|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectSciLib.Math.rPoint
public class rPoint
This class describes a 3D point (x, y, z). A rPoint in 3D can be understood as a 3D vector
| Field Summary | |
|---|---|
double |
x
public members |
double |
y
public members |
double |
z
public members |
| Constructor Summary | |
|---|---|
rPoint()
make a rPoint object at origin |
|
rPoint(double x,
double y,
double z)
make a rPoint (x, y, z) object |
|
rPoint(rPoint p)
make a rPoint from another rPoint |
|
| Method Summary | |
|---|---|
static rPoint |
crossProduct(rPoint a,
rPoint b)
Compute the cross product of the two vector in 3D space |
double |
distance(rPoint p)
compute the distance from this point to a point a |
static double |
dotProduct(rPoint a,
rPoint b)
Compute the dot product of the two vector in 3D space |
static rPoint |
minus(rPoint a,
rPoint b)
minus 2 3D vectors |
double |
norm()
compute the norm of a 3D vector |
static rPoint |
plus(rPoint a,
rPoint b)
add 2 3D vectors |
void |
print()
print this rPoint on the screen |
void |
scale(double s)
multiplication of a 3D vector with a scalar |
void |
setPoint(double x,
double y,
double z)
set rPoint |
double |
squareDistance(rPoint p)
compute the square distance from this point to a point a |
java.lang.String |
toString()
make a String from this rPoint |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public double x
public double y
public double z
| Constructor Detail |
|---|
public rPoint()
public rPoint(double x,
double y,
double z)
x - the first coordinatey - the second coordinatez - the third coordinatepublic rPoint(rPoint p)
p - A rPoint| Method Detail |
|---|
public void setPoint(double x,
double y,
double z)
x - the first coordinatey - the second coordinatez - the third coordinatepublic double squareDistance(rPoint p)
p - a rPoint
public double distance(rPoint p)
p - a rPoint
public static rPoint crossProduct(rPoint a,
rPoint b)
a - a rPointb - a rPoint
public static double dotProduct(rPoint a,
rPoint b)
a - a rPointb - a rPoint
public double norm()
public static rPoint plus(rPoint a,
rPoint b)
a - a rPointb - a rPoint
public static rPoint minus(rPoint a,
rPoint b)
a - a rPointb - a rPoint
public void scale(double s)
s - A double valuepublic java.lang.String toString()
toString in class java.lang.Objectpublic void print()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||