 |
Box2D
2.4.1
A 2D physics engine for games
|
22 #ifndef B2_POLYGON_SHAPE_H
23 #define B2_POLYGON_SHAPE_H
48 void Set(
const b2Vec2* points, int32 count);
53 void SetAsBox(
float hx,
float hy);
60 void SetAsBox(
float hx,
float hy,
const b2Vec2& center,
float angle);
69 const b2Transform& transform, int32 childIndex)
const override;
79 bool Validate()
const;
87 inline b2PolygonShape::b2PolygonShape()
A 2D column vector.
Definition: b2_math.h:41
virtual bool RayCast(b2RayCastOutput *output, const b2RayCastInput &input, const b2Transform &transform, int32 childIndex) const =0
virtual int32 GetChildCount() const =0
Get the number of child primitives.
virtual void ComputeAABB(b2AABB *aabb, const b2Transform &xf, int32 childIndex) const =0
float m_radius
Definition: b2_shape.h:102
virtual void ComputeMass(b2MassData *massData, float density) const =0
An axis aligned bounding box.
Definition: b2_collision.h:168
Definition: b2_block_allocator.h:37
Definition: b2_polygon_shape.h:32
#define b2_polygonRadius
Definition: b2_common.h:74
Definition: b2_shape.h:48
This holds the mass data computed for a shape.
Definition: b2_shape.h:33
void SetZero()
Set this vector to all zeros.
Definition: b2_math.h:50
virtual b2Shape * Clone(b2BlockAllocator *allocator) const =0
Clone the concrete shape using the provided allocator.
Definition: b2_collision.h:161
virtual bool TestPoint(const b2Transform &xf, const b2Vec2 &p) const =0
#define b2_maxPolygonVertices
Definition: b2_settings.h:53