Class SoModelMatrixElement
java.lang.Object
com.openinventor.inventor.Inventor
com.openinventor.inventor.elements.SoElement
com.openinventor.inventor.elements.SoAccumulatedElement
com.openinventor.inventor.elements.SoModelMatrixElement
- Direct Known Subclasses:
SoBBoxModelMatrixElement
,SoModelScaleElement
Stores the current model matrix.
This element stores the current model matrix - the cumulative transformation applied to subsequent shapes. Because the matrix is cumulative, this class is derived from
SoAccumulatedElement
. The set()
method replaces the current matrix, while all the others (mult()
, translateBy()
, etc.) multiply into it. Node id's of the nodes that affect the element are accumulated properly.
This element also stores the current view-volume culling transformation, which is normally the view*projection matrices (set by cameras), but which may be modified by sophisticated culling schemes.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
Field Summary
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
Method Summary
Modifier and TypeMethodDescriptionstatic SbMatrix
Returns current model matrix from the state.static int
Deprecated.As of Open Inventor 9.3.0.0.static SbMatrix
getCombinedCullMatrix
(SoState state) This method gets the model*cullMatrix combined matrix (which is cached by this element).static void
makeIdentity
(SoState state, SoNode node) Sets the model matrix to the identity matrix.static void
Multiplies the given matrix into the model matrix.static void
This method is used by the TransformSeparator node.void
Overridespush()
method to copy values from next instance in the stack.static SbMatrix
pushMatrix
(SoState state) This method is used by the TransformSeparator node.static void
rotateBy
(SoState state, SoNode node, SbRotation rotation) This multiplies a matrix that performs the specified transformation into the model matrix.static void
This multiplies a matrix that performs the specified transformation into the model matrix.static void
Calls set(state, node, matrix, true).static void
Sets the model matrix to the given matrix.static void
setCullMatrix
(SoState state, SoNode node, SbMatrix matrix) Sets the transformation that defines the volume that view-volume culling should be tested against.static void
translateBy
(SoState state, SoNode node, SbVec3f translation) This multiplies a matrix that performs the specified transformation into the model matrix.Methods inherited from class com.openinventor.inventor.elements.SoElement
getClassStackIndex, pop
Methods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
Method Details
-
set
Calls set(state, node, matrix, true). -
getClassStackIndex
Deprecated.As of Open Inventor 9.3.0.0. replaced by SoElement.getClassStackIndex(Class)Returns the stack id for this element. ] * -
push
Overridespush()
method to copy values from next instance in the stack.- Overrides:
push
in classSoAccumulatedElement
-
setCullMatrix
Sets the transformation that defines the volume that view-volume culling should be tested against. -
makeIdentity
Sets the model matrix to the identity matrix. -
popMatrix
This method is used by the TransformSeparator node. WARNING! For proper caching behavior, the matrix returned by .pushMatrix() must be used ONLY as a later argument to .popMatrix(), and you must NOT modify the matrix between the push and the pop. If you need the matrix for any other reason, you MUST use the .get() routine. -
pushMatrix
This method is used by the TransformSeparator node. WARNING! For proper caching behavior, the matrix returned by .pushMatrix() must be used ONLY as a later argument to .popMatrix(), and you must NOT modify the matrix between the push and the pop. If you need the matrix for any other reason, you MUST use the .get() routine. -
getCombinedCullMatrix
This method gets the model*cullMatrix combined matrix (which is cached by this element). -
get
Returns current model matrix from the state. -
mult
Multiplies the given matrix into the model matrix. -
set
Sets the model matrix to the given matrix. This method will (indirectly) call glLoadMatrix with the new matrix unless the 'sendToGL' parameter is explicitly false. -
translateBy
This multiplies a matrix that performs the specified transformation into the model matrix. -
scaleBy
This multiplies a matrix that performs the specified transformation into the model matrix. -
rotateBy
This multiplies a matrix that performs the specified transformation into the model matrix.
-