|
|||||||||||
| 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
|
+--gumbo.graphic.math.UnitVector3
A 3D spatial element representing a vector that is always normalized (length is always one). Commonly used for surface normals and direction vectors. Not affected by translation or scaling transforms. Can't use partial state mutators.
| Field Summary |
| Fields inherited from class gumbo.graphic.math.Vector3 |
NORMALIZED_ZERO_LENGTH |
| Constructor Summary | |
UnitVector3()
Creates an instance using an initializer, with a value of NORMALIZED_ZERO_LENGTH. |
|
UnitVector3(double[] val)
Creates an instance using a mutator. |
|
UnitVector3(double x,
double y,
double z)
Creates an instance using a mutator. |
|
UnitVector3(Tuple3 tuple)
Creates an instance using a mutator. |
|
| Method Summary | |
boolean |
equals(java.lang.Object obj)
|
UnitVector3 |
getUnitVector3()
Gets a singleton immutable view of this object with the same identity (hashCode(), equals()) as this object. |
protected UnitVector3 |
implGetUnitVector3()
Master whole state accessor. |
protected Tuple3 |
implSetTuple3(double[] val)
Forces normalization of all full state input values. |
protected Tuple3 |
implSetTuple3(int dim,
double val)
Block all partial state input values because normalization requires the whole state. |
protected UnitVector3 |
implSetUnitVector3(UnitVector3 vector)
|
void |
set(Tuple3 vector)
Sets this tuple to the value of another tuple. |
| Methods inherited from class gumbo.graphic.math.Vector3 |
getVector3, implGetVector3, length, lengthSquared, normalize, transformGraphic, transformGraphic |
| 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, isEqual, isEqual, isGreaterEqual, isInsideEqual, isLessEqual, isOutside, isZero, isZero, max, max, min, min, mult, mult, neg, noise, random, round, 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 |
| Constructor Detail |
public UnitVector3()
public UnitVector3(double x,
double y,
double z)
public UnitVector3(double[] val)
public UnitVector3(Tuple3 tuple)
| Method Detail |
public UnitVector3 getUnitVector3()
public void set(Tuple3 vector)
Tuple3
set in class Tuple3vector - Tuple to copy. Never null.
protected Tuple3 implSetTuple3(int dim,
double val)
implSetTuple3 in class Tuple3dim - Dimension. Throws an exception if out of range.val - New value for the dimension.
java.lang.UnsupportedOperationException - Can't set partial state.
Use whole state mutators.protected Tuple3 implSetTuple3(double[] val)
implSetTuple3 in class Tuple3val - New value [3].protected UnitVector3 implSetUnitVector3(UnitVector3 vector)
protected UnitVector3 implGetUnitVector3()
public boolean equals(java.lang.Object obj)
equals in class Vector3
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||