|
Aviatrix3D 2.0 Dev |
||||||||||
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
Base collection of functionality marking background nodes of various types.
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].
As such, backgrounds are not typically subject to most rendering effects, such as lighting, fog, perspective projection etc.
Field Summary | |
protected float[] |
color
Base colour of the background |
protected java.util.HashMap |
dispListMap
Map of display contexts to maps |
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 | |
protected |
Background()
Constructs a background node with the colour set to opaque black. |
protected |
Background(float[] c)
Construct a background node for a user-provided colour. |
Method Summary | |
protected int |
compareColor4(float[] a,
float[] b)
Compare 2 color arrays of length 3 for equality |
protected boolean |
equalsColor4(float[] a,
float[] b)
Compare 2 color arrays of length 4 for equality |
void |
getColor(float[] c)
Get the current drawing colour |
Renderable |
getRenderable(int bufferId)
Get the Renderable instance needed to process this object for
the given buffer ID. |
protected void |
markBoundsDirty()
Mark this node as having dirty bounds due to one of it's children having their bounds changed. |
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. |
Methods inherited from class org.j3d.aviatrix3d.Node |
boundsChanged, checkForCyclicParent, getBounds, getParent, recomputeBounds, removeParent, setBounds, setLive, setParent, updateBounds, updateParentBounds |
Methods inherited from class org.j3d.aviatrix3d.SceneGraphObject |
checkForCyclicChild, dataChanged, getUserData, isLive, setUpdateHandler, 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.RenderableObject |
postRender, render |
Methods inherited from interface org.j3d.aviatrix3d.Renderable |
equals |
Methods inherited from interface java.lang.Comparable |
compareTo |
Field Detail |
protected float[] color
protected java.util.HashMap dispListMap
Constructor Detail |
protected Background()
protected Background(float[] c)
c
- The array of colours to use, or null
java.lang.IllegalArgumentException
- The colour array is not long enoughMethod Detail |
public Renderable getRenderable(int bufferId)
Renderable
instance needed to process this object for
the given buffer ID.
getRenderable
in class Leaf
bufferId
- The ID of the buffer for the renderable to encapsulate
protected void markBoundsDirty()
markBoundsDirty
in class Node
public void setColor(float[] c) throws InvalidWriteTimingException, java.lang.IllegalArgumentException
c
- The colour to copy in
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener callback method
java.lang.IllegalArgumentException
- The colour array is not long enoughpublic 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 toprotected int compareColor4(float[] a, float[] b)
a
- The first colour array to checkb
- The first colour array to check
protected boolean equalsColor4(float[] a, float[] b)
a
- The first colour array to checkb
- The first colour array to check
|
Aviatrix3D 2.0 Dev |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |