|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object
|
+--jumbo.euclid.Status
|
+--jumbo.euclid.Point3
Point3 - 3-dimensional point class
Point3 represents a 3-dimensional point. It is one of a set of primitives which can be combined to create and manipulate complex 3-dimensional objects. Points can be transformed with rotation matrices or rotation-translation matrices (Transform3), can be calculated from other primitives or can be used to generate other primitives.
Default point is 0.0, 0.0, 0.0
Vector3,
Line3,
Point3Vector,
Plane3| Field Summary | |
protected double[] |
flarray
the coordinates of the point |
| Constructor Summary | |
Point3()
|
|
Point3(double[] f)
constructor from a double[] (or a RealArray) |
|
Point3(double x,
double y,
double z)
formed from point components |
|
Point3(Point3 p)
copy constructor |
|
Point3(Vector3 v)
make a point from a vector |
|
| Method Summary | |
Point3 |
clone(double[] f)
overloaded assignment from a double[] (or a RealArray) |
Point3 |
clone(Point3 p)
|
Point3 |
clone(Vector3 v)
from Vector3 |
double |
distanceFromLine(Line3 l)
|
double |
distanceFromPlane(Plane3 pl)
|
Point3 |
divideBy(double f)
|
double |
elementAt(int n)
subscript operator counts from ZERO |
boolean |
equals(Point3 p)
are two points identical? |
static Angle |
getAngle(Point3 p1,
Point3 p2,
Point3 p3)
angle (p1-p2-p3; vertex is p2) |
double[] |
getArray()
get components as double[] |
Point3 |
getClosestPointOnLine(Line3 l)
|
double |
getDistanceFromOrigin()
distance of point from origin |
double |
getDistanceFromPoint(Point3 p2)
distance of point from another point |
Point3 |
getMidPoint(Point3 p2)
mid-point of two points |
static Angle |
getTorsion(Point3 p1,
Point3 p2,
Point3 p3,
Point3 p4)
torsion angle |
boolean |
isOrigin()
is a point at Origin? |
static void |
main(java.lang.String[] args)
tests Point3 routines = new Point3 |
Point3 |
multiplyBy(double f)
scale point |
Point3 |
plus(Point3 p)
New point from point+point - used for finding centrois, etc. |
Point3 |
plus(Vector3 v)
New point from point+vector |
Vector3 |
subtract(Point3 p2)
vector between two points |
Point3 |
subtract(Vector3 v)
New point from point-vector |
java.lang.String |
toString()
|
Point3 |
transform(Transform3 t)
transform a point; does NOT modify 'this' |
| Methods inherited from class jumbo.euclid.Status |
NYI |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
protected double[] flarray
| Constructor Detail |
public Point3()
public Point3(double x,
double y,
double z)
public Point3(Point3 p)
public Point3(double[] f)
public Point3(Vector3 v)
| Method Detail |
public Point3 clone(Point3 p)
public Point3 clone(double[] f)
public double[] getArray()
public Point3 clone(Vector3 v)
public boolean equals(Point3 p)
public Vector3 subtract(Point3 p2)
public Point3 plus(Point3 p)
public Point3 plus(Vector3 v)
public Point3 subtract(Vector3 v)
public Point3 multiplyBy(double f)
public Point3 divideBy(double f)
public double elementAt(int n)
public Point3 transform(Transform3 t)
public double getDistanceFromOrigin()
public double getDistanceFromPoint(Point3 p2)
public double distanceFromPlane(Plane3 pl)
public Point3 getClosestPointOnLine(Line3 l)
l - any linepublic double distanceFromLine(Line3 l)
public Point3 getMidPoint(Point3 p2)
public static Angle getAngle(Point3 p1,
Point3 p2,
Point3 p3)
throws ZeroVectorException
public static Angle getTorsion(Point3 p1,
Point3 p2,
Point3 p3,
Point3 p4)
throws ZeroVectorException
public boolean isOrigin()
public java.lang.String toString()
public static void main(java.lang.String[] args)
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||