public class Vector3D extends Point3D
Constructor and Description |
---|
Vector3D()
constructeurs
|
Vector3D(double x,
double y,
double z)
Constructor for the Vector3D object
|
Vector3D(float x,
float y,
float z)
Constructor for the Vector3D object
|
Vector3D(Point3D P) |
Vector3D(Point3D P1,
Point3D P2)
Conctruct a vector from two points
|
Vector3D(Vector3D V)
Copy constructor for the Vector3D object
|
Modifier and Type | Method and Description |
---|---|
Vector3D |
add(Vector3D v)
Add a vector
|
Vector3D |
add(Vector3D v,
double f1,
double f2)
Description of the Method
|
Vector3D |
add(Vector3D v,
float f1,
float f2)
add a vector with ration
|
void |
addMe(Vector3D v)
Add a vector to current vector
|
void |
addMe(Vector3D v,
double r) |
double |
angle(Vector3D v)
angle between two vectors in radians between 0 and PI
|
double |
angleDegrees(Vector3D v)
angle between two vectors in degrees between 0 and 180
|
double |
anglePlane(double a,
double b,
double c,
double d) |
double |
anglePlaneDegrees(double a,
double b,
double c,
double d) |
double |
colinear(Vector3D other)
Computes the colinearity between two vectors that is to say the absolute
value of cross product between normalized vectors
|
Vector3D |
crossProduct(Vector3D V)
the cross product between two vectors
|
double |
distance(Vector3D V)
Distance between two vectors
|
double |
distanceSquare(Vector3D V)
Description of the Method
|
double |
dotProduct(Vector3D V)
scalar product between two vectors
|
double |
dotProduct(Vector3D V,
double resXY,
double resZ)
Compute the scalar product, using calibration
|
Vector3D |
getComposante(Vector3D base) |
double |
getLength()
Gets the value attribute of the Pixel3D object
|
double |
getLength(double resXY,
double resZ)
Gets the length attribute of the Vector3D object with units
|
double |
getLengthSquare() |
double |
getLengthSquare(double resXY,
double resZ) |
Vector3D |
getNormalizedVector() |
Vector3D |
getRandomPerpendicularVector() |
double |
intersection_unit_cube(double x,
double y,
double z,
double rx,
double ry,
double rz)
Distance traversée dans un cube (for projection computation)
|
Vector3D |
multiply(double f)
multiply a vector by a scalar
|
Vector3D |
multiply(double fx,
double fy,
double fz)
mumultiply the coordinates
|
void |
multiplyMe(double f)
multiply current vector by a scalar
|
void |
multiplyMe(double fx,
double fy,
double fz)
mumultiply the coordinates
|
void |
normalize()
normalization of the vector, put length to 1.0
|
void |
setCoord(double x,
double y,
double z)
Sets the attributes of the Vector3D object
|
void |
setCoordRandom()
set coordinates with random numbers between -1 and 1
|
void |
setVectorPoint3f(Point3f P)
Conctruct a vector from two points
|
void |
setVectorTwoPoint3f(Point3f P1,
Point3f P2) |
java.lang.String |
toString()
display vector information
|
void |
xmlWrite(java.io.Writer wr) |
distance, distance, distanceSquare, distanceSquare, distBlock, equals, getArray, getPoint3f, getPosition, getRoundX, getRoundY, getRoundZ, getVector3D, getX, getY, getZ, hashCode, isInsideBoundingBox, projectionPlane, samePosition, samePosition, sameVoxel, sameVoxel, scale, setX, setY, setZ, translate, translate
public Vector3D()
public Vector3D(float x, float y, float z)
x
- x coordinate of the vectory
- y coordinate of the vectorz
- z coordinate of the vectorpublic Vector3D(double x, double y, double z)
x
- x coordinate of the vectory
- y coordinate of the vectorz
- z coordinate of the vectorpublic Vector3D(Vector3D V)
V
- the vector to copypublic Vector3D(Point3D P)
P
- the point3D to copypublic void setVectorPoint3f(Point3f P)
P1
- first pointP2
- second pointpublic void setVectorTwoPoint3f(Point3f P1, Point3f P2)
public void setCoord(double x, double y, double z)
x
- x coordinate of the vectory
- y coordinate of the vectorz
- z coordinate of the vectorpublic void setCoordRandom()
Point3D
setCoordRandom
in class Point3D
public double getLength()
public double getLengthSquare()
public double getLength(double resXY, double resZ)
resXY
- resolution in XYresZ
- resolution in Zpublic double getLengthSquare(double resXY, double resZ)
public double distance(Vector3D V)
V
- the other vectorpublic double distanceSquare(Vector3D V)
V
- Description of the Parameterpublic Vector3D add(Vector3D v)
v
- the other vectorpublic void addMe(Vector3D v)
v
- the other vectorpublic void addMe(Vector3D v, double r)
public Vector3D add(Vector3D v, float f1, float f2)
v
- the other vector V2f1
- the ratio for V1f2
- the ratio for V2public Vector3D add(Vector3D v, double f1, double f2)
v
- Description of the Parameterf1
- Description of the Parameterf2
- Description of the Parameterpublic Vector3D multiply(double f)
f
- the scalarpublic void multiplyMe(double f)
f
- the scalarpublic Vector3D multiply(double fx, double fy, double fz)
fx
- multiplication factor for xfy
- multiplication factor for yfz
- multiplication factor for zpublic void multiplyMe(double fx, double fy, double fz)
fx
- multiplication factor for xfy
- multiplication factor for yfz
- multiplication factor for zpublic double angle(Vector3D v)
v
- the other vectorpublic double anglePlane(double a, double b, double c, double d)
public double anglePlaneDegrees(double a, double b, double c, double d)
public double angleDegrees(Vector3D v)
v
- the other vectorpublic double dotProduct(Vector3D V)
V
- the other vectorpublic double dotProduct(Vector3D V, double resXY, double resZ)
V
- the other vectorresXY
- the XY calibrationresZ
- the Z calibrationpublic Vector3D getRandomPerpendicularVector()
public Vector3D crossProduct(Vector3D V)
V
- the other vectorpublic double colinear(Vector3D other)
other
- public void normalize()
public Vector3D getNormalizedVector()
public double intersection_unit_cube(double x, double y, double z, double rx, double ry, double rz)
rx
- coordonnée x du point de passagery
- coordonnée x du point de passagerz
- coordonnée x du point de passagex
- Description of the Parametery
- Description of the Parameterz
- Description of the Parameterpublic java.lang.String toString()