Class nurbs.Point4
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class nurbs.Point4

java.lang.Object
   |
   +----nurbs.Point4

public class Point4
extends Object
Representation of a homogeneous point in 3-space, used as control points for a NURBS curve or surface.

Variable Index

 o TOLERANCE
 o w
The w coordinate.
 o x
The x coordinate.
 o y
The y coordinate.
 o z
The z coordinate.

Constructor Index

 o Point4()
Constructor.
 o Point4(float, float, float, float)
Constructor.
 o Point4(Point4)
Constructor.

Method Index

 o add(Point4)
Add another Point4 to this one.
 o approxEquals(Point4)
Check to see if this Point4 approximately equals another.
 o rotate(float, float, float, float)
Apply a rotation transformation to this Point4.
 o scale(float)
Scale this Point4 uniformly.
 o scale(float, float, float)
Scale this Point4 non-uniformly.
 o setValue(float, float, float, float)
Set the values of this Point4.
 o toString()
Create a string representation of this point.
 o translate(float, float, float)
Translate this Point4.

Variables

 o TOLERANCE
  public final static float TOLERANCE
 o x
  public float x
The x coordinate.
 o y
  public float y
The y coordinate.
 o z
  public float z
The z coordinate.
 o w
  public float w
The w coordinate.

Constructors

 o Point4
  public Point4()
Constructor. Initializes coordinates to 0.0f.
 o Point4
  public Point4(float x,
                float y,
                float z,
                float w)
Constructor.
Parameters:
x - the x coordinate.
y - the y coordinate.
z - the z coordinate.
w - the w coordinate.
 o Point4
  public Point4(Point4 point)
Constructor.
Parameters:
point - a Point4 object to copy.

Methods

 o setValue
  public void setValue(float x,
                       float y,
                       float z,
                       float w)
Set the values of this Point4.
Parameters:
x - the x coordinate.
y - the y coordinate.
z - the z coordinate.
w - the w coordinate.
 o approxEquals
  public boolean approxEquals(Point4 p1)
Check to see if this Point4 approximately equals another. "Approximately" means within one part in ten million. This is useful when comparing to within roundoff error
Parameters:
p1 - the Point4 to compare
 o add
  public void add(Point4 p1)
Add another Point4 to this one.
Parameters:
p1 - the Point4 to add
 o translate
  public void translate(float x,
                        float y,
                        float z)
Translate this Point4.
Parameters:
x - the X translation component
y - the Y translation component
z - the Z translation component
 o scale
  public void scale(float scale)
Scale this Point4 uniformly.
Parameters:
scale - the uniform scale factor
 o scale
  public void scale(float xscale,
                    float yscale,
                    float zscale)
Scale this Point4 non-uniformly.
Parameters:
xscale - the x scale factor
yscale - the y scale factor
zscale - the z scale factor
 o rotate
  public void rotate(float xaxis,
                     float yaxis,
                     float zaxis,
                     float angle)
Apply a rotation transformation to this Point4.
Parameters:
xaxis - the X component of the rotation axis
yaxis - the Y component of the rotation axis
zaxis - the Z component of the rotation axis
angle - the angle of the rotation in radians
 o toString
  public String toString()
Create a string representation of this point.
Returns:
the String
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index