Class SelectableSphere
- java.lang.Object
-
- org.jzy3d.plot3d.primitives.Drawable
-
- org.jzy3d.plot3d.primitives.Wireframeable
-
- org.jzy3d.plot3d.primitives.Sphere
-
- org.jzy3d.plot3d.primitives.selectable.SelectableSphere
-
- All Implemented Interfaces:
ISingleColorable
,IGLRenderer
,ISortableDraw
,Selectable
public class SelectableSphere extends Sphere implements Selectable
-
-
Field Summary
Fields Modifier and Type Field Description protected List<Coord3d>
anchors
protected boolean
isHighlighted
protected int
PRECISION
protected List<Coord3d>
projection
-
Fields inherited from class org.jzy3d.plot3d.primitives.Sphere
color, position, radius, slices, stacks
-
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 SelectableSphere()
SelectableSphere(Coord3d position, float radius, int slicing, Color color)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
buildAnchors()
protected List<Coord3d>
buildAnchors(Coord3d position, float radius)
void
draw(IPainter painter)
Call OpenGL2 routines for rendering the object.Polygon2d
getHull2d()
List<Coord3d>
getLastProjection()
List<Coord3d>
getProjection()
boolean
isHighlighted()
void
project(IPainter painter, Camera cam)
void
resetHighlighting()
void
setHighlighted(boolean value)
void
setPosition(Coord3d position)
Set the position of the Sphere and the dimensions of its boundingbox.void
setVolume(float radius)
Set the radius of the sphere, and the dimensions of its boundingbox.-
Methods inherited from class org.jzy3d.plot3d.primitives.Sphere
applyGeometryTransform, doDrawSphere, getColor, getPosition, setColor, setData, setSlicing, toString, updateBounds
-
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
-
-
-
-
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
- Overrides:
draw
in classSphere
-
project
public void project(IPainter painter, Camera cam)
- Specified by:
project
in interfaceSelectable
-
setPosition
public void setPosition(Coord3d position)
Description copied from class:Sphere
Set the position of the Sphere and the dimensions of its boundingbox. Note that this position will be use to translate the object before drawing it (meaning a glTranslate(position) is performed right after the Translate.execute).- Overrides:
setPosition
in classSphere
-
setVolume
public void setVolume(float radius)
Description copied from class:Sphere
Set the radius of the sphere, and the dimensions of its boundingbox.
-
buildAnchors
protected void buildAnchors()
-
getHull2d
public Polygon2d getHull2d()
- Specified by:
getHull2d
in interfaceSelectable
-
getLastProjection
public List<Coord3d> getLastProjection()
- Specified by:
getLastProjection
in interfaceSelectable
-
setHighlighted
public void setHighlighted(boolean value)
-
isHighlighted
public boolean isHighlighted()
-
resetHighlighting
public void resetHighlighting()
-
-