|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openmali.vecmath2.TupleNd<Tuple3d>
org.openmali.vecmath2.Tuple3d
org.openmali.vecmath2.Point3d
public class Point3d
A simple 3-dimensional double-Point implementation. Inspired by Kenji Hiranabe's Point3d implementation
| Field Summary | |
|---|---|
static Point3d |
ZERO
|
| Fields inherited from class org.openmali.vecmath2.TupleNd |
|---|
isDirty, roTrick, values |
| Constructor Summary | |
|---|---|
|
Point3d()
Creates a new Point3d instance. |
protected |
Point3d(boolean readOnly)
Creates a new Point3d instance. |
protected |
Point3d(boolean readOnly,
double[] values,
boolean[] isDirty,
boolean copy)
Creates a new Point3d instance. |
protected |
Point3d(boolean readOnly,
double x,
double y,
double z)
Creates a new Point3d instance. |
protected |
Point3d(boolean readOnly,
Tuple3d tuple)
Creates a new Point3d instance. |
|
Point3d(double[] values)
Creates a new Point3d instance. |
|
Point3d(double x,
double y,
double z)
Creates a new Point3d instance. |
|
Point3d(Tuple3d tuple)
Creates a new Point3d instance. |
| Method Summary | |
|---|---|
Point3d |
asReadOnly()
|
double |
distance(double p2x,
double p2y,
double p2z)
|
double |
distance(Point3d that)
|
double |
distanceSquared(double p2x,
double p2y,
double p2z)
|
double |
distanceSquared(Point3d that)
|
double |
distanceToOrigin()
|
double |
distanceToOriginSquared()
|
static Point3d |
fromPool()
Allocates an Point3d instance from the pool. |
static Point3d |
fromPool(double x,
double y,
double z)
Allocates an Point3d instance from the pool. |
static Point3d |
fromPool(Tuple3d tuple)
Allocates an Point3d instance from the pool. |
Point3d |
getReadOnly()
|
static Point3d |
newReadOnly()
Creates a new Point3d instance. |
static Point3d |
newReadOnly(double[] values)
Creates a new Point3d instance. |
static Point3d |
newReadOnly(double x,
double y,
double z)
Creates a new Point3d instance. |
static Point3d |
newReadOnly(Tuple3d tuple)
Creates a new Point3d instance. |
static void |
toPool(Point3d o)
Stores the given Point3d instance in the pool. |
| Methods inherited from class org.openmali.vecmath2.Tuple3d |
|---|
add, addX, addY, addZ, clone, div, divX, divY, divZ, equals, getX, getY, getZ, mul, mulX, mulY, mulZ, scale, set, setX, setY, setZ, sub, subX, subY, subZ, toPool, x, x, y, y, z, z |
| Methods inherited from class org.openmali.vecmath2.TupleNd |
|---|
absolute, absolute, add, add, addValue, clamp, clamp, clampMax, clampMax, clampMin, clampMin, deserialize, div, divValue, epsilonEquals, equals, fill, get, get, getSerializationBufferSize, getSize, getValue, hashCode, interpolate, interpolate, isDirty, isReadOnly, mul, mulValue, negate, negate, readExternal, round, round, scale, scale, scaleAdd, scaleAdd, serialize, set, set, setClean, setValue, setZero, sub, sub, subValue, toString, writeExternal, writeToBuffer, writeToBuffer |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.io.Externalizable |
|---|
readExternal, writeExternal |
| Field Detail |
|---|
public static final Point3d ZERO
| Constructor Detail |
|---|
protected Point3d(boolean readOnly,
double x,
double y,
double z)
readOnly - x - the x element to usey - the y element to usez - the z element to use
protected Point3d(boolean readOnly,
double[] values,
boolean[] isDirty,
boolean copy)
readOnly - values - the values array (must be at least size 3)isDirty - the isDirty-valuecopy - copy the array?
protected Point3d(boolean readOnly,
Tuple3d tuple)
readOnly - tuple - the Tuple3d to copy the values fromprotected Point3d(boolean readOnly)
readOnly -
public Point3d(double x,
double y,
double z)
x - the x element to usey - the y element to usez - the z element to usepublic Point3d(double[] values)
values - the values array (must be at least size 3)public Point3d(Tuple3d tuple)
tuple - the Tuple3d to copy the values frompublic Point3d()
| Method Detail |
|---|
public final double distanceSquared(Point3d that)
public final double distance(Point3d that)
public final double distanceSquared(double p2x,
double p2y,
double p2z)
public final double distance(double p2x,
double p2y,
double p2z)
public final double distanceToOriginSquared()
public double distanceToOrigin()
public Point3d asReadOnly()
asReadOnly in class Tuple3dTupleNd.getReadOnly()public Point3d getReadOnly()
getReadOnly in class Tuple3dTupleNd.asReadOnly()
public static Point3d newReadOnly(double x,
double y,
double z)
x - the x element to usey - the y element to usez - the z element to usepublic static Point3d newReadOnly(double[] values)
values - the values array (must be at least size 3)public static Point3d newReadOnly(Tuple3d tuple)
tuple - the Tuple3d to copy the values frompublic static Point3d newReadOnly()
public static Point3d fromPool()
public static Point3d fromPool(double x,
double y,
double z)
public static Point3d fromPool(Tuple3d tuple)
public static void toPool(Point3d o)
o -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||