|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A graphic object that provides a strategy for transforming (mapping) geometry from one space to another in a space tree. Implementations are encouraged to take advantage of native graphic capabilities.
Design note: Space transforms involve SpaceNode, TransformableGraphic, and specifically Point3, Vector3, and Matrix4. SpaceMapper is intended to embody all awareness of native graphics for space transformations, thereby freeing the other classes from such dependencies.
Method Summary | |
Matrix4 |
getGraphicTransform(SpaceNode from,
SpaceNode to,
Matrix4 retVal)
Returns a matrix that transforms geometry from one local space to another when the geometry is pre-multiplied by the matrix. |
Point3 |
transformGraphic(Point3 point,
SpaceNode from,
SpaceNode to,
Point3 retVal)
Transforms a point from one local space to another. |
Vector3 |
transformGraphic(Vector3 vector,
SpaceNode from,
SpaceNode to,
Vector3 retVal)
Transforms a vector from one local space to another. |
Methods inherited from interface gumbo.graphic.Graphic |
getGraphic |
Method Detail |
public Point3 transformGraphic(Point3 point, SpaceNode from, SpaceNode to, Point3 retVal)
point
- Value of a point in the from space. Never null.from
- The source space. If null, the tree's absolute space.to
- The target space. If null, the tree's absolute space.retVal
- The return value object. The transformed point
Never null.
java.lang.IllegalArgumentException
- The from and to nodes are not
in the same tree.public Vector3 transformGraphic(Vector3 vector, SpaceNode from, SpaceNode to, Vector3 retVal)
vector
- Value of a vector in the from space. Never null.from
- The source space. If null, the tree's absolute space.to
- The target space. If null, the tree's absolute space.retVal
- The return value object. The transformed vector
Never null.
java.lang.IllegalArgumentException
- The from and to nodes are not
in the same tree.public Matrix4 getGraphicTransform(SpaceNode from, SpaceNode to, Matrix4 retVal)
from
- The source space. If null, the tree's absolute space.to
- The target space. If null, the tree's absolute space.retVal
- The return value object. The transform matrix.
Never null.
java.lang.IllegalArgumentException
- The from and to nodes are not
in the same tree.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |