API reference
API reference
Select your platform
No SDKs available
No versions available

Pose Class

Modifiers: open
Represents a pose in 3D space, which includes a position and an orientation.

Signature

open class Pose(var t: Vector3 = Vector3(0f, 0f, 0f), var q: Quaternion = Quaternion(1.0f, 0f, 0f, 0f))

Constructors

Pose ( t , q ) : Pose
Signature
constructor(t: Vector3 = Vector3(0f, 0f, 0f), q: Quaternion = Quaternion(1.0f, 0f, 0f, 0f))
Parameters
The position vector of the pose.
The orientation quaternion of the pose.
Returns

Properties

[Get][Set]
The orientation quaternion of the pose.
Signature
open var q: Quaternion
[Get][Set]
The position vector of the pose.
Signature
open var t: Vector3

Functions

component1 () : Vector3
Signature
operator fun component1(): Vector3
Returns
component2 () : Quaternion
Signature
operator fun component2(): Quaternion
Returns
copy () : Pose
Returns a copy of this pose.
Signature
fun copy(): Pose
Returns
A copy of this pose.
equals ( other ) : Boolean
Signature
open operator override fun equals(other: Any?): Boolean
Parameters
other: Any?
Returns
Boolean
forward () : Vector3
Calculates the forward direction vector of this pose.
Signature
fun forward(): Vector3
Returns
The forward vector.
hashCode () : Int
Signature
open override fun hashCode(): Int
Returns
Int
inverse () : Pose
Computes the inverse of this pose.
Signature
fun inverse(): Pose
Returns
The inverse pose.
lerp ( dest , ratio ) : Pose
Interpolates between this pose and another pose.
Signature
fun lerp(dest: Pose, ratio: Float): Pose
Parameters
dest: Pose
The destination pose to interpolate towards.
ratio: Float
The interpolation ratio.
Returns
The interpolated pose.
removePitchAndRoll () : Pose
Removes the pitch and roll components from this pose, effectively aligning it with the up vector.
Signature
fun removePitchAndRoll(): Pose
Returns
A new pose with pitch and roll removed.
right () : Vector3
Calculates the right direction vector of this pose.
Signature
fun right(): Vector3
Returns
The right vector.
times ( p ) : Pose
Multiplies this pose with another pose.
Signature
inline operator fun times(p: Pose): Pose
Parameters
p: Pose
The other pose to multiply with.
Returns
A new pose resulting from the multiplication.
times ( v ) : Vector3
Multiplies this pose with a vector.
Signature
inline operator fun times(v: Vector3): Vector3
Parameters
The vector to multiply with.
Returns
The transformed vector.
toString () : String
Provides a string representation of the pose.
Signature
open override fun toString(): String
Returns
String
A string that represents the pose.
up () : Vector3
Calculates the up direction vector of this pose.
Signature
fun up(): Vector3
Returns
The up vector.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon