|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.util.DeepObject
com.threerings.tudey.shape.config.ShapeConfig
@EditorTypes(value={ShapeConfig.Point.class,ShapeConfig.Segment.class,ShapeConfig.Rectangle.class,ShapeConfig.Circle.class,ShapeConfig.Capsule.class,ShapeConfig.Polygon.class,ShapeConfig.Compound.class,ShapeConfig.Global.class})
public abstract class ShapeConfigThe configuration for a shape.
| Nested Class Summary | |
|---|---|
static class |
ShapeConfig.Capsule
A capsule. |
static class |
ShapeConfig.Circle
A circle. |
static class |
ShapeConfig.Compound
A compound shape. |
static class |
ShapeConfig.Global
A global shape. |
static class |
ShapeConfig.None
A non-shape. |
static class |
ShapeConfig.Point
A point. |
static class |
ShapeConfig.Polygon
A polygon. |
static class |
ShapeConfig.Rectangle
A rectangle. |
static class |
ShapeConfig.Segment
A line segment. |
static class |
ShapeConfig.TransformedShape
Combines a shape with its transform. |
static class |
ShapeConfig.Vertex
A single vertex in a polygon. |
| Nested classes/interfaces inherited from interface com.threerings.io.Streamable |
|---|
Streamable.Closure |
| Field Summary | |
|---|---|
protected Box |
_bounds
The untransformed bounds of the shape. |
protected SoftReference<DisplayList> |
_outlineList
The display lists containing the solid and outline representations. |
protected Shape |
_shape
The untransformed shape. |
protected SoftReference<DisplayList> |
_solidList
The display lists containing the solid and outline representations. |
protected static float |
CIRCLE_INCREMENT
The increment angle between circle segments. |
protected static int |
CIRCLE_SEGMENTS
The number of segments to use when we render circles. |
| Constructor Summary | |
|---|---|
ShapeConfig()
|
|
| Method Summary | |
|---|---|
protected abstract Shape |
createShape()
Creates the untransformed shape corresponding to this config. |
protected abstract void |
draw(boolean outline)
Draws this shape in immediate mode. |
Box |
getBounds()
Returns a reference to the untransformed bounds of the shape. |
DisplayList |
getList(GlContext ctx,
boolean outline)
Returns the cached display list to draw this shape. |
Shape |
getShape()
Returns a reference to the untransformed shape. |
void |
invalidate()
Invalidates any cached data. |
| Methods inherited from class com.threerings.util.DeepObject |
|---|
clone, copy, copy, equals, hashCode, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
@DeepOmit protected transient Shape _shape
@DeepOmit protected transient Box _bounds
@DeepOmit protected transient SoftReference<DisplayList> _solidList
@DeepOmit protected transient SoftReference<DisplayList> _outlineList
protected static final int CIRCLE_SEGMENTS
protected static final float CIRCLE_INCREMENT
| Constructor Detail |
|---|
public ShapeConfig()
| Method Detail |
|---|
public Shape getShape()
public Box getBounds()
public DisplayList getList(GlContext ctx,
boolean outline)
outline - if true, return the outline list; otherwise, the solid list.public void invalidate()
protected abstract Shape createShape()
protected abstract void draw(boolean outline)
outline - if true, draw the outline of the shape; otherwise, draw the solid form.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||