Frustum GetFrustum( Rect pixelRect )
Frustum GetFrustum( Rect pixelRect, Vector3 screenSize )

robot_2Generated
code_blocksInput

Description

The GetFrustum method of the SceneCamera class is used to retrieve the viewing frustum for a given pixel rectangle. The frustum is a geometric shape that represents the volume of space that the camera can see. This method is useful for determining which objects are visible within the camera's view.

Usage

To use the GetFrustum method, you need to have an instance of the SceneCamera class. You can then call this method by passing a Rect object that defines the pixel rectangle for which you want to get the frustum.

Example

// Create a new SceneCamera instance
SceneCamera camera = new SceneCamera();

// Define a pixel rectangle
Rect pixelRect = new Rect(0, 0, 1920, 1080);

// Get the frustum for the specified pixel rectangle
Frustum frustum = camera.GetFrustum(pixelRect);

// Use the frustum for visibility checks or other operations