|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectlt.monarch.chart.chart3D.engine.vecmath.Vector3d
public class Vector3d extends java.lang.Object
A class which represents a vector in three dimensional space.
| Modifier and Type | Field and Description |
|---|---|
double |
x
The x coordinate. |
double |
y
The y coordinate. |
double |
z
The z coordinate. |
static Vector3d |
Z_VECTOR
|
| Constructor and Description |
|---|
Vector3d()
Constructs a new instance of vector. |
Vector3d(double xpos,
double ypos,
double zpos)
Constructs a new instance of vector with coordinate value specified. |
Vector3d(Point3D point)
|
| Modifier and Type | Method and Description |
|---|---|
static Vector3d |
add(Vector3d a,
Vector3d b)
Adds two vectors. |
static double |
angle(Vector3d a,
Vector3d b)
Deprecated. |
Vector3d |
crossProduct(Vector3d v1)
|
static Vector3d |
crossProduct(Vector3d a,
Vector3d b)
Calculates vector cross product. |
static double |
dot(Vector3d a,
Vector3d b)
Calculates the dot product. |
boolean |
equals(Vector3d vector)
Compare vectors |
boolean |
equalsPreciselly(Vector3d vector)
Test if a supplied Vector3D has the exactly same position. |
Vector3d |
getCopy()
Retrieves a copy. |
static Vector3d |
getNormal(Vector3d a,
Vector3d b,
Vector3d c)
Retrieves a normal of a plane defined by three points. |
static Vector3d |
getNormal(Vector3d a,
Vector3d b,
Vector3d c,
Vector3d normal)
Retrieves a normal of a plane defined by three points. |
double |
length()
Calculates the length of the vector. |
double |
lengthSq()
Calculates the square length of the vector. |
Vector3d |
normalize()
Normalizes the vector. |
Vector3d |
reverse()
Reverses the vector direction. |
static Vector3d |
scale(double f,
Vector3d a)
Scales the specified vector by a scaling factor. |
static Vector3d |
sub(Vector3d a,
Vector3d b)
Subtracts one vector from another. |
java.lang.String |
toString()
|
static Vector3d |
vectorProduct(Vector3d a,
Vector3d b)
Deprecated. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Vector3d Z_VECTOR
public double x
public double y
public double z
| Constructor Detail |
|---|
public Vector3d()
public Vector3d(double xpos,
double ypos,
double zpos)
xpos - the x coordinateypos - the y coordinatezpos - the z coordinatepublic Vector3d(Point3D point)
| Method Detail |
|---|
public Vector3d normalize()
public Vector3d reverse()
public double lengthSq()
public double length()
public static Vector3d getNormal(Vector3d a,
Vector3d b,
Vector3d c)
a - the first plane reference pointb - the second plane reference pointc - the third plane reference point
public static Vector3d getNormal(Vector3d a,
Vector3d b,
Vector3d c,
Vector3d normal)
a - the first plane reference pointb - the second plane reference pointc - the third plane reference pointthe - normal of the specified plane
@Deprecated
public static Vector3d vectorProduct(Vector3d a,
Vector3d b)
public static double dot(Vector3d a,
Vector3d b)
a - the first vectorb - the second vector
@Deprecated
public static double angle(Vector3d a,
Vector3d b)
a - the first vectorb - the second vector
public static Vector3d add(Vector3d a,
Vector3d b)
a - the first vectorb - the second vector
public static Vector3d sub(Vector3d a,
Vector3d b)
a - the first vectorb - the second vector
public static Vector3d scale(double f,
Vector3d a)
f - the scaling factora - the vector to be scaledpublic Vector3d getCopy()
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(Vector3d vector)
vector - public boolean equalsPreciselly(Vector3d vector)
vector. - public Vector3d crossProduct(Vector3d v1)
public static Vector3d crossProduct(Vector3d a,
Vector3d b)
a - the first vectorb - the second vector
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||