Click or drag to resize
AB4D logo

DXSceneCalculateCameraPlanes(ICamera, Boolean, Single, Single) Method

CalculateCameraPlanes sets the zNear and zFar parameters to camera near plane distance and camera far plane distance. The values are calculated with using the bounding box of the current scene and specified camera. 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.DirectX
Assembly: Ab3d.DXEngine (in Ab3d.DXEngine.dll) Version: 7.0.8865.1045
Syntax
C#
public bool CalculateCameraPlanes(
	ICamera camera,
	bool adjustValues,
	out float zNear,
	out float zFar
)

Parameters

camera  ICamera
camera as ICamera
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

Boolean
returns 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