Coin
4.0.3
Coin3D core library
|
The SoModelMatrixElement class is used to manage the current transformation. More...
#include <Inventor/elements/SoModelMatrixElement.h>
Public Member Functions | |
const SbMatrix & | getModelMatrix (void) const |
virtual void | init (SoState *state) |
virtual SbBool | matches (const SoElement *element) const |
virtual void | push (SoState *state) |
Public Member Functions inherited from SoElement | |
virtual | ~SoElement () |
int | getDepth (void) const |
int | getStackIndex (void) const |
const SoType | getTypeId (void) const |
virtual void | pop (SoState *state, const SoElement *prevTopElement) |
virtual void | print (FILE *file=stdout) const |
void | setDepth (const int depth) |
Protected Attributes | |
SbMatrix | combinedMatrix |
SbMatrix | cullMatrix |
uint32_t | flags |
SbMatrix | modelMatrix |
Protected Attributes inherited from SoAccumulatedElement | |
SbList< SbUniqueId > | nodeIds |
Protected Attributes inherited from SoElement | |
int | depth |
int | stackIndex |
SoType | typeId |
Additional Inherited Members | |
Static Protected Member Functions inherited from SoElement | |
static int | createStackIndex (const SoType id) |
static const SoElement * | getConstElement (SoState *const state, const int stackIndex) |
static SoElement * | getElement (SoState *const state, const int stackIndex) |
Static Protected Attributes inherited from SoElement | |
static int | classStackIndex |
static SoTypeList * | stackToType |
The SoModelMatrixElement class is used to manage the current transformation.
SoModelMatrixElement contains the object-to-world matrix.
The world-to-camera transformation is stored in the SoViewingMatrixElement class.
Note that one thing that can be a little confusing with the API is that SoModelMatrixElement does not contain the same matrix as the OpenGL GL_MODELVIEW
matrix.
|
protectedvirtual |
Destructor.
This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.
Creates a new instance of the class type corresponding to the SoType object.
Returns the current model matrix.
Returns the current model matrix. Sets isIdentity to TRUE if the model matrix is known to be an identity matrix.
|
static |
This static method returns the state stack index for the class.
This static method returns the SoType object associated with objects of this class.
Returns the combined cull and model matrix. This matrix is cached.
Returns the current model matrix.
Initializes the element to its default value. The default value for modelMatrix is the identity matrix.
Reimplemented from SoAccumulatedElement.
Reimplemented in SoBBoxModelMatrixElement, and SoGLModelMatrixElement.
Initialize relevant common data for all instances, like the type system.
virtual method which is called from the static method makeIdentity(). Sets element model matrix to identity.
Reimplemented in SoGLModelMatrixElement, and SoBBoxModelMatrixElement.
Sets the current model matrix to the identity matrix.
This function returns TRUE
is the element matches another element (of the same class), with respect to cache validity.
If the application programmer's extension element has a matches() function, it should also have a copyMatchInfo() function.
Reimplemented from SoAccumulatedElement.
|
static |
Multiplies matrix into the model matrix.
virtual method which is called from the static method mult(). Multiplies matrix into element model matrix.
Reimplemented in SoBBoxModelMatrixElement, and SoGLModelMatrixElement.
Used by SoTransformSeparator to store and restore model matrix. Don't use it for any other reason.
virtual method which is called from the static method popMatrix(). Restores model matrix to the matrix returned from pushMatrix().
Reimplemented in SoBBoxModelMatrixElement, and SoGLModelMatrixElement.
This method is called every time a new element is required in one of the stacks. This happens when a writable element is requested, using SoState::getElement() or indirectly SoElement::getElement(), and the depth of the current element is less than the state depth.
Override this method if your element needs to copy data from the previous top of stack. The push() method is called on the new element, and the previous element can be found using SoElement::getNextInStack().
Reimplemented from SoAccumulatedElement.
Reimplemented in SoBBoxModelMatrixElement, and SoGLModelMatrixElement.
Used by SoTransformSeparator to store and restore model matrix. Don't use it for any other reason.
virtual method which is called from the static method pushMatrix(). Returns current model matrix.
Reimplemented in SoBBoxModelMatrixElement, and SoGLModelMatrixElement.
|
static |
Appends rotation to the model matrix.
|
protectedvirtual |
virtual method which is called from the static method rotateBy(). Appends rotation to element model matrix.
Reimplemented in SoBBoxModelMatrixElement, and SoGLModelMatrixElement.
|
static |
Appends scaleFactor to the model matrix.
virtual method which is called from the static method scaleBy(). Appends scaleFactor to element model matrix.
Reimplemented in SoBBoxModelMatrixElement, and SoGLModelMatrixElement.
|
static |
Sets the current model matrix to matrix.
|
static |
Sets the current cull matrix.
virtual method which is called from the static method set(). Sets element model matrix to matrix.
Reimplemented in SoBBoxModelMatrixElement, and SoGLModelMatrixElement.
|
static |
Appends translation to the model matrix.
virtual method which is called from the static method translateBy(). Appends translation to element model matrix.
Reimplemented in SoBBoxModelMatrixElement, and SoGLModelMatrixElement.
|
protected |
FIXME: write doc.
|
protected |
FIXME: write doc.
|
protected |
FIXME: write doc.
|
protected |
FIXME: write doc.