|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jzy3d.plot3d.primitives.AbstractDrawable org.jzy3d.plot3d.primitives.AbstractWireframeable org.jzy3d.plot3d.primitives.CompileableComposite
public class CompileableComposite
A CompileableComposite
allows storage and subsequent faster execution of individual
contained instances drawing routines in an OpenGL display list.
Compiling the object take the time needed to render it as a standard AbstractComposite
,
and rendering it once it is compiled seems to take roughly half the time up to now.
Since compilation occurs during a draw()
, the first call to draw()
is supposed
to be 1.5x longer than a standard AbstractComposite
, while all next cycles would be 0.5x
longer.
Compilation occurs when the content or the display attributes of this Composite changes
(then all add(), remove(), setColor(), setWireFrameDisplayed(), etc). One can also force
rebuilding the object by calling recompile();
IMPORTANT: for the moment, CompileableComposite
should not be use in a charts using a
Quality
superior to Intermediate, in other word, you should not desire to have alpha
enabled in your scene. Indeed, alpha requires ordering of polygons each time the viewpoint changes,
which would require to recompile the object.
Constructor Summary | |
---|---|
CompileableComposite()
|
Method Summary | |
---|---|
void |
add(AbstractDrawable drawable)
Add a Drawable to this composite. |
void |
add(java.util.List<? extends AbstractDrawable> drawables)
Append a list of Drawables to this composite. |
void |
clear()
Clear the list of Drawables from this composite. |
void |
draw(javax.media.opengl.GL gl,
javax.media.opengl.glu.GLU glu,
Camera cam)
Reset the object if required, compile the object if it is not compiled, and execute actual rendering. |
AbstractDrawable |
get(int p)
Get a Drawable stored by this composite. |
BoundingBox3d |
getBounds()
Creates and return a BoundingBox3d that embed all available Drawable bounds. |
Color |
getColor()
Get the color. |
ColorMapper |
getColorMapper()
Get the colormapper. |
java.util.List<AbstractDrawable> |
getDrawables()
|
boolean |
isDetailedToString()
|
void |
recompile()
Force the object to be rebuilt and stored as a display list at the next call to draw(). |
void |
remove(AbstractDrawable drawable)
Remove a Drawable from this composite. |
void |
setColor(Color color)
Set the color. |
void |
setColorMapper(ColorMapper mapper)
Set the colormapper that will be used by the Drawable, instead of using precomputed colors. |
void |
setDetailedToString(boolean detailedToString)
When to true, the toString() method will give the detail of each element
of this composite object in a tree like layout. |
void |
setFaceDisplayed(boolean status)
Set the face display status to on or off. |
void |
setWireframeColor(Color color)
Set the wireframe color. |
void |
setWireframeDisplayed(boolean status)
Set the wireframe display status to on or off. |
void |
setWireframeWidth(float width)
Set the wireframe width. |
int |
size()
Return the number of Drawable stored by this composite. |
java.lang.String |
toString()
Print out information concerning all Drawable of this composite. |
java.lang.String |
toString(int depth)
|
Methods inherited from class org.jzy3d.plot3d.primitives.AbstractWireframeable |
---|
getFaceDisplayed, getWireframeColor, getWireframeDisplayed, getWireframeWidth |
Methods inherited from class org.jzy3d.plot3d.primitives.AbstractDrawable |
---|
addDrawableListener, dispose, getBarycentre, getDistance, getFace, getLongestDistance, getShortestDistance, getTransform, hasFace, isDisplayed, isFace2dDisplayed, removeDrawableListener, setDisplayed, setLegend, setLegendDisplayed, setTransform |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CompileableComposite()
Method Detail |
---|
public void recompile()
public void draw(javax.media.opengl.GL gl, javax.media.opengl.glu.GLU glu, Camera cam)
draw
in interface IGLRenderer
draw
in class AbstractDrawable
gl
- GL contextglu
- GLU contextcam
- a reference to a shooting Camera.public void add(java.util.List<? extends AbstractDrawable> drawables)
public void clear()
public void add(AbstractDrawable drawable)
public void remove(AbstractDrawable drawable)
public AbstractDrawable get(int p)
public java.util.List<AbstractDrawable> getDrawables()
public int size()
public BoundingBox3d getBounds()
getBounds
in class AbstractDrawable
public void setWireframeColor(Color color)
AbstractWireframeable
setWireframeColor
in interface IWireframeable
setWireframeColor
in class AbstractWireframeable
public void setWireframeDisplayed(boolean status)
AbstractWireframeable
setWireframeDisplayed
in interface IWireframeable
setWireframeDisplayed
in class AbstractWireframeable
public void setWireframeWidth(float width)
AbstractWireframeable
setWireframeWidth
in interface IWireframeable
setWireframeWidth
in class AbstractWireframeable
public void setFaceDisplayed(boolean status)
AbstractWireframeable
setFaceDisplayed
in interface IWireframeable
setFaceDisplayed
in class AbstractWireframeable
public void setColorMapper(ColorMapper mapper)
IMultiColorable
setColorMapper
in interface IMultiColorable
public ColorMapper getColorMapper()
IMultiColorable
getColorMapper
in interface IMultiColorable
public void setColor(Color color)
ISingleColorable
setColor
in interface ISingleColorable
color
- the colorpublic Color getColor()
ISingleColorable
getColor
in interface ISingleColorable
public java.lang.String toString()
toString
in class AbstractDrawable
public java.lang.String toString(int depth)
toString
in class AbstractDrawable
public boolean isDetailedToString()
public void setDetailedToString(boolean detailedToString)
toString()
method will give the detail of each element
of this composite object in a tree like layout.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |