|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.math.SphereCoords
public class SphereCoords
A set of spherical coordinates.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.threerings.io.Streamable |
|---|
com.threerings.io.Streamable.Closure |
| Field Summary | |
|---|---|
float |
azimuth
The azimuth about the Z axis (in radians CCW from Y+). |
float |
distance
The distance from the origin. |
float |
elevation
The elevation above the XY plane, in radians. |
| Constructor Summary | |
|---|---|
SphereCoords()
Creates a set of zero coordinates. |
|
SphereCoords(float[] values)
Creates a set of coordinates from three components. |
|
SphereCoords(float azimuth,
float elevation,
float distance)
Creates a set of coordinates from three components. |
|
SphereCoords(SphereCoords 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 |
equals(Object other)
|
int |
hashCode()
|
SphereCoords |
lerp(SphereCoords other,
float t)
Interpolates between this and the specified other set of coordinates. |
SphereCoords |
lerp(SphereCoords other,
float t,
SphereCoords result)
Interpolates between this and the specified other set of coordinates, storing the result in the object provided. |
SphereCoords |
lerpLocal(SphereCoords other,
float t)
Interpolates between this and the specified other set of coordinates, storing the result in this object. |
SphereCoords |
set(float[] values)
Sets all of the elements of the coordinates. |
SphereCoords |
set(float azimuth,
float elevation,
float distance)
Sets all of the elements of the coordinates. |
SphereCoords |
set(SphereCoords other)
Copies the elements of another set of coordinates. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
@Editable(min=-180.0,
max=180.0,
scale=0.017453292519943295,
hgroup="c")
public float azimuth
@Editable(min=-90.0,
max=90.0,
scale=0.017453292519943295,
hgroup="c")
public float elevation
@Editable(min=0.0,
step=0.01,
hgroup="c")
public float distance
| Constructor Detail |
|---|
public SphereCoords(float azimuth,
float elevation,
float distance)
public SphereCoords(float[] values)
public SphereCoords(SphereCoords other)
public SphereCoords()
| Method Detail |
|---|
public SphereCoords lerpLocal(SphereCoords other,
float t)
public SphereCoords lerp(SphereCoords other,
float t)
public SphereCoords lerp(SphereCoords other,
float t,
SphereCoords result)
public SphereCoords set(SphereCoords other)
public SphereCoords set(float[] values)
public SphereCoords set(float azimuth,
float elevation,
float distance)
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 | |||||||||