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
 
 public class SoModelMatrixElement extends SoAccumulatedElement 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 fromSoAccumulatedElement. Theset()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:
- SoMatrixTransform,- SoRotation,- SoRotationXYZ,- SoScale,- SoTransform,- SoTranslation,- SoUnits
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class com.openinventor.inventor.InventorInventor.ConstructorCommand
 
- 
 - 
Field Summary- 
Fields inherited from class com.openinventor.inventor.InventorVERBOSE_LEVEL, ZeroHandle
 
- 
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static SbMatrixget(SoState state)Returns current model matrix from the state.static intgetClassStackIndex()Deprecated.As of Open Inventor 9300.static SbMatrixgetCombinedCullMatrix(SoState state)This method gets the model*cullMatrix combined matrix (which is cached by this element).static voidmakeIdentity(SoState state, SoNode node)Sets the model matrix to the identity matrix.static voidmult(SoState state, SoNode node, SbMatrix matrix)Multiplies the given matrix into the model matrix.static voidpopMatrix(SoState state, SbMatrix m)This method is used by the TransformSeparator node.voidpush(SoState state)Overridespush()method to copy values from next instance in the stack.static SbMatrixpushMatrix(SoState state)This method is used by the TransformSeparator node.static voidrotateBy(SoState state, SoNode node, SbRotation rotation)This multiplies a matrix that performs the specified transformation into the model matrix.static voidscaleBy(SoState state, SoNode node, SbVec3f scaleFactor)This multiplies a matrix that performs the specified transformation into the model matrix.static voidset(SoState state, SoNode node, SbMatrix matrix)Calls set(state, node, matrix, true).static voidset(SoState state, SoNode node, SbMatrix matrix, boolean sendToGL)Sets the model matrix to the given matrix.static voidsetCullMatrix(SoState state, SoNode node, SbMatrix matrix)Sets the transformation that defines the volume that view-volume culling should be tested against.static voidtranslateBy(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.SoElementgetClassStackIndex, pop
 - 
Methods inherited from class com.openinventor.inventor.Inventordispose, getNativeResourceHandle
 
- 
 
- 
- 
- 
Method Detail- 
setpublic static void set(SoState state, SoNode node, SbMatrix matrix) Calls set(state, node, matrix, true).
 - 
pushpublic void push(SoState state) Overridespush()method to copy values from next instance in the stack.- Overrides:
- pushin class- SoAccumulatedElement
 
 - 
popMatrixpublic static void popMatrix(SoState state, SbMatrix m) 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.
 - 
getClassStackIndex@Deprecated public static int getClassStackIndex() Deprecated.As of Open Inventor 9300. replaced by SoElement.getClassStackIndex(Class)Returns the stack id for this element. ] *
 - 
scaleBypublic static void scaleBy(SoState state, SoNode node, SbVec3f scaleFactor) This multiplies a matrix that performs the specified transformation into the model matrix.
 - 
rotateBypublic static void rotateBy(SoState state, SoNode node, SbRotation rotation) This multiplies a matrix that performs the specified transformation into the model matrix.
 - 
pushMatrixpublic static SbMatrix pushMatrix(SoState state) 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.
 - 
setCullMatrixpublic static void setCullMatrix(SoState state, SoNode node, SbMatrix matrix) Sets the transformation that defines the volume that view-volume culling should be tested against.
 - 
getCombinedCullMatrixpublic static SbMatrix getCombinedCullMatrix(SoState state) This method gets the model*cullMatrix combined matrix (which is cached by this element).
 - 
setpublic static void set(SoState state, SoNode node, SbMatrix matrix, boolean sendToGL) 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.
 - 
makeIdentitypublic static void makeIdentity(SoState state, SoNode node) Sets the model matrix to the identity matrix.
 - 
translateBypublic static void translateBy(SoState state, SoNode node, SbVec3f translation) This multiplies a matrix that performs the specified transformation into the model matrix.
 
- 
 
-