|
Aviatrix3D 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.Leaf
org.j3d.aviatrix3d.Background
org.j3d.aviatrix3d.ShapeBackground
Background node that renders a list of user-provided Shape3D instances.
Backgrounds are rendered as the first item but do not interact with the
normal geometry in the rendering process. Typically, backgrounds are
rendered in a fixed volume (a unit box or sphere is the most common) with
depthbuffer reads and writes disabled. Ordinary geometry is then drawn over
the top. Backgrounds must fit within clipping planes of [0.1,1].
Rendering is performed in the order the nodes are added to the instance.
As such
This will set the background colour to a single colour for the entire
viewport. If used, this will override the setClearColor() on
DrawableSurface
.
Field Summary |
Fields inherited from class org.j3d.aviatrix3d.Background |
dispListMap |
Fields inherited from class org.j3d.aviatrix3d.Node |
bounds, implicitBounds, INVALID_BOUNDS, parent |
Fields inherited from class org.j3d.aviatrix3d.SceneGraphObject |
alive, LISTENER_SET_NOT_LIVE_MESSAGE, updateHandler, WRITE_TIMING_MSG |
Constructor Summary | |
ShapeBackground()
Constructs a background node for a base colour of black. |
|
ShapeBackground(float[] c)
Construct a background node for a user-provided colour |
Method Summary | |
void |
addShape(Shape3D shape)
Add a shape to be rendered to the end of the listing. |
void |
getColor(float[] c)
Get the current drawing colour |
Shape3D |
getShape(int idx)
Get the current the shape and the given index position. |
void |
postRender(net.java.games.jogl.GL gl,
net.java.games.jogl.GLU glu)
Restore all openGL state to the given drawable. |
Shape3D |
removeShape(int idx)
Remove the shape at the given index position. |
void |
render(net.java.games.jogl.GL gl,
net.java.games.jogl.GLU glu)
Issue ogl commands needed for this component |
void |
setColor(float[] c)
Change the colour to the new colour. |
void |
setColor(float r,
float g,
float b,
float a)
Change the colour to the new colour. |
protected void |
setLive(boolean state)
Notification that this object is live now. |
void |
setShape(Shape3D shape,
int idx)
Change the shape at the given index. |
protected void |
setUpdateHandler(NodeUpdateHandler handler)
Set the scenegraph update handler for this node. |
Methods inherited from class org.j3d.aviatrix3d.Background |
markBoundsDirty |
Methods inherited from class org.j3d.aviatrix3d.Node |
boundsChanged, checkForCyclicParent, getBounds, getParent, recomputeBounds, removeParent, setBounds, setParent, updateBounds, updateParentBounds |
Methods inherited from class org.j3d.aviatrix3d.SceneGraphObject |
checkForCyclicChild, dataChanged, getUserData, isLive, setUserData |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ShapeBackground()
public ShapeBackground(float[] c)
Method Detail |
public void render(net.java.games.jogl.GL gl, net.java.games.jogl.GLU glu)
gl
- The gl context to draw withglu
- The utility context to draw withpublic void postRender(net.java.games.jogl.GL gl, net.java.games.jogl.GLU glu)
gl
- The gl context to draw withglu
- The utility context to draw withprotected void setUpdateHandler(NodeUpdateHandler handler)
setUpdateHandler
in class SceneGraphObject
handler
- The instance to use as a handlerprotected void setLive(boolean state)
setLive
in class Node
state
- true to set this to livepublic void setColor(float[] c) throws InvalidWriteTimingException
c
- The colour to copy in
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener callback methodpublic void setColor(float r, float g, float b, float a) throws InvalidWriteTimingException
r
- The red colour component to useg
- The green colour component to useb
- The blue colour component to usea
- The alpha colour component to use
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener callback methodpublic void getColor(float[] c)
c
- An array of length 4 or more to copy the colour topublic void addShape(Shape3D shape) throws InvalidWriteTimingException
shape
- The object instance to be rendered
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener callback methodpublic Shape3D removeShape(int idx)
idx
- The index of the shape to be fetched
public void setShape(Shape3D shape, int idx)
idx
- The index of the shape to be fetchedshape
- The object instance to be rendered
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener callback methodpublic Shape3D getShape(int idx)
idx
- The index of the shape to be fetched
|
Aviatrix3D 1.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |