Camera
Methods
Methods
copy
dolly
equals
equalsWithTolerance
forJson
- Camera.forJson()
- Deprecated
Use
toJson
instead.- Return type
Object
getCameraPlaneIntersectionPoint
getFullMatrix
- Camera.getFullMatrix(viewer)
Returns the camera’s projection matrix multiplied by its view matrix.
- Arguments
viewer (
WebViewer()
) – TheWebViewer
for which the matrix should be valid.
- Return type
getHeight
- Camera.getHeight()
gets the camera height
- Return type
number
- Returns
the camera width
getMatrixFromCamera
getNearLimit
- Camera.getNearLimit()
gets the camera near clipping limit
- Return type
number
- Returns
the camera near clipping limit
getPosition
getProjection
- Camera.getProjection()
gets the camera projection
- Return type
- Returns
the camera projection
getProjectionMatrix
- Camera.getProjectionMatrix(viewer)
Returns the camera’s projection matrix.
- Arguments
viewer (
WebViewer()
) – TheWebViewer
for which the matrix should be valid.
- Return type
getTarget
getUp
getViewMatrix
- Camera.getViewMatrix(viewer)
Returns the camera’s view matrix. This matrix places the camera at
<0,0,0>
, with the negative z-axis pointing toward the camera’s target and the y-axis in the direction of the camera’s up-vector.- Arguments
viewer (
WebViewer()
) – TheWebViewer
for which the matrix should be valid.
- Return type
getWidth
- Camera.getWidth()
gets the camera width
- Return type
number
- Returns
the camera width
setHeight
- Camera.setHeight(height)
Sets the camera height
- Arguments
height (
number()
) – the new camera height
- Return type
void
setNearLimit
- Camera.setNearLimit(nearLimit)
Sets the camera near clipping limit
- Arguments
nearLimit (
number()
) – the new camera near clipping limit
- Return type
void
setPosition
setProjection
- Camera.setProjection(projection)
Sets the camera projection
- Arguments
projection (Projection) – the new camera Projection
- Return type
void
setTarget
setUp
setWidth
- Camera.setWidth(width)
Sets the camera width
- Arguments
width (
number()
) – the new camera width
- Return type
void
toJson
- Camera.toJson()
Creates an object ready for JSON serialization.
- Return type
Object
- Returns
The prepared object.
transform
static construct
static create
- Camera.create(pos, tar, up, projection, width, height[, nearLimit])
Creates a new camera object with the given parameters.
- Arguments
pos (
Point3()
) – the camera position.tar (
Point3()
) – the camera target.up (
Point3()
) – the camera up vector.projection (Projection) – the camera projection mode.
width (
number()
) – camea view width.height (
number()
) – camera view height.nearLimit (
number()
) – optional the camera near limit.
- Return type
- Returns
a new camera object.