Package org.jzy3d.plot3d.primitives
Class MultiDrawable
- java.lang.Object
-
- org.jzy3d.plot3d.primitives.Drawable
-
- org.jzy3d.plot3d.primitives.MultiDrawable
-
- All Implemented Interfaces:
IGLRenderer
,ISortableDraw
public class MultiDrawable extends Drawable
-
-
Field Summary
-
Fields inherited from class org.jzy3d.plot3d.primitives.Drawable
bbox, boundingBoxColor, boundingBoxDisplayed, displayed, hasListeners, legend, legendDisplayed, listeners, spaceTransformer, transform, transformBefore
-
-
Constructor Summary
Constructors Constructor Description MultiDrawable()
MultiDrawable(List<Drawable> drawables)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
applyGeometryTransform(Transform transform)
Drawable
current()
protected void
doDrawBoundsIfDisplayed(IPainter painter)
void
doTransform(IPainter painter)
void
draw(IPainter painter)
Call OpenGL2 routines for rendering the object.Coord3d
getBarycentre()
Return the barycentre of this object, which is computed as the center of its bounding box.Color
getBoundingBoxColor()
BoundingBox3d
getBounds()
Return the BoundingBox of this object.int
getCurrentDrawable()
double
getDistance(Camera camera)
Return the distance of the object center to theCamera
's eye.List<Drawable>
getDrawables()
ILegend
getLegend()
double
getLongestDistance(Camera camera)
double
getShortestDistance(Camera camera)
SpaceTransformer
getSpaceTransformer()
Transform
getTransform()
Get object's transformation that is applied at the beginning of a call todraw(IPainter)
.Transform
getTransformBefore()
boolean
hasLegend()
boolean
isBoundingBoxDisplayed()
boolean
isDisplayed()
Return the display status of this object.boolean
isLegendDisplayed()
void
setBoundingBoxColor(Color boundingBoxColor)
void
setBoundingBoxDisplayed(boolean boundingBoxDisplayed)
void
setCurrentDrawable(int currentDrawable)
void
setDisplayed(boolean status)
Set to true or false the displayed status of this object.void
setDrawables(List<Drawable> drawables)
void
setLegend(ILegend legend)
void
setLegendDisplayed(boolean status)
void
setSpaceTransformer(SpaceTransformer spaceTransformer)
void
setTransform(Transform transform)
Set object's transformation that is applied at the beginning of a call todraw(IPainter)
.void
setTransformBefore(Transform transformBefore)
String
toString()
String
toString(int depth)
void
updateBounds()
-
Methods inherited from class org.jzy3d.plot3d.primitives.Drawable
addDrawableListener, asWireframeable, dispose, fireDrawableChanged, fireDrawableChanged, removeDrawableListener
-
-
-
-
Method Detail
-
getCurrentDrawable
public int getCurrentDrawable()
-
setCurrentDrawable
public void setCurrentDrawable(int currentDrawable)
-
current
public Drawable current()
-
draw
public void draw(IPainter painter)
Description copied from class:Drawable
Call OpenGL2 routines for rendering the object.- Specified by:
draw
in interfaceIGLRenderer
- Specified by:
draw
in classDrawable
-
applyGeometryTransform
public void applyGeometryTransform(Transform transform)
- Specified by:
applyGeometryTransform
in classDrawable
-
updateBounds
public void updateBounds()
- Specified by:
updateBounds
in classDrawable
-
doTransform
public void doTransform(IPainter painter)
- Overrides:
doTransform
in classDrawable
-
doDrawBoundsIfDisplayed
protected void doDrawBoundsIfDisplayed(IPainter painter)
- Overrides:
doDrawBoundsIfDisplayed
in classDrawable
-
setTransform
public void setTransform(Transform transform)
Set object's transformation that is applied at the beginning of a call todraw(IPainter)
.- Overrides:
setTransform
in classDrawable
- Parameters:
transform
-
-
getTransform
public Transform getTransform()
Get object's transformation that is applied at the beginning of a call todraw(IPainter)
.- Overrides:
getTransform
in classDrawable
- Returns:
- transform
-
getTransformBefore
public Transform getTransformBefore()
- Overrides:
getTransformBefore
in classDrawable
-
setTransformBefore
public void setTransformBefore(Transform transformBefore)
- Overrides:
setTransformBefore
in classDrawable
-
getBounds
public BoundingBox3d getBounds()
Return the BoundingBox of this object.
-
getBarycentre
public Coord3d getBarycentre()
Return the barycentre of this object, which is computed as the center of its bounding box. If the bounding box is not available, the returned value isCoord3d.INVALID
- Overrides:
getBarycentre
in classDrawable
- Returns:
- the center of the bounding box, or
Coord3d.INVALID
.
-
setDisplayed
public void setDisplayed(boolean status)
Set to true or false the displayed status of this object.- Overrides:
setDisplayed
in classDrawable
- Parameters:
status
-
-
isDisplayed
public boolean isDisplayed()
Return the display status of this object.- Overrides:
isDisplayed
in classDrawable
-
getDistance
public double getDistance(Camera camera)
Return the distance of the object center to theCamera
's eye.- Specified by:
getDistance
in interfaceISortableDraw
- Overrides:
getDistance
in classDrawable
-
getShortestDistance
public double getShortestDistance(Camera camera)
- Specified by:
getShortestDistance
in interfaceISortableDraw
- Overrides:
getShortestDistance
in classDrawable
-
getLongestDistance
public double getLongestDistance(Camera camera)
- Specified by:
getLongestDistance
in interfaceISortableDraw
- Overrides:
getLongestDistance
in classDrawable
-
setLegendDisplayed
public void setLegendDisplayed(boolean status)
- Overrides:
setLegendDisplayed
in classDrawable
-
isLegendDisplayed
public boolean isLegendDisplayed()
- Overrides:
isLegendDisplayed
in classDrawable
-
isBoundingBoxDisplayed
public boolean isBoundingBoxDisplayed()
- Overrides:
isBoundingBoxDisplayed
in classDrawable
-
setBoundingBoxDisplayed
public void setBoundingBoxDisplayed(boolean boundingBoxDisplayed)
- Overrides:
setBoundingBoxDisplayed
in classDrawable
-
getBoundingBoxColor
public Color getBoundingBoxColor()
- Overrides:
getBoundingBoxColor
in classDrawable
-
setBoundingBoxColor
public void setBoundingBoxColor(Color boundingBoxColor)
- Overrides:
setBoundingBoxColor
in classDrawable
-
getSpaceTransformer
public SpaceTransformer getSpaceTransformer()
- Overrides:
getSpaceTransformer
in classDrawable
-
setSpaceTransformer
public void setSpaceTransformer(SpaceTransformer spaceTransformer)
- Overrides:
setSpaceTransformer
in classDrawable
-
-