|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.tudey.util.TudeySceneMetrics
public class TudeySceneMetrics
Contains static methods relating to the Tudey coordinate system.
| Field Summary | |
|---|---|
static Quaternion[] |
TILE_ROTATIONS
Tile rotations corresponding to each direction. |
| Constructor Summary | |
|---|---|
TudeySceneMetrics()
|
|
| Method Summary | |
|---|---|
static CameraConfig |
getDefaultCameraConfig()
Returns a reference to the default camera config. |
static Rect |
getDefaultLocalInterest()
Returns the default local interest region (as derived from the camera parameters). |
static Rect |
getLocalInterest(CameraConfig config,
float aspect)
Returns the local area of interest corresponding to the given camera parameters. |
static int |
getTileElevation(float z)
Returns the (closest) tile elevation corresponding to the given world space z coordinate. |
static int |
getTileHeight(int width,
int height,
int rotation)
Returns the height of a tile with the specified dimensions under the supplied rotation. |
static void |
getTileRegion(int width,
int height,
int x,
int y,
int rotation,
Rectangle result)
Finds the region covered by a tile with the specified dimensions at the supplied coordinates with the given rotation. |
static void |
getTileTransform(int width,
int height,
int x,
int y,
int elevation,
int rotation,
Transform3D result)
Gets the transform of a tile with the specified dimensions at the supplied coordinates with the given rotation. |
static int |
getTileWidth(int width,
int height,
int rotation)
Returns the width of a tile with the specified dimensions under the supplied rotation. |
static float |
getTileZ(int elevation)
Returns the world space z coordinate corresponding to the given tile elevation. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Quaternion[] TILE_ROTATIONS
| Constructor Detail |
|---|
public TudeySceneMetrics()
| Method Detail |
|---|
public static void getTileTransform(int width,
int height,
int x,
int y,
int elevation,
int rotation,
Transform3D result)
width - the untransformed width of the tile.height - the untransformed height of the tile.
public static void getTileRegion(int width,
int height,
int x,
int y,
int rotation,
Rectangle result)
public static int getTileWidth(int width,
int height,
int rotation)
public static int getTileHeight(int width,
int height,
int rotation)
public static float getTileZ(int elevation)
public static int getTileElevation(float z)
public static CameraConfig getDefaultCameraConfig()
public static Rect getDefaultLocalInterest()
public static Rect getLocalInterest(CameraConfig config,
float aspect)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||