Vector

Represents coordinates in a Cartesian coordinate system. In the context of robotics, imagine to face the machine's front: the system's origin is the bottom left corner next to you. ``` z ↑ y | ↗ └ - → x ```

Decorators
dataclasses.dataclass

Methods

  • __init__(self, x : Decimal, y : Decimal, z : Decimal) -> None

    Parameters

    • Name
      self
      Type
      Default
      Description

    • Name
      x
      Type
      Decimal
      Default
      Description

      The x coordinate.

    • Name
      y
      Type
      Decimal
      Default
      Description

      The y coordinate.

    • Name
      z
      Type
      Decimal
      Default
      Description

      The z coordinate.

  • copy(self) -> Vector

    Returns a new Vector that is a copy of the current Vector.

    Response

    Type
    Vector
    Description

    A new Vector with the same x, y, and z values as the original Vector.

  • update(self, x : typing.Optional[Number], y : typing.Optional[Number], z : typing.Optional[Number]) -> Vector

    Returns a new Vector with the provided coordinate updates.

    Parameters

    • Name
      self
      Type
      Default
      Description

    • Name
      x
      Type
      typing.Optional[Number]
      Default
      = None
      Description

    • Name
      y
      Type
      typing.Optional[Number]
      Default
      = None
      Description

    • Name
      z
      Type
      typing.Optional[Number]
      Default
      = None
      Description

    Response

    Type
    Vector
    Description

    A new Vector with the updated or same x, y, and z values as the

  • __add__(self, other : typing.Union[Number, Vector]) -> Vector

    Parameters

    • Name
      self
      Type
      Default
      Description

    • Name
      other
      Type
      typing.Union[Number, Vector]
      Default
      Description

    Response

    Type
    Vector
    Description

  • __radd__(self, other : typing.Union[Number, Vector]) -> Vector

    Parameters

    • Name
      self
      Type
      Default
      Description

    • Name
      other
      Type
      typing.Union[Number, Vector]
      Default
      Description

    Response

    Type
    Vector
    Description

  • __iadd__(self, other : typing.Union[Number, Vector]) -> Vector

    Parameters

    • Name
      self
      Type
      Default
      Description

    • Name
      other
      Type
      typing.Union[Number, Vector]
      Default
      Description

    Response

    Type
    Vector
    Description

  • __sub__(self, other : typing.Union[Number, Vector]) -> Vector

    Parameters

    • Name
      self
      Type
      Default
      Description

    • Name
      other
      Type
      typing.Union[Number, Vector]
      Default
      Description

    Response

    Type
    Vector
    Description

  • __rsub__(self, other : typing.Union[Number, Vector]) -> Vector

    Parameters

    • Name
      self
      Type
      Default
      Description

    • Name
      other
      Type
      typing.Union[Number, Vector]
      Default
      Description

    Response

    Type
    Vector
    Description

  • __isub__(self, other : typing.Union[Number, Vector]) -> Vector

    Parameters

    • Name
      self
      Type
      Default
      Description

    • Name
      other
      Type
      typing.Union[Number, Vector]
      Default
      Description

    Response

    Type
    Vector
    Description

  • __mul__(self, other : typing.Union[Number, Vector]) -> Vector

    Parameters

    • Name
      self
      Type
      Default
      Description

    • Name
      other
      Type
      typing.Union[Number, Vector]
      Default
      Description

    Response

    Type
    Vector
    Description

  • __rmul__(self, other : typing.Union[Number, Vector]) -> Vector

    Parameters

    • Name
      self
      Type
      Default
      Description

    • Name
      other
      Type
      typing.Union[Number, Vector]
      Default
      Description

    Response

    Type
    Vector
    Description

  • __imul__(self, other : typing.Union[Number, Vector]) -> Vector

    Parameters

    • Name
      self
      Type
      Default
      Description

    • Name
      other
      Type
      typing.Union[Number, Vector]
      Default
      Description

    Response

    Type
    Vector
    Description

  • __truediv__(self, other : typing.Union[Number, Vector]) -> Vector

    Parameters

    • Name
      self
      Type
      Default
      Description

    • Name
      other
      Type
      typing.Union[Number, Vector]
      Default
      Description

    Response

    Type
    Vector
    Description

  • __rtruediv__(self, other : typing.Union[Number, Vector]) -> Vector

    Parameters

    • Name
      self
      Type
      Default
      Description

    • Name
      other
      Type
      typing.Union[Number, Vector]
      Default
      Description

    Response

    Type
    Vector
    Description

  • __itruediv__(self, other : typing.Union[Number, Vector]) -> Vector

    Parameters

    • Name
      self
      Type
      Default
      Description

    • Name
      other
      Type
      typing.Union[Number, Vector]
      Default
      Description

    Response

    Type
    Vector
    Description

  • __bool__(self) -> bool

    Response

    Type
    bool
    Description

Attributes

  • Name
    x
    Type
    Decimal
    Value

    = dataclasses.field(metadata={'marshmallow_field': DecimalField()}, default=Decimal(default=0))

    Description

  • Name
    y
    Type
    Decimal
    Value

    = dataclasses.field(metadata={'marshmallow_field': DecimalField()}, default=Decimal(default=0))

    Description

  • Name
    z
    Type
    Decimal
    Value

    = dataclasses.field(metadata={'marshmallow_field': DecimalField()}, default=Decimal(default=0))

    Description

Copyright © 2024