open class Pose(var t: Vector3 = Vector3(0f, 0f, 0f), var q: Quaternion = Quaternion(1.0f, 0f, 0f, 0f))
Pose
(
t
, q
)
|
Signature
constructor(t: Vector3 = Vector3(0f, 0f, 0f), q: Quaternion = Quaternion(1.0f, 0f, 0f, 0f)) Parameters Returns |
q
: Quaternion
[Get][Set] |
The orientation quaternion of the pose.
Signature
open var q: Quaternion |
t
: Vector3
[Get][Set] |
The position vector of the pose.
Signature
open var t: Vector3 |
component1
()
|
Signature
operator fun component1(): Vector3 Returns |
component2
()
|
Signature
operator fun component2(): Quaternion Returns |
copy
()
| |
equals
(
other
)
|
Signature
open operator override fun equals(other: Any?): Boolean Parameters
other:
Any?
Returns
Boolean
|
forward
()
|
Calculates the forward direction vector of this pose.
Signature
fun forward(): Vector3 |
hashCode
()
|
Signature
open override fun hashCode(): Int Returns
Int
|
inverse
()
| |
isWithinAngle
(
other
, angleRadians
)
|
Checks if the rotation of this pose is within a specified angular distance of another pose's rotation.
This method uses the industry-standard approach for comparing quaternion orientations: computing the angular distance between the two rotations using the dot product. It correctly handles the q vs -q equivalence (both represent the same rotation).
Signature
fun isWithinAngle(other: Pose, angleRadians: Float): Boolean Parameters
angleRadians:
Float
Returns
Boolean
|
isWithinAngleDegrees
(
other
, angleDegrees
)
|
Checks if the rotation of this pose is within a specified angular distance of another pose's rotation.
This method uses the industry-standard approach for comparing quaternion orientations: computing the angular distance between the two rotations using the dot product. It correctly handles the q vs -q equivalence (both represent the same rotation).
Signature
fun isWithinAngleDegrees(other: Pose, angleDegrees: Float): Boolean Parameters
angleDegrees:
Float
Returns
Boolean
|
isWithinDistance
(
other
, distance
)
|
Checks if the position of this pose is within a specified Euclidean distance of another pose's position.
This is the recommended approach for position-based proximity checks in VR/AR applications.
Signature
fun isWithinDistance(other: Pose, distance: Float): Boolean Parameters
distance:
Float
Returns
Boolean
|
lerp
(
dest
, ratio
)
| |
removePitchAndRoll
()
|
Removes the pitch and roll components from this pose, effectively aligning it with the up vector.
Signature
fun removePitchAndRoll(): Pose |
right
()
|
Calculates the right direction vector of this pose.
Signature
fun right(): Vector3 |
times
(
p
)
| |
times
(
v
)
| |
toString
()
|
Provides a string representation of the pose.
Signature
open override fun toString(): String Returns
String
|
up
()
|
Calculates the up direction vector of this pose.
Signature
fun up(): Vector3 |