Classes | |
| class | clan::ChainShape |
| Chain Shape class. More... | |
| class | clan::CircleShape |
| Circle Shape class. More... | |
| class | clan::EdgeShape |
| Edge Shape class. More... | |
| class | clan::PhysicsObject |
| Physics Object class. More... | |
| class | clan::PolygonShape |
| Polygon Shape class. More... | |
| class | clan::Shape |
| Shape class. More... | |
Enumerations | |
| enum | clan::ShapeType { clan::shape_circle = 0, clan::shape_edge = 1, clan::shape_polygon = 2, clan::shape_chain = 3 } |
| Shape types. More... | |
Construction | |
| clan::PhysicsObject::PhysicsObject () | |
| virtual | clan::PhysicsObject::~PhysicsObject () |
Attributes | |
| virtual bool | clan::PhysicsObject::should_collide_with (Body &body)=0 |
Operations | |
| virtual void | clan::PhysicsObject::on_collision_begin (Body &body)=0 |
| virtual void | clan::PhysicsObject::on_collision_end (Body &body)=0 |
Construction | |
| clan::ChainShape::ChainShape () | |
| Constructs a null instance. More... | |
| clan::ChainShape::ChainShape (const PhysicsWorld &pw) | |
| Constructs a Chain Shape. More... | |
| clan::ChainShape::ChainShape (const PhysicsContext &pc) | |
| Constructs a Chain Shape. More... | |
| clan::ChainShape::~ChainShape () | |
Attributes | |
| bool | clan::ChainShape::is_null () const |
| Returns true if this object is invalid. More... | |
| void | clan::ChainShape::throw_if_null () const |
| Throw an exception if this object is invalid. More... | |
Operations | |
| ChainShape & | clan::ChainShape::operator= (const ChainShape ©) |
| Copy assignment operator. More... | |
| void | clan::ChainShape::create_loop (const Vec2f *vertices, const int count) |
| Create a loop. This automatically adjusts connectivity. More... | |
| void | clan::ChainShape::create_loop (const CollisionOutline &outline) |
| void | clan::ChainShape::create_chain (const Vec2f *vertices, const int count) |
| Create a chain with isolated end vertices. More... | |
| void | clan::ChainShape::set_prev_vertex (const Vec2f &prev_vertex) |
| Establish connectivity to a vertex that precedes the first vertex. Don't call this for loops. More... | |
| void | clan::ChainShape::set_next_vertex (const Vec2f &next_vertex) |
| Establish connectivity to a vertex that follows the last vertex. Don't call this for loops. More... | |
Construction | |
| clan::CircleShape::CircleShape () | |
| Constructs a null instance. More... | |
| clan::CircleShape::CircleShape (const PhysicsWorld &pw) | |
| Constructs a Circle Shape. More... | |
| clan::CircleShape::CircleShape (const PhysicsContext &pc) | |
| Constructs a Circle Shape. More... | |
| clan::CircleShape::~CircleShape () | |
Attributes | |
| bool | clan::CircleShape::is_null () const |
| Returns true if this object is invalid. More... | |
| void | clan::CircleShape::throw_if_null () const |
| Throw an exception if this object is invalid. More... | |
Operations | |
| CircleShape & | clan::CircleShape::operator= (const CircleShape ©) |
| Copy assignment operator. More... | |
| void | clan::CircleShape::set_radius (float radius) |
Construction | |
| clan::EdgeShape::EdgeShape () | |
| Constructs a null instance. More... | |
| clan::EdgeShape::EdgeShape (const PhysicsWorld &pw) | |
| Constructs an Edge Shape. More... | |
| clan::EdgeShape::EdgeShape (const PhysicsContext &pc) | |
| Constructs an Edge Shape. More... | |
| clan::EdgeShape::~EdgeShape () | |
Attributes | |
| bool | clan::EdgeShape::is_null () const |
| Returns true if this object is invalid. More... | |
| void | clan::EdgeShape::throw_if_null () const |
| Throw an exception if this object is invalid. More... | |
Operations | |
| EdgeShape & | clan::EdgeShape::operator= (const EdgeShape ©) |
| Copy assignment operator. More... | |
| void | clan::EdgeShape::set (const Vec2f &v1, const Vec2f &v2) |
| Set this as an isolated edge. More... | |
Construction | |
| clan::PolygonShape::PolygonShape () | |
| Constructs a null instance. More... | |
| clan::PolygonShape::PolygonShape (const PhysicsWorld &pw) | |
| Constructs a Polygon Shape. More... | |
| clan::PolygonShape::PolygonShape (const PhysicsContext &pc) | |
| Constructs a Polygon Shape. More... | |
| clan::PolygonShape::~PolygonShape () | |
Attributes | |
| bool | clan::PolygonShape::is_null () const |
| Returns true if this object is invalid. More... | |
| void | clan::PolygonShape::throw_if_null () const |
| Throw an exception if this object is invalid. More... | |
Operations | |
| PolygonShape & | clan::PolygonShape::operator= (const PolygonShape ©) |
| Copy assignment operator. More... | |
| void | clan::PolygonShape::set_as_box (float width, float height) |
| void | clan::PolygonShape::set_as_box (float width, float height, const Vec2f ¢er, Angle &angle) |
Construction | |
| clan::Shape::Shape () | |
| Constructs a Shape object. More... | |
| virtual | clan::Shape::~Shape () |
Attributes | |
| ShapeType | clan::Shape::get_shape_type () const |
| bool | clan::Shape::is_null () const |
| Returns true if this object is invalid. More... | |
| void | clan::Shape::throw_if_null () const |
| Throw an exception if this object is invalid. More... | |
Operations | |
| Shape & | clan::Shape::operator= (const Shape ©) |
| Copy operator. More... | |
Implementation | |
| std::shared_ptr< Shape_Impl > | clan::Shape::shape_impl |
| enum clan::ShapeType |
Shape types.
| Enumerator | |
|---|---|
| shape_circle | |
| shape_edge | |
| shape_polygon | |
| shape_chain | |
| clan::ChainShape::ChainShape | ( | ) |
Constructs a null instance.
| clan::ChainShape::ChainShape | ( | const PhysicsWorld & | pw | ) |
Constructs a Chain Shape.
| pw | = Physics World. |
| clan::ChainShape::ChainShape | ( | const PhysicsContext & | pc | ) |
Constructs a Chain Shape.
| pc | = Physics Context. |
| clan::CircleShape::CircleShape | ( | ) |
Constructs a null instance.
| clan::CircleShape::CircleShape | ( | const PhysicsWorld & | pw | ) |
| clan::CircleShape::CircleShape | ( | const PhysicsContext & | pc | ) |
| clan::EdgeShape::EdgeShape | ( | ) |
Constructs a null instance.
| clan::EdgeShape::EdgeShape | ( | const PhysicsWorld & | pw | ) |
Constructs an Edge Shape.
| pw | = Physics World. |
| clan::EdgeShape::EdgeShape | ( | const PhysicsContext & | pc | ) |
Constructs an Edge Shape.
| pw | = Physics World. |
|
inline |
| clan::PolygonShape::PolygonShape | ( | ) |
Constructs a null instance.
| clan::PolygonShape::PolygonShape | ( | const PhysicsWorld & | pw | ) |
Constructs a Polygon Shape.
| pw | = Physics World. |
| clan::PolygonShape::PolygonShape | ( | const PhysicsContext & | pc | ) |
Constructs a Polygon Shape.
| pc | = Physics Context. |
| clan::Shape::Shape | ( | ) |
Constructs a Shape object.
| clan::ChainShape::~ChainShape | ( | ) |
| clan::CircleShape::~CircleShape | ( | ) |
| clan::EdgeShape::~EdgeShape | ( | ) |
|
inlinevirtual |
| clan::PolygonShape::~PolygonShape | ( | ) |
|
virtual |
| void clan::ChainShape::create_chain | ( | const Vec2f * | vertices, |
| const int | count | ||
| ) |
Create a chain with isolated end vertices.
| vertices | = an array of vertices, these are copied |
| count | = the vertex count |
| void clan::ChainShape::create_loop | ( | const Vec2f * | vertices, |
| const int | count | ||
| ) |
Create a loop. This automatically adjusts connectivity.
| vertices | = an array of vertices, these are copied |
| count | = the vertex count |
| void clan::ChainShape::create_loop | ( | const CollisionOutline & | outline | ) |
| ShapeType clan::Shape::get_shape_type | ( | ) | const |
|
inline |
Returns true if this object is invalid.
|
inline |
Returns true if this object is invalid.
|
inline |
Returns true if this object is invalid.
|
inline |
Returns true if this object is invalid.
|
inline |
Returns true if this object is invalid.
|
pure virtual |
|
pure virtual |
| Shape& clan::Shape::operator= | ( | const Shape & | copy | ) |
Copy operator.
| CircleShape& clan::CircleShape::operator= | ( | const CircleShape & | copy | ) |
Copy assignment operator.
| EdgeShape& clan::EdgeShape::operator= | ( | const EdgeShape & | copy | ) |
Copy assignment operator.
| PolygonShape& clan::PolygonShape::operator= | ( | const PolygonShape & | copy | ) |
Copy assignment operator.
| ChainShape& clan::ChainShape::operator= | ( | const ChainShape & | copy | ) |
Copy assignment operator.
| void clan::PolygonShape::set_as_box | ( | float | width, |
| float | height | ||
| ) |
| void clan::PolygonShape::set_as_box | ( | float | width, |
| float | height, | ||
| const Vec2f & | center, | ||
| Angle & | angle | ||
| ) |
| void clan::ChainShape::set_next_vertex | ( | const Vec2f & | next_vertex | ) |
Establish connectivity to a vertex that follows the last vertex. Don't call this for loops.
| void clan::ChainShape::set_prev_vertex | ( | const Vec2f & | prev_vertex | ) |
Establish connectivity to a vertex that precedes the first vertex. Don't call this for loops.
| void clan::CircleShape::set_radius | ( | float | radius | ) |
|
pure virtual |
| void clan::Shape::throw_if_null | ( | ) | const |
Throw an exception if this object is invalid.
| void clan::CircleShape::throw_if_null | ( | ) | const |
Throw an exception if this object is invalid.
| void clan::EdgeShape::throw_if_null | ( | ) | const |
Throw an exception if this object is invalid.
| void clan::PolygonShape::throw_if_null | ( | ) | const |
Throw an exception if this object is invalid.
| void clan::ChainShape::throw_if_null | ( | ) | const |
Throw an exception if this object is invalid.
|
protected |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |