|
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.NodeComponent
org.j3d.aviatrix3d.MultipassTextureComponent
A source for texture information that is dynamically generated as required per frame.
Note: This class does nothing in Aviatrix3D 1.0
The texture width and height are dynamically found each time it is requested. If no scene is set, or the scene does not have a ViewEnvironment with a valid viewport set, then the width and height will both return zero.
Field Summary | |
protected float[] |
clearColor
The current clear colour |
protected int |
format
The format |
protected int[] |
formats
The listing of formats defined for each level |
protected int |
glBuffers
The collection of GL buffer IDs needed by the rendering |
protected int |
numLevels
The number of levels in this component. |
protected MultipassRenderObserver |
observer
The observer instance to use for update callbacks |
protected Scene |
renderableObjects
The Scene Graph renderableObjects |
Fields inherited from class org.j3d.aviatrix3d.NodeComponent |
lastParent, liveCount, parentList |
Fields inherited from class org.j3d.aviatrix3d.SceneGraphObject |
alive, LISTENER_SET_NOT_LIVE_MESSAGE, updateHandler, WRITE_TIMING_MSG |
Fields inherited from interface org.j3d.aviatrix3d.MultipassTextureSource |
ACCUMULATION_BUFFER, COLOR_BUFFER, DEPTH_BUFFER, STENCIL_BUFFER |
Fields inherited from interface org.j3d.aviatrix3d.TextureSource |
FORMAT_BGR, FORMAT_BGRA, FORMAT_INTENSITY_ALPHA, FORMAT_RGB, FORMAT_RGBA, FORMAT_SINGLE_COMPONENT |
Constructor Summary | |
MultipassTextureComponent()
Construct a multipass texture with the buffer set to the colour buffer only. |
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. |
void |
getClearColor(float[] col)
Set the background colour that this surface should be cleared to before the drawing step. |
int |
getFormat(int level)
Get the format of this image at the given mipmap level. |
int |
getHeight()
Get the height of the texture in pixels. |
int |
getNumLevels()
Get the number of levels for the mipmapping in this source. |
Scene |
getRenderedScene()
Get the root of the currently rendered scene. |
MultipassRenderObserver |
getRenderObserver()
Fetch the observer instance that may be associated with the texture source. |
int |
getUsedBuffers()
Get the list of buffers that are required to be rendered by this source. |
int |
getWidth()
Get the width of this image. |
boolean |
isRepaintRequired()
Get the current state of the repainting enabled flag. |
void |
setClearColor(float r,
float g,
float b,
float a)
Set the background colour that this surface should be cleared to before the drawing step. |
protected void |
setLive(boolean state)
Notification that this object is live now. |
void |
setNumLevels(int numLevels)
Set the number of levels of mipmap generation that should be rendered. |
void |
setRenderedScene(Scene scene)
Set the collection of geometry that should be rendered to this texture. |
void |
setRenderObserver(MultipassRenderObserver obs)
Set the observer instance to be associated with the texture source. |
void |
setRepaintRequired(boolean enable)
Set this texture as requiring a repaint for the next frame. |
protected void |
setUpdateHandler(NodeUpdateHandler handler)
Set the scenegraph update handler for this node. |
void |
setUsedBuffers(int buffers)
Set the list of buffers that this source needs to write to. |
Methods inherited from class org.j3d.aviatrix3d.NodeComponent |
addParent, getParents, hasChanged, numParents, removeParent |
Methods inherited from class org.j3d.aviatrix3d.SceneGraphObject |
checkForCyclicParent, dataChanged, getUserData, isLive, setUserData |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected int format
protected Scene renderableObjects
protected float[] clearColor
protected int numLevels
protected int[] formats
protected MultipassRenderObserver observer
protected int glBuffers
Constructor Detail |
public MultipassTextureComponent()
Method Detail |
public MultipassRenderObserver getRenderObserver()
getRenderObserver
in interface MultipassTextureSource
public int getUsedBuffers()
getUsedBuffers
in interface MultipassTextureSource
public void setNumLevels(int numLevels) throws InvalidWriteTimingException, java.lang.IllegalArgumentException
setNumLevels
in interface MultipassTextureSource
numLevels
- The number of levels to render
java.lang.IllegalArgumentException
- The number of levels is more than what
the current size could reduce to
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener callback methodpublic void setRenderedScene(Scene scene) throws CyclicSceneGraphStructureException
setRenderedScene
in interface OffscreenTextureSource
scene
- The new scene instance to use or null
CyclicSceneGraphStructureException
- Equal parent and childpublic Scene getRenderedScene()
getRenderedScene
in interface OffscreenTextureSource
public int getHeight()
getHeight
in interface OffscreenTextureSource
public boolean isRepaintRequired()
isRepaintRequired
in interface OffscreenTextureSource
public void getClearColor(float[] col)
getClearColor
in interface OffscreenTextureSource
col
- An array of at least length 4 to copy values intopublic int getWidth()
getWidth
in interface TextureSource
public int getNumLevels()
getNumLevels
in interface TextureSource
public int getFormat(int level)
getFormat
in interface TextureSource
level
- The mipmap level to get the format for
protected void checkForCyclicChild(SceneGraphObject parent) throws InvalidWriteTimingException, CyclicSceneGraphStructureException
checkForCyclicChild
in class SceneGraphObject
parent
- The reference to check against this class
CyclicSceneGraphStructureException
- Equal parent and child
InvalidWriteTimingException
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 handlerpublic void setRenderObserver(MultipassRenderObserver obs) throws InvalidWriteTimingException
InvalidWriteTimingException
- An attempt was made to write outside
of the ApplicationUpdateObserver callback methodpublic void setRepaintRequired(boolean enable)
enable
- true to have this repaint the next framepublic void setClearColor(float r, float g, float b, float a) throws InvalidWriteTimingException
r
- The red component of the background clear colourg
- The green component of the background clear colourb
- The blue component of the background clear coloura
- The alpha component of the background clear colour
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener callback methodpublic void setUsedBuffers(int buffers) throws InvalidWriteTimingException
buffers
- The list of buffers bitwise OR together
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener callback method
|
Aviatrix3D 1.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |