|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openmali.vecmath2.Ray3f
public class Ray3f
Simple three-dimensional ray implementation.
| Constructor Summary | |
|---|---|
|
Ray3f()
Creates a new Ray3f. |
protected |
Ray3f(boolean readOnly)
Creates a new Ray3f. |
protected |
Ray3f(boolean readOnly,
float origX,
float origY,
float origZ,
float direcX,
float direcY,
float direcZ)
Creates a new Ray3f. |
protected |
Ray3f(boolean readOnly,
Point3f origin,
Vector3f direction)
Creates a new Ray3f. |
protected |
Ray3f(boolean readOnly,
Ray3f template)
Clone constructor. |
|
Ray3f(float origX,
float origY,
float origZ,
float direcX,
float direcY,
float direcZ)
Creates a new Ray3f. |
|
Ray3f(Point3f origin,
Vector3f direction)
Creates a new Ray3f. |
|
Ray3f(Ray3f template)
Clone constructor. |
| Method Summary | |
|---|---|
Ray3f |
clone()
Creates a clone. |
int |
deserialize(int pos,
byte[] buffer)
Deserializes this instanc'es data from the byte array. |
boolean |
equals(java.lang.Object o)
|
boolean |
equals(Ray3f ray)
Checks if the given ray equals this one. |
static Ray3f |
fromPool()
Allocates an Ray3f instance from the pool. |
static Ray3f |
fromPool(float ox,
float oy,
float oz,
float dx,
float dy,
float dz)
Allocates an Ray3f instance from the pool. |
static Ray3f |
fromPool(Ray3f ray)
Allocates an Ray3f instance from the pool. |
static Ray3f |
fromPool(Tuple3f origin,
Vector3f direction)
Allocates an Ray3f instance from the pool. |
Vector3f |
getDirection()
|
float |
getLength()
|
float |
getLengthSquared()
|
Point3f |
getOrigin()
|
protected int |
getSerializationBufferSize()
|
boolean |
isDirty()
|
boolean |
isReadOnly()
|
float |
length()
|
float |
lengthSquared()
|
static Ray3f |
newReadOnly()
Creates a new Ray3f. |
static Ray3f |
newReadOnly(float origX,
float origY,
float origZ,
float direcX,
float direcY,
float direcZ)
Creates a new Ray3f. |
static Ray3f |
newReadOnly(Point3f origin,
Vector3f direction)
Creates a new Ray3f. |
static Ray3f |
newReadOnly(Ray3f template)
Clone constructor. |
void |
readExternal(java.io.ObjectInput in)
|
int |
serialize(int pos,
byte[] buffer)
Serializes this instanc'es data into the byte array. |
Ray3f |
set(float ox,
float oy,
float oz,
float dx,
float dy,
float dz)
Sets this ray to the passed parameters. |
Ray3f |
set(Ray3f ray)
Sets this ray to be equal to the passed one. |
Ray3f |
set(Tuple3f origin,
Vector3f direction)
Sets this ray to the passed parameters. |
boolean |
setClean()
Marks this ray non-dirty. |
Ray3f |
setDirection(float x,
float y,
float z)
Sets the ray's direction. |
Ray3f |
setDirection(Tuple3f direction)
Sets the ray's direction. |
Ray3f |
setOrigin(float x,
float y,
float z)
Sets the ray's origin. |
Ray3f |
setOrigin(Tuple3f origin)
Sets the ray's origin. |
void |
setZero()
Sets origin and direction to zero. |
static void |
toPool(Ray3f o)
Stores the given Ray3f instance in the pool. |
java.lang.String |
toString()
|
void |
writeExternal(java.io.ObjectOutput out)
|
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected Ray3f(boolean readOnly,
float origX,
float origY,
float origZ,
float direcX,
float direcY,
float direcZ)
readOnly - origX - origY - origZ - direcX - direcY - direcZ -
protected Ray3f(boolean readOnly,
Point3f origin,
Vector3f direction)
readOnly - origin - the new origin pointdirection - the new direction vectorprotected Ray3f(boolean readOnly)
readOnly -
protected Ray3f(boolean readOnly,
Ray3f template)
readOnly - template -
public Ray3f(float origX,
float origY,
float origZ,
float direcX,
float direcY,
float direcZ)
origX - origY - origZ - direcX - direcY - direcZ -
public Ray3f(Point3f origin,
Vector3f direction)
origin - the new origin pointdirection - the new direction vectorpublic Ray3f()
public Ray3f(Ray3f template)
template - | Method Detail |
|---|
public final boolean isReadOnly()
public final boolean setClean()
public final boolean isDirty()
public final void setZero()
public final Ray3f setOrigin(float x,
float y,
float z)
x - y - z -
public final Ray3f setOrigin(Tuple3f origin)
origin - new origin
public final Point3f getOrigin()
public final Ray3f setDirection(float x,
float y,
float z)
x - y - z -
public final Ray3f setDirection(Tuple3f direction)
direction - new direction
public final Vector3f getDirection()
public final float getLengthSquared()
public final float lengthSquared()
public final float getLength()
public final float length()
public Ray3f clone()
clone in class java.lang.Object
public final Ray3f set(float ox,
float oy,
float oz,
float dx,
float dy,
float dz)
ox - the new origin point's x-coordinateoy - the new origin point's y-coordinateoz - the new origin point's z-coordinatedx - the new direction vector's x-coordinatedy - the new direction vector's y-coordinatedz - the new direction vector's z-coordinate
public final Ray3f set(Tuple3f origin,
Vector3f direction)
origin - the new origin pointdirection - the new direction vector
public final Ray3f set(Ray3f ray)
public boolean equals(Ray3f ray)
ray - the ray to test for equalitypublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
public int serialize(int pos,
byte[] buffer)
pos - buffer -
public int deserialize(int pos,
byte[] buffer)
pos - buffer -
protected int getSerializationBufferSize()
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOException
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablejava.io.IOException
java.lang.ClassNotFoundException
public static Ray3f newReadOnly(float origX,
float origY,
float origZ,
float direcX,
float direcY,
float direcZ)
origX - origY - origZ - direcX - direcY - direcZ -
public static Ray3f newReadOnly(Point3f origin,
Vector3f direction)
origin - the new origin pointdirection - the new direction vectorpublic static Ray3f newReadOnly()
public static Ray3f newReadOnly(Ray3f template)
template - public static Ray3f fromPool()
public static Ray3f fromPool(float ox,
float oy,
float oz,
float dx,
float dy,
float dz)
public static Ray3f fromPool(Tuple3f origin,
Vector3f direction)
public static Ray3f fromPool(Ray3f ray)
public static void toPool(Ray3f o)
o -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||