Package org.jzy3d.plot3d.primitives
Class CubeGLUT
- java.lang.Object
-
- org.jzy3d.plot3d.primitives.Drawable
-
- org.jzy3d.plot3d.primitives.Wireframeable
-
- org.jzy3d.plot3d.primitives.CubeGLUT
-
- All Implemented Interfaces:
ISingleColorable,IGLRenderer,ISortableDraw
public class CubeGLUT extends Wireframeable implements ISingleColorable
A cube rendered with OpenGL GLUT. GLUT helps fully defining cube with normals, which makes this cube suitable for usage with aLight.- Author:
- Martin Pernollet
-
-
Field Summary
Fields Modifier and Type Field Description protected Colorcolorprotected Coord3dpositionprotected floatradius-
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 CubeGLUT(BoundingBox3d box)CubeGLUT(BoundingBox3d box, Color wireframe, Color face)CubeGLUT(Coord3d c, float radius)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapplyGeometryTransform(Transform transform)protected voiddoDrawCube(IPainter painter)voiddraw(IPainter painter)Call OpenGL2 routines for rendering the object.ColorgetColor()Get the color.Coord3dgetPosition()floatgetRadius()voidsetColor(Color color)Set the color.voidsetPosition(Coord3d position)voidsetRadius(float radius)voidupdateBounds()-
Methods inherited from class org.jzy3d.plot3d.primitives.Wireframeable
applyDepthRangeDefault, applyDepthRangeForOverlying, applyDepthRangeForUnderlying, applyMaterial, doDrawBoundsIfDisplayed, getMaterialAmbiantReflection, getMaterialDiffuseReflection, getMaterialEmission, getMaterialShininess, getMaterialSpecularReflection, getPolygonOffsetFactor, getPolygonOffsetUnit, getWireframeColor, getWireframeWidth, isFaceDisplayed, isPolygonOffsetFillEnable, isPolygonWireframeDepthTrick, isReflectLight, isWireframeColorFromPolygonPoints, isWireframeDisplayed, polygonOffsetFillDisable, polygonOffsetFillEnable, polygonOffsetLineDisable, polygonOffsetLineEnable, setFaceDisplayed, setMaterialAmbiantReflection, setMaterialDiffuseReflection, setMaterialEmission, setMaterialShininess, setMaterialSpecularReflection, setPolygonOffsetFactor, setPolygonOffsetFillEnable, setPolygonOffsetUnit, setPolygonWireframeDepthTrick, setReflectLight, setWireframeColor, setWireframeColorFromPolygonPoints, setWireframeDisplayed, setWireframeWidth
-
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, setTransform, setTransformBefore, toString, toString
-
-
-
-
Constructor Detail
-
CubeGLUT
public CubeGLUT(Coord3d c, float radius)
-
CubeGLUT
public CubeGLUT(BoundingBox3d box)
-
CubeGLUT
public CubeGLUT(BoundingBox3d box, Color wireframe, Color face)
-
-
Method Detail
-
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.
-
getRadius
public float getRadius()
-
setRadius
public void setRadius(float radius)
-
getPosition
public Coord3d getPosition()
-
setPosition
public void setPosition(Coord3d position)
-
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
-
doDrawCube
protected void doDrawCube(IPainter painter)
-
applyGeometryTransform
public void applyGeometryTransform(Transform transform)
- Specified by:
applyGeometryTransformin classDrawable
-
updateBounds
public void updateBounds()
- Specified by:
updateBoundsin classDrawable
-
-