Package com.aspose.threed
Class Camera
- java.lang.Object
-
- com.aspose.threed.A3DObject
-
- com.aspose.threed.Entity
-
- com.aspose.threed.Frustum
-
- com.aspose.threed.Camera
-
- All Implemented Interfaces:
IOrientable
public class Camera extends Frustum implements IOrientable
The camera describes the eye point of the viewer looking at the scene.
-
-
Constructor Summary
Constructors Constructor Description Camera()
Initializes a new instance of theCamera
class.Camera(ProjectionType projectionType)
Initializes a new instance of theCamera
class.Camera(java.lang.String name)
Initializes a new instance of theCamera
class.Camera(java.lang.String name, ProjectionType projectionType)
Initializes a new instance of theCamera
class.
-
Method Summary
Modifier and Type Method Description ApertureMode
getApertureMode()
Gets the camera's aperture modedouble
getAspectRatio()
Gets the view plane aspect ratio.double
getFieldOfView()
Gets the camera's field of view in degrees, this property is used only when ApertureMode isApertureMode.HORIZONTAL
orApertureMode.VERTICAL
double
getFieldOfViewX()
Gets the camera's horizontal field of view in degrees, this property is used only when ApertureMode isApertureMode.HORIZ_AND_VERT
double
getFieldOfViewY()
Gets the camera's vertical field of view in degrees, this property is used only when ApertureMode isApertureMode.HORIZ_AND_VERT
double
getHeight()
Gets the view plane's height measured in inchesVector2
getMagnification()
Gets the maginification used in orthographic cameraProjectionType
getProjectionType()
Gets the camera's projection type.double
getWidth()
Gets the view plane's width measured in inchesvoid
moveForward(double distance)
Move camera forward towards its direction or target.void
setApertureMode(ApertureMode value)
Sets the camera's aperture modevoid
setAspectRatio(double value)
Sets the view plane aspect ratio.void
setFieldOfView(double value)
Sets the camera's field of view in degrees, this property is used only when ApertureMode isApertureMode.HORIZONTAL
orApertureMode.VERTICAL
void
setFieldOfViewX(double value)
Sets the camera's horizontal field of view in degrees, this property is used only when ApertureMode isApertureMode.HORIZ_AND_VERT
void
setFieldOfViewY(double value)
Sets the camera's vertical field of view in degrees, this property is used only when ApertureMode isApertureMode.HORIZ_AND_VERT
void
setHeight(double value)
Sets the view plane's height measured in inchesvoid
setMagnification(Vector2 value)
Sets the maginification used in orthographic cameravoid
setProjectionType(ProjectionType value)
Sets the camera's projection type.void
setWidth(double value)
Sets the view plane's width measured in inches-
Methods inherited from class com.aspose.threed.Frustum
getAspect, getDirection, getFarPlane, getLookAt, getNearPlane, getOrthoHeight, getRotationMode, getTarget, getUp, setAspect, setDirection, setFarPlane, setLookAt, setNearPlane, setOrthoHeight, setRotationMode, setTarget, setUp
-
Methods inherited from class com.aspose.threed.Entity
createRenderableResource, getBoundingBox, getExcluded, getParentNode, getParentNodes, setExcluded, setParentNode
-
Methods inherited from class com.aspose.threed.A3DObject
findProperty, getName, getProperty, removeProperty, removeProperty, setName, setProperty
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.aspose.threed.IOrientable
getDirection, getTarget, setDirection, setTarget
-
-
-
-
Constructor Detail
-
Camera
public Camera()
Initializes a new instance of theCamera
class.
-
Camera
public Camera(ProjectionType projectionType)
Initializes a new instance of theCamera
class.- Parameters:
projectionType
- Projection type.
-
Camera
public Camera(java.lang.String name)
Initializes a new instance of theCamera
class.- Parameters:
name
- Name.
-
Camera
public Camera(java.lang.String name, ProjectionType projectionType)
Initializes a new instance of theCamera
class.- Parameters:
name
- Name.projectionType
- Projection type.
-
-
Method Detail
-
getApertureMode
public ApertureMode getApertureMode()
Gets the camera's aperture mode
-
setApertureMode
public void setApertureMode(ApertureMode value)
Sets the camera's aperture mode- Parameters:
value
- New value
-
getFieldOfView
public double getFieldOfView()
Gets the camera's field of view in degrees, this property is used only when ApertureMode isApertureMode.HORIZONTAL
orApertureMode.VERTICAL
-
setFieldOfView
public void setFieldOfView(double value)
Sets the camera's field of view in degrees, this property is used only when ApertureMode isApertureMode.HORIZONTAL
orApertureMode.VERTICAL
- Parameters:
value
- New value
-
getFieldOfViewX
public double getFieldOfViewX()
Gets the camera's horizontal field of view in degrees, this property is used only when ApertureMode isApertureMode.HORIZ_AND_VERT
-
setFieldOfViewX
public void setFieldOfViewX(double value)
Sets the camera's horizontal field of view in degrees, this property is used only when ApertureMode isApertureMode.HORIZ_AND_VERT
- Parameters:
value
- New value
-
getFieldOfViewY
public double getFieldOfViewY()
Gets the camera's vertical field of view in degrees, this property is used only when ApertureMode isApertureMode.HORIZ_AND_VERT
-
setFieldOfViewY
public void setFieldOfViewY(double value)
Sets the camera's vertical field of view in degrees, this property is used only when ApertureMode isApertureMode.HORIZ_AND_VERT
- Parameters:
value
- New value
-
getWidth
public double getWidth()
Gets the view plane's width measured in inches
-
setWidth
public void setWidth(double value)
Sets the view plane's width measured in inches- Parameters:
value
- New value
-
getHeight
public double getHeight()
Gets the view plane's height measured in inches
-
setHeight
public void setHeight(double value)
Sets the view plane's height measured in inches- Parameters:
value
- New value
-
getAspectRatio
public double getAspectRatio()
Gets the view plane aspect ratio.
-
setAspectRatio
public void setAspectRatio(double value)
Sets the view plane aspect ratio.- Parameters:
value
- New value
-
getMagnification
public Vector2 getMagnification()
Gets the maginification used in orthographic camera
-
setMagnification
public void setMagnification(Vector2 value)
Sets the maginification used in orthographic camera- Parameters:
value
- New value
-
getProjectionType
public ProjectionType getProjectionType()
Gets the camera's projection type. By default the perspective projection is used.
-
setProjectionType
public void setProjectionType(ProjectionType value)
Sets the camera's projection type. By default the perspective projection is used.- Parameters:
value
- New value
-
moveForward
public void moveForward(double distance)
Move camera forward towards its direction or target.- Parameters:
distance
- How long to move forward
-
-