22 #include <Box2D/Dynamics/b2Body.h>
24 #include <Box2D/Collision/Shapes/b2Shape.h>
196 void Dump(int32 bodyIndex);
226 float32 m_restitution;
295 b2Assert(b2IsValid(density) && density >= 0.0f);
311 m_friction = friction;
316 return m_restitution;
321 m_restitution = restitution;
341 b2Assert(0 <= childIndex && childIndex < m_proxyCount);
342 return m_proxies[childIndex].aabb;
const b2AABB & GetAABB(int32 childIndex) const
Definition: b2Fixture.h:339
Type GetType() const
Definition: b2Shape.h:96
b2Filter filter
Contact filtering data.
Definition: b2Fixture.h:90
b2Fixture * GetNext()
Definition: b2Fixture.h:283
void SetRestitution(float32 restitution)
Definition: b2Fixture.h:319
Definition: b2BroadPhase.h:36
bool RayCast(b2RayCastOutput *output, const b2RayCastInput &input, int32 childIndex) const
Definition: b2Fixture.h:329
void * userData
Use this to store application specific fixture data.
Definition: b2Fixture.h:74
bool isSensor
Definition: b2Fixture.h:87
void GetMassData(b2MassData *massData) const
Definition: b2Fixture.h:334
This proxy is used internally to connect fixtures to the broad-phase.
Definition: b2Fixture.h:94
void SetFriction(float32 friction)
Definition: b2Fixture.h:309
uint16 categoryBits
The collision category bits. Normally you would just set one bit.
Definition: b2Fixture.h:42
float32 restitution
The restitution (elasticity) usually in the range [0,1].
Definition: b2Fixture.h:80
float32 GetFriction() const
Get the coefficient of friction.
Definition: b2Fixture.h:304
Definition: b2BlockAllocator.h:35
This holds the mass data computed for a shape.
Definition: b2Shape.h:27
float32 GetDensity() const
Get the density of this fixture.
Definition: b2Fixture.h:299
b2Shape::Type GetType() const
Definition: b2Fixture.h:238
Definition: b2Collision.h:155
bool IsSensor() const
Definition: b2Fixture.h:253
b2Body * GetBody()
Definition: b2Fixture.h:273
b2Shape * GetShape()
Definition: b2Fixture.h:243
Definition: b2Fixture.h:56
int16 groupIndex
Definition: b2Fixture.h:51
An axis aligned bounding box.
Definition: b2Collision.h:162
const b2Filter & GetFilterData() const
Get the contact filtering data.
Definition: b2Fixture.h:258
void SetFilterData(const b2Filter &filter)
Definition: b2Fixture.cpp:176
void SetSensor(bool sensor)
Set if this fixture is a sensor.
Definition: b2Fixture.cpp:220
void Refilter()
Call this if you want to establish collision that was previously disabled by b2ContactFilter::ShouldC...
Definition: b2Fixture.cpp:183
uint16 maskBits
Definition: b2Fixture.h:46
A rigid body. These are created via b2World::CreateBody.
Definition: b2Body.h:126
float32 GetRestitution() const
Get the coefficient of restitution.
Definition: b2Fixture.h:314
b2FixtureDef()
The constructor sets the default fixture definition values.
Definition: b2Fixture.h:59
void SetDensity(float32 density)
Definition: b2Fixture.h:293
const b2Shape * shape
Definition: b2Fixture.h:71
const b2Transform & GetTransform() const
Definition: b2Body.h:474
virtual bool RayCast(b2RayCastOutput *output, const b2RayCastInput &input, const b2Transform &transform, int32 childIndex) const =0
virtual void ComputeMass(b2MassData *massData, float32 density) const =0
A 2D column vector.
Definition: b2Math.h:53
void * GetUserData() const
Definition: b2Fixture.h:263
void SetUserData(void *data)
Set the user data. Use this to store your application specific data.
Definition: b2Fixture.h:268
This holds contact filtering data.
Definition: b2Fixture.h:32
bool TestPoint(const b2Vec2 &p) const
Definition: b2Fixture.h:324
float32 density
The density, usually in kg/m^2.
Definition: b2Fixture.h:83
float32 friction
The friction coefficient, usually in the range [0,1].
Definition: b2Fixture.h:77
void Dump(int32 bodyIndex)
Dump this fixture to the log file.
Definition: b2Fixture.cpp:229
virtual bool TestPoint(const b2Transform &xf, const b2Vec2 &p) const =0
Definition: b2Fixture.h:107