Google cardBoard Android API (十二):HeadTransform
来源:互联网 发布:highlight.js下载 编辑:程序博客网 时间:2024/05/29 02:58
Describes the head transform independently of any eye parameters.
Public Constructors
Public Methods
Inherited Methods
Public Constructors
public HeadTransform ()
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:
- Pitch (X axis): [-pi/2, pi/2]
- Yaw (Y axis): [-pi, pi]
- Roll (Z axis): [-pi, pi]
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
Throws
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
Throws
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
Throws
public void getQuaternion (float[] quaternion, int offset)
Provides the quaternion representing the head rotation.
Parameters
Throws
public void getRightVector (float[] right, int offset)
Provides the rightwards direction of the head as a 3x1 unit vector.
Parameters
Throws
public void getTranslation (float[] translation, int offset)
Provides the relative translation of the head as a 3x1 vector.
Parameters
Throws
public void getUpVector (float[] up, int offset)
Provides the upwards direction of the head as a 3x1 unit vector.
Parameters
Throws
- Google cardBoard Android API (十二):HeadTransform
- Google cardBoard Android API (一):CardboardActivity
- Google cardBoard Android API (二):CardboardDeviceParams
- Google cardBoard Android API (三):CardboardView
- Google cardBoard Android API (四):Constants
- Google cardBoard Android API (五):Distortion
- Google cardBoard Android API (六):DistortionRenderer
- Google cardBoard Android API (七):Eye
- Google cardBoard Android API (八):Eye.Type
- Google cardBoard Android API (九):FieldOfView
- Google cardBoard Android API (十):HeadMountedDisplay
- Google cardBoard Android API (十一):HeadMountedDisplayManager
- Google cardBoard Android API (十三):ScreenParams
- Google cardBoard Android API (十四):ViewPort
- Google cardBoard Android API (十五):两个接口中的CardboardView.Renderer
- Google cardBoard Android API (十六):两个接口中的CardboardView.StereoRenderer
- Google cardBoard Android API (十七):Enums--CardboardDeviceParams.VerticalAlignmentType
- Google cardBoard Android的两个jar包,以及Demo
- 2016年3月21日
- mongodb group 查询
- Describe major crisis
- MySQL参数--init-file
- 关于IDEA的maven没有artifacts的解决方法
- Google cardBoard Android API (十二):HeadTransform
- 微信公众帐号开发教程第1篇-引言
- 构建可穿戴应用程序
- oracle 数据库 查询结构拼接输出到本地文件
- 职业发展困惑
- 读取文件并找出年龄最大的N个人-兰亭集市笔试题
- response.getWriter().write("中文");乱码问题
- 敏捷开发12原则新理解
- ExtJs4.2.1中的Ext.grid.GridPanel选择行回车事件