com.threerings.tudey.shape.config
Class ShapeConfig

java.lang.Object
  extended by com.threerings.util.DeepObject
      extended by com.threerings.tudey.shape.config.ShapeConfig
All Implemented Interfaces:
Exportable, com.threerings.io.Streamable, Copyable, Cloneable
Direct Known Subclasses:
ShapeConfig.Capsule, ShapeConfig.Circle, ShapeConfig.Compound, ShapeConfig.Global, ShapeConfig.None, ShapeConfig.Point, ShapeConfig.Polygon, ShapeConfig.Rectangle, ShapeConfig.Segment

@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 ShapeConfig
extends DeepObject
implements Exportable, com.threerings.io.Streamable

The 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
com.threerings.io.Streamable.Closure
 
Constructor Summary
ShapeConfig()
           
 
Method Summary
 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
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ShapeConfig

public ShapeConfig()
Method Detail

getShape

public Shape getShape()
Returns a reference to the untransformed shape.


getBounds

public Box getBounds()
Returns a reference to the untransformed bounds of the shape.


getList

public DisplayList getList(GlContext ctx,
                           boolean outline)
Returns the cached display list to draw this shape.

Parameters:
outline - if true, return the outline list; otherwise, the solid list.

invalidate

public void invalidate()
Invalidates any cached data.



Copyright © 2011. All Rights Reserved.