Main Page   Namespace List   Class Hierarchy   Compound List   Namespace Members   Compound Members   Related Pages  

ModelviewMatrixStack Class Reference

Encapsulates and extended modelview matrix stack. More...

List of all members.


Public Methods

 ModelviewMatrixStack ()
 Constructor.

void push ()
 Push the current matrix onto the stack.

void pop ()
 Pop the current matrix off of the stack.


Private Attributes

size_t size
 The current stack depth.

std::stack< VrmlMatrixspillover
 Any matrices that won't fit on the OpenGL modelview matrix stack get pushed onto this stack.


Detailed Description

Encapsulates and extended modelview matrix stack.

OpenGL requires that implementations have a modelview matrix stack with a maximum depth of only 32. Regardless of that, the maximum depth can be expected to vary between implementations, and we don't want nesting of Transform nodes in VRML worlds to be constrained by this limit.

ModelviewMatrixStack uses the OpenGL modelview matrix stack until it fills up, at which point any additional matrices that spill over are pushed onto a conventional stack of VrmlMatrices.


Constructor & Destructor Documentation

ModelviewMatrixStack  
 

Constructor.


Member Function Documentation

void pop  
 

Pop the current matrix off of the stack.

Precondition:
The current matrix is the modelview matrix.

void push  
 

Push the current matrix onto the stack.

Precondition:
The current matrix is the modelview matrix.

Member Data Documentation

size_t size [private]
 

The current stack depth.

std::stack< VrmlMatrix > spillover [private]
 

Any matrices that won't fit on the OpenGL modelview matrix stack get pushed onto this stack.