|
DXSceneCalculateCameraPlanes(Matrix, Boolean, Boolean, Vector3, Boolean, Single, Single) Method |
CalculateCameraPlanes sets the zNear and zFar parameters to camera near plane distance and camera far plane distance.
When adjustValues Boolean parameter is true, the zNear and zFar values are slightly adjusted to increase the distance between zNear and zFar (recommended).
CalculateCameraPlanes returns false if the calculated values are not correct (are 0, NaN or Infinity). This can happen when camera's matrices are not set.
Namespace: Ab3d.DirectXAssembly: Ab3d.DXEngine (in Ab3d.DXEngine.dll) Version: 7.0.8865.1045
Syntax public static bool CalculateCameraPlanes(
ref Matrix viewMatrix,
bool isOrthographicProjection,
bool isRightHandedCoordinateSystem,
Vector3[] boundingCorners,
bool adjustValues,
out float zNear,
out float zFar
)
Parameters
- viewMatrix Matrix
- viewMatrix
- isOrthographicProjection Boolean
- true if camera is using Orthographic projection, false for Perspective projection
- isRightHandedCoordinateSystem Boolean
- true when using right handed coordinate system (true for DXEngine)
- boundingCorners Vector3
- array of Vector3 elements that represents corner positions for BoundingBox (use BoundingBox.GetCorners to get this array)
- adjustValues Boolean
- When adjustValues Boolean parameter is true, the zNear and zFar values are slightly adjusted to increase the distance between zNear and zFar (recommended)
- zNear Single
- out camera near plane distance
- zFar Single
- out camera far plane distance
Return Value
Booleanreturns false if the calculated values are not correct (are 0, NaN or Infinity). This can happen when camera's matrices are not set.
See Also