Engine API Reference - v2.9.1
    Preparing search index...

    Class PoseAlpha

    Represents a pose in 3D space, including position and rotation.

    Index

    Constructors

    • Alpha

      Creates a new Pose instance.

      Parameters

      • Optionalposition: Vec3 = Vec3.ZERO

        The position of the pose.

      • Optionalangles: Vec3 = Vec3.ZERO

        The angles of the pose in degrees.

      • Optionaldistance: number = 0

        The focus distance from the position to the pose.

      Returns Pose

    Properties

    angles: Vec3 = ...

    The angles of the pose in degrees calculated from the forward vector.

    distance: number = 0

    The focus distance from the position to the pose.

    pitchRange: Vec2 = ...
    position: Vec3 = ...

    The position of the pose.

    xRange: Vec2 = ...
    yawRange: Vec2 = ...
    yRange: Vec2 = ...
    zRange: Vec2 = ...

    Methods

    • Alpha

      Checks if this pose is approximately equal to another pose within a given epsilon.

      Parameters

      • other: Pose

        The pose to compare with.

      • Optionalepsilon: number = 1e-6

        The tolerance for comparison.

      Returns boolean

      True if the poses are approximately equal, false otherwise.

    • Alpha

      Gets the focus point of the pose, which is the position plus the forward vector scaled by the distance.

      Parameters

      • Optionalout: Vec3

        The output vector to store the focus point.

      Returns Vec3

      The focus point of the pose.

    • Alpha

      Lerps between two poses based on the given alpha values.

      Parameters

      • lhs: Pose

        The left-hand side pose.

      • rhs: Pose

        The right-hand side pose.

      • alpha1: number

        The alpha value for position interpolation.

      • Optionalalpha2: number = alpha1

        The alpha value for angles interpolation.

      • Optionalalpha3: number = alpha1

        The alpha value for distance interpolation.

      Returns Pose

      The updated Pose instance.

    • Alpha

      Sets the position and rotation of the pose.

      Parameters

      • position: Vec3

        The new position.

      • angles: Vec3

        The new angles in degrees.

      • distance: number

        The new focus distance.

      Returns Pose

      The updated Pose instance.