|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gumbo.graphic.math.Tuple3 | +--gumbo.graphic.math.Vector3
A 3D spatial element representing a vector, which is used exclusively for spatial direction and magnitude. Not affected by translation transforms.
Field Summary | |
static Vector3 |
NORMALIZED_ZERO_LENGTH
Result of normalizing a zero length vector. |
Constructor Summary | |
Vector3()
|
|
Vector3(double[] val)
Creates an instance using a mutator. |
|
Vector3(double x,
double y,
double z)
Creates an instance using a mutator. |
|
Vector3(Tuple3 tuple)
Creates an instance using a mutator. |
Method Summary | |
boolean |
equals(java.lang.Object obj)
|
Vector3 |
getVector3()
Gets a singleton immutable view of this object with the same identity (hashCode(), equals()) as this object. |
protected Vector3 |
implGetVector3()
Master whole state accessor. |
double |
length()
Returns the length of this vector. |
double |
lengthSquared()
Returns the squared length of this vector. |
Vector3 |
normalize(Vector3 vect)
Sets this vector to a normalized (length one) version of a vector. |
void |
transformGraphic(Matrix4 matrix)
Transforms this graphic's geometry by pre-multiplying it with the specified transform matrix. |
void |
transformGraphic(SpaceNode from,
SpaceNode to)
Transforms this graphic's geometry from one local reference space to another in a space tree. |
Methods inherited from class gumbo.graphic.math.Tuple3 |
abs, add, add, clamp, clamp, clampMax, clampMax, clampMin, clampMin, clear, clearArray, div, div, get, get, getGraphic, getGraphicLocalSpace, getTuple3, getX, getY, getZ, implGetTuple3, implGetTuple3, implGetTuple3, implInitTuple3, implSetTuple3, implSetTuple3, isEqual, isEqual, isGreaterEqual, isInsideEqual, isLessEqual, isOutside, isZero, isZero, max, max, min, min, mult, mult, neg, noise, random, round, set, set, set, set, setArray, setX, setY, setZ, sub, sub, sum, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface gumbo.graphic.space.GraphicGeometry |
getGraphicLocalSpace |
Methods inherited from interface gumbo.graphic.Graphic |
getGraphic |
Field Detail |
public static final Vector3 NORMALIZED_ZERO_LENGTH
Constructor Detail |
public Vector3()
public Vector3(double x, double y, double z)
public Vector3(double[] val)
public Vector3(Tuple3 tuple)
Method Detail |
public Vector3 getVector3()
public double lengthSquared()
public double length()
public Vector3 normalize(Vector3 vect)
public void transformGraphic(SpaceNode from, SpaceNode to)
TransformableGraphic
transformGraphic
in interface TransformableGraphic
from
- The current reference space. Never null.to
- The new reference space. Never null.public void transformGraphic(Matrix4 matrix)
TransformableGraphic
transformGraphic
in interface TransformableGraphic
matrix
- Value of the transform matrix. Never null.protected Vector3 implGetVector3()
public boolean equals(java.lang.Object obj)
equals
in class Tuple3
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |