j3d.org Aviatrix3D

org.j3d.aviatrix3d
Interface OffscreenTextureSource

All Superinterfaces:
TextureSource
All Known Subinterfaces:
MultipassTextureSource, PBufferTextureSource
All Known Implementing Classes:
MultipassTextureComponent, OffscreenTexture2D

public interface OffscreenTextureSource
extends TextureSource

Marker describing a texture source that gets it's source data from an offscreen, direct rendering path.

Examples of this type of texture are either multipass and pBuffer textures.

Version:
$Revision: 1.5 $
Author:
Justin Couch

Field Summary
 
Fields inherited from interface org.j3d.aviatrix3d.TextureSource
FORMAT_BGR, FORMAT_BGRA, FORMAT_INTENSITY_ALPHA, FORMAT_RGB, FORMAT_RGBA, FORMAT_SINGLE_COMPONENT
 
Method Summary
 void getClearColor(float[] col)
          Set the background colour that this surface should be cleared to before the drawing step.
 int getHeight()
          Get the height of the texture in pixels.
 Scene getRenderedScene()
          Get the root of the currently rendered scene.
 boolean isRepaintRequired()
          Get the current state of the repainting enabled flag.
 void setRenderedScene(Scene scene)
          Set the collection of geometry that should be rendered to this texture.
 
Methods inherited from interface org.j3d.aviatrix3d.TextureSource
getFormat, getNumLevels, getWidth
 

Method Detail

setRenderedScene

public void setRenderedScene(Scene scene)
                      throws InvalidWriteTimingException,
                             CyclicSceneGraphStructureException
Set the collection of geometry that should be rendered to this texture. The geometry is, in effect, a completely separate rendarable space, with it's own culling and sorting pass. In addition, a check is made to make sure that no cyclic scene graph structures are created, as this can create really major headachesfor nested surface rendering. A null value will clear the current geometry and result in only rendering the background, if set. if not set, then whatever the default colour is, is used (typically black).

Parameters:
scene - The new scene instance to use or null
Throws:
CyclicSceneGraphStructureException - Equal parent and child
InvalidWriteTimingException - An attempt was made to write outside of the NodeUpdateListener callback method

getRenderedScene

public Scene getRenderedScene()
Get the root of the currently rendered scene. If none is set, this will return null.

Returns:
The current scene root or null.

getHeight

public int getHeight()
Get the height of the texture in pixels. If no image is set, this returns -1.

Returns:
a number >= -1

isRepaintRequired

public boolean isRepaintRequired()
Get the current state of the repainting enabled flag.

Returns:
true when the texture requires re-drawing

getClearColor

public void getClearColor(float[] col)
Set the background colour that this surface should be cleared to before the drawing step. Colours range from 0 to 1 in the normal manner.

Parameters:
col - An array of at least length 4 to copy values into

j3d.org Aviatrix3D

Latest Info from http://aviatrix3d.j3d.org/
Copyright © 2003 - j3d.org