public interface CameraModel extends NamedModelElement
NodeModel| Modifier and Type | Method and Description |
|---|---|
float[] |
computeProjectionMatrix(float[] result,
java.lang.Float aspectRatio)
Compute the projection matrix for this camera.
|
java.util.function.Supplier<float[]> |
createProjectionMatrixSupplier(java.util.function.DoubleSupplier aspectRatioSupplier)
Create the supplier of the projection matrix for this camera model.
|
CameraOrthographicModel |
getCameraOrthographicModel()
Returns the
CameraOrthographicModel, or null if
this is a perspective camera |
CameraPerspectiveModel |
getCameraPerspectiveModel()
Returns the
CameraPerspectiveModel, or null if
this is an orthographic camera |
getNamegetExtensions, getExtrasCameraOrthographicModel getCameraOrthographicModel()
CameraOrthographicModel, or null if
this is a perspective cameraCameraOrthographicModelCameraPerspectiveModel getCameraPerspectiveModel()
CameraPerspectiveModel, or null if
this is an orthographic cameraCameraPerspectiveModelfloat[] computeProjectionMatrix(float[] result,
java.lang.Float aspectRatio)
null or does
not have a length of 16, then a new array with length 16 will be
created and returned.result - The result arrayaspectRatio - An optional aspect ratio that should be used.
If this is null, then the aspect ratio of the
camera will be used.java.util.function.Supplier<float[]> createProjectionMatrixSupplier(java.util.function.DoubleSupplier aspectRatioSupplier)
CameraModel was
created for is neither "perspective" nor
"orthographic",
then the supplier will print an error message and return
the identity matrix.aspectRatioSupplier - The optional supplier for the aspect
ratio of the camera. If this is null, then the
aspect ratio of the camera will be used.Copyright © 2022. All Rights Reserved.