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.
|
float[] |
computeViewMatrix(float[] result)
Compute the view 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.
|
java.util.function.Supplier<float[]> |
createViewMatrixSupplier()
Create the supplier of the view matrix for this camera model.
|
java.lang.String |
getInstanceName()
Returns the name of this camera model instance, suitable to be shown
to a user.
|
NodeModel |
getNodeModel()
Returns the
NodeModel that the camera is attached to |
getNamejava.lang.String getInstanceName()
name, this method
will return a string that also contains information about the node
that this camera instance is attached to.NodeModel getNodeModel()
NodeModel that the camera is attached toNodeModelfloat[] computeViewMatrix(float[] result)
null or does
not have a length of 16, then a new array with length 16 will be
created and returned.result - The result arrayfloat[] 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[]> createViewMatrixSupplier()
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.