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 voidapplyGeometryTransform(Transform transform)voiddraw(IPainter painter)Call OpenGL2 routines for rendering the object.ColorgetColor()Get the color.ColorMappergetColorMapper()Get the colormapper.ColorgetWireframeColor()Get the wireframe color.floatgetWireframeWidth()Get the wireframe width.booleanisFaceDisplayed()Get the face display status to on or off.booleanisWireframeDisplayed()Get the wireframe display status to on or off.voidsetColor(Color color)Set the color.voidsetColorMapper(ColorMapper mapper)Set the colormapper that will be used by the Drawable, instead of using precomputed colors.voidsetData(BoundingBox3d box)Set the parallelepiped data.voidsetFaceDisplayed(boolean status)Set the face display status to on or off.voidsetTransform(Transform transform)Set object's transformation that is applied at the beginning of a call toDrawable.draw(IPainter).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.voidupdateBounds()-
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:DrawableCall OpenGL2 routines for rendering the object.- Specified by:
drawin interfaceIGLRenderer- Specified by:
drawin classDrawable
-
setTransform
public void setTransform(Transform transform)
Description copied from class:DrawableSet object's transformation that is applied at the beginning of a call toDrawable.draw(IPainter).- Overrides:
setTransformin classDrawable
-
setWireframeColor
public void setWireframeColor(Color color)
Description copied from class:WireframeableSet the wireframe color.- Overrides:
setWireframeColorin classWireframeable
-
setWireframeDisplayed
public void setWireframeDisplayed(boolean status)
Description copied from class:WireframeableSet the wireframe display status to on or off.- Overrides:
setWireframeDisplayedin classWireframeable
-
setWireframeWidth
public void setWireframeWidth(float width)
Description copied from class:WireframeableSet the wireframe width.- Overrides:
setWireframeWidthin classWireframeable
-
setFaceDisplayed
public void setFaceDisplayed(boolean status)
Description copied from class:WireframeableSet the face display status to on or off.- Overrides:
setFaceDisplayedin classWireframeable
-
getWireframeColor
public Color getWireframeColor()
Description copied from class:WireframeableGet the wireframe color.- Overrides:
getWireframeColorin classWireframeable
-
isWireframeDisplayed
public boolean isWireframeDisplayed()
Description copied from class:WireframeableGet the wireframe display status to on or off.- Overrides:
isWireframeDisplayedin classWireframeable
-
getWireframeWidth
public float getWireframeWidth()
Description copied from class:WireframeableGet the wireframe width.- Overrides:
getWireframeWidthin classWireframeable
-
isFaceDisplayed
public boolean isFaceDisplayed()
Description copied from class:WireframeableGet the face display status to on or off.- Overrides:
isFaceDisplayedin classWireframeable
-
setData
public void setData(BoundingBox3d box)
Set the parallelepiped data.
-
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.
-
applyGeometryTransform
public void applyGeometryTransform(Transform transform)
- Specified by:
applyGeometryTransformin classDrawable
-
updateBounds
public void updateBounds()
- Specified by:
updateBoundsin classDrawable
-
-