|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ProGAL.geomNd.Vector ProGAL.geom3d.Vector ProGAL.geom3d.Vector.ImmutableVector3d
public static class Vector.ImmutableVector3d
A wrapper class for Vector3d
which makes the vector immutable.
All methods that can change the x, y and z-coordinates are overwritten. If
e.g. setX(0.1)
is called a RuntimeException is thrown. If any of the
arithmetic methods such as multiplyThis
are called, the result of
their corresponding non-mutating variant (multiply
) is returned instead.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class ProGAL.geom3d.Vector |
---|
Vector.ImmutableVector3d |
Field Summary |
---|
Fields inherited from class ProGAL.geom3d.Vector |
---|
X, Y, Z |
Constructor Summary | |
---|---|
Vector.ImmutableVector3d(double x,
double y,
double z)
|
Method Summary | |
---|---|
Vector |
addThis(Vector v)
Add v to this vector and return the result (changing this object). |
Vector |
crossThis(Vector v)
Get the cross-product of this vector and v and store the result in this vector (changes this object). |
Vector |
multiplyThis(double s)
Multiply this vector by s and return the result (changing this object). |
Vector |
normalizeThis()
Normalize this vector and return the result (changing this object). |
Vector |
scaleToLengthThis(double length)
Scale this vector to a certain length (changes this object). |
void |
set(int i,
double v)
Set the i'th coordinate to v |
void |
setCoord(int i,
double v)
Set the i'th coordinate to v |
void |
setX(double x)
Set the first coordinate |
void |
setY(double y)
Set the second coordinate |
void |
setZ(double z)
Set the third coordinate |
Methods inherited from class ProGAL.geom3d.Vector |
---|
add, add, addThis, angle, clone, cross, divide, divideThis, dot, getAngle, getCosDihedralAngle, getDihedralAngle, getOrthonormal, isParallel, isSteinerAngle, multiply, normalize, normalizeFast, normalizeThisFast, rotateIn, scaleToLength, set, subtract, subtractThis, toConsole, toConsole, toPoint, toScene, toString, toString, x, y, z |
Methods inherited from class ProGAL.geomNd.Vector |
---|
add, addThis, angle, dot, equals, equals, get, getCoord, getDimensions, getLengthSquared, isZeroVector, length, outerProduct, setCoords, subtract, subtractThis |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Vector.ImmutableVector3d(double x, double y, double z)
Method Detail |
---|
public void setCoord(int i, double v)
Vector
setCoord
in class Vector
public void set(int i, double v)
Vector
set
in class Vector
public void setX(double x)
Vector
setX
in class Vector
public void setY(double y)
Vector
setY
in class Vector
public void setZ(double z)
Vector
setZ
in class Vector
public Vector addThis(Vector v)
Vector
addThis
in class Vector
public Vector multiplyThis(double s)
Vector
multiplyThis
in class Vector
public Vector normalizeThis()
Vector
normalizeThis
in class Vector
public Vector scaleToLengthThis(double length)
Vector
scaleToLengthThis
in class Vector
public Vector crossThis(Vector v)
Vector
crossThis
in class Vector
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |