@openhps/core
    Preparing search index...

    Class Pose

    Position and orientation.

    In computer vision and robotics, a typical task is to identify specific objects in an image and to determine each object's position and orientation relative to some coordinate system. This information can then be used, for example, to allow a robot to manipulate an object or to avoid moving into the object. The combination of position and orientation is referred to as the pose of an object, even though this concept is sometimes used only to describe the orientation. Exterior orientation and translation are also used as synonyms of pose.

    Hierarchy (View Summary)

    Implements

    Index
    • Creates an identity matrix.

      Returns Pose

    • Creates a 4x4 matrix with the given arguments in row-major order.

      Parameters

      • n11: number
      • n12: number
      • n13: number
      • n14: number
      • n21: number
      • n22: number
      • n23: number
      • n24: number
      • n31: number
      • n32: number
      • n33: number
      • n34: number
      • n41: number
      • n42: number
      • n43: number
      • n44: number

      Returns Pose

    elements: Matrix4Tuple

    Array with matrix values.

    [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]
    
    isMatrix4: true
    timestamp: number = ...

    Position recording timestamp

    unit: LengthUnit = LengthUnit.METER

    Position unit

    • Sets this matrix to the transformation composed of translation, rotation and scale.

      Parameters

      • position: Vector3
      • quaternion: Quaternion
      • scale: Vector3

      Returns this

    • Parameters

      • m: Matrix4

      Returns this

    • Parameters

      • m: Matrix4

      Returns this

    • Decomposes this matrix into it's position, quaternion and scale components.

      Parameters

      • position: Vector3
      • quaternion: Quaternion
      • scale: Vector3

      Returns this

    • Check if this position equals another position

      Parameters

      • matrix: Matrix4

        Other position

      Returns boolean

    • Parameters

      • xAxis: Vector3
      • yAxis: Vector3
      • zAxis: Vector3

      Returns this

    • Copies the rotation component of the supplied matrix m into this matrix rotation component.

      Parameters

      • m: Matrix4

      Returns this

    • Sets the values of this matrix from the provided array or array-like.

      Parameters

      • array: ArrayLike<number>

        the source array or array-like.

      • Optionaloffset: number

        (optional) offset into the array-like. Default is 0.

      Returns this

    • Returns number

    • Resets this matrix to identity.

      Returns this

    • Inverts this matrix.

      Returns this

    • Sets the rotation component of the transformation matrix, looking from [eye]Vector3 towards [target]Vector3, and oriented by the up-direction [up]Vector3.

      Parameters

      • eye: Vector3
      • target: Vector3
      • up: Vector3

      Returns this

    • Parameters

      • xAxis: Vector3
      • yAxis: Vector3
      • zAxis: Vector3

      Returns this

    • Creates an orthographic projection matrix.

      Parameters

      • left: number
      • right: number
      • top: number
      • bottom: number
      • near: number
      • far: number
      • OptionalcoordinateSystem: CoordinateSystem

      Returns this

    • Creates a perspective projection matrix.

      Parameters

      • left: number
      • right: number
      • top: number
      • bottom: number
      • near: number
      • far: number
      • OptionalcoordinateSystem: CoordinateSystem

      Returns this

    • Parameters

      • euler: Euler

      Returns this

    • Parameters

      • q: Quaternion

      Returns this

    • Sets this matrix as rotation transform around x axis by theta radians.

      Parameters

      • theta: number

        Rotation angle in radians.

      Returns this

    • Sets this matrix as rotation transform around y axis by theta radians.

      Parameters

      • theta: number

        Rotation angle in radians.

      Returns this

    • Sets this matrix as rotation transform around z axis by theta radians.

      Parameters

      • theta: number

        Rotation angle in radians.

      Returns this

    • Sets this matrix as scale transform.

      Parameters

      • x: number
      • y: number
      • z: number

      Returns this

    • Sets this matrix as shear transform.

      Parameters

      • xy: number
      • xz: number
      • yx: number
      • yz: number
      • zx: number
      • zy: number

      Returns this

    • Sets this matrix as translation transform.

      Parameters

      • v: Vector3

      Returns this

    • Sets this matrix as translation transform.

      Parameters

      • x: number
      • y: number
      • z: number

      Returns this

    • Multiplies this matrix by m.

      Parameters

      • m: Matrix4

      Returns this

    • Sets this matrix to a x b.

      Parameters

      • a: Matrix4
      • b: Matrix4

      Returns this

    • Multiplies this matrix by s.

      Parameters

      • s: number

      Returns this

    • Parameters

      • m: Matrix4

      Returns this

    • Multiplies the columns of this matrix by vector v.

      Parameters

      • v: Vector3

      Returns this

    • Sets all fields of this matrix.

      Parameters

      • n11: number
      • n12: number
      • n13: number
      • n14: number
      • n21: number
      • n22: number
      • n23: number
      • n24: number
      • n31: number
      • n32: number
      • n33: number
      • n34: number
      • n41: number
      • n42: number
      • n43: number
      • n44: number

      Returns this

    • Set the upper 3x3 elements of this matrix to the values of the Matrix3 m.

      Parameters

      • m: Matrix3

      Returns this

    • Sets the position component for this matrix from vector v.

      Parameters

      • v: Vector3

      Returns this

    • Sets the position component for this matrix from vector v.

      Parameters

      • x: number
      • y: number
      • z: number

      Returns this

    • Writes the elements of this matrix to an array in column-major format.

      Returns Matrix4Tuple

    • Writes the elements of this matrix to an array in column-major format.

      Type Parameters

      • TArray extends ArrayLike<number>

      Parameters

      • array: TArray

        array to store the resulting vector in.

      • Optionaloffset: number

        (optional) offset in the array at which to put the result.

      Returns TArray

    • Transposes this matrix.

      Returns this