20 #ifndef B2_CIRCLE_SHAPE_H
21 #define B2_CIRCLE_SHAPE_H
23 #include <Box2D/Collision/Shapes/b2Shape.h>
45 const b2Transform& transform, int32 childIndex)
const;
65 #if LIQUIDFUN_EXTERNAL_LANGUAGE_API
68 void SetPosition(float32 x, float32 y) {
m_p.
Set(x, y); }
71 float32 GetPositionX()
const {
return m_p.x; }
74 float32 GetPositionY()
const {
return m_p.y; }
75 #endif // LIQUIDFUN_EXTERNAL_LANGUAGE_API
81 inline b2CircleShape::b2CircleShape()
103 b2Assert(index == 0);
A circle shape.
Definition: b2CircleShape.h:26
void ComputeAABB(b2AABB *aabb, const b2Transform &transform, int32 childIndex) const
Definition: b2CircleShape.cpp:95
bool TestPoint(const b2Transform &transform, const b2Vec2 &p) const
Implement b2Shape.
Definition: b2CircleShape.cpp:36
bool RayCast(b2RayCastOutput *output, const b2RayCastInput &input, const b2Transform &transform, int32 childIndex) const
Implement b2Shape.
Definition: b2CircleShape.cpp:58
Definition: b2BlockAllocator.h:36
This holds the mass data computed for a shape.
Definition: b2Shape.h:28
void Set(float32 x_, float32 y_)
Set this vector to some specified coordinates.
Definition: b2Math.h:68
Definition: b2Collision.h:155
void SetZero()
Set this vector to all zeros.
Definition: b2Math.h:65
void ComputeDistance(const b2Transform &xf, const b2Vec2 &p, float32 *distance, b2Vec2 *normal, int32 childIndex) const
Definition: b2CircleShape.cpp:43
void ComputeMass(b2MassData *massData, float32 density) const
Definition: b2CircleShape.cpp:104
An axis aligned bounding box.
Definition: b2Collision.h:162
int32 GetChildCount() const
Definition: b2CircleShape.cpp:31
const b2Vec2 & GetSupportVertex(const b2Vec2 &d) const
Get the supporting vertex in the given direction.
Definition: b2CircleShape.h:94
const b2Vec2 & GetVertex(int32 index) const
Get a vertex by index. Used by b2Distance.
Definition: b2CircleShape.h:100
b2Vec2 m_p
Position.
Definition: b2CircleShape.h:78
b2Shape * Clone(b2BlockAllocator *allocator) const
Implement b2Shape.
Definition: b2CircleShape.cpp:23
A 2D column vector.
Definition: b2Math.h:56
int32 GetSupport(const b2Vec2 &d) const
Get the supporting vertex index in the given direction.
Definition: b2CircleShape.h:88
int32 GetVertexCount() const
Get the vertex count.
Definition: b2CircleShape.h:60