public classEye

Describes the stereoscopic rendering details of an eye.

Nested Classes

classEye.Type Defines the constants identifying the current eye type.

Public Constructors

Eye(int type)

Public Methods

float[] getEyeView()
FieldOfView getFov()
float[] getPerspective(float zNear, float zFar)
boolean getProjectionChanged()
int getType()
Viewport getViewport()
void setProjectionChanged()

Inherited Methods

From class java.lang.Object

Public Constructors

publicEye(int type)

Creates a new set of eye parameters.

Parameters
type One of theEye.Typeconstants describing the eye this object refers to. Behavior is undefined if an invalid eye constant is provided.

Public Methods

public float[]getEyeView()

Returns a matrix that transforms from the camera to the current eye.

This matrix should premultiply the camera matrix.

Assumes a scale of 1 world unit = 1 meter when applying the interpupillary distance. If this not your case, make sure to callandroid.opengl.Matrix.scaleMon this matrix to correct it.

The transformation includes head tracking rotation, position shift and interpupillary distance shift. Use this if you just want to get an eye view from your normal view.

Returns
  • A 4x4 column-major representing the transformation from the camera to this eye.

publicFieldOfViewgetFov()

Returns the field of view for this eye.

Use thegetFov().toPerspectiveMatrixmethod to generate the appropriate perspective projection matrix to use.

Returns
  • The field of view for this eye.

public float[]getPerspective(float zNear, float zFar)

Convenience method that returns the perspective projection matrix for this eye.

CallsgetFov().toPerspectiveMatrixto generate the perspective matrix to use.

Parameters
zNear Near Z plane to use in the projection.
zFar Far Z plane to use in the projection.
Returns
  • A 4x4 column-major matrix representing the perspective projection for this eye.

public booleangetProjectionChanged()

Whether the projection matrix is stale and should be recomputed.

Returns
  • true if projection matrix is stale, false otherwise

public intgetType()

Returns the eye type this object refers to.

Returns
  • The current eye as one of theEye.Typeconstants.

publicViewportgetViewport()

Returns the viewport for this eye.

Returns
  • Viewport to use when rendering this eye.

public voidsetProjectionChanged()

Forces to clean up any cached projection matrices.

Called by the framework when projection parameters change between frames. Should be called if the eye's field of view object returned bygetFov()is changed.

更多相关文章

  1. 代码中设置drawableleft
  2. android 3.0 隐藏 系统标题栏
  3. Android开发中activity切换动画的实现
  4. Android(安卓)学习 笔记_05. 文件下载
  5. Android中直播视频技术探究之—摄像头Camera视频源数据采集解析
  6. 技术博客汇总
  7. android 2.3 wifi (一)
  8. AndRoid Notification的清空和修改
  9. Android中的Chronometer

随机推荐

  1. Android(安卓)IPC机制(二)——利用Messenge
  2. 【转载】Android事件分发机制完全解析,带
  3. Android(安卓)图片预览器加载微博长图,大
  4. [置顶] 声波通信(声波传输)在iOS、Android
  5. 禁止android进去休眠状态
  6. Android 定时器大全
  7. Android下编译OpenSSL静态库
  8. Android学习--摘录
  9. Android studio 下拉刷新,加载更多使用Loa
  10. android的Support Library