75 std::vector<d2Vec2> &contactsOut,
Represents a 2D physics world.
Definition d2World.h:22
CIRCLE
Definition d2Shape.h:12
enum D2_API d2ShapeType
Definition d2Shape.h:11
POLYGON
Definition d2Shape.h:13
float real
Definition d2Types.h:10
#define D2_API
Definition d2api.h:27
d2BoxShape(real width, real height)
d2ShapeType GetType() const override
real GetMomentOfInertia() const override
d2Shape * Clone() const override
real GetMomentOfInertia() const override
d2CircleShape(const real radius)
d2ShapeType GetType() const override
d2Shape * Clone() const override
real radius
Definition d2Shape.h:33
void UpdateVertices(const d2Transform &transform) override
Definition d2Shape.h:43
virtual ~d2PolygonShape()
int FindIncidentEdge(const d2Vec2 &normal) const
real GetMomentOfInertia() const override
real FindMinSeparation(const d2PolygonShape *other, int &indexReferenceEdge, d2Vec2 &supportPoint) const
d2PolygonShape(const d2Vec2 *vertices, int vertexCount)
void UpdateVertices(const d2Transform &transform) override
d2Vec2 * localVertices
Definition d2Shape.h:55
d2Vec2 * worldVertices
Definition d2Shape.h:56
d2Vec2 PolygonCentroid() const
int m_vertexCount
Definition d2Shape.h:53
d2ShapeType GetType() const override
real height
Definition d2Shape.h:51
int ClipSegmentToLine(const std::vector< d2Vec2 > &contactsIn, std::vector< d2Vec2 > &contactsOut, const d2Vec2 &c0, const d2Vec2 &c1) const
real width
Definition d2Shape.h:50
d2Vec2 EdgeAt(int index) const
d2Shape * Clone() const override
virtual real GetMomentOfInertia() const =0
virtual d2ShapeType GetType() const =0
virtual d2Shape * Clone() const =0
virtual ~d2Shape()=default
virtual void UpdateVertices(const d2Transform &transform)=0
Represents a 2D vector.
Definition d2Math.h:22