|
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.Leaf org.j3d.aviatrix3d.Background
public abstract class 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.
Internationalisation Resource Names
Field Summary | |
---|---|
protected float[] |
color
Base colour of the background |
protected java.util.HashMap |
dispListMap
Map of display contexts to maps |
protected static java.lang.String |
INVALID_ALPHA_PROP
Message when the drawing mode is not a valid value |
protected static java.lang.String |
INVALID_BLUE_PROP
Message when the drawing mode is not a valid value |
protected static java.lang.String |
INVALID_GREEN_PROP
Message when the drawing mode is not a valid value |
protected static java.lang.String |
INVALID_RED_PROP
Message when the drawing mode is not a valid value |
protected boolean |
useClearColor
Flag whether the background should perform a clear of the colour buffer before being drawn. |
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 |
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 |
Cullable |
getCullableParent()
Get the parent cullable of this instance. |
Renderable |
getRenderable()
Get the renderable that represents the environment node rendering. |
boolean |
isColorClearEnabled()
Check to see if the clearing of the colour buffer is enabled for this instance. |
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. |
void |
setColorClearEnabled(boolean state)
Enable or disable the clearing of the colour buffer before drawing the background contents. |
Methods inherited from class org.j3d.aviatrix3d.Node |
---|
boundsChanged, checkForCyclicParent, getBounds, getParent, recomputeBounds, removeParent, requestBoundsUpdate, setBounds, setParent, updateBounds, updateParentBounds |
Methods inherited from class org.j3d.aviatrix3d.SceneGraphObject |
---|
checkForCyclicChild, dataChanged, getAppUpdateWriteTimingMessage, getBoundsWriteTimingMessage, getDataWriteTimingMessage, getUserData, isLive, setLive, 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.rendering.BackgroundRenderable |
---|
is2D |
Methods inherited from interface org.j3d.aviatrix3d.rendering.ObjectRenderable |
---|
postRender, render |
Methods inherited from interface org.j3d.aviatrix3d.rendering.Renderable |
---|
equals |
Methods inherited from interface java.lang.Comparable |
---|
compareTo |
Field Detail |
---|
protected static final java.lang.String INVALID_RED_PROP
protected static final java.lang.String INVALID_GREEN_PROP
protected static final java.lang.String INVALID_BLUE_PROP
protected static final java.lang.String INVALID_ALPHA_PROP
protected float[] color
protected java.util.HashMap dispListMap
protected boolean useClearColor
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 Cullable getCullableParent()
getCullableParent
in interface EnvironmentCullable
public Renderable getRenderable()
getRenderable
in interface EnvironmentCullable
protected void markBoundsDirty()
markBoundsDirty
in class Node
public void setColorClearEnabled(boolean state) throws InvalidWriteTimingException
state
- True to enable clearing of the colour buffer
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener data callback methodpublic boolean isColorClearEnabled()
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 data 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 data 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.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |