org.jzy3d.plot3d.primitives
Class Point

java.lang.Object
  extended by org.jzy3d.plot3d.primitives.AbstractDrawable
      extended by org.jzy3d.plot3d.primitives.Point
All Implemented Interfaces:
ISingleColorable, IGLRenderer, ISortableDraw
Direct Known Subclasses:
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:


A Point3d is defined by the following methods:

Author:
Martin Pernollet

Field Summary
 Color rgb
           
 float width
           
 Coord3d xyz
           
 
Constructor Summary
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
 void draw(javax.media.opengl.GL gl, javax.media.opengl.glu.GLU glu, Camera cam)
          Call OpenGL routines for rendering the object.
 Color getColor()
          Get the color.
 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 setData(Coord3d xyz)
          Set the coordinates of the point.
 void setWidth(float width)
           
 java.lang.String toString(int depth)
           
 
Methods inherited from class org.jzy3d.plot3d.primitives.AbstractDrawable
addDrawableListener, dispose, getBarycentre, getBounds, getFace, getTransform, hasFace, isDisplayed, isFace2dDisplayed, removeDrawableListener, setDisplayed, setLegend, setLegendDisplayed, setTransform, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

xyz

public Coord3d xyz

rgb

public Color rgb

width

public float width
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.


Point

public Point(Coord3d xyz,
             Color rgb)
Intialize a point with a width of 1.


Point

public Point(Coord3d xyz,
             Color rgb,
             float width)
Method Detail

draw

public void draw(javax.media.opengl.GL gl,
                 javax.media.opengl.glu.GLU glu,
                 Camera cam)
Description copied from class: AbstractDrawable
Call OpenGL routines for rendering the object.

Specified by:
draw in interface IGLRenderer
Specified by:
draw in class AbstractDrawable
Parameters:
gl - GL context
glu - GLU context
cam - a reference to a shooting Camera.

setData

public void setData(Coord3d xyz)
Set the coordinates of the point.

Parameters:
xyz - point's coordinates

setColor

public void setColor(Color color)
Description copied from interface: ISingleColorable
Set the color.

Specified by:
setColor in interface ISingleColorable
Parameters:
color - the color

getColor

public Color getColor()
Description copied from interface: ISingleColorable
Get the color.

Specified by:
getColor in interface ISingleColorable
Returns:
color the color.

setWidth

public void setWidth(float width)

getDistance

public double getDistance(Camera camera)
Description copied from class: AbstractDrawable
Return the distance of the object center to the Camera's eye.

Specified by:
getDistance in interface ISortableDraw
Overrides:
getDistance in class AbstractDrawable

getShortestDistance

public double getShortestDistance(Camera camera)
Specified by:
getShortestDistance in interface ISortableDraw
Overrides:
getShortestDistance in class AbstractDrawable

getLongestDistance

public double getLongestDistance(Camera camera)
Specified by:
getLongestDistance in interface ISortableDraw
Overrides:
getLongestDistance in class AbstractDrawable

toString

public java.lang.String toString(int depth)
Overrides:
toString in class AbstractDrawable