Camera
Complete API reference for Camera, including constructors, attributes, virtual attributes, and methods.
Package: JAVARuntime
Category: Rendering
Component: yes
public class Camera extends Component
Constructors
| Signature | Description |
|---|---|
Camera(Camera) | Executes Camera and returns after the underlying engine call finishes. |
Camera() | Creates a new instance of Camera. |
Attributes
| Name | Type | Description |
|---|---|---|
PROJECTION_3D | int | Represents the PROJECTION_3D value stored on this instance. Read or assign to update the property. |
PROJECTION_2D | int | Represents the PROJECTION_2D value stored on this instance. Read or assign to update the property. |
BACKGROUND_SKYBOX | int | Represents the BACKGROUND_SKYBOX value stored on this instance. Read or assign to update the property. |
BACKGROUND_ALPHA | int | Represents the BACKGROUND_ALPHA value stored on this instance. Read or assign to update the property. |
instance | Camera | Represents the instance value stored on this instance. Read or assign to update the property. |
Virtual Attributes
| Name | Type | Access | Description |
|---|---|---|---|
background | int | get/set | Returns the camera's background mode (Skybox or Alpha). |
farPlane | float | get | Returns the camera's far plane. |
fixedResolutionPixelsHeight | int | get/set | Returns the fixed resolution height in pixels. |
fixedResolutionPixelsWidth | int | get/set | Returns the fixed resolution width in pixels. |
fov | float | get/set | Returns the camera's field of view (FOV). |
frameBuffer | FrameBuffer | get | Returns the current framebuffer of the camera. |
freeResolutionPixels | int | get/set | Returns the pixel resolution used when in free resolution mode. |
frustumMatrix | float[] | get | Returns the view frustum matrix. |
hierarchyCameraMatrix | float[] | get | Returns the hierarchical camera matrix. |
imageHeight | int | get | Returns the image height in pixels. |
imageRatio | float | get | Returns the aspect ratio of the image. |
imageWidth | int | get | Returns the image width in pixels. |
inverseFrustumMatrix | float[] | get | Returns the inverse view frustum matrix. |
inverseViewMatrix | float[] | get | Returns the inverse view matrix. |
layer | int | get/set | Returns the camera's rendering layer. |
minimalDistance | float | get/set | Returns the minimal render distance. |
nearPlane | float | get | Returns the camera's near plane. |
objectFilter | CameraObjectFilter | get/set | Returns the object filter applied to the camera. |
orthoDiameter | float | get/set | Returns the diameter of the orthographic projection (2D). |
projection | int | get/set | Returns the camera's projection mode (2D or 3D). |
rectHeight | float | get/set | Returns the height of the camera's Rect. |
rectPosX | float | get/set | Returns the X position of the camera's Rect. |
rectPosY | float | get/set | Returns the Y position of the camera's Rect. |
rectWidth | float | get/set | Returns the width of the camera's Rect. |
renderCameraDirection | Vector3 | get | Returns the camera's render direction. |
renderCameraPosition | Vector3 | get | Returns the camera's render position. |
renderDistance | float | get/set | Returns the camera's render distance. |
renderPercentage | float | get/set | Returns the camera's render resolution percentage. |
resolutionMode | ResolutionMode | get/set | Returns the camera's resolution mode. |
scaledRectHeight | float | get | Returns the height scale of the camera's Rect. |
scaledRectPosX | float | get | Returns the X position scale of the camera's Rect. |
scaledRectPosY | float | get | Returns the Y position scale of the camera's Rect. |
scaledRectWidth | float | get | Returns the width scale of the camera's Rect. |
Methods
| Signature | Returns | Description |
|---|---|---|
getInternalFiltering() | InternalFiltering | Returns the internal filtering controller, used to check if the camera should render specific objects. Useful for custom rendering and shaders. |
worldToScreenCoordinates(Vector3) | Point2 | Converts a world position to screen coordinates. |
screenPointRay(int, int) | RayDirection | Returns a ray that originates from the camera and points toward the specified coordinates. |
screenPointRay(Point2) | RayDirection | Returns a ray that originates from the camera and points toward the specified Point2. |
screenPointRay(float, float) | RayDirection | Returns a ray that originates from the camera and points toward the specified coordinates. |
screenPointRay(Vector2) | RayDirection | Returns a ray that originates from the camera and points toward the specified Vector2. |
screenPointNormal(int, int) | Vector3 | Returns the camera's normal vector at the position of the specified coordinates. |
screenPointNormal(Point2) | Vector3 | Returns the camera's normal vector at the position of the specified Point2. |
screenPointNormal(float, float) | Vector3 | Returns the camera's normal vector at the position of the specified coordinates. |
screenPointNormal(Vector2) | Vector3 | Returns the camera's normal vector at the position of the specified Vector2. |
takeScreenShot(String, String) | void | Takes a screenshot and saves it to the specified folder and filename. |
takeScreenShot(String, String, boolean) | void | Takes a screenshot and saves it to the specified folder and filename. If 'bypassFileChecking' is false, verifies if the location exists and is accessible before saving. |
takeScreenShot(File, String) | void | Takes a screenshot and saves it to the specified folder and filename. |
isVisible(ModelRenderer) | boolean | Checks if a model is visible in the camera's view. |
isVisible(Vertex, SpatialObject) | boolean | Checks if a vertex is visible in a specified SpatialObject within the camera's view. |
isVisible(Vertex, Transform) | boolean | Checks if a vertex is visible at the position of a specified Transform in the camera's view. |
isVisible(Vertex, float[]) | boolean | Checks if a vertex is visible in the specified render matrix within the camera's view. |
isSphereVisible(Vector3, float) | boolean | Checks if the position with the specified sphere radius is visible in the camera's view. |
isSphereVisible(float, float, float, float) | boolean | Checks if the position with the specified sphere radius is visible in the camera's view. |
isSphereVisible(Transform, float) | boolean | Checks if the position of the Transform with the specified sphere radius is visible in the camera's view. |
isCubeVisible(Vector3, float) | boolean | Checks if the position with the specified cube size is visible in the camera's view. |
isCubeVisible(float, float, float, float) | boolean | Checks if the position with the specified cube size is visible in the camera's view. |
isPointVisible(SpatialObject) | boolean | Checks if the center of the specified object is visible in the camera's view. |
isPointVisible(Transform) | boolean | Checks if the specified transform is visible in the camera's view. |
isPointVisible(Vector3) | boolean | Checks if the specified position is visible in the camera's view. |
isPointVisible(float, float, float) | boolean | Checks if the specified position is visible in the camera's view. |
getViewMatrix() | float[] | Returns the camera's view matrix. |
getProjectionMatrix() | float[] | Returns the camera's projection matrix. |
recalculateMatrices() | void | Recalculates the camera matrices. |
determineImageResolutionPercentage() | int | Define the percentage of the camera image resolution. |
componentClassMatch(Component, Component) | boolean | Executes componentClassMatch and returns after the underlying engine call finishes. |
getEngineComponent() | Component | Executes getEngineComponent and returns after the underlying engine call finishes. |