public class DefaultMatrixSupport extends Object
Transformations.
For convienience, there is one shared instance.| Constructor and Description |
|---|
DefaultMatrixSupport() |
| Modifier and Type | Method and Description |
|---|---|
static DefaultMatrixSupport |
getSharedInstance() |
void |
restoreDefault(Transformation trafo,
boolean clear)
Restores the default matrix if there is any, otherwise
assigns the identity matrix or does nothing, depending on the
clear flag. |
void |
restoreDefaultMatrices(SceneGraphComponent root,
boolean clear) |
void |
storeAsDefault(Transformation trafo)
Stores the current matrix of trafo as its default matrix.
|
void |
storeDefault(Transformation trafo,
double[] defMatrix)
Stores the given array as default matrix for trafo.
|
void |
storeDefaultMatrices(SceneGraphComponent root)
Traverses thetree from the given root and calls
storeDefault
for all Transformations. |
public static DefaultMatrixSupport getSharedInstance()
public void storeDefault(Transformation trafo, double[] defMatrix)
trafo - the trafo for which to set the default matrixdefMatrix - the default matrix for trafopublic void storeAsDefault(Transformation trafo)
trafo - the trafopublic void restoreDefault(Transformation trafo, boolean clear)
clear flag.trafo - the trafo to restoreclear - determines the behaviour for Transformations
without a default matrix: if true, set to the indentity - if
false, do nothing.public void restoreDefaultMatrices(SceneGraphComponent root, boolean clear)
public void storeDefaultMatrices(SceneGraphComponent root)
storeDefault
for all Transformations.root - the root of the subgraph to traverse