Home | Download | Screen shots | Discussion | Documentation
--- | --- | --- | --- | ---

Main Page | Modules | Namespace List | Class Hierarchy | Class List | Namespace Members | Class Members | Related Pages

# openvrml::frustum Class Reference

List of all members.

## Detailed Description

A view frustum.

A frustum is more or less a truncated pyramid. This class represents frustums with their wide end facing down the -z axis, and their (theoretical) tip at the origin. A frustum is a convenient representation of the volume of virtual space visible through the on-screen window when using a perspective projection.

See also:
  node::render

  viewer

## Public Member Functions
| frustum ()
| Construct a default frustum.
| frustum (float fovy, float aspect, double z_near, double z_far)
| Construct and initialize a frustum.
## Public Attributes
float | fovy
| Vertical field of view.
float | fovx
| Horizontal field of view.
double | z_near
| Distance to the near clipping plane.
double | z_far
| Distance to the far clipping plane.
float | left_plane [4]
| Left (looking down -z) side clip plane.
float | right_plane [4]
| Right clipping plane.
float | top_plane [4]
| Top clipping plane.
float | bot_plane [4]
| Bottom clipping plane.
## Private Member Functions
void | update ()
| Update the plane equations.

## Constructor & Destructor Documentation

openvrml::frustum::frustum | ( |  | ) |

| Construct a default frustum. fovy, fovx, near and far all get set to -1.

openvrml::frustum::frustum | ( | float | fovy,
|  | float | aspect,
|  | double | z_near,
|  | double | z_far
| ) |

  | Construct and initialize a frustum. The field of view should be less than 180 degrees. Extreme aspect ratios are unlikely to work well. The near and far plane distances are always positive (think distance, not position). anear must be less than afar. This is supposed to look like gluPerspective. Parameters:
  | fovy | vertical field of view in degrees.
  | aspect | ratio of view width to height (not the ratio of the horizontal to vertial field-of-views).
  | z_near | distance to near clip plane.
  | z_far | distance to far clip plane.

## Member Function Documentation

void openvrml::frustum::update | ( |  | ) | `[private]`

| Update the plane equations. The plane equations are derived from the other members.

## Member Data Documentation

openvrml::frustum::fovy

| Vertical field of view.

openvrml::frustum::fovx

| Horizontal field of view.

openvrml::frustum::z_near

| Distance to the near clipping plane.

openvrml::frustum::z_far

| Distance to the far clipping plane.

openvrml::frustum::left_plane

| Left (looking down -z) side clip plane. Format is (a,b,c,d) where (a,b,c) is the plane normal and d is the plane offset. For the momement the eyepoint is always the origin, so d is going to be 0.

openvrml::frustum::right_plane

| Right clipping plane.

openvrml::frustum::top_plane

| Top clipping plane.

openvrml::frustum::bot_plane

| Bottom clipping plane.