setEyeModelMatrix

actual fun setEyeModelMatrix(eyeId: Int, modelMatrix: DoubleArray)

Set the position of an individual eye relative to the camera (head) space.

By default, both eyes' transforms are identity.

Example: position Eye 0 3cm left, Eye 1 3cm right:

camera.setEyeModelMatrix(0, floatArrayOf(-0.03f, 0f, 0f, ...)) // left eye
camera.setEyeModelMatrix(1, floatArrayOf(0.03f, 0f, 0f, ...)) // right eye

Call setModelMatrix to update the head position, not this method per-frame.

Parameters

eyeId

Eye index (must be < stereoscopicEyeCount)

modelMatrix

4×4 model matrix for this eye relative to camera space

expect fun setEyeModelMatrix(eyeId: Int, modelMatrix: DoubleArray)

Set the position of an individual eye relative to the camera (head) space.

By default, both eyes' transforms are identity.

Example: position Eye 0 3cm left, Eye 1 3cm right:

camera.setEyeModelMatrix(0, floatArrayOf(-0.03f, 0f, 0f, ...)) // left eye
camera.setEyeModelMatrix(1, floatArrayOf(0.03f, 0f, 0f, ...)) // right eye

Call setModelMatrix to update the head position, not this method per-frame.

Parameters

eyeId

Eye index (must be < stereoscopicEyeCount)

modelMatrix

4×4 model matrix for this eye relative to camera space

actual fun setEyeModelMatrix(eyeId: Int, modelMatrix: DoubleArray)

Set the position of an individual eye relative to the camera (head) space.

By default, both eyes' transforms are identity.

Example: position Eye 0 3cm left, Eye 1 3cm right:

camera.setEyeModelMatrix(0, floatArrayOf(-0.03f, 0f, 0f, ...)) // left eye
camera.setEyeModelMatrix(1, floatArrayOf(0.03f, 0f, 0f, ...)) // right eye

Call setModelMatrix to update the head position, not this method per-frame.

Parameters

eyeId

Eye index (must be < stereoscopicEyeCount)

modelMatrix

4×4 model matrix for this eye relative to camera space

actual fun setEyeModelMatrix(eyeId: Int, modelMatrix: DoubleArray)

Set the position of an individual eye relative to the camera (head) space.

By default, both eyes' transforms are identity.

Example: position Eye 0 3cm left, Eye 1 3cm right:

camera.setEyeModelMatrix(0, floatArrayOf(-0.03f, 0f, 0f, ...)) // left eye
camera.setEyeModelMatrix(1, floatArrayOf(0.03f, 0f, 0f, ...)) // right eye

Call setModelMatrix to update the head position, not this method per-frame.

Parameters

eyeId

Eye index (must be < stereoscopicEyeCount)

modelMatrix

4×4 model matrix for this eye relative to camera space

actual fun setEyeModelMatrix(eyeId: Int, modelMatrix: DoubleArray)

Set the position of an individual eye relative to the camera (head) space.

By default, both eyes' transforms are identity.

Example: position Eye 0 3cm left, Eye 1 3cm right:

camera.setEyeModelMatrix(0, floatArrayOf(-0.03f, 0f, 0f, ...)) // left eye
camera.setEyeModelMatrix(1, floatArrayOf(0.03f, 0f, 0f, ...)) // right eye

Call setModelMatrix to update the head position, not this method per-frame.

Parameters

eyeId

Eye index (must be < stereoscopicEyeCount)

modelMatrix

4×4 model matrix for this eye relative to camera space