Camera

Camera class

The camera describes the eye point of the viewer looking at the scene.

Methods

constructor

NameDescription
constructor()Initializes a new instance of the Camera class.

Result:


constructor_overload

NameDescription
constructor_overload(projectionType)Initializes a new instance of the Camera class.

Parameters:

NameTypeDescription
projectionTypeProjectionTypeProjectionType

Result:


constructor_overload$2{#constructor_overload$2}

NameDescription
constructor_overload$2(name)Initializes a new instance of the Camera class.

Parameters:

NameTypeDescription
nameStringName.

Result:


constructor_overload$3{#constructor_overload$3}

NameDescription
constructor_overload$3(name, projectionType)Initializes a new instance of the Camera class.

Parameters:

NameTypeDescription
nameStringName.
projectionTypeProjectionTypeProjectionType

Result:


getApertureMode

NameDescription
getApertureMode()Gets or sets the camera’s aperture mode The value of the property is ApertureMode integer constant.

Result:


setApertureMode

NameDescription
setApertureMode(value)Gets or sets the camera’s aperture mode The value of the property is ApertureMode integer constant.

Result:


getFieldOfView

NameDescription
getFieldOfView()Gets or sets the camera’s field of view in degrees, this property is used only when ApertureMode is ApertureMode.HORIZONTAL or ApertureMode.VERTICAL

Result:


setFieldOfView

NameDescription
setFieldOfView(value)Gets or sets the camera’s field of view in degrees, this property is used only when ApertureMode is ApertureMode.HORIZONTAL or ApertureMode.VERTICAL

Result:


getFieldOfViewX

NameDescription
getFieldOfViewX()Gets or sets the camera’s horizontal field of view in degrees, this property is used only when ApertureMode is ApertureMode.HORIZ_AND_VERT

Result:


setFieldOfViewX

NameDescription
setFieldOfViewX(value)Gets or sets the camera’s horizontal field of view in degrees, this property is used only when ApertureMode is ApertureMode.HORIZ_AND_VERT

Result:


getFieldOfViewY

NameDescription
getFieldOfViewY()Gets or sets the camera’s vertical field of view in degrees, this property is used only when ApertureMode is ApertureMode.HORIZ_AND_VERT

Result:


setFieldOfViewY

NameDescription
setFieldOfViewY(value)Gets or sets the camera’s vertical field of view in degrees, this property is used only when ApertureMode is ApertureMode.HORIZ_AND_VERT

Result:


getWidth

NameDescription
getWidth()Gets or sets the view plane’s width measured in inches

Result:


setWidth

NameDescription
setWidth(value)Gets or sets the view plane’s width measured in inches

Result:


getHeight

NameDescription
getHeight()Gets or sets the view plane’s height measured in inches

Result:


setHeight

NameDescription
setHeight(value)Gets or sets the view plane’s height measured in inches

Result:


getAspectRatio

NameDescription
getAspectRatio()Gets or sets the view plane aspect ratio.

Result:


setAspectRatio

NameDescription
setAspectRatio(value)Gets or sets the view plane aspect ratio.

Result:


getMagnification

NameDescription
getMagnification()Gets or sets the magnification used in orthographic camera

Result:


setMagnification

NameDescription
setMagnification(value)Gets or sets the magnification used in orthographic camera

Result:


getProjectionType

NameDescription
getProjectionType()Gets or sets the camera’s projection type. By default the perspective projection is used. The value of the property is ProjectionType integer constant.

Result:


setProjectionType

NameDescription
setProjectionType(value)Gets or sets the camera’s projection type. By default the perspective projection is used. The value of the property is ProjectionType integer constant.

Result:


getRotationMode

NameDescription
getRotationMode()Gets or sets the frustum’s orientation mode This property only works when the Target is null. If the value is RotationMode.FIXED_TARGET, the direction is always calculated by the property LookAt Otherwise the LookAt is always calculated by the DirectionThe value of the property is RotationMode integer constant.

Result:


setRotationMode

NameDescription
setRotationMode(value)Gets or sets the frustum’s orientation mode This property only works when the Target is null. If the value is RotationMode.FIXED_TARGET, the direction is always calculated by the property LookAt Otherwise the LookAt is always calculated by the DirectionThe value of the property is RotationMode integer constant.

Result:


getNearPlane

NameDescription
getNearPlane()Gets or sets the frustum’s near plane distance.

Result:


setNearPlane

NameDescription
setNearPlane(value)Gets or sets the frustum’s near plane distance.

Result:


getFarPlane

NameDescription
getFarPlane()Gets or sets the frustum’s far plane distance.

Result:


setFarPlane

NameDescription
setFarPlane(value)Gets or sets the frustum’s far plane distance.

Result:


getAspect

NameDescription
getAspect()Gets or sets the aspect ratio of the frustum

Result:


setAspect

NameDescription
setAspect(value)Gets or sets the aspect ratio of the frustum

Result:


getOrthoHeight

NameDescription
getOrthoHeight()Gets or sets the height when frustum in orthographic projection.

Result:


setOrthoHeight

NameDescription
setOrthoHeight(value)Gets or sets the height when frustum in orthographic projection.

Result:


getUp

NameDescription
getUp()Gets or sets the up direction of the camera

Result:


setUp

NameDescription
setUp(value)Gets or sets the up direction of the camera

Result:


getLookAt

NameDescription
getLookAt()Gets or sets the the interested position that the camera is looking at.

Result:


setLookAt

NameDescription
setLookAt(value)Gets or sets the the interested position that the camera is looking at.

Result:


getDirection

NameDescription
getDirection()Gets or sets the direction that the camera is looking at. Changes on this property will also affects the LookAt and Target.

Result:


setDirection

NameDescription
setDirection(value)Gets or sets the direction that the camera is looking at. Changes on this property will also affects the LookAt and Target.

Result:


getTarget

NameDescription
getTarget()Gets or sets the target that the camera is looking at. If the user supports this property, it should be prior to LookAt property.

Result:


setTarget

NameDescription
setTarget(value)Gets or sets the target that the camera is looking at. If the user supports this property, it should be prior to LookAt property.

Result:


getParentNodes

NameDescription
getParentNodes()Gets all parent nodes, an entity can be attached to multiple parent nodes for geometry instancing The nodes.

Result:


getExcluded

NameDescription
getExcluded()Gets or sets whether to exclude this entity during exporting.

Result:


setExcluded

NameDescription
setExcluded(value)Gets or sets whether to exclude this entity during exporting.

Result:


getParentNode

NameDescription
getParentNode()Gets or sets the first parent node, if set the first parent node, this entity will be detached from other parent nodes. The parent node.

Result:


setParentNode

NameDescription
setParentNode(value)Gets or sets the first parent node, if set the first parent node, this entity will be detached from other parent nodes. The parent node.

Result:


getScene

NameDescription
getScene()Gets the scene that this object belongs to

Result:


getName

NameDescription
getName()Gets or sets the name. The name.

Result:


setName

NameDescription
setName(value)Gets or sets the name. The name.

Result:


getProperties

NameDescription
getProperties()Gets the collection of all properties.

Result:


moveForward

NameDescription
moveForward(distance)Move camera forward towards its direction or target.

Parameters:

NameTypeDescription
distanceNumberHow long to move forward

Result:


getBoundingBox

NameDescription
getBoundingBox()Gets the bounding box of current entity in its object space coordinate system.

Result:


getEntityRendererKey

NameDescription
getEntityRendererKey()Gets the key of the entity renderer registered in the renderer

Result: EntityRendererKey


removeProperty

NameDescription
removeProperty(property)Removes a dynamic property.

Parameters:

NameTypeDescription
propertyPropertyWhich property to remove

Result: boolean


removeProperty

NameDescription
removeProperty(property)Remove the specified property identified by name

Parameters:

NameTypeDescription
propertStringnull

Result: boolean


getProperty

NameDescription
getProperty(property)Get the value of specified property

Parameters:

NameTypeDescription
propertyStringProperty name

Result: Object


setProperty

NameDescription
setProperty(property, value)Sets the value of specified property

Parameters:

NameTypeDescription
propertyStringProperty name
valueObjectThe value of the property

Result: Object


findProperty

NameDescription
findProperty(propertyName)Finds the property. It can be a dynamic property (Created by CreateDynamicProperty/SetProperty) or native property(Identified by its name)

Parameters:

NameTypeDescription
propertyNameStringProperty name.

Result: Property