|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.math.Vector4f
public final class Vector4f
A four element vector.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.threerings.io.Streamable |
|---|
com.threerings.io.Streamable.Closure |
| Field Summary | |
|---|---|
float |
w
The components of the vector. |
float |
x
The components of the vector. |
float |
y
The components of the vector. |
float |
z
The components of the vector. |
| Constructor Summary | |
|---|---|
Vector4f()
Creates a zero vector. |
|
Vector4f(float[] values)
Creates a vector from four components. |
|
Vector4f(FloatBuffer buf)
Creates a vector from a float buffer. |
|
Vector4f(float x,
float y,
float z,
float w)
Creates a vector from four components. |
|
Vector4f(Vector4f other)
Copy constructor. |
|
| Method Summary | |
|---|---|
void |
decodeFromStream(DataInputStream in)
Initializes this object with data read from the specified stream. |
void |
decodeFromString(String string)
Initializes this object with the contents of the specified string. |
void |
encodeToStream(DataOutputStream out)
Encodes this object to the specified stream. |
String |
encodeToString()
Returns a string representation of this object. |
boolean |
epsilonEquals(Vector4f other,
float epsilon)
Compares this vector to another with the provided epsilon. |
boolean |
equals(Object other)
|
FloatBuffer |
get(FloatBuffer buf)
Populates the supplied buffer with the contents of this vector. |
int |
hashCode()
|
Vector4f |
set(float[] values)
Sets all of the elements of the vector. |
Vector4f |
set(FloatBuffer buf)
Sets all of the elements of the vector. |
Vector4f |
set(float x,
float y,
float z,
float w)
Sets all of the elements of the vector. |
Vector4f |
set(Vector4f other)
Copies the elements of another vector. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public float x
public float y
public float z
public float w
| Constructor Detail |
|---|
public Vector4f(float x,
float y,
float z,
float w)
public Vector4f(float[] values)
public Vector4f(FloatBuffer buf)
public Vector4f(Vector4f other)
public Vector4f()
| Method Detail |
|---|
public Vector4f set(Vector4f other)
public Vector4f set(float[] values)
public Vector4f set(FloatBuffer buf)
public Vector4f set(float x,
float y,
float z,
float w)
public FloatBuffer get(FloatBuffer buf)
public boolean epsilonEquals(Vector4f other,
float epsilon)
public String encodeToString()
Encodable
encodeToString in interface Encodable
public void decodeFromString(String string)
throws Exception
Encodable
decodeFromString in interface EncodableException
public void encodeToStream(DataOutputStream out)
throws IOException
Encodable
encodeToStream in interface EncodableIOException
public void decodeFromStream(DataInputStream in)
throws IOException
Encodable
decodeFromStream in interface EncodableIOExceptionpublic String toString()
toString in class Objectpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object other)
equals in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||