#include <Shape.h>


Public Types | |
| enum | ShapeType { ST_CIRCLE, ST_CONVEX, ST_POLY, ST_POINT, ST_LINE, ST_NONE } |
| Type of shape. More... | |
Public Member Functions | |
| Shape () | |
| Construct new Shape of type Shape::ST_NONE. | |
| Shape (const std::string &name) | |
| Construct a Shape with a given name. | |
| Shape (const Shape ©) | |
| Copy constructor for Shapes. | |
| virtual ShapeType | type () |
| Get the type of a Shape. | |
| virtual void | getDataPoints (std::vector< Vector2f > &points) const |
| Get locations of the points that construct the Shape. | |
| virtual const Vertex & | getPoint (int idx) const |
| Get a const reference to a vertex at a specific index. | |
| virtual Vertex & | getPoint (int idx) |
| Get a reference to a vertex at a specific index. | |
| virtual std::vector< Vertex > & | getPoints () |
| Get the vertices that make up this object. | |
Public Attributes | |
| boost::signal< void(Shape *, Shape *, b2Contact *) | Collision ) |
| Collision signal that occurs when two Shapes collide. | |
| AppearanceProperties | Appearance |
| Contains the visual properties for this object. | |
| PhysicsProperties | Physics |
| Contains the physical properties for this object. | |
Friends | |
| class | SceneNode |
Shapes are a type of Node with a geometrical representation.
| enum Shape::ShapeType |
| Shape::Shape | ( | ) | [inline] |
Construct new Shape of type Shape::ST_NONE.
This sort of Shape has no geometrical representation.
| Shape::Shape | ( | const std::string & | name | ) | [inline] |
| virtual ShapeType Shape::type | ( | ) | [inline, virtual] |
| virtual void Shape::getDataPoints | ( | std::vector< Vector2f > & | points | ) | const [virtual] |
| virtual const Vertex& Shape::getPoint | ( | int | idx | ) | const [inline, virtual] |
Get a const reference to a vertex at a specific index.
| idx | index of point to get |
| virtual Vertex& Shape::getPoint | ( | int | idx | ) | [inline, virtual] |
Get a reference to a vertex at a specific index.
| idx | index of point to get |
| virtual std::vector<Vertex>& Shape::getPoints | ( | ) | [virtual] |
Get the vertices that make up this object.
These are the same vertices that are used to draw the object. Modifying these will modify the appearance of the object.
| boost::signal<void (Shape*, Shape*, b2Contact*) Shape::Collision) |
Collision signal that occurs when two Shapes collide.
Connect to this signal to be notified of collision events for this Shape.
1.5.5