|
Aviatrix3D 2.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.j3d.aviatrix3d.SceneGraphObject
org.j3d.aviatrix3d.Node
org.j3d.aviatrix3d.Group
org.j3d.aviatrix3d.PixelTransform
public class PixelTransform
A grouping node that contains a transform for 2D pixel coordinate space.
As this node works in pixel space defined by OpenGL, it is limited in the types of transformations that can occur. Actions permitted are only translations and zoom. These are defined for all the children and may be nested. If the node contains any 3D spaces below it, the Z component of those values are ignored when projected onto the screen. Any scales become a zoom factor in X and Y. While you can also include TransformGroups below this node, that's generally not a good idea. We recommend you stay to either pure 2D or 3D in any one transformation path.
The default location is (0,0) and zoom of (1,1). Zoom may be a negative number, indicating a mirror operation on that axis.
Field Summary |
---|
Fields inherited from class org.j3d.aviatrix3d.Group |
---|
childList, cullList, dirtyBoundsCount, lastChild, pickableList, pickFlags, wkVec1, wkVec2 |
Fields inherited from class org.j3d.aviatrix3d.Node |
---|
bounds, implicitBounds, INVALID_BOUNDS, parent |
Fields inherited from class org.j3d.aviatrix3d.SceneGraphObject |
---|
alive, LISTENER_SET_TIMING_ERR_PROP, updateHandler |
Fields inherited from interface org.j3d.aviatrix3d.picking.PickTarget |
---|
CUSTOM_PICK_TYPE, GROUP_PICK_TYPE, LEAF_PICK_TYPE, SINGLE_PICK_TYPE |
Fields inherited from interface org.j3d.aviatrix3d.picking.PickableObject |
---|
COLLIDABLE_OBJECT, GENERAL_OBJECT, PROXIMITY_OBJECT, VISIBLE_OBJECT |
Constructor Summary | |
---|---|
PixelTransform()
The default constructor |
|
PixelTransform(int[] translation)
Construct a TransformGroup given a translation offset. |
|
PixelTransform(int[] translation,
float[] zoom)
Construct a TransformGroup given a zoom and translation offset. |
Method Summary | |
---|---|
void |
getInverseTransform(javax.vecmath.Matrix4f mat)
Get the inverse version of the local transform. |
void |
getTransform(javax.vecmath.Matrix4f mat)
Get the inverse version of the local transform. |
void |
getTranslation(int[] translation)
Get the current local transformation value. |
void |
getZoom(float[] zoom)
Get the current local zoom value. |
protected void |
recomputeBounds()
Internal method to recalculate the implicit bounds of this Node. |
void |
setTranslation(int[] translation)
Set the pixel translation for this transform. |
void |
setZoom(float[] zoom)
Set the pixel zoom for this transform. |
Methods inherited from class org.j3d.aviatrix3d.Group |
---|
addChild, checkForCyclicChild, checkPickMask, getAllChildren, getChild, getCullableChildren, getCullableParent, getPickableBounds, getPickableChild, getPickableChildren, getPickMask, getPickTargetType, hasMultipleParents, indexOfChild, markBoundsDirty, numChildren, numCullableChildren, numPickableChildren, pickBatch, pickSingle, removeAllChildren, removeChild, removeChild, requestBoundsUpdate, setBounds, setChild, setLive, setPickMask, setUpdateHandler, updateBounds |
Methods inherited from class org.j3d.aviatrix3d.Node |
---|
boundsChanged, checkForCyclicParent, getBounds, getParent, removeParent, setParent, updateParentBounds |
Methods inherited from class org.j3d.aviatrix3d.SceneGraphObject |
---|
dataChanged, getAppUpdateWriteTimingMessage, getBoundsWriteTimingMessage, getDataWriteTimingMessage, getUserData, isLive, setUserData |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.j3d.aviatrix3d.picking.PickTarget |
---|
checkPickMask, getPickableBounds, getPickTargetType |
Methods inherited from interface org.j3d.aviatrix3d.rendering.GroupCullable |
---|
getBounds |
Constructor Detail |
---|
public PixelTransform()
public PixelTransform(int[] translation)
translation
- The pixel translation to usepublic PixelTransform(int[] translation, float[] zoom)
translation
- The pixel translation to usezoom
- The amount of zoom factors to useMethod Detail |
---|
protected void recomputeBounds()
recomputeBounds
in class Group
public void getTransform(javax.vecmath.Matrix4f mat)
getTransform
in interface TransformPickTarget
getTransform
in interface TransformCullable
mat
- The matrix to copy the transform data topublic void getInverseTransform(javax.vecmath.Matrix4f mat)
getInverseTransform
in interface TransformPickTarget
mat
- The matrix to copy the transform data topublic void setTranslation(int[] translation) throws InvalidWriteTimingException
translation
- The copy of the matrix to use
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener bounds changed callback methodpublic void getTranslation(int[] translation)
translation
- The array to copy the translation data topublic void setZoom(float[] zoom) throws InvalidWriteTimingException
zoom
- The zoom factor in (x,y) order
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener bounds changed callback methodpublic void getZoom(float[] zoom)
zoom
- The array to copy the zoom data to
|
Aviatrix3D 2.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |