|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsim.util.MutableDouble3D
public final class MutableDouble3D
MutableDouble3D is more or less the same class as javax.vecmath.Point3d, except that it is hash-equivalent to Double3D.
Just as with MutableInt3D: you use MutableDouble3D as a STORED hash key at your peril: it has the same misfeature as javax.vecmath.Point3d, and you should read the warning in Double3D. However, you can look up Double3D-keyed objects in a hash table by passing in a MutableDouble3D instead.
Field Summary | |
---|---|
double |
x
|
double |
y
|
double |
z
|
Constructor Summary | |
---|---|
MutableDouble3D()
|
|
MutableDouble3D(Double2D p)
Explicitly assumes the z value is set to 0 |
|
MutableDouble3D(Double2D p,
double z)
|
|
MutableDouble3D(Double3D p)
|
|
MutableDouble3D(double x,
double y,
double z)
|
|
MutableDouble3D(Int2D p)
Explicitly assumes the z value is set to 0 |
|
MutableDouble3D(Int2D p,
double z)
|
|
MutableDouble3D(Int3D p)
|
|
MutableDouble3D(MutableDouble2D p)
Explicitly assumes the z value is set to 0 |
|
MutableDouble3D(MutableDouble2D p,
double z)
|
|
MutableDouble3D(MutableDouble3D p)
|
|
MutableDouble3D(MutableInt2D p)
Explicitly assumes the z value is set to 0 |
|
MutableDouble3D(MutableInt2D p,
double z)
|
|
MutableDouble3D(MutableInt3D p)
|
Method Summary | |
---|---|
MutableDouble3D |
add(MutableDouble3D other1,
MutableDouble3D other2)
Sets me to the sum of other1 and other2, returning me. |
MutableDouble3D |
addIn(double x,
double y,
double z)
Adds the x and y values into my x and y values, returning me. |
MutableDouble3D |
addIn(MutableDouble3D other)
Adds other into me, returning me. |
java.lang.Object |
clone()
|
double |
distance(Double3D p)
Returns the distance FROM this MutableDouble3D TO the specified point. |
double |
distance(double x,
double y,
double z)
Returns the distance FROM this MutableDouble3D TO the specified point |
double |
distance(Int3D p)
Returns the distance FROM this MutableDouble3D TO the specified point. |
double |
distance(MutableDouble3D p)
Returns the distance FROM this MutableDouble3D TO the specified point. |
double |
distance(MutableInt3D p)
Returns the distance FROM this MutableDouble3D TO the specified point. |
double |
distanceSq(Double3D p)
Returns the squared distance FROM this MutableDouble3D TO the specified point. |
double |
distanceSq(double x,
double y,
double z)
Returns the squared distance FROM this MutableDouble3D TO the specified point |
double |
distanceSq(Int3D p)
Returns the squared distance FROM this MutableDouble3D TO the specified point. |
double |
distanceSq(MutableDouble3D p)
Returns the squared distance FROM this MutableDouble3D TO the specified point. |
double |
distanceSq(MutableInt3D p)
Returns the squared distance FROM this MutableDouble3D TO the specified point. |
double |
dot(MutableDouble3D other)
Returns the dot product of myself against other, that is me DOT other. |
MutableDouble3D |
dup()
Equivalent to (new MutableDouble3D(d)), but (d.dup()) shorter of course, but perhaps not quite as fast. |
boolean |
equals(java.lang.Object obj)
|
double |
getX()
|
double |
getY()
|
double |
getZ()
|
int |
hashCode()
|
double |
length()
Returns the length of the vector. |
double |
lengthSq()
Returns the square of the length of the MutableDouble2D. |
MutableDouble3D |
multiply(MutableDouble3D other,
double val)
Multiplies other by val, setting me to the result and returning me. |
MutableDouble3D |
multiplyIn(double val)
Extends my length so that it is multiplied by val, and returns me. |
void |
negate()
Negates the MutableDouble2D's values |
MutableDouble3D |
normalize()
Normalizes me (sets my length to 1.0), returning me. |
MutableDouble3D |
setLength(double val)
Sets my length, which should be >= 0. |
void |
setTo(Double3D p)
|
void |
setTo(double x,
double y,
double z)
|
void |
setTo(Int3D p)
|
void |
setTo(MutableDouble3D p)
|
void |
setTo(MutableInt3D p)
|
void |
setToMinus(MutableDouble3D b)
Sets the values to the negation of the values in the provided MutableDouble2D |
void |
setX(double val)
|
void |
setY(double val)
|
void |
setZ(double val)
|
MutableDouble3D |
subtract(MutableDouble3D other1,
MutableDouble3D other2)
Subtracts other2 from other1, setting me to the result and returning me. |
MutableDouble3D |
subtractIn(MutableDouble3D other)
Sets me to me minus other, returning me. |
java.lang.String |
toCoordinates()
|
java.lang.String |
toString()
|
void |
zero()
Sets the values to 0. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public double x
public double y
public double z
Constructor Detail |
---|
public MutableDouble3D()
public MutableDouble3D(Int2D p)
public MutableDouble3D(Int2D p, double z)
public MutableDouble3D(Int3D p)
public MutableDouble3D(MutableInt2D p)
public MutableDouble3D(MutableInt2D p, double z)
public MutableDouble3D(MutableInt3D p)
public MutableDouble3D(Double2D p)
public MutableDouble3D(Double2D p, double z)
public MutableDouble3D(Double3D p)
public MutableDouble3D(MutableDouble2D p)
public MutableDouble3D(MutableDouble2D p, double z)
public MutableDouble3D(MutableDouble3D p)
public MutableDouble3D(double x, double y, double z)
Method Detail |
---|
public final double getX()
public final double getY()
public final double getZ()
public final void setX(double val)
public final void setY(double val)
public final void setZ(double val)
public void setTo(double x, double y, double z)
public void setTo(Int3D p)
public void setTo(MutableInt3D p)
public void setTo(Double3D p)
public void setTo(MutableDouble3D p)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toCoordinates()
public java.lang.Object clone()
clone
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public double distance(double x, double y, double z)
public double distance(Double3D p)
public double distance(Int3D p)
public double distance(MutableInt3D p)
public double distance(MutableDouble3D p)
public double distanceSq(double x, double y, double z)
public double distanceSq(Double3D p)
public double distanceSq(Int3D p)
public double distanceSq(MutableInt3D p)
public double distanceSq(MutableDouble3D p)
public final MutableDouble3D addIn(MutableDouble3D other)
public final MutableDouble3D add(MutableDouble3D other1, MutableDouble3D other2)
public final MutableDouble3D addIn(double x, double y, double z)
public final MutableDouble3D dup()
public final MutableDouble3D subtractIn(MutableDouble3D other)
public final MutableDouble3D subtract(MutableDouble3D other1, MutableDouble3D other2)
public final double length()
public final MutableDouble3D multiplyIn(double val)
public final MutableDouble3D multiply(MutableDouble3D other, double val)
public final MutableDouble3D normalize()
public final MutableDouble3D setLength(double val)
public final double dot(MutableDouble3D other)
public final void zero()
public final void setToMinus(MutableDouble3D b)
public final void negate()
public final double lengthSq()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |