|
Aviatrix3D 2.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CustomRenderable
Marker interface for all leaf objects that wish to implement custom rendering
capabilities beyond just the basic GL callbacks, combining the custom rendering
of Cullable
with the rendering callbacks of ComponentRenderable
.
This interface is used by programmers that require fairly complex implementation logic at the point of rendering. An example of this is volume rendering that requires a set of viewpoint-specific cutting planes to be generated every frame. This is not achievable using the standard renderable interfaces as they have no way of determining the current viewpoint and transformation stack during the rendering process. This is made worse by a node that could have multiple parents, thus multiple transformation paths to it within a single cull traversal. A developer uses this class to take the given rendering information to generate a set of custom instructions that are passed back at rendering time, then later passed back during the rendering phase.
Leaf
base class. Anywhere else in the scene graph
hierarchy will be ignored by the rendering system. Classes that want to be
culled as part of a NodeComponent
should make use
of either ObjectRenderable
or ComponentRenderable
. Nodes
further up the tree that provide grouping and structural information, should
implement the Cullable
interface.
Method Summary | |
---|---|
boolean |
hasTransparency()
Check to see if this renderable object has anything that could be interpreted as an alpha value. |
boolean |
processCull(RenderableInstructions output,
javax.vecmath.Matrix4f vworldTx,
javax.vecmath.Matrix4f viewTransform,
javax.vecmath.Vector4f[] frustumPlanes,
float angularRes)
This node is being subjected to rendering, so process the provided data and return the instructions to the rendering system. |
void |
render(javax.media.opengl.GL gl,
java.lang.Object externalData)
Render object now using the pre-given set of custom rendering details. |
Methods inherited from interface org.j3d.aviatrix3d.rendering.Renderable |
---|
equals |
Methods inherited from interface java.lang.Comparable |
---|
compareTo |
Method Detail |
---|
boolean hasTransparency()
boolean processCull(RenderableInstructions output, javax.vecmath.Matrix4f vworldTx, javax.vecmath.Matrix4f viewTransform, javax.vecmath.Vector4f[] frustumPlanes, float angularRes)
render(GL, Object)
method is called, then formulate that now, and
hand it back as part of the query mechanism.
The culler will not make use of the children or numChildren variables as part of the rendering system. Only the return value of this method is used to determine if this object should be placed into the queue for sorting and rendering.
output
- Fill in the cull information herevworldTx
- The transformation from the root of the scene to
this node according to the current traversal pathviewTransform
- The transformation from the root of the scene
graph to the active viewpointfrustumPlanes
- Listing of frustum planes in the order: right,
left, bottom, top, far, nearangularRes
- Angular resolution of the screen, or 0 if not
calculable from the available data.
void render(javax.media.opengl.GL gl, java.lang.Object externalData)
gl
- The GL context to render withexternalData
- Some implementation-specific external data to
aid in the rendering that was generated in the processCull method.
|
Aviatrix3D 2.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |