|
Aviatrix3D 2.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.j3d.aviatrix3d.SceneGraphObject org.j3d.aviatrix3d.Node org.j3d.aviatrix3d.Node2D org.j3d.aviatrix3d.Leaf2D org.j3d.aviatrix3d.Pixmap
public class Pixmap
A Pixmap wraps 2D screen-aligned pixel blits.
By default, all pixmaps are pickable.
Internationalisation Resource Names
Field Summary |
---|
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.PickableObject |
---|
COLLIDABLE_OBJECT, GENERAL_OBJECT, PROXIMITY_OBJECT, VISIBLE_OBJECT |
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.rendering.LeafCullable |
---|
AUDIO_CULLABLE, CLIP_CULLABLE, FOG_CULLABLE, GEOMETRY_CULLABLE, LIGHT_CULLABLE, OVERRIDE_CULLABLE |
Constructor Summary | |
---|---|
Pixmap()
Creates a shape with no geometry or appearance set. |
Method Summary | |
---|---|
protected void |
checkForCyclicChild(SceneGraphObject parent)
Check to see if this node is the same reference as the passed node that is a parent of this node. |
boolean |
checkPickMask(int mask)
Check the given pick mask against the node's internal pick mask representation. |
int |
compareTo(java.lang.Object o)
Compares this object with the specified object for order. |
int |
compareTo(Pixmap sh)
Compares this object with the specified object for order. |
boolean |
equals(java.lang.Object o)
Compare this object for equality to the given object. |
boolean |
equals(Pixmap sh)
Compares this object with the specified object to check for equivalence. |
AppearanceRenderable |
getAppearanceRenderable()
Fetch the renderable that represents the visual appearance modifiers of this shape. |
void |
getCenter(float[] center)
Get the centre of the shape object. |
int |
getCullableType()
Get the type that this cullable represents. |
GeometryRenderable |
getGeometryRenderable()
Fetch the renderable that represents the geometry of this shape. |
BoundingVolume |
getPickableBounds()
Get the bounds of this picking target so that testing can be performed on the object. |
PickTarget |
getPickableChild()
Return the child that is pickable of from this target. |
int |
getPickMask()
Get the current pickable state mask of this object. |
int |
getPickTargetType()
Return the type constant that represents the type of pick target this is. |
Raster |
getRaster()
Get the current geometry associated with this shape. |
Renderable |
getRenderable()
Get the child renderable of this object. |
boolean |
is2D()
Check to see whether this shape is something that represents 2D or 3D geometry. |
boolean |
isVisible()
State check to see whether the shape in it's current setup is visible. |
protected void |
markBoundsDirty()
Mark this node as having dirty bounds due to one of it's children having their bounds changed. |
void |
pickBatch(PickRequest[] reqs,
int numRequests)
Check for all intersections against this geometry and it's children to see if there is an intersection with the given set of requests. |
void |
pickSingle(PickRequest req)
Check for all intersections against this geometry and it's children to see if there is an intersection with the given set of requests. |
void |
postRender(javax.media.opengl.GL gl)
|
protected void |
recomputeBounds()
Internal method to recalculate the implicit bounds of this Node. |
void |
render(javax.media.opengl.GL gl)
This method is called to render this node. |
void |
requestBoundsUpdate()
Request a recomputation of the bounds of this object. |
protected void |
setLive(boolean state)
Notification that this object is live now. |
void |
setPickMask(int state)
Set the node as being pickable currently using the given bit mask. |
void |
setRaster(Raster raster)
Set the pixel data for this pixmap. |
protected void |
setUpdateHandler(NodeUpdateHandler handler)
Set the scenegraph update handler for this node. |
protected void |
updateBounds()
Update this node's bounds and then call the parent to update it's bounds. |
Methods inherited from class org.j3d.aviatrix3d.Node |
---|
boundsChanged, checkForCyclicParent, getBounds, getParent, removeParent, setBounds, 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, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.j3d.aviatrix3d.rendering.LeafCullable |
---|
getBounds |
Constructor Detail |
---|
public Pixmap()
Method Detail |
---|
public int getCullableType()
getCullableType
in interface LeafCullable
public Renderable getRenderable()
getRenderable
in interface LeafCullable
public boolean isVisible()
isVisible
in interface ShapeRenderable
public boolean is2D()
EffectRenderable
, while 3D is.
Note that this can be changed depending on the type of geometry itself.
A Shape3D node with an IndexedLineArray that only has 2D coordinates is
as much a 2D geometry as a raster object.
is2D
in interface ShapeRenderable
public void getCenter(float[] center)
getCenter
in interface ShapeRenderable
center
- The object to copy the center coordinates in topublic GeometryRenderable getGeometryRenderable()
getGeometryRenderable
in interface ShapeRenderable
public AppearanceRenderable getAppearanceRenderable()
getAppearanceRenderable
in interface ShapeRenderable
public void render(javax.media.opengl.GL gl)
render
in interface ObjectRenderable
gl
- The gl context to draw withpublic void postRender(javax.media.opengl.GL gl)
postRender
in interface ObjectRenderable
protected void updateBounds()
updateBounds
in class Node
protected void markBoundsDirty()
markBoundsDirty
in class Node
protected void recomputeBounds()
recomputeBounds
in class Node
public void requestBoundsUpdate()
This will request the geometry to recompute the bounds. If the geometry is found to be live during this process, it will not update, and thus the value used will be the last updated (ie from the previous frame it was processed).
requestBoundsUpdate
in class Node
protected void setLive(boolean state)
setLive
in class SceneGraphObject
state
- true if this should be marked as live nowprotected void setUpdateHandler(NodeUpdateHandler handler)
setUpdateHandler
in class SceneGraphObject
handler
- The instance to use as a handlerprotected void checkForCyclicChild(SceneGraphObject parent) throws CyclicSceneGraphStructureException
checkForCyclicChild
in class SceneGraphObject
parent
- The reference to check against this class
CyclicSceneGraphStructureException
- Equal parent and childpublic void setPickMask(int state)
setPickMask
in interface PickableObject
state
- A bit mask of available options to pick forpublic int getPickMask()
getPickMask
in interface PickableObject
public void pickBatch(PickRequest[] reqs, int numRequests) throws NotPickableException, InvalidPickTimingException
pickBatch
in interface PickableObject
reqs
- The list of picks to be made, starting at this objectnumRequests
- The number of valid pick requests to process
NotPickableException
- This object has been marked as non pickable,
but you decided to try to call the method anyway
InvalidPickTimingException
- An attempt was made to pick outside
of the ApplicationUpdateObserver callback methodpublic void pickSingle(PickRequest req) throws NotPickableException, InvalidPickTimingException
pickSingle
in interface PickableObject
req
- The details of the pick to be made
NotPickableException
- This object has been marked as non pickable,
but you decided to try to call the method anyway
InvalidPickTimingException
- An attempt was made to pick outside
of the ApplicationUpdateObserver callback methodpublic PickTarget getPickableChild()
getPickableChild
in interface SinglePickTarget
public final int getPickTargetType()
getPickTargetType
in interface PickTarget
public boolean checkPickMask(int mask)
checkPickMask
in interface PickTarget
mask
- The bit mask to check against
public BoundingVolume getPickableBounds()
getPickableBounds
in interface PickTarget
public int compareTo(java.lang.Object o) throws java.lang.ClassCastException
compareTo
in interface java.lang.Comparable
o
- The objec to be compared
java.lang.ClassCastException
- The specified object's type prevents it from
being compared to this Objectpublic boolean equals(java.lang.Object o)
equals
in interface Renderable
equals
in class java.lang.Object
o
- The object to be compared
public Raster getRaster()
public void setRaster(Raster raster) throws InvalidWriteTimingException
raster
- The pixel data to be drawn
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener bounds changed callback methodpublic int compareTo(Pixmap sh)
sh
- The argument instance to be compared
public boolean equals(Pixmap sh)
sh
- The shape instance to be compared
|
Aviatrix3D 2.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |