|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.miso.client.SceneObject
public class SceneObject
Contains resolved information on an object in a scene.
| Field Summary | |
|---|---|
protected Polygon |
_footprint
Our object footprint as a polygon. |
protected static RuntimeAdjust.BooleanAdjust |
_fprintDebug
A debug hook that toggles rendering of object footprints. |
protected Rectangle |
_frect
Our object as a tile coordinate rectangle. |
protected Point |
_fspot
The full-coordinates of our object spot; or null if we have none. |
protected static RuntimeAdjust.BooleanAdjust |
_hideObjects
A debug hook that toggles rendering of objects. |
protected static Polygon |
_spotTri
The triangle used to render an object's spot. |
protected Point |
_sspot
The screen-coordinates of our object spot; or null if we have none. |
protected boolean |
_warning
Used to mark objects with errors. |
protected static Composite |
ALPHA_WARN
The alpha used to fill our bounds for warning purposes. |
Rectangle |
bounds
The screen coordinate bounds of our object tile given its position in the scene. |
ObjectInfo |
info
The object's info record. |
ObjectTile |
tile
The object tile used to display this object. |
| Constructor Summary | |
|---|---|
SceneObject(MisoSceneMetrics metrics,
ObjectInfo info,
ObjectTile tile)
Creates a scene object for display according to the supplied metrics. |
|
SceneObject(MisoSceneMetrics metrics,
TileManager mgr,
TileSet.Colorizer colorizer,
ObjectInfo info)
|
|
SceneObject(MisoScenePanel panel,
ObjectInfo info)
Creates a scene object for display by the specified panel. |
|
SceneObject(MisoScenePanel panel,
ObjectInfo info,
ObjectTile tile)
Creates a scene object for display by the specified panel. |
|
| Method Summary | |
|---|---|
protected void |
computeInfo(MisoSceneMetrics metrics)
Computes our screen bounds, tile footprint and other useful cached metrics. |
Polygon |
getObjectFootprint()
Returns a polygon bounding all footprint tiles of this scene object. |
Point |
getObjectScreenSpot()
Returns the location associated with this object's "spot" in screen coordinates or null if it has no spot. |
Point |
getObjectSpot()
Returns the location associated with this object's "spot" in fine coordinates or null if it has no spot. |
int |
getPriority()
Returns the render priority of this scene object. |
boolean |
objectFootprintOverlaps(Rectangle rect)
Returns true if this object's footprint overlaps the supplied tile coordinate rectangle. |
boolean |
objectFootprintOverlaps(SceneObject so)
Returns true if this object's footprint overlaps that of the specified other object. |
void |
paint(Graphics2D gfx)
Requests that this scene object render itself. |
void |
refreshObjectTile(MisoSceneMetrics metrics,
TileManager mgr,
TileSet.Colorizer colorizer)
Reloads and recolorizes our object tile. |
void |
refreshObjectTile(MisoScenePanel panel)
Reloads and recolorizes our object tile. |
void |
relocateObject(MisoSceneMetrics metrics,
int tx,
int ty)
Updates this object's origin tile coordinate. |
boolean |
setHovered(boolean hovered)
Informs this scene object that the mouse is now hovering over it. |
void |
setPriority(byte priority)
Overrides the render priority of this object. |
void |
setWarning(boolean warning)
Used to flag overlapping scene objects that have no resolving object priorities. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public ObjectInfo info
public ObjectTile tile
public Rectangle bounds
protected Rectangle _frect
protected Polygon _footprint
protected Point _fspot
protected Point _sspot
protected boolean _warning
protected static RuntimeAdjust.BooleanAdjust _hideObjects
protected static RuntimeAdjust.BooleanAdjust _fprintDebug
protected static Polygon _spotTri
protected static final Composite ALPHA_WARN
| Constructor Detail |
|---|
public SceneObject(MisoScenePanel panel,
ObjectInfo info)
public SceneObject(MisoSceneMetrics metrics,
TileManager mgr,
TileSet.Colorizer colorizer,
ObjectInfo info)
public SceneObject(MisoScenePanel panel,
ObjectInfo info,
ObjectTile tile)
public SceneObject(MisoSceneMetrics metrics,
ObjectInfo info,
ObjectTile tile)
| Method Detail |
|---|
public void setWarning(boolean warning)
public void paint(Graphics2D gfx)
public Point getObjectSpot()
public Point getObjectScreenSpot()
public boolean objectFootprintOverlaps(SceneObject so)
public boolean objectFootprintOverlaps(Rectangle rect)
public Polygon getObjectFootprint()
public int getPriority()
public void setPriority(byte priority)
public boolean setHovered(boolean hovered)
public void relocateObject(MisoSceneMetrics metrics,
int tx,
int ty)
public void refreshObjectTile(MisoScenePanel panel)
ObjectInfo's
tileId and call this method or things might break.
public void refreshObjectTile(MisoSceneMetrics metrics,
TileManager mgr,
TileSet.Colorizer colorizer)
ObjectInfo's
tileId and call this method or things might break.
protected void computeInfo(MisoSceneMetrics metrics)
public String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||