|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.opengl.util.SimpleRenderable
com.threerings.opengl.util.SimpleTransformable
com.threerings.opengl.util.Grid
com.threerings.tudey.tools.EditorGrid
public class EditorGrid
A special grid that follows the camera around (while staying aligned to the tile grid).
| Field Summary | |
|---|---|
protected int |
_elevation
The elevation of the grid in tile units. |
protected Vector3f |
_isect
A working vector for intersection testing. |
protected Plane |
_plane
The grid plane. |
protected Ray3D |
_target
A working ray for intersection testing. |
protected static int |
LINE_COUNT
The number of grid lines in each direction (must be odd so that the center is a line intersection). |
| Fields inherited from class com.threerings.opengl.util.SimpleTransformable |
|---|
_transform |
| Fields inherited from class com.threerings.opengl.util.SimpleRenderable |
|---|
_batch, _ctx, _priority, _queue |
| Constructor Summary | |
|---|---|
EditorGrid(SceneEditor editor)
Creates a new grid. |
|
| Method Summary | |
|---|---|
int |
getElevation()
Returns the elevation of the tile grid. |
Plane |
getPlane()
Returns a reference to the grid plane. |
float |
getZ()
Returns the z coordinate of the tile grid. |
void |
setElevation(int elevation)
Sets the elevation of the grid in tile units. |
void |
tick(float elapsed)
Updates the state of this object based on the elapsed time in seconds. |
| Methods inherited from class com.threerings.opengl.util.Grid |
|---|
createStates, getColor |
| Methods inherited from class com.threerings.opengl.util.SimpleTransformable |
|---|
enqueue, getCenter, getTransform |
| Methods inherited from class com.threerings.opengl.util.SimpleRenderable |
|---|
composite, createBatch, draw, getStates |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int _elevation
protected Plane _plane
protected Ray3D _target
protected Vector3f _isect
protected static final int LINE_COUNT
| Constructor Detail |
|---|
public EditorGrid(SceneEditor editor)
| Method Detail |
|---|
public void setElevation(int elevation)
public int getElevation()
public float getZ()
public Plane getPlane()
public void tick(float elapsed)
Tickable
tick in interface Tickable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||