Package org.jzy3d.plot3d.primitives
Class Parallelepiped
- java.lang.Object
-
- org.jzy3d.plot3d.primitives.Drawable
-
- org.jzy3d.plot3d.primitives.Wireframeable
-
- org.jzy3d.plot3d.primitives.Parallelepiped
-
- All Implemented Interfaces:
IMultiColorable
,ISingleColorable
,IGLRenderer
,ISortableDraw
public class Parallelepiped extends Wireframeable implements ISingleColorable, IMultiColorable
A Parallelepiped is a parallelepiped rectangle that is Drawable and Wireframeable. A future version of Rectangle3d should consider it as a Composite3d. This class has been implemented for debugging purpose and inconsistency of its input w.r.t other primitives should not be considered (no setData function).- Author:
- Martin Pernollet
-
-
Field Summary
-
Fields inherited from class org.jzy3d.plot3d.primitives.Wireframeable
depthFunctionChangeForWireframe, faceDisplayed, materialAmbiantReflection, materialDiffuseReflection, materialEmission, materialShininess, materialSpecularReflection, NO_OVERLAP_DEPTH_RATIO, polygonOffsetFactor, polygonOffsetFillEnable, polygonOffsetUnit, polygonWireframeDepthTrick, reflectLight, wireframeColor, wireframeColorFromPolygonPoints, wireframeDisplayed, wireframeWidth, wireframeWithLineLoop
-
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 Parallelepiped()
Initialize a parallelepiped.Parallelepiped(BoundingBox3d b)
Initialize a parallelepiped.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
applyGeometryTransform(Transform transform)
void
draw(IPainter painter)
Call OpenGL2 routines for rendering the object.Color
getColor()
Get the color.ColorMapper
getColorMapper()
Get the colormapper.Color
getWireframeColor()
Get the wireframe color.float
getWireframeWidth()
Get the wireframe width.boolean
isFaceDisplayed()
Get the face display status to on or off.boolean
isWireframeDisplayed()
Get the wireframe display status to on or off.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
setData(BoundingBox3d box)
Set the parallelepiped data.void
setFaceDisplayed(boolean status)
Set the face display status to on or off.void
setTransform(Transform transform)
Set object's transformation that is applied at the beginning of a call toDrawable.draw(IPainter)
.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.void
updateBounds()
-
Methods inherited from class org.jzy3d.plot3d.primitives.Wireframeable
applyDepthRangeDefault, applyDepthRangeForOverlying, applyDepthRangeForUnderlying, applyMaterial, doDrawBoundsIfDisplayed, getMaterialAmbiantReflection, getMaterialDiffuseReflection, getMaterialEmission, getMaterialShininess, getMaterialSpecularReflection, getPolygonOffsetFactor, getPolygonOffsetUnit, isPolygonOffsetFillEnable, isPolygonWireframeDepthTrick, isReflectLight, isWireframeColorFromPolygonPoints, polygonOffsetFillDisable, polygonOffsetFillEnable, polygonOffsetLineDisable, polygonOffsetLineEnable, setMaterialAmbiantReflection, setMaterialDiffuseReflection, setMaterialEmission, setMaterialShininess, setMaterialSpecularReflection, setPolygonOffsetFactor, setPolygonOffsetFillEnable, setPolygonOffsetUnit, setPolygonWireframeDepthTrick, setReflectLight, setWireframeColorFromPolygonPoints
-
Methods inherited from class org.jzy3d.plot3d.primitives.Drawable
addDrawableListener, asWireframeable, dispose, doTransform, fireDrawableChanged, fireDrawableChanged, getBarycentre, getBoundingBoxColor, getBounds, getDistance, getLegend, getLongestDistance, getShortestDistance, getSpaceTransformer, getTransform, getTransformBefore, hasLegend, isBoundingBoxDisplayed, isDisplayed, isLegendDisplayed, removeDrawableListener, setBoundingBoxColor, setBoundingBoxDisplayed, setDisplayed, setLegend, setLegendDisplayed, setSpaceTransformer, setTransformBefore, toString, toString
-
-
-
-
Constructor Detail
-
Parallelepiped
public Parallelepiped()
Initialize a parallelepiped.
-
Parallelepiped
public Parallelepiped(BoundingBox3d b)
Initialize a parallelepiped.
-
-
Method Detail
-
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
-
setTransform
public void setTransform(Transform transform)
Description copied from class:Drawable
Set object's transformation that is applied at the beginning of a call toDrawable.draw(IPainter)
.- Overrides:
setTransform
in classDrawable
-
setWireframeColor
public void setWireframeColor(Color color)
Description copied from class:Wireframeable
Set the wireframe color.- Overrides:
setWireframeColor
in classWireframeable
-
setWireframeDisplayed
public void setWireframeDisplayed(boolean status)
Description copied from class:Wireframeable
Set the wireframe display status to on or off.- Overrides:
setWireframeDisplayed
in classWireframeable
-
setWireframeWidth
public void setWireframeWidth(float width)
Description copied from class:Wireframeable
Set the wireframe width.- Overrides:
setWireframeWidth
in classWireframeable
-
setFaceDisplayed
public void setFaceDisplayed(boolean status)
Description copied from class:Wireframeable
Set the face display status to on or off.- Overrides:
setFaceDisplayed
in classWireframeable
-
getWireframeColor
public Color getWireframeColor()
Description copied from class:Wireframeable
Get the wireframe color.- Overrides:
getWireframeColor
in classWireframeable
-
isWireframeDisplayed
public boolean isWireframeDisplayed()
Description copied from class:Wireframeable
Get the wireframe display status to on or off.- Overrides:
isWireframeDisplayed
in classWireframeable
-
getWireframeWidth
public float getWireframeWidth()
Description copied from class:Wireframeable
Get the wireframe width.- Overrides:
getWireframeWidth
in classWireframeable
-
isFaceDisplayed
public boolean isFaceDisplayed()
Description copied from class:Wireframeable
Get the face display status to on or off.- Overrides:
isFaceDisplayed
in classWireframeable
-
setData
public void setData(BoundingBox3d box)
Set the parallelepiped data.
-
setColorMapper
public void setColorMapper(ColorMapper mapper)
Description copied from interface:IMultiColorable
Set the colormapper that will be used by the Drawable, instead of using precomputed colors.- Specified by:
setColorMapper
in interfaceIMultiColorable
-
getColorMapper
public ColorMapper getColorMapper()
Description copied from interface:IMultiColorable
Get the colormapper.- Specified by:
getColorMapper
in interfaceIMultiColorable
-
setColor
public void setColor(Color color)
Description copied from interface:ISingleColorable
Set the color.- Specified by:
setColor
in interfaceISingleColorable
- Parameters:
color
- the color
-
getColor
public Color getColor()
Description copied from interface:ISingleColorable
Get the color.- Specified by:
getColor
in interfaceISingleColorable
- Returns:
- color the color.
-
applyGeometryTransform
public void applyGeometryTransform(Transform transform)
- Specified by:
applyGeometryTransform
in classDrawable
-
updateBounds
public void updateBounds()
- Specified by:
updateBounds
in classDrawable
-
-