23 #include <Box2D/Dynamics/b2Body.h>
25 #include <Box2D/Collision/Shapes/b2Shape.h>
201 void Dump(int32 bodyIndex);
231 float32 m_restitution;
300 b2Assert(b2IsValid(density) && density >= 0.0f);
316 m_friction = friction;
321 return m_restitution;
326 m_restitution = restitution;
351 b2Assert(0 <= childIndex && childIndex < m_proxyCount);
352 return m_proxies[childIndex].aabb;
const b2AABB & GetAABB(int32 childIndex) const
Definition: b2Fixture.h:349
Type GetType() const
Definition: b2Shape.h:104
b2Filter filter
Contact filtering data.
Definition: b2Fixture.h:91
b2Fixture * GetNext()
Definition: b2Fixture.h:288
void SetRestitution(float32 restitution)
Definition: b2Fixture.h:324
Definition: b2BroadPhase.h:36
bool RayCast(b2RayCastOutput *output, const b2RayCastInput &input, int32 childIndex) const
Definition: b2Fixture.h:339
void * userData
Use this to store application specific fixture data.
Definition: b2Fixture.h:75
bool isSensor
Definition: b2Fixture.h:88
void GetMassData(b2MassData *massData) const
Definition: b2Fixture.h:344
This proxy is used internally to connect fixtures to the broad-phase.
Definition: b2Fixture.h:95
void SetFriction(float32 friction)
Definition: b2Fixture.h:314
uint16 categoryBits
The collision category bits. Normally you would just set one bit.
Definition: b2Fixture.h:43
float32 restitution
The restitution (elasticity) usually in the range [0,1].
Definition: b2Fixture.h:81
float32 GetFriction() const
Get the coefficient of friction.
Definition: b2Fixture.h:309
Definition: b2BlockAllocator.h:36
This holds the mass data computed for a shape.
Definition: b2Shape.h:28
void ComputeDistance(const b2Vec2 &p, float32 *distance, b2Vec2 *normal, int32 childIndex) const
Definition: b2Fixture.h:334
float32 GetDensity() const
Get the density of this fixture.
Definition: b2Fixture.h:304
b2Shape::Type GetType() const
Definition: b2Fixture.h:243
Definition: b2Collision.h:155
bool IsSensor() const
Definition: b2Fixture.h:258
b2Body * GetBody()
Definition: b2Fixture.h:278
b2Shape * GetShape()
Definition: b2Fixture.h:248
Definition: b2Fixture.h:57
int16 groupIndex
Definition: b2Fixture.h:52
An axis aligned bounding box.
Definition: b2Collision.h:162
const b2Filter & GetFilterData() const
Get the contact filtering data.
Definition: b2Fixture.h:263
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:47
A rigid body. These are created via b2World::CreateBody.
Definition: b2Body.h:132
float32 GetRestitution() const
Get the coefficient of restitution.
Definition: b2Fixture.h:319
b2FixtureDef()
The constructor sets the default fixture definition values.
Definition: b2Fixture.h:60
void SetDensity(float32 density)
Definition: b2Fixture.h:298
const b2Shape * shape
Definition: b2Fixture.h:72
const b2Transform & GetTransform() const
Definition: b2Body.h:496
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:56
void * GetUserData() const
Definition: b2Fixture.h:268
void SetUserData(void *data)
Set the user data. Use this to store your application specific data.
Definition: b2Fixture.h:273
This holds contact filtering data.
Definition: b2Fixture.h:33
bool TestPoint(const b2Vec2 &p) const
Definition: b2Fixture.h:329
virtual void ComputeDistance(const b2Transform &xf, const b2Vec2 &p, float32 *distance, b2Vec2 *normal, int32 childIndex) const =0
float32 density
The density, usually in kg/m^2.
Definition: b2Fixture.h:84
float32 friction
The friction coefficient, usually in the range [0,1].
Definition: b2Fixture.h:78
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:108