Stay organized with collections Save and categorize content based on your preferences.
Describes the head transform independently of any eye parameters.
Public Constructors Public Methods void getEulerAngles(float[] eulerAngles, int offset)
Provides the Euler angles representation of the head rotation.
void getForwardVector(float[] forward, int offset)
Provides the direction the head is looking towards as a 3x1 unit vector.
void getHeadView(float[] headView, int offset)
A matrix representing the transform from the camera to the head.
void getQuaternion(float[] quaternion, int offset)
Provides the quaternion representing the head rotation.
void getRightVector(float[] right, int offset)
Provides the rightwards direction of the head as a 3x1 unit vector.
void getTranslation(float[] translation, int offset)
Provides the relative translation of the head as a 3x1 vector.
void getUpVector(float[] up, int offset)
Provides the upwards direction of the head as a 3x1 unit vector.
Inherited Methods From class java.lang.Object boolean final Class<?>getClass()
inthashCode()
final voidnotify()
final voidnotifyAll()
StringtoString()
final voidwait(long arg0, int arg1)
final voidwait(long arg0)
final voidwait()
Public Constructors Public Methods public void getEulerAngles (float[] eulerAngles, int offset)Provides the Euler angles representation of the head rotation.
Use of Euler angles is discouraged as they might be subject to Gimbal lock situations. Use quaternions or rotation matrices instead whenever possible.
The provided values represent the viewport rotation as pitch, yaw and roll angles where the matrix R = Rz(roll) * Rx(pitch) * Ry(yaw) represents the full rotation. This rotation matrix order ensures both yaw and roll are in the full [-pi, pi] interval.
The angles are provided in radians, in this order and within the following intervals:
The X-Y-Z axes are the basis of a right-handed OpenGL-style coordinate system. During Gimbal lock this method enforces yaw to 0 and provides a valid roll angle.
Parameters eulerAngles Array where the 3 angles will be written to. offset Offset in the array where data should be written. public void getForwardVector (float[] forward, int offset)Provides the direction the head is looking towards as a 3x1 unit vector.
Note that in OpenGL the forward vector points into the -Z direction. Make sure to invert it if ever used to compute the basis of a right-handed system.
Parameters forward Array where the forward vector will be written to. offset Offset in the array where data should be written. public void getHeadView (float[] headView, int offset)A matrix representing the transform from the camera to the head.
Head origin is defined as the center point between the two eyes.
Parameters headView Array where the 4x4 column-major transformation matrix will be written to. offset Offset in the array where data should be written. public void getQuaternion (float[] quaternion, int offset)Provides the quaternion representing the head rotation.
Parameters quaternion Array where the quaternion (x, y, z, w) will be written to. offset Offset in the array where data should be written. public void getRightVector (float[] right, int offset)Provides the rightwards direction of the head as a 3x1 unit vector.
Parameters right Array where the right vector will be written to. offset Offset in the array where data should be written. public void getTranslation (float[] translation, int offset)Provides the relative translation of the head as a 3x1 vector.
Parameters translation Array where the translation vector will be written to. offset Offset in the array where data should be written. public void getUpVector (float[] up, int offset)Provides the upwards direction of the head as a 3x1 unit vector.
Parameters up Array where the up vector will be written to. offset Offset in the array where data should be written.All rights reserved. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-09 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-09 UTC."],[[["`HeadTransform` describes the head's position and orientation in 3D space, independent of eye parameters."],["It provides methods to access head rotation as Euler angles, quaternion, and a 4x4 head view matrix."],["It also provides methods to access the head's forward, right, up, and translation vectors as 3x1 vectors."],["Euler angle usage is discouraged due to potential Gimbal lock issues; quaternions or rotation matrices are preferred."],["The forward vector in OpenGL points towards -Z, requiring inversion for right-handed systems."]]],["The `HeadTransform` class provides methods to access head orientation and position data. Key actions include retrieving the head's rotation via `getEulerAngles` or `getQuaternion`, obtaining directional vectors such as `getForwardVector`, `getRightVector`, and `getUpVector`. Additionally, it supplies `getHeadView` to get a matrix for camera-to-head transformation and `getTranslation` to determine the head's relative position. Each method writes results into a provided float array at a specified offset.\n"]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4