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
A Point3d is a storage for a Coord3d and a Color that represents a drawable 3d point.
The Point3d is used for:
A Point3d is defined by the following methods:
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 inherited from class org.jzy3d.plot3d.primitives.Drawable
bbox, boundingBoxColor, boundingBoxDisplayed, displayed, hasListeners, legend, legendDisplayed, listeners, spaceTransformer, transform, transformBefore
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
applyGeometryTransform
(Transform transform) clone()
void
Call OpenGL2 routines for rendering the object.getColor()
Get the color.getCoord()
double
getDistance
(Camera camera) Return the distance of the object center to theCamera
's eye.double
getLongestDistance
(Camera camera) double
getShortestDistance
(Camera camera) float
getWidth()
void
Set the color.void
void
Set the coordinates of the point.void
setWidth
(float width) toString
(int depth) void
Methods inherited from class org.jzy3d.plot3d.primitives.Drawable
addDrawableListener, asWireframeable, dispose, doDrawBoundsIfDisplayed, doTransform, fireDrawableChanged, fireDrawableChanged, getBarycentre, getBoundingBoxColor, getBounds, getLegend, getSpaceTransformer, getTransform, getTransformBefore, hasLegend, isBoundingBoxDisplayed, isDisplayed, isLegendDisplayed, removeDrawableListener, setBoundingBoxColor, setBoundingBoxDisplayed, setDisplayed, setLegend, setLegendDisplayed, setSpaceTransformer, setTransform, setTransformBefore, toString
-
Field Details
-
xyz
-
rgb
-
width
public float width
-
-
Constructor Details
-
Point
public Point()Intialize a point at the origin, with a white color and a width of 1. -
Point
Intialize a point with a white color and a width of 1. -
Point
Intialize a point with a width of 1. -
Point
-
-
Method Details
-
draw
Description copied from class:Drawable
Call OpenGL2 routines for rendering the object.- Specified by:
draw
in interfaceIGLRenderer
- Specified by:
draw
in classDrawable
-
applyGeometryTransform
- Specified by:
applyGeometryTransform
in classDrawable
-
setData
Set the coordinates of the point.- Parameters:
xyz
- point's coordinates
-
updateBounds
public void updateBounds()- Specified by:
updateBounds
in classDrawable
-
setColor
Description copied from interface:ISingleColorable
Set the color.- Specified by:
setColor
in interfaceISingleColorable
- Parameters:
color
- the color
-
getColor
Description copied from interface:ISingleColorable
Get the color.- Specified by:
getColor
in interfaceISingleColorable
- Returns:
- color the color.
-
setWidth
public void setWidth(float width) -
getWidth
public float getWidth() -
getDistance
Description copied from class:Drawable
Return the distance of the object center to theCamera
's eye.- Specified by:
getDistance
in interfaceISortableDraw
- Overrides:
getDistance
in classDrawable
-
getShortestDistance
- Specified by:
getShortestDistance
in interfaceISortableDraw
- Overrides:
getShortestDistance
in classDrawable
-
getLongestDistance
- Specified by:
getLongestDistance
in interfaceISortableDraw
- Overrides:
getLongestDistance
in classDrawable
-
clone
-
toString
-
getCoord
-
setCoord
-