#include <polygon_shape.h>
Public Member Functions | |
Construction | |
PolygonShape () | |
Constructs a null instance. More... | |
PolygonShape (const PhysicsWorld &pw) | |
Constructs a Polygon Shape. More... | |
PolygonShape (const PhysicsContext &pc) | |
Constructs a Polygon Shape. More... | |
~PolygonShape () | |
Attributes | |
bool | is_null () const |
Returns true if this object is invalid. More... | |
void | throw_if_null () const |
Throw an exception if this object is invalid. More... | |
Operations | |
PolygonShape & | operator= (const PolygonShape ©) |
Copy assignment operator. More... | |
void | set_as_box (float width, float height) |
void | set_as_box (float width, float height, const Vec2f ¢er, Angle &angle) |
Attributes | |
ShapeType | get_shape_type () const |
Protected Attributes | |
Implementation | |
std::shared_ptr< Shape_Impl > | shape_impl |
Friends | |
class | FixtureDescription |
Polygon Shape class.
A convex polygon. It is assumed that the interior of the polygon is to the left of each edge. Polygons have a maximum number of vertices equal to b2_maxPolygonVertices. In most cases you should not need many vertices for a convex polygon.