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

NameTypeAccessDescription
apertureModeApertureModeReadGets the aperture mode.
fieldOfViewdoubleReadGets the field of view.
fieldOfViewXdoubleReadGets the field of view x.
fieldOfViewYdoubleReadGets the field of view y.
widthdoubleReadGets the width.
heightdoubleReadGets the height.
aspectRatiodoubleReadGets the aspect ratio.
magnificationVector2ReadGets the magnification.
projectionTypeProjectionTypeReadGets the projection type.
rotationModeRotationModeReadGets the frustum’s orientation mode
This property only works when the getTarget() is null.
nearPlanedoubleReadGets the frustum’s near plane distance.
farPlanedoubleReadGets the frustum’s far plane distance.
aspectdoubleReadGets the aspect ratio of the frustum
@return the aspect ratio of the frustum
/
orthoHeightdoubleReadGets the height when frustum in orthographic projection.
upVector3ReadGets the up direction of the camera
@return the up direction of the camera
/
lookAtVector3ReadGets the the interested position that the camera is looking at.
directionVector3ReadGets the direction that the camera is looking at.
targetNodeReadGets the target that the camera is looking at.
parentNodeNodeReadGets the parent node.
parentNodesArrayList<Node>ReadGets the parent nodes.
excludedbooleanReadGets the excluded.
boundingBoxBoundingBoxReadGets the bounding box.
entityRendererKeyEntityRendererKeyReadGets the entity renderer key.
sceneSceneReadGets the scene.
nameStringReadGets the name.
propertiesPropertyCollectionReadGets the properties.

Methods

SignatureDescription
Camera()Creates a new camera instance with default name and properties
Camera(name: String)Calls Camera(name) on this Camera instance.
getApertureMode()ApertureModeReturns the aperture mode.
setApertureMode(value: ApertureMode)Sets the aperture mode value.
getFieldOfView()doubleReturns the field of view.
setFieldOfView(value: double)Sets the field of view value.
getFieldOfViewX()doubleReturns the field of view x.
setFieldOfViewX(value: double)Sets the field of view x value.
getFieldOfViewY()doubleReturns the field of view y.
setFieldOfViewY(value: double)Sets the field of view y value.
getWidth()doubleReturns the width.
setWidth(value: double)Sets the width value.
getHeight()doubleReturns the height.
setHeight(value: double)Sets the height value.
getAspectRatio()doubleReturns the aspect ratio.
setAspectRatio(value: double)Sets the aspect ratio value.
getMagnification()Vector2Returns the magnification.
setMagnification(value: Vector2)Sets the magnification value.
getProjectionType()ProjectionTypeReturns 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()RotationModeGets 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()doubleGets the frustum’s near plane distance.
setNearPlane(value: double)Sets the frustum’s near plane distance.
getFarPlane()doubleGets the frustum’s far plane distance.
setFarPlane(value: double)Sets the frustum’s far plane distance.
getAspect()doubleGets 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()doubleGets the height when frustum in orthographic projection.
setOrthoHeight(value: double)Sets the height when frustum in orthographic projection.
getUp()Vector3Gets 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()Vector3Gets 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()Vector3Gets the direction that the camera is looking at.
setDirection(value: Vector3)Sets the direction that the camera is looking at.
getTarget()NodeGets the target that the camera is looking at.
setTarget(value: Node)Sets the target that the camera is looking at.
getParentNode()NodeReturns the parent node.
setParentNode(value: Node)Sets the parent node value.
getParentNodes()ArrayList<Node>Returns the parent nodes.
getExcluded()booleanReturns the excluded.
setExcluded(value: boolean)Sets the excluded value.
getBoundingBox()BoundingBoxReturns the bounding box.
getEntityRendererKey()EntityRendererKeyReturns the entity renderer key.
getScene()SceneReturns the scene.
getName()StringReturns the name.
setName(name: String)Sets the name value.
getProperties()PropertyCollectionReturns the properties.
findProperty(name: String)PropertyCalls findProperty(name) on this Camera instance.
getProperty(name: String)ObjectCalls getProperty(name) on this Camera instance.
setProperty(name: String, value: Object)Sets the property value.
removeProperty(name: String)booleanCalls removeProperty(name) on this Camera instance.

See Also

 English