new UniformState
DOC_TBA
Source:
Members
-
<readonly> frameState :FrameState
-
Gets the current frame state.
- Default Value:
- undefined
See:
Methods
-
getCurrentFrustum
-
Returns the near distance (
x
) and the far distance (y
) of the frustum defined by the camera. This is the individual frustum used for multi-frustum rendering.Returns:
Cartesian2 Returns the near distance and the far distance of the frustum defined by the camera. -
getEncodedCameraPositionMCHigh
-
Returns the high bits of the camera position used to define the czm_encodedCameraPositionMCHigh GLSL uniform.
Returns:
Cartesian3 The high bits of the camera position. -
getEncodedCameraPositionMCLow
-
Returns the low bits of the camera position used to define the czm_encodedCameraPositionMCLow GLSL uniform.
Returns:
Cartesian3 The low bits of the camera position. -
getEntireFrustum
-
Returns the near distance (
x
) and the far distance (y
) of the frustum defined by the camera. This is the largest possible frustum, not an individual frustum used for multi-frustum rendering.Returns:
Cartesian2 Returns the near distance and the far distance of the frustum defined by the camera. -
getEyeHeight2D
-
Returns the the height (
x
) and the height squared (y
) in meters of the camera above the 2D world plane. This uniform is only valid when the SceneMode equal toSCENE2D
.Returns:
Cartesian2 Height and height squared above the 2D world plane for SCENE2D SceneMode.See:
-
getInfiniteProjection
-
DOC_TBA
Returns:
Matrix4 DOC_TBA.- UniformState#setInfiniteProjection
- czm_infiniteProjection
See:
-
getInverseModel
-
Returns the inverse model matrix used to define the czm_inverseModel GLSL uniform.
Returns:
Matrix4 The inverse model matrix. -
getInverseModelView
-
Gets the inverse of the model-view matrix.
Returns:
Matrix4 The inverse of the model-view matrix.See:
-
getInverseModelView3D
-
Gets the inverse of the 3D model-view matrix. In 3D mode, this is equivalent to UniformState#getInverseModelView. In 2D and Columbus View, however, it is a synthetic matrix based on the equivalent position of the camera in the 3D world.
Returns:
Matrix4 The inverse of the 3D model-view matrix. -
getInverseModelViewProjection
-
Returns the inverse model-view-projection matrix.
Returns:
Matrix4 The inverse model-view-projection matrix. -
getInverseNormal
-
Gets an inverse 3x3 normal transformation matrix that transforms normal vectors in model coordinates to eye coordinates.
Returns:
Matrix3 The inverse normal transformation matrix.See:
-
getInverseNormal3D
-
Gets an inverse 3x3 normal transformation matrix that transforms normal vectors in eye coordinates to 3D model coordinates. In 3D mode, this is identical to UniformState#getInverseNormal, but in 2D and Columbus View it represents the normal transformation matrix as if the camera were at an equivalent location in 3D mode.
Returns:
Matrix3 The inverse normal transformation matrix.See:
-
getInverseProjection
-
DOC_TBA
Returns:
Matrix4 DOC_TBA. -
getInverseView
-
Returns the 4x4 inverse-view matrix that transforms from eye to world coordinates.
Returns:
Matrix4 The 4x4 inverse-view matrix that transforms from eye to world coordinates.See:
-
getInverseView3D
-
Returns the 4x4 inverse-view matrix that transforms from eye to 3D world coordinates. In 3D mode, this is identical to UniformState#getInverseView, but in 2D and Columbus View it is a synthetic matrix based on the equivalent position of the camera in the 3D world.
Returns:
Matrix4 The 4x4 inverse-view matrix that transforms from eye to 3D world coordinates.See:
-
getInverseViewProjection
-
Returns the inverse view-projection matrix
Returns:
Matrix4 The inverse view-projection matrix. -
getInverseViewRotation
-
Returns the 3x3 rotation matrix of the current inverse-view matrix (UniformState#getInverseView).
Returns:
Matrix3 The 3x3 rotation matrix of the current inverse-view matrix. -
getInverseViewRotation3D
-
Returns the 3x3 rotation matrix of the current 3D inverse-view matrix (UniformState#getInverseView3D).
Returns:
Matrix3 The 3x3 rotation matrix of the current 3D inverse-view matrix. -
getModel
-
DOC_TBA
Returns:
Matrix4 DOC_TBA. -
getModelView
-
Gets the model-view matrix.
Returns:
Matrix4 The model-view matrix.See:
-
getModelView3D
-
Gets the 3D model-view matrix. In 3D mode, this is equivalent to UniformState#getModelView. In 2D and Columbus View, however, it is a synthetic matrix based on the equivalent position of the camera in the 3D world.
Returns:
Matrix4 The 3D model-view matrix.See:
-
getModelViewInfiniteProjection
-
DOC_TBA
Returns:
Matrix4 DOC_TBA. -
getModelViewProjection
-
DOC_TBA
Returns:
Matrix4 DOC_TBA. -
getModelViewProjectionRelativeToEye
-
Returns the model-view-projection relative to eye matrix used to define the czm_modelViewProjectionRelativeToEye GLSL uniform.
Returns:
Matrix4 The model-view-projection relative to eye matrix. -
getModelViewRelativeToEye
-
Returns the model-view relative to eye matrix used to define the czm_modelViewRelativeToEye GLSL uniform.
Returns:
Matrix4 The model-view relative to eye matrix. -
getMoonDirectionEC
-
Returns a normalized vector to the moon in eye coordinates at the current scene time. In 3D mode, this returns the actual vector from the camera position to the moon position. In 2D and Columbus View, it returns the vector from the equivalent 3D camera position to the position of the moon in the 3D scene.
Returns:
Cartesian3 A normalized vector to the moon in eye coordinates at the current scene time.See:
-
getNormal
-
Gets a 3x3 normal transformation matrix that transforms normal vectors in model coordinates to eye coordinates.
Returns:
Matrix3 The normal transformation matrix.See:
-
getNormal3D
-
Gets a 3x3 normal transformation matrix that transforms normal vectors in 3D model coordinates to eye coordinates. In 3D mode, this is identical to UniformState#getNormal, but in 2D and Columbus View it represents the normal transformation matrix as if the camera were at an equivalent location in 3D mode.
Returns:
Matrix3 The normal transformation matrix.See:
-
getPixelSize
-
Returns the size of a pixel in meters at a distance of one meter from the camera.
Returns:
Number Returns the size of a pixel in meters at a distance of one meter from the camera. -
getProjection
-
DOC_TBA
Returns:
Matrix4 DOC_TBA.- UniformState#setProjection
- czm_projection
See:
-
getSunDirectionEC
-
Returns a normalized vector to the sun in eye coordinates at the current scene time. In 3D mode, this returns the actual vector from the camera position to the sun position. In 2D and Columbus View, it returns the vector from the equivalent 3D camera position to the position of the sun in the 3D scene.
Returns:
Cartesian3 A normalized vector to the sun in eye coordinates at the current scene time.See:
-
getSunDirectionWC
-
Returns a normalized vector to the sun in 3D world coordinates at the current scene time. Even in 2D or Columbus View mode, this returns the position of the sun in the 3D scene.
Returns:
Cartesian3 A normalized vector to the sun in 3D world coordinates at the current scene time.See:
-
getSunPositionColumbusView
-
Returns the sun position in 2D world coordinates at the current scene time.
Returns:
Cartesian3 The sun position in 2D world coordinates at the current scene time. -
getSunPositionWC
-
Returns the sun position in 3D world coordinates at the current scene time.
Returns:
Cartesian3 The sun position in 3D world coordinates at the current scene time.See:
-
getTemeToPseudoFixedMatrix
-
Returns a 3x3 matrix that transforms from True Equator Mean Equinox (TEME) axes to the pseudo-fixed axes at the Scene's current time.
Returns:
Matrix3 The transform from TEME to pseudo-fixed. -
getView
-
DOC_TBA
Returns:
Matrix4 DOC_TBA.See:
-
getView3D
-
Gets the 3D view matrix. In 3D mode, this is identical to UniformState#getView, but in 2D and Columbus View it is a synthetic matrix based on the equivalent position of the camera in the 3D world.
Returns:
Matrix4 The 3D view matrix.See:
-
getViewportOrthographic
-
DOC_TBA
-
getViewportTransformation
-
DOC_TBA
-
getViewProjection
-
DOC_TBA
Returns:
Matrix4 DOC_TBA.See:
-
getViewRotation
-
Returns the 3x3 rotation matrix of the current view matrix (UniformState#getView).
Returns:
Matrix3 The 3x3 rotation matrix of the current view matrix. -
getViewRotation3D
-
Returns the 3x3 rotation matrix of the current 3D view matrix (UniformState#getView3D).
Returns:
Matrix3 The 3x3 rotation matrix of the current 3D view matrix. -
setModel
-
DOC_TBA
Parameters:
Name Type Argument Description matrix
Matrix4 <optional>
DOC_TBA. -
setViewport
-
DOC_TBA
Parameters:
Name Type Description viewport
BoundingRectangle DOC_TBA. - UniformState#getViewport
- czm_viewport
See:
-
update
-
Synchronizes frame state with the uniform state. This is called by the Scene when rendering to ensure that automatic GLSL uniforms are set to the right value.
Parameters:
Name Type Description frameState
FrameState The frameState to synchronize with. -
updateFrustum
-
Synchronizes the frustum's state with the uniform state. This is called by the Scene when rendering to ensure that automatic GLSL uniforms are set to the right value.
Parameters:
Name Type Description frustum
Object The frustum to synchronize with.