Package org.jzy3d.plot3d.primitives
Class Point
- java.lang.Object
-
- org.jzy3d.plot3d.primitives.Drawable
-
- org.jzy3d.plot3d.primitives.Point
-
- All Implemented Interfaces:
ISingleColorable,IGLRenderer,ISortableDraw
- Direct Known Subclasses:
CameraDistanceAnnotation,PickablePoint
public class Point extends Drawable implements ISingleColorable
A Point3d is a storage for a Coord3d and a Color that represents a drawable 3d point.
The Point3d is used for:- adding a Point3d to a
Graph. - providing to other primitives (e.g.
Polygon) a way to associate a coordinate and a color.
A Point3d is defined by the following methods:- setData() defines the point's position
- setColor() defines the point's color
- setWidth() defines the point's width
- Author:
- Martin Pernollet
-
-
Field Summary
Fields Modifier and Type Field Description ColorrgbfloatwidthCoord3dxyz-
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 Point()Intialize a point at the origin, with a white color and a width of 1.Point(Coord3d xyz)Intialize a point with a white color and a width of 1.Point(Coord3d xyz, Color rgb)Intialize a point with a width of 1.Point(Coord3d xyz, Color rgb, float width)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapplyGeometryTransform(Transform transform)Pointclone()voiddraw(IPainter painter)Call OpenGL2 routines for rendering the object.ColorgetColor()Get the color.Coord3dgetCoord()doublegetDistance(Camera camera)Return the distance of the object center to theCamera's eye.doublegetLongestDistance(Camera camera)doublegetShortestDistance(Camera camera)floatgetWidth()voidsetColor(Color color)Set the color.voidsetCoord(Coord3d xyz)voidsetData(Coord3d xyz)Set the coordinates of the point.voidsetWidth(float width)StringtoString(int depth)voidupdateBounds()-
Methods inherited from class org.jzy3d.plot3d.primitives.Drawable
addDrawableListener, dispose, doDrawBoundsIfDisplayed, doTransform, fireDrawableChanged, fireDrawableChanged, getBarycentre, getBoundingBoxColor, getBounds, getLegend, getSpaceTransformer, getTransform, getTransformBefore, hasLegend, isBoundingBoxDisplayed, isDisplayed, isLegendDisplayed, negative, removeDrawableListener, setBoundingBoxColor, setBoundingBoxDisplayed, setDisplayed, setLegend, setLegendDisplayed, setSpaceTransformer, setTransform, setTransformBefore, toString
-
-
-
-
Constructor Detail
-
Point
public Point()
Intialize a point at the origin, with a white color and a width of 1.
-
Point
public Point(Coord3d xyz)
Intialize a point with a white color and a width of 1.
-
-
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
-
applyGeometryTransform
public void applyGeometryTransform(Transform transform)
- Specified by:
applyGeometryTransformin classDrawable
-
setData
public void setData(Coord3d xyz)
Set the coordinates of the point.- Parameters:
xyz- point's coordinates
-
updateBounds
public void updateBounds()
- Specified by:
updateBoundsin classDrawable
-
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.
-
setWidth
public void setWidth(float width)
-
getWidth
public float getWidth()
-
getDistance
public double getDistance(Camera camera)
Description copied from class:DrawableReturn the distance of the object center to theCamera's eye.- Specified by:
getDistancein interfaceISortableDraw- Overrides:
getDistancein classDrawable
-
getShortestDistance
public double getShortestDistance(Camera camera)
- Specified by:
getShortestDistancein interfaceISortableDraw- Overrides:
getShortestDistancein classDrawable
-
getLongestDistance
public double getLongestDistance(Camera camera)
- Specified by:
getLongestDistancein interfaceISortableDraw- Overrides:
getLongestDistancein classDrawable
-
getCoord
public Coord3d getCoord()
-
setCoord
public void setCoord(Coord3d xyz)
-
-