Camera
Overview
Camera is a class in Aspose.3D FOSS for Java.
Inherits from: Frustum, IOrientable.
Camera provides methods to get and set aperture mode, field of view, aspect ratio, width, height, magnification and projection type, allowing full configuration of perspective and orthographic cameras.
This class provides 54 methods for working with Camera objects in Java programs.
Available methods include: Camera, findProperty, getApertureMode, getAspect, getAspectRatio, getBoundingBox, getDirection, getEntityRendererKey, getExcluded, getFarPlane, getFieldOfView, getFieldOfViewX, and 41 additional methods.
All public members are accessible to any Java application after installing the Aspose.3D FOSS for Java package.
Properties: apertureMode, aspect, aspectRatio, boundingBox, direction, entityRendererKey, and 20 more.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
apertureMode | ApertureMode | Read | Gets the aperture mode. |
fieldOfView | double | Read | Gets the field of view. |
fieldOfViewX | double | Read | Gets the field of view x. |
fieldOfViewY | double | Read | Gets the field of view y. |
width | double | Read | Gets the width. |
height | double | Read | Gets the height. |
aspectRatio | double | Read | Gets the aspect ratio. |
magnification | Vector2 | Read | Gets the magnification. |
projectionType | ProjectionType | Read | Gets the projection type. |
rotationMode | RotationMode | Read | Gets the frustum’s orientation mode |
| This property only works when the getTarget() is null. | |||
nearPlane | double | Read | Gets the frustum’s near plane distance. |
farPlane | double | Read | Gets the frustum’s far plane distance. |
aspect | double | Read | Gets the aspect ratio of the frustum |
| @return the aspect ratio of the frustum | |||
| / | |||
orthoHeight | double | Read | Gets the height when frustum in orthographic projection. |
up | Vector3 | Read | Gets the up direction of the camera |
| @return the up direction of the camera | |||
| / | |||
lookAt | Vector3 | Read | Gets the the interested position that the camera is looking at. |
direction | Vector3 | Read | Gets the direction that the camera is looking at. |
target | Node | Read | Gets the target that the camera is looking at. |
parentNode | Node | Read | Gets the parent node. |
parentNodes | ArrayList<Node> | Read | Gets the parent nodes. |
excluded | boolean | Read | Gets the excluded. |
boundingBox | BoundingBox | Read | Gets the bounding box. |
entityRendererKey | EntityRendererKey | Read | Gets the entity renderer key. |
scene | Scene | Read | Gets the scene. |
name | String | Read | Gets the name. |
properties | PropertyCollection | Read | Gets the properties. |
Methods
| Signature | Description |
|---|---|
Camera() | Creates a new camera instance with default name and properties |
Camera(name: String) | Calls Camera(name) on this Camera instance. |
getApertureMode() → ApertureMode | Returns the aperture mode. |
setApertureMode(value: ApertureMode) | Sets the aperture mode value. |
getFieldOfView() → double | Returns the field of view. |
setFieldOfView(value: double) | Sets the field of view value. |
getFieldOfViewX() → double | Returns the field of view x. |
setFieldOfViewX(value: double) | Sets the field of view x value. |
getFieldOfViewY() → double | Returns the field of view y. |
setFieldOfViewY(value: double) | Sets the field of view y value. |
getWidth() → double | Returns the width. |
setWidth(value: double) | Sets the width value. |
getHeight() → double | Returns the height. |
setHeight(value: double) | Sets the height value. |
getAspectRatio() → double | Returns the aspect ratio. |
setAspectRatio(value: double) | Sets the aspect ratio value. |
getMagnification() → Vector2 | Returns the magnification. |
setMagnification(value: Vector2) | Sets the magnification value. |
getProjectionType() → ProjectionType | Returns the projection type. |
setProjectionType(value: ProjectionType) | Sets the projection type value. |
moveForward(distance: double) | Move camera forward |
| @param distance The distance to move forward | |
| / | |
getRotationMode() → RotationMode | Gets the frustum’s orientation mode |
| This property only works when the getTarget() is null. | |
setRotationMode(value: RotationMode) | Sets the frustum’s orientation mode |
| This property only works when the getTarget() is null. | |
getNearPlane() → double | Gets the frustum’s near plane distance. |
setNearPlane(value: double) | Sets the frustum’s near plane distance. |
getFarPlane() → double | Gets the frustum’s far plane distance. |
setFarPlane(value: double) | Sets the frustum’s far plane distance. |
getAspect() → double | Gets the aspect ratio of the frustum |
| @return the aspect ratio of the frustum | |
| / | |
setAspect(value: double) | Sets the aspect ratio of the frustum |
| @param value New value | |
| / | |
getOrthoHeight() → double | Gets the height when frustum in orthographic projection. |
setOrthoHeight(value: double) | Sets the height when frustum in orthographic projection. |
getUp() → Vector3 | Gets the up direction of the camera |
| @return the up direction of the camera | |
| / | |
setUp(value: Vector3) | Sets the up direction of the camera |
| @param value New value | |
| / | |
getLookAt() → Vector3 | Gets the the interested position that the camera is looking at. |
setLookAt(value: Vector3) | Sets the the interested position that the camera is looking at. |
getDirection() → Vector3 | Gets the direction that the camera is looking at. |
setDirection(value: Vector3) | Sets the direction that the camera is looking at. |
getTarget() → Node | Gets the target that the camera is looking at. |
setTarget(value: Node) | Sets the target that the camera is looking at. |
getParentNode() → Node | Returns the parent node. |
setParentNode(value: Node) | Sets the parent node value. |
getParentNodes() → ArrayList<Node> | Returns the parent nodes. |
getExcluded() → boolean | Returns the excluded. |
setExcluded(value: boolean) | Sets the excluded value. |
getBoundingBox() → BoundingBox | Returns the bounding box. |
getEntityRendererKey() → EntityRendererKey | Returns the entity renderer key. |
getScene() → Scene | Returns the scene. |
getName() → String | Returns the name. |
setName(name: String) | Sets the name value. |
getProperties() → PropertyCollection | Returns the properties. |
findProperty(name: String) → Property | Calls findProperty(name) on this Camera instance. |
getProperty(name: String) → Object | Calls getProperty(name) on this Camera instance. |
setProperty(name: String, value: Object) | Sets the property value. |
removeProperty(name: String) → boolean | Calls removeProperty(name) on this Camera instance. |