Go to the documentation of this file.
63 for (
int32 i = 0; i < childCount; ++i)
105 s->~b2PolygonShape();
201 if (fixtureA ==
this || fixtureB ==
this)
211 if (world ==
nullptr)
235 b2Dump(
" b2FixtureDef fd;\n");
250 b2Dump(
" b2CircleShape shape;\n");
251 b2Dump(
" shape.m_radius = %.9g;\n",
s->m_radius);
252 b2Dump(
" shape.m_p.Set(%.9g, %.9g);\n",
s->m_p.x,
s->m_p.y);
259 b2Dump(
" b2EdgeShape shape;\n");
260 b2Dump(
" shape.m_radius = %.9g;\n",
s->m_radius);
261 b2Dump(
" shape.m_vertex0.Set(%.9g, %.9g);\n",
s->m_vertex0.x,
s->m_vertex0.y);
262 b2Dump(
" shape.m_vertex1.Set(%.9g, %.9g);\n",
s->m_vertex1.x,
s->m_vertex1.y);
263 b2Dump(
" shape.m_vertex2.Set(%.9g, %.9g);\n",
s->m_vertex2.x,
s->m_vertex2.y);
264 b2Dump(
" shape.m_vertex3.Set(%.9g, %.9g);\n",
s->m_vertex3.x,
s->m_vertex3.y);
265 b2Dump(
" shape.m_oneSided = bool(%d);\n",
s->m_oneSided);
272 b2Dump(
" b2PolygonShape shape;\n");
274 for (
int32 i = 0; i <
s->m_count; ++i)
276 b2Dump(
" vs[%d].Set(%.9g, %.9g);\n", i,
s->m_vertices[i].x,
s->m_vertices[i].y);
278 b2Dump(
" shape.Set(vs, %d);\n",
s->m_count);
285 b2Dump(
" b2ChainShape shape;\n");
286 b2Dump(
" b2Vec2 vs[%d];\n",
s->m_count);
287 for (
int32 i = 0; i <
s->m_count; ++i)
289 b2Dump(
" vs[%d].Set(%.9g, %.9g);\n", i,
s->m_vertices[i].x,
s->m_vertices[i].y);
291 b2Dump(
" shape.CreateChain(vs, %d);\n",
s->m_count);
292 b2Dump(
" shape.m_prevVertex.Set(%.9g, %.9g);\n",
s->m_prevVertex.x,
s->m_prevVertex.y);
293 b2Dump(
" shape.m_nextVertex.Set(%.9g, %.9g);\n",
s->m_nextVertex.x,
s->m_nextVertex.y);
302 b2Dump(
" fd.shape = &shape;\n");
304 b2Dump(
" bodies[%d]->CreateFixture(&fd);\n", bodyIndex);
void DestroyProxies(b2BroadPhase *broadPhase)
void DestroyProxy(int32 proxyId)
Destroy a proxy. It is up to the client to remove any pairs.
void Free(void *p, int32 size)
Free memory. This will use b2Free if the size is larger than b2_maxBlockSize.
virtual int32 GetChildCount() const =0
Get the number of child primitives.
b2FixtureUserData userData
Use this to store application specific fixture data.
void SetFilterData(const b2Filter &filter)
virtual b2Shape * Clone(b2BlockAllocator *allocator) const =0
Clone the concrete shape using the provided allocator.
void * Allocate(int32 size)
Allocate memory. This will use b2Alloc if the size is larger than b2_maxBlockSize.
void TouchProxy(int32 proxyId)
Call to trigger a re-processing of it's pairs on the next call to UpdatePairs.
b2Vec2 GetCenter() const
Get the center of the AABB.
void SetSensor(bool sensor)
Set if this fixture is a sensor.
A rigid body. These are created via b2World::CreateBody.
void b2Dump(const char *string,...)
void MoveProxy(int32 proxyId, const b2AABB &aabb, const b2Vec2 &displacement)
float restitutionThreshold
void Synchronize(b2BroadPhase *broadPhase, const b2Transform &xf1, const b2Transform &xf2)
void CreateProxies(b2BroadPhase *broadPhase, const b2Transform &xf)
This proxy is used internally to connect fixtures to the broad-phase.
float m_restitutionThreshold
b2ContactManager m_contactManager
float restitution
The restitution (elasticity) usually in the range [0,1].
float friction
The friction coefficient, usually in the range [0,1].
b2Filter filter
Contact filtering data.
void Dump(int32 bodyIndex)
Dump this fixture to the log file.
This holds contact filtering data.
float density
The density, usually in kg/m^2.
void Destroy(b2BlockAllocator *allocator)
b2FixtureUserData m_userData
void Refilter()
Call this if you want to establish collision that was previously disabled by b2ContactFilter::ShouldC...
b2FixtureProxy * m_proxies
An axis aligned bounding box.
void Combine(const b2AABB &aabb)
Combine an AABB into this one.
b2ContactEdge * GetContactList()
void Create(b2BlockAllocator *allocator, b2Body *body, const b2FixtureDef *def)
uint16 categoryBits
The collision category bits. Normally you would just set one bit.
b2World * GetWorld()
Get the parent world of this body.
virtual void ComputeAABB(b2AABB *aabb, const b2Transform &xf, int32 childIndex) const =0
int32 CreateProxy(const b2AABB &aabb, void *userData)
#define b2_maxPolygonVertices
mvsim
Author(s):
autogenerated on Wed May 28 2025 02:13:07