|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openmali.vecmath2.TupleNf<Tuple3f>
org.openmali.vecmath2.Tuple3f
org.openmali.vecmath2.Point3f
public class Point3f
A simple 3-dimensional float-Point implementation. Inspired by Kenji Hiranabe's Point3f implementation
| Field Summary | |
|---|---|
static Point3f |
ZERO
|
| Fields inherited from class org.openmali.vecmath2.TupleNf |
|---|
isDirty, roTrick, values |
| Constructor Summary | |
|---|---|
|
Point3f()
Creates a new Point3f instance. |
protected |
Point3f(boolean readOnly)
Creates a new Point3f instance. |
protected |
Point3f(boolean readOnly,
float[] values,
boolean[] isDirty,
boolean copy)
Creates a new Point3f instance. |
protected |
Point3f(boolean readOnly,
float x,
float y,
float z)
Creates a new Point3f instance. |
protected |
Point3f(boolean readOnly,
Tuple3f tuple)
Creates a new Point3f instance. |
|
Point3f(float[] values)
Creates a new Point3f instance. |
|
Point3f(float x,
float y,
float z)
Creates a new Point3f instance. |
|
Point3f(Tuple3f tuple)
Creates a new Point3f instance. |
| Method Summary | |
|---|---|
Point3f |
asReadOnly()
|
Point3f |
clone()
Creates and returns a copy of this object. |
float |
distance(float p2x,
float p2y,
float p2z)
|
float |
distance(Point3f that)
|
float |
distanceSquared(float p2x,
float p2y,
float p2z)
|
float |
distanceSquared(Point3f that)
|
float |
distanceToOrigin()
|
float |
distanceToOriginSquared()
|
static Point3f |
fromPool()
Allocates an Point3f instance from the pool. |
static Point3f |
fromPool(float x,
float y,
float z)
Allocates an Point3f instance from the pool. |
static Point3f |
fromPool(Tuple3f tuple)
Allocates an Point3f instance from the pool. |
Point3f |
getReadOnly()
|
static Point3f |
newReadOnly()
Creates a new Point3f instance. |
static Point3f |
newReadOnly(float[] values)
Creates a new Point3f instance. |
static Point3f |
newReadOnly(float x,
float y,
float z)
Creates a new Point3f instance. |
static Point3f |
newReadOnly(Tuple3f tuple)
Creates a new Point3f instance. |
static void |
toPool(Point3f o)
Stores the given Point3f instance in the pool. |
| Methods inherited from class org.openmali.vecmath2.Tuple3f |
|---|
add, addX, addY, addZ, 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.TupleNf |
|---|
absolute, absolute, add, add, addValue, clamp, clamp, clampMax, clampMax, clampMin, clampMin, deserialize, div, divValue, epsilonEquals, equals, fill, get, get, get, getSerializationBufferSize, getSize, getValue, hashCode, interpolate, interpolate, isDirty, isReadOnly, mul, mulValue, negate, negate, readExternal, readFromBuffer, readFromBuffer, readFromBuffer, readFromBuffer, round, round, scale, scale, scaleAdd, scaleAdd, serialize, set, set, set, setClean, setValue, setZero, sub, sub, subValue, toString, writeExternal, writeToBuffer, writeToBuffer, 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 |
| Methods inherited from interface org.openmali.vecmath2.TupleInterface |
|---|
absolute, absolute, add, add, addValue, clamp, clamp, clampMax, clampMax, clampMin, clampMin, div, divValue, epsilonEquals, fill, get, get, get, getSize, getValue, interpolate, interpolate, isDirty, isReadOnly, mul, mulValue, negate, negate, round, round, scale, scale, scaleAdd, scaleAdd, set, set, set, setClean, setValue, setZero, sub, sub, subValue |
| Field Detail |
|---|
public static final Point3f ZERO
| Constructor Detail |
|---|
protected Point3f(boolean readOnly,
float x,
float y,
float z)
readOnly - x - the x element to usey - the y element to usez - the z element to use
protected Point3f(boolean readOnly,
float[] values,
boolean[] isDirty,
boolean copy)
readOnly - values - the values array (must be at least size 3)isDirty - the isDirty-valuecopy - copy the array?
protected Point3f(boolean readOnly,
Tuple3f tuple)
readOnly - tuple - the Tuple3f to copy the values fromprotected Point3f(boolean readOnly)
readOnly -
public Point3f(float x,
float y,
float z)
x - the x element to usey - the y element to usez - the z element to usepublic Point3f(float[] values)
values - the values array (must be at least size 3)public Point3f(Tuple3f tuple)
tuple - the Tuple3f to copy the values frompublic Point3f()
| Method Detail |
|---|
public final float distanceSquared(Point3f that)
distanceSquared in interface PointInterface<Tuple3f,Point3f>public final float distance(Point3f that)
distance in interface PointInterface<Tuple3f,Point3f>
public final float distanceSquared(float p2x,
float p2y,
float p2z)
public final float distance(float p2x,
float p2y,
float p2z)
public final float distanceToOriginSquared()
distanceToOriginSquared in interface PointInterface<Tuple3f,Point3f>public float distanceToOrigin()
distanceToOrigin in interface PointInterface<Tuple3f,Point3f>public Point3f clone()
clone in class Tuple3fCloneablepublic Point3f asReadOnly()
asReadOnly in class Tuple3fTupleNf.getReadOnly()public Point3f getReadOnly()
getReadOnly in class Tuple3fTupleNf.asReadOnly()
public static Point3f newReadOnly(float x,
float y,
float z)
x - the x element to usey - the y element to usez - the z element to usepublic static Point3f newReadOnly(float[] values)
values - the values array (must be at least size 3)public static Point3f newReadOnly(Tuple3f tuple)
tuple - the Tuple3f to copy the values frompublic static Point3f newReadOnly()
public static Point3f fromPool()
public static Point3f fromPool(float x,
float y,
float z)
public static Point3f fromPool(Tuple3f tuple)
public static void toPool(Point3f o)
o -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||