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.
TOLERANCE
w
The w coordinate.
x
The x coordinate.
y
The y coordinate.
z
The z coordinate.
Point4 ()
Constructor.
Point4 (float, float, float, float)
Constructor.
Point4 (Point4)
Constructor.
add (Point4)
Add another Point4 to this one.
approxEquals (Point4)
Check to see if this Point4 approximately equals
another.
rotate (float, float, float, float)
Apply a rotation transformation to this Point4.
scale (float)
Scale this Point4 uniformly.
scale (float, float, float)
Scale this Point4 non-uniformly.
setValue (float, float, float, float)
Set the values of this Point4.
toString ()
Create a string representation of this point.
translate (float, float, float)
Translate this Point4.
TOLERANCE
public final static float TOLERANCE
x
public float x
The x coordinate.
y
public float y
The y coordinate.
z
public float z
The z coordinate.
w
public float w
The w coordinate.
Point4
public Point4()
Constructor. Initializes coordinates to 0.0f.
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.
Point4
public Point4(Point4 point)
Constructor.
Parameters:
point - a Point4 object to copy.
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.
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
add
public void add(Point4 p1)
Add another Point4 to this one.
Parameters:
p1 - the Point4 to add
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
scale
public void scale(float scale)
Scale this Point4 uniformly.
Parameters:
scale - the uniform scale factor
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
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
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