org.jzy3d.plot3d.primitives
Class AbstractComposite
- java.lang.Object
-
- org.jzy3d.plot3d.primitives.AbstractDrawable
-
- org.jzy3d.plot3d.primitives.AbstractWireframeable
-
- org.jzy3d.plot3d.primitives.AbstractComposite
-
- All Implemented Interfaces:
- IMultiColorable, ISingleColorable, IGLRenderer, ISortableDraw
- Direct Known Subclasses:
- BarycenterAnnotation, ContourLevel, Cylinder, EnlightableBar, FlatLine2d, HistogramBar, LineStripInterpolated, ParallelepipedComposite, Shape, TesselatedPolygon, TexturedCube, TexturedCylinder
public abstract class AbstractComposite extends AbstractWireframeable implements ISingleColorable, IMultiColorable
A Composite gathers several Drawable and provides default methods for rendering them all in one call.
-
-
Constructor Summary
Constructors Constructor and Description AbstractComposite()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidadd(AbstractDrawable drawable)Add a Drawable to this composite.voidadd(java.util.List<? extends AbstractDrawable> drawables)Append a list of Drawables to this composite.voidapplyGeometryTransform(Transform transform)voidclear()Clear the list of Drawables from this composite.voiddraw(com.jogamp.opengl.GL gl, com.jogamp.opengl.glu.GLU glu, Camera camera)Delegate rendering iteratively to all Drawable of this composite.AbstractDrawableget(int p)Get a Drawable stored by this composite.BoundingBox3dgetBounds()Creates and return a BoundingBox3d that embed all available Drawable bounds.ColorgetColor()Get the color.ColorMappergetColorMapper()Get the colormapper.java.util.List<AbstractDrawable>getDrawables()TransformgetTransform()Return the transform that was affected to this composite.booleanisDetailedToString()voidremove(AbstractDrawable drawable)Remove a Drawable from this composite.voidsetColor(Color color)Set the color.voidsetColorMapper(ColorMapper mapper)Set the colormapper that will be used by the Drawable, instead of using precomputed colors.voidsetDetailedToString(boolean detailedToString)When to true, thetoString()method will give the detail of each element of this composite object in a tree like layout.voidsetDisplayed(boolean status)Set to true or false the displayed status of this object.voidsetFaceDisplayed(boolean status)Set the face display status to on or off.voidsetTransform(Transform transform)Delegate transforming iteratively to all Drawable of this composite and stores the given transform for keeping the ability of retrieving it.voidsetTransformBefore(Transform transform)voidsetWireframeColor(Color color)Set the wireframe color.voidsetWireframeDisplayed(boolean status)Set the wireframe display status to on or off.voidsetWireframeWidth(float width)Set the wireframe width.intsize()Return the number of Drawable stored by this composite.java.lang.StringtoString()Print out information concerning all Drawable of this composite.java.lang.StringtoString(int depth)voidupdateBounds()-
Methods inherited from class org.jzy3d.plot3d.primitives.AbstractWireframeable
getFaceDisplayed, getWireframeColor, getWireframeDisplayed, getWireframeWidth
-
Methods inherited from class org.jzy3d.plot3d.primitives.AbstractDrawable
addDrawableListener, dispose, doTransform, getBarycentre, getBoundingBoxColor, getDistance, getLegend, getLongestDistance, getShortestDistance, getSpaceTransformer, getTransformBefore, hasLegend, isBoundingBoxDisplayed, isDisplayed, isLegendDisplayed, removeDrawableListener, setBoundingBoxColor, setBoundingBoxDisplayed, setLegend, setLegendDisplayed, setSpaceTransformer
-
-
-
-
Method Detail
-
add
public void add(java.util.List<? extends AbstractDrawable> drawables)
Append a list of Drawables to this composite.
-
clear
public void clear()
Clear the list of Drawables from this composite.
-
add
public void add(AbstractDrawable drawable)
Add a Drawable to this composite.
-
remove
public void remove(AbstractDrawable drawable)
Remove a Drawable from this composite.
-
get
public AbstractDrawable get(int p)
Get a Drawable stored by this composite.
-
getDrawables
public java.util.List<AbstractDrawable> getDrawables()
-
size
public int size()
Return the number of Drawable stored by this composite.
-
draw
public void draw(com.jogamp.opengl.GL gl, com.jogamp.opengl.glu.GLU glu, Camera camera)Delegate rendering iteratively to all Drawable of this composite.- Specified by:
drawin interfaceIGLRenderer- Specified by:
drawin classAbstractDrawable- Parameters:
gl- GL2 contextglu- GLU contextcamera- a reference to a shooting Camera.
-
setTransform
public void setTransform(Transform transform)
Delegate transforming iteratively to all Drawable of this composite and stores the given transform for keeping the ability of retrieving it.- Overrides:
setTransformin classAbstractDrawable
-
setTransformBefore
public void setTransformBefore(Transform transform)
- Overrides:
setTransformBeforein classAbstractDrawable
-
getTransform
public Transform getTransform()
Return the transform that was affected to this composite.- Overrides:
getTransformin classAbstractDrawable- Returns:
- transform
-
getBounds
public BoundingBox3d getBounds()
Creates and return a BoundingBox3d that embed all available Drawable bounds.- Overrides:
getBoundsin classAbstractDrawable- Returns:
- a bounding box
-
updateBounds
public void updateBounds()
- Specified by:
updateBoundsin classAbstractDrawable
-
applyGeometryTransform
public void applyGeometryTransform(Transform transform)
- Specified by:
applyGeometryTransformin classAbstractDrawable
-
setWireframeColor
public void setWireframeColor(Color color)
Description copied from class:AbstractWireframeableSet the wireframe color.- Overrides:
setWireframeColorin classAbstractWireframeable
-
setWireframeDisplayed
public void setWireframeDisplayed(boolean status)
Description copied from class:AbstractWireframeableSet the wireframe display status to on or off.- Overrides:
setWireframeDisplayedin classAbstractWireframeable
-
setWireframeWidth
public void setWireframeWidth(float width)
Description copied from class:AbstractWireframeableSet the wireframe width.- Overrides:
setWireframeWidthin classAbstractWireframeable
-
setFaceDisplayed
public void setFaceDisplayed(boolean status)
Description copied from class:AbstractWireframeableSet the face display status to on or off.- Overrides:
setFaceDisplayedin classAbstractWireframeable
-
setDisplayed
public void setDisplayed(boolean status)
Description copied from class:AbstractDrawableSet to true or false the displayed status of this object.- Overrides:
setDisplayedin classAbstractDrawable
-
setColorMapper
public void setColorMapper(ColorMapper mapper)
Description copied from interface:IMultiColorableSet the colormapper that will be used by the Drawable, instead of using precomputed colors.- Specified by:
setColorMapperin interfaceIMultiColorable
-
getColorMapper
public ColorMapper getColorMapper()
Description copied from interface:IMultiColorableGet the colormapper.- Specified by:
getColorMapperin interfaceIMultiColorable
-
setColor
public void setColor(Color color)
Description copied from interface:ISingleColorableSet the color.- Specified by:
setColorin interfaceISingleColorable- Parameters:
color- the color
-
getColor
public Color getColor()
Description copied from interface:ISingleColorableGet the color.- Specified by:
getColorin interfaceISingleColorable- Returns:
- color the color.
-
toString
public java.lang.String toString()
Print out information concerning all Drawable of this composite.- Overrides:
toStringin classAbstractDrawable
-
toString
public java.lang.String toString(int depth)
- Overrides:
toStringin classAbstractDrawable
-
isDetailedToString
public boolean isDetailedToString()
-
setDetailedToString
public void setDetailedToString(boolean detailedToString)
When to true, thetoString()method will give the detail of each element of this composite object in a tree like layout.
-
-
DMelt 3.0 © DataMelt by jWork.ORG