Class SoLocalBBoxMatrixElement
- java.lang.Object
-
- com.openinventor.inventor.Inventor
-
- com.openinventor.inventor.elements.SoElement
-
- com.openinventor.inventor.elements.SoLocalBBoxMatrixElement
-
public class SoLocalBBoxMatrixElement extends SoElement
Stores the transformation matrix from object space to some local coordinate space during application of anSoGetBoundingBoxAction
. This element stores the transformation matrix from object space to some local coordinate space during application of anSoGetBoundingBoxAction
. This element is needed to allow separators (and other caching nodes) to store cached bounding boxes in their own local space. Shapes that extend the current bounding box computed by the action use this matrix to transform the bounding box into local space. Separators cache this box, then transform it into the next local space up the hierarchy.Because this element is set to identity by separators before traversing their children, it can never have an affect on any caching separator that it is not under. Therefore, it should never be tested for cache invalidation, so its
matches()
method prints an error message and returns false. It also means that it does not have to save node id's so there are no nodes passed in to any of the methods.
-
-
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
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static SbMatrix
get(SoState state)
Returns current matrix from the state.static int
getClassStackIndex()
Deprecated.As of Open Inventor 9.3.0.0.static void
makeIdentity(SoState state)
Sets the local matrix to the identity matrix.static void
mult(SoState state, SbMatrix matrix)
Multiplies the given matrix into the local matrix.static void
popMatrix(SoState state, SbMatrix m)
This method is used by the TransformSeparator node.void
push(SoState state)
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
resetAll(SoState state)
Resets all current instances in the state to identity.static void
rotateBy(SoState state, SbRotation rotation)
Multiplies a matrix that performs the specified transformation into the local matrix.static void
scaleBy(SoState state, SbVec3f scaleFactor)
Multiplies a matrix that performs the specified transformation into the local matrix.static void
set(SoState state, SbMatrix matrix)
Sets the local matrix to the given matrix.static void
translateBy(SoState state, SbVec3f translation)
Multiplies a matrix that performs the specified transformation into the local matrix.-
Methods inherited from class com.openinventor.inventor.elements.SoElement
getClassStackIndex, pop
-
Methods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
-
-
-
Method Detail
-
makeIdentity
public static void makeIdentity(SoState state)
Sets the local matrix to the identity matrix.
-
set
public static void set(SoState state, SbMatrix matrix)
Sets the local matrix to the given matrix.
-
resetAll
public static void resetAll(SoState state)
Resets all current instances in the state to identity.
-
getClassStackIndex
@Deprecated(since="9.3.0.0") public static int getClassStackIndex()
Deprecated.As of Open Inventor 9.3.0.0. replaced by SoElement.getClassStackIndex(Class)Returns the stack id for this element. ] *
-
push
public void push(SoState state)
Overridespush()
method to copy values from next instance in the stack.
-
popMatrix
public static void popMatrix(SoState state, SbMatrix m)
This method is used by the TransformSeparator node.
-
scaleBy
public static void scaleBy(SoState state, SbVec3f scaleFactor)
Multiplies a matrix that performs the specified transformation into the local matrix.
-
pushMatrix
public static SbMatrix pushMatrix(SoState state)
This method is used by the TransformSeparator node.
-
mult
public static void mult(SoState state, SbMatrix matrix)
Multiplies the given matrix into the local matrix.
-
translateBy
public static void translateBy(SoState state, SbVec3f translation)
Multiplies a matrix that performs the specified transformation into the local matrix.
-
rotateBy
public static void rotateBy(SoState state, SbRotation rotation)
Multiplies a matrix that performs the specified transformation into the local matrix.
-
-