public class Point extends AbstractDrawable implements ISingleColorable
Graph
.
Polygon
) a way to associate a
coordinate and a color.
Modifier and Type | Field and Description |
---|---|
Color |
rgb |
float |
width |
Coord3d |
xyz |
bbox, boundingBoxColor, boundingBoxDisplayed, displayed, hasListeners, legend, legendDisplayed, listeners, spaceTransformer, transform, transformBefore
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) |
Modifier and Type | Method and Description |
---|---|
void |
applyGeometryTransform(Transform transform) |
Point |
clone() |
void |
draw(com.jogamp.opengl.GL gl,
com.jogamp.opengl.glu.GLU glu,
Camera cam)
Call OpenGL2 routines for rendering the object.
|
Color |
getColor()
Get the color.
|
Coord3d |
getCoord() |
double |
getDistance(Camera camera)
Return the distance of the object center to the
Camera 's eye. |
double |
getLongestDistance(Camera camera) |
double |
getShortestDistance(Camera camera) |
void |
setColor(Color color)
Set the color.
|
void |
setCoord(Coord3d xyz) |
void |
setData(Coord3d xyz)
Set the coordinates of the point.
|
void |
setWidth(float width) |
String |
toString(int depth) |
void |
updateBounds() |
addDrawableListener, call, call, callWithAlphaFactor, colorGL2, colorGLES2, dispose, doDrawBounds, 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, vertexGL2, vertexGLES2
public Point()
public Point(Coord3d xyz)
public void draw(com.jogamp.opengl.GL gl, com.jogamp.opengl.glu.GLU glu, Camera cam)
AbstractDrawable
draw
in interface IGLRenderer
draw
in class AbstractDrawable
gl
- GL2 contextglu
- GLU contextcam
- a reference to a shooting Camera.public void applyGeometryTransform(Transform transform)
applyGeometryTransform
in class AbstractDrawable
public void setData(Coord3d xyz)
xyz
- point's coordinatespublic void updateBounds()
updateBounds
in class AbstractDrawable
public void setColor(Color color)
ISingleColorable
setColor
in interface ISingleColorable
color
- the colorpublic Color getColor()
ISingleColorable
getColor
in interface ISingleColorable
public void setWidth(float width)
public double getDistance(Camera camera)
AbstractDrawable
Camera
's eye.getDistance
in interface ISortableDraw
getDistance
in class AbstractDrawable
public double getShortestDistance(Camera camera)
getShortestDistance
in interface ISortableDraw
getShortestDistance
in class AbstractDrawable
public double getLongestDistance(Camera camera)
getLongestDistance
in interface ISortableDraw
getLongestDistance
in class AbstractDrawable
public String toString(int depth)
toString
in class AbstractDrawable
public Coord3d getCoord()
public void setCoord(Coord3d xyz)
Copyright © 2016. All rights reserved.