Class Camera3D
Namespace:
Assembly: .dll
Syntax
public class Camera3D implements ICameraController
Constructors
Camera3D()
Declaration
Methods
animate(Vector3 position, Vector3 target, long duration)
Animates camera to specified position
and target
position with specified duration
Declaration
public final void animate(Vector3 position, Vector3 target, long duration)
Parameters
animateZoomToFit(Vector3 resetPosition, long duration)
Zooms camera to fit bounding box of parent surface inside the viewport using current camera position as reset position
Declaration
public final void animateZoomToFit(Vector3 resetPosition, long duration)
Parameters
Type |
Name |
Description |
Vector3 |
resetPosition |
|
long |
duration |
|
animateZoomToFit(long duration)
Zooms camera to fit bounding box of parent surface inside the viewport using current camera position as reset position
Declaration
public final void animateZoomToFit(long duration)
Parameters
Type |
Name |
Description |
long |
duration |
|
attachTo(IServiceContainer services)
Declaration
public void attachTo(IServiceContainer services)
Parameters
calculateRadiusAndTargetToFit(Vector3 targetToFit)
Calculates a Camera target and radius that will fit the bounding box completely inside the viewport.
Declaration
public float calculateRadiusAndTargetToFit(Vector3 targetToFit)
Parameters
Type |
Name |
Description |
Vector3 |
targetToFit |
|
Returns
decrementSuspend()
Declaration
public void decrementSuspend()
detach()
Declaration
getAspectRatio()
Gets the Aspect Ratio of the viewport, e.g. 1.333f suggests width is 1.333 * height
Declaration
public final float getAspectRatio()
Returns
getCameraAnimator()
Declaration
public final ICameraAnimator getCameraAnimator()
Returns
getFarClip()
Gets the Far Clipping distance of the camera. Objects farther than this distance will be invisible to the camera
Declaration
public float getFarClip()
Returns
getFieldOfView()
Gets the Field of View Angle of the Camera in Degrees
Declaration
public final float getFieldOfView()
Returns
getForward()
Calculated Property: Gets the Normalized Forward (direction) Vector of the Camera as an XYZ Vector3 in World Coordinates
Declaration
public final Vector3 getForward()
Returns
getIsSuspended()
Declaration
public final boolean getIsSuspended()
Returns
getNearClip()
Gets the Near Clipping distance of the camera. Objects closer than this distance will be invisible to the camera
Declaration
public final float getNearClip()
Returns
getOrbitalPitch()
Gets the Pitch angle of the camera position relative to the target in DEGREES. This property may be manipulated to change the camera position
Declaration
public final float getOrbitalPitch()
Returns
getOrbitalYaw()
Gets the Yaw angle of the camera position relative to the target in DEGREES. This property may be manipulated to change the camera position
Declaration
public final float getOrbitalYaw()
Returns
getOrthoHeight()
Gets the Camera Orthogonal Viewport height, used when ProjectionMode is Orthogonal
Declaration
public final float getOrthoHeight()
Returns
getOrthoWidth()
Gets the Camera Orthogonal Viewport width, used when ProjectionMode is Orthogonal
Declaration
public final float getOrthoWidth()
Returns
getPosition()
Gets the Position of the Camera as an XYZ Vector3 in World Coordinates
Declaration
public final Vector3 getPosition()
Returns
getProjectionMode()
Gets the Camera projection mode, e.g. perspective or orthogonal
Declaration
public final CameraProjectionMode getProjectionMode()
Returns
getRadius()
Calculated Property: Gets the Radius distance of the camera to target in World Units. This property may be manipulated to change the camera position
Declaration
public final float getRadius()
Returns
getServices()
Declaration
public final IServiceContainer getServices()
Returns
getSide()
Calculated Property: Gets the Normalized Side Vector of the Camera as an XYZ Vector3 in World Coordinates
Declaration
public final Vector3 getSide()
Returns
getTarget()
Gets or sets the Target of the Camera as an XYZ Vector3 in World Coordinates
Declaration
public final Vector3 getTarget()
Returns
getUp()
Calculated Property: Gets the Normalized Up Vector of the Camera as an XYZ Vector3 in World Coordinates
Declaration
public final Vector3 getUp()
Returns
getUpdateSuspenderCount()
Declaration
public final AtomicInteger getUpdateSuspenderCount()
Returns
getZoomToFitOnAttach()
Gets whether or not the Camera should be zoomed to fit the parent scene bounds when it's attached
Declaration
public final boolean getZoomToFitOnAttach()
Returns
getZoomToFitScaleFactor()
Gets the scale factor which is applied during calculation when Camera should be zoomed to fit the parent scene bounds
Declaration
public final float getZoomToFitScaleFactor()
Returns
invalidateElement()
Declaration
public void invalidateElement()
isAttached()
Declaration
public final boolean isAttached()
Returns
resumeUpdates(IUpdateSuspender suspender)
Declaration
public void resumeUpdates(IUpdateSuspender suspender)
Parameters
setAspectRatio(float aspectRatio)
Sets the Aspect Ratio of the viewport, e.g. 1.333f suggests width is 1.333 * height
Declaration
public final void setAspectRatio(float aspectRatio)
Parameters
Type |
Name |
Description |
float |
aspectRatio |
|
setCameraAnimator(ICameraAnimator cameraAnimator)
Declaration
public final void setCameraAnimator(ICameraAnimator cameraAnimator)
Parameters
setCameraUpdateListener(ICameraUpdateListener cameraUpdateListener)
Declaration
public void setCameraUpdateListener(ICameraUpdateListener cameraUpdateListener)
Parameters
setFarClip(float farClip)
Sets the Far Clipping distance of the camera. Objects farther than this distance will be invisible to the camera
Declaration
public final void setFarClip(float farClip)
Parameters
Type |
Name |
Description |
float |
farClip |
|
setFieldOfView(float fieldOfView)
Sets the Field of View Angle of the Camera in Degrees
Declaration
public void setFieldOfView(float fieldOfView)
Parameters
Type |
Name |
Description |
float |
fieldOfView |
|
setNearClip(float nearClip)
Sets the Near Clipping distance of the camera. Objects closer than this distance will be invisible to the camera
Declaration
public void setNearClip(float nearClip)
Parameters
Type |
Name |
Description |
float |
nearClip |
|
setOrbitalPitch(float orbitalPitch)
Sets the Pitch angle of the camera position relative to the target in DEGREES. This property may be manipulated to change the camera position
Declaration
public final void setOrbitalPitch(float orbitalPitch)
Parameters
Type |
Name |
Description |
float |
orbitalPitch |
|
setOrbitalYaw(float orbitalVaw)
Sets the Yaw angle of the camera position relative to the target in DEGREES. This property may be manipulated to change the camera position
Declaration
public final void setOrbitalYaw(float orbitalVaw)
Parameters
Type |
Name |
Description |
float |
orbitalVaw |
|
setOrthoHeight(float orthoHeight)
Sets the Camera Orthogonal Viewport height, used when ProjectionMode is Orthogonal
Declaration
public final void setOrthoHeight(float orthoHeight)
Parameters
Type |
Name |
Description |
float |
orthoHeight |
|
setOrthoWidth(float orthoWidth)
Sets the Camera Orthogonal Viewport width, used when ProjectionMode is Orthogonal
Declaration
public final void setOrthoWidth(float orthoWidth)
Parameters
Type |
Name |
Description |
float |
orthoWidth |
|
setPosition(Vector3 position)
Sets the Position of the Camera as an XYZ Vector3 in World Coordinates
Declaration
public final void setPosition(Vector3 position)
Parameters
Type |
Name |
Description |
Vector3 |
position |
|
setPositionAndTarget(Vector3 position, Vector3 target)
Sets the Position and the Target of the Camera as XYZ Vector3 in World Coordinates and
Declaration
public void setPositionAndTarget(Vector3 position, Vector3 target)
Parameters
setProjectionMode(CameraProjectionMode projectionMode)
Sets the Camera projection mode, e.g. perspective or orthogonal
Declaration
public final void setProjectionMode(CameraProjectionMode projectionMode)
Parameters
setRadius(float radius)
Calculated Property: Sets the Radius distance of the camera to target in World Units. This property may be manipulated to change the camera position
Declaration
public final void setRadius(float radius)
Parameters
Type |
Name |
Description |
float |
radius |
|
setTarget(Vector3 target)
Sets the Target of the Camera as an XYZ Vector3 in World Coordinates
Declaration
public void setTarget(Vector3 target)
Parameters
Type |
Name |
Description |
Vector3 |
target |
|
setZoomToFitOnAttach(boolean zoomToFitOnAttach)
Sets whether or not the Camera should be zoomed to fit the parent scene bounds when it's attached
Declaration
public final void setZoomToFitOnAttach(boolean zoomToFitOnAttach)
Parameters
Type |
Name |
Description |
boolean |
zoomToFitOnAttach |
|
setZoomToFitScaleFactor(float zoomToFitScaleFactor)
Sets the scale factor which is applied during calculation when Camera should be zoomed to fit the parent scene bounds
Declaration
public final void setZoomToFitScaleFactor(float zoomToFitScaleFactor)
Parameters
Type |
Name |
Description |
float |
zoomToFitScaleFactor |
|
suspendUpdates()
Declaration
public final IUpdateSuspender suspendUpdates()
Returns
toOrthogonal()
Switches the camera to Orthogonal mode
Declaration
public final void toOrthogonal()
toPerspective()
Switches the camera to Perspective mode
Declaration
public final void toPerspective()
update(RenderPassState3D renderPassState)
Declaration
public void update(RenderPassState3D renderPassState)
Parameters
zoomToFit()
Zooms camera to fit bounding box of parent surface inside the viewport using current camera position as reset position
Declaration
public final void zoomToFit()
zoomToFit(Vector3 resetPosition)
Zooms camera to fit bounding box of parent surface inside the viewport using specified reset position
Declaration
public final void zoomToFit(Vector3 resetPosition)
Parameters
Type |
Name |
Description |
Vector3 |
resetPosition |
|
Implements