public class Point4 extends Tuple4
Constructor and Description |
---|
Point4()
Constructs a point with coordinates (x,y,z) = 0 and w = 1.
|
Point4(double x,
double y,
double z)
Constructs a point with specified (x,y,z) coordinates and w = 1.
|
Point4(double x,
double y,
double z,
double w)
Constructs a point with specified coordinates.
|
Point4(Point3 p)
Constructs a point from the specified 3-D point.
|
Point4(Point4 p)
Constructs a copy of the specified point.
|
Modifier and Type | Method and Description |
---|---|
Point4 |
affine(double a,
Point4 q)
Returns an affine combination of this point p and the specified point q.
|
Point4 |
homogenize()
Returns the homogenized point equivalent to this point.
|
Point4 |
homogenizeEquals()
Homogenizes this point.
|
Point4 |
minus(Vector3 v)
Returns the point q = p-v, for this point p and the specified vector v.
|
Point4 |
minusEquals(Vector3 v)
Moves this point p by subtracting the specified vector v.
|
Point4 |
plus(Vector3 v)
Returns the point q = p+v, for this point p and the specified vector v.
|
Point4 |
plusEquals(Vector3 v)
Moves this point p by adding the specified vector v.
|
public Point4()
public Point4(double x, double y, double z)
x
- the x coordinate.y
- the y coordinate.z
- the z coordinate.public Point4(double x, double y, double z, double w)
x
- the x coordinate.y
- the y coordinate.z
- the z coordinate.w
- the w coordinate.public Point4(Point3 p)
p
- the 3-D point.public Point4(Point4 p)
p
- the point.public Point4 homogenize()
public Point4 homogenizeEquals()
public Point4 plus(Vector3 v)
v
- the vector v.public Point4 minus(Vector3 v)
v
- the vector v.public Point4 plusEquals(Vector3 v)
v
- the vector v.public Point4 minusEquals(Vector3 v)
v
- the vector v.