org.jzy3d.plot3d.primitives
Class Point
- java.lang.Object
-
- org.jzy3d.plot3d.primitives.AbstractDrawable
-
- org.jzy3d.plot3d.primitives.Point
-
- All Implemented Interfaces:
- ISingleColorable, IGLRenderer, ISortableDraw
- Direct Known Subclasses:
- AxeTransformablePoint, CameraDistanceAnnotation, PickablePoint
public class Point extends AbstractDrawable 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
-
-
Constructor Summary
Constructors Constructor and 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 and Description voidapplyGeometryTransform(Transform transform)Pointclone()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.Coord3dgetCoord()doublegetDistance(Camera camera)Return the distance of the object center to theCamera's eye.doublegetLongestDistance(Camera camera)doublegetShortestDistance(Camera camera)voidsetColor(Color color)Set the color.voidsetCoord(Coord3d xyz)voidsetData(Coord3d xyz)Set the coordinates of the point.voidsetWidth(float width)java.lang.StringtoString(int depth)voidupdateBounds()-
Methods inherited from class org.jzy3d.plot3d.primitives.AbstractDrawable
addDrawableListener, dispose, doTransform, getBarycentre, getBoundingBoxColor, getBounds, getLegend, getSpaceTransformer, getTransform, getTransformBefore, hasLegend, isBoundingBoxDisplayed, isDisplayed, isLegendDisplayed, 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(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.
-
applyGeometryTransform
public void applyGeometryTransform(Transform transform)
- Specified by:
applyGeometryTransformin classAbstractDrawable
-
setData
public void setData(Coord3d xyz)
Set the coordinates of the point.- Parameters:
xyz- point's coordinates
-
updateBounds
public void updateBounds()
- Specified by:
updateBoundsin classAbstractDrawable
-
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)
-
getDistance
public double getDistance(Camera camera)
Description copied from class:AbstractDrawableReturn the distance of the object center to theCamera's eye.- Specified by:
getDistancein interfaceISortableDraw- Overrides:
getDistancein classAbstractDrawable
-
getShortestDistance
public double getShortestDistance(Camera camera)
- Specified by:
getShortestDistancein interfaceISortableDraw- Overrides:
getShortestDistancein classAbstractDrawable
-
getLongestDistance
public double getLongestDistance(Camera camera)
- Specified by:
getLongestDistancein interfaceISortableDraw- Overrides:
getLongestDistancein classAbstractDrawable
-
clone
public Point clone()
- Overrides:
clonein classjava.lang.Object
-
toString
public java.lang.String toString(int depth)
- Overrides:
toStringin classAbstractDrawable
-
getCoord
public Coord3d getCoord()
-
setCoord
public void setCoord(Coord3d xyz)
-
-
DMelt 3.0 © DataMelt by jWork.ORG