org.jzy3d.plot3d.primitives
Class Parallelepiped
- java.lang.Object
-
- org.jzy3d.plot3d.primitives.AbstractDrawable
-
- org.jzy3d.plot3d.primitives.AbstractWireframeable
-
- org.jzy3d.plot3d.primitives.Parallelepiped
-
- All Implemented Interfaces:
- IMultiColorable, ISingleColorable, IGLRenderer, ISortableDraw
public class Parallelepiped extends AbstractWireframeable 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).
-
-
Constructor Summary
Constructors Constructor and Description Parallelepiped()Initialize a parallelepiped.Parallelepiped(BoundingBox3d b)Initialize a parallelepiped.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidapplyGeometryTransform(Transform transform)voiddraw(com.jogamp.opengl.GL gl, com.jogamp.opengl.glu.GLU glu, Camera cam)Call OpenGL2 routines for rendering the object.ColorgetColor()Get the color.ColorMappergetColorMapper()Get the colormapper.booleangetFaceDisplayed()Get the face display status to on or off.ColorgetWireframeColor()Get the wireframe color.booleangetWireframeDisplayed()Get the wireframe display status to on or off.floatgetWireframeWidth()Get the wireframe width.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 toAbstractDrawable.draw(GL,GLU,Camera).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.AbstractDrawable
addDrawableListener, dispose, doTransform, 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(com.jogamp.opengl.GL gl, com.jogamp.opengl.glu.GLU glu, Camera cam)Description copied from class:AbstractDrawableCall OpenGL2 routines for rendering the object.- Specified by:
drawin interfaceIGLRenderer- Specified by:
drawin classAbstractDrawable- Parameters:
gl- GL2 contextglu- GLU contextcam- a reference to a shooting Camera.
-
setTransform
public void setTransform(Transform transform)
Description copied from class:AbstractDrawableSet object's transformation that is applied at the beginning of a call toAbstractDrawable.draw(GL,GLU,Camera).- Overrides:
setTransformin 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
-
getWireframeColor
public Color getWireframeColor()
Description copied from class:AbstractWireframeableGet the wireframe color.- Overrides:
getWireframeColorin classAbstractWireframeable
-
getWireframeDisplayed
public boolean getWireframeDisplayed()
Description copied from class:AbstractWireframeableGet the wireframe display status to on or off.- Overrides:
getWireframeDisplayedin classAbstractWireframeable
-
getWireframeWidth
public float getWireframeWidth()
Description copied from class:AbstractWireframeableGet the wireframe width.- Overrides:
getWireframeWidthin classAbstractWireframeable
-
getFaceDisplayed
public boolean getFaceDisplayed()
Description copied from class:AbstractWireframeableGet the face display status to on or off.- Overrides:
getFaceDisplayedin classAbstractWireframeable
-
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 classAbstractDrawable
-
updateBounds
public void updateBounds()
- Specified by:
updateBoundsin classAbstractDrawable
-
-
DMelt 3.0 © DataMelt by jWork.ORG