Skip to main content

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

SignatureDescription
Camera(Camera)Executes Camera and returns after the underlying engine call finishes.
Camera()Creates a new instance of Camera.

Attributes

NameTypeDescription
PROJECTION_3DintRepresents the PROJECTION_3D value stored on this instance. Read or assign to update the property.
PROJECTION_2DintRepresents the PROJECTION_2D value stored on this instance. Read or assign to update the property.
BACKGROUND_SKYBOXintRepresents the BACKGROUND_SKYBOX value stored on this instance. Read or assign to update the property.
BACKGROUND_ALPHAintRepresents the BACKGROUND_ALPHA value stored on this instance. Read or assign to update the property.
instanceCameraRepresents the instance value stored on this instance. Read or assign to update the property.

Virtual Attributes

NameTypeAccessDescription
backgroundintget/setReturns the camera's background mode (Skybox or Alpha).
farPlanefloatgetReturns the camera's far plane.
fixedResolutionPixelsHeightintget/setReturns the fixed resolution height in pixels.
fixedResolutionPixelsWidthintget/setReturns the fixed resolution width in pixels.
fovfloatget/setReturns the camera's field of view (FOV).
frameBufferFrameBuffergetReturns the current framebuffer of the camera.
freeResolutionPixelsintget/setReturns the pixel resolution used when in free resolution mode.
frustumMatrixfloat[]getReturns the view frustum matrix.
hierarchyCameraMatrixfloat[]getReturns the hierarchical camera matrix.
imageHeightintgetReturns the image height in pixels.
imageRatiofloatgetReturns the aspect ratio of the image.
imageWidthintgetReturns the image width in pixels.
inverseFrustumMatrixfloat[]getReturns the inverse view frustum matrix.
inverseViewMatrixfloat[]getReturns the inverse view matrix.
layerintget/setReturns the camera's rendering layer.
minimalDistancefloatget/setReturns the minimal render distance.
nearPlanefloatgetReturns the camera's near plane.
objectFilterCameraObjectFilterget/setReturns the object filter applied to the camera.
orthoDiameterfloatget/setReturns the diameter of the orthographic projection (2D).
projectionintget/setReturns the camera's projection mode (2D or 3D).
rectHeightfloatget/setReturns the height of the camera's Rect.
rectPosXfloatget/setReturns the X position of the camera's Rect.
rectPosYfloatget/setReturns the Y position of the camera's Rect.
rectWidthfloatget/setReturns the width of the camera's Rect.
renderCameraDirectionVector3getReturns the camera's render direction.
renderCameraPositionVector3getReturns the camera's render position.
renderDistancefloatget/setReturns the camera's render distance.
renderPercentagefloatget/setReturns the camera's render resolution percentage.
resolutionModeResolutionModeget/setReturns the camera's resolution mode.
scaledRectHeightfloatgetReturns the height scale of the camera's Rect.
scaledRectPosXfloatgetReturns the X position scale of the camera's Rect.
scaledRectPosYfloatgetReturns the Y position scale of the camera's Rect.
scaledRectWidthfloatgetReturns the width scale of the camera's Rect.

Methods

SignatureReturnsDescription
getInternalFiltering()InternalFilteringReturns the internal filtering controller, used to check if the camera should render specific objects. Useful for custom rendering and shaders.
worldToScreenCoordinates(Vector3)Point2Converts a world position to screen coordinates.
screenPointRay(int, int)RayDirectionReturns a ray that originates from the camera and points toward the specified coordinates.
screenPointRay(Point2)RayDirectionReturns a ray that originates from the camera and points toward the specified Point2.
screenPointRay(float, float)RayDirectionReturns a ray that originates from the camera and points toward the specified coordinates.
screenPointRay(Vector2)RayDirectionReturns a ray that originates from the camera and points toward the specified Vector2.
screenPointNormal(int, int)Vector3Returns the camera's normal vector at the position of the specified coordinates.
screenPointNormal(Point2)Vector3Returns the camera's normal vector at the position of the specified Point2.
screenPointNormal(float, float)Vector3Returns the camera's normal vector at the position of the specified coordinates.
screenPointNormal(Vector2)Vector3Returns the camera's normal vector at the position of the specified Vector2.
takeScreenShot(String, String)voidTakes a screenshot and saves it to the specified folder and filename.
takeScreenShot(String, String, boolean)voidTakes 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)voidTakes a screenshot and saves it to the specified folder and filename.
isVisible(ModelRenderer)booleanChecks if a model is visible in the camera's view.
isVisible(Vertex, SpatialObject)booleanChecks if a vertex is visible in a specified SpatialObject within the camera's view.
isVisible(Vertex, Transform)booleanChecks if a vertex is visible at the position of a specified Transform in the camera's view.
isVisible(Vertex, float[])booleanChecks if a vertex is visible in the specified render matrix within the camera's view.
isSphereVisible(Vector3, float)booleanChecks if the position with the specified sphere radius is visible in the camera's view.
isSphereVisible(float, float, float, float)booleanChecks if the position with the specified sphere radius is visible in the camera's view.
isSphereVisible(Transform, float)booleanChecks if the position of the Transform with the specified sphere radius is visible in the camera's view.
isCubeVisible(Vector3, float)booleanChecks if the position with the specified cube size is visible in the camera's view.
isCubeVisible(float, float, float, float)booleanChecks if the position with the specified cube size is visible in the camera's view.
isPointVisible(SpatialObject)booleanChecks if the center of the specified object is visible in the camera's view.
isPointVisible(Transform)booleanChecks if the specified transform is visible in the camera's view.
isPointVisible(Vector3)booleanChecks if the specified position is visible in the camera's view.
isPointVisible(float, float, float)booleanChecks 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()voidRecalculates the camera matrices.
determineImageResolutionPercentage()intDefine the percentage of the camera image resolution.
componentClassMatch(Component, Component)booleanExecutes componentClassMatch and returns after the underlying engine call finishes.
getEngineComponent()ComponentExecutes getEngineComponent and returns after the underlying engine call finishes.