21 #ifndef GF_PHYSICS_BODY_H 22 #define GF_PHYSICS_BODY_H 27 #include "PhysicsGeometry.h" 31 #include "Transform.h" 35 #ifndef DOXYGEN_SHOULD_SKIP_THIS 119 void setPosition(
Vector2f position);
134 return m_linearVelocity;
143 m_linearVelocity = velocity;
153 void applyLinearImpulse(
Vector2f impulse);
161 return m_acceleration;
203 void setVelocityFromAngle();
212 void updateTransform();
236 m_restitution = restitution;
245 return m_restitution;
254 m_staticFriction = friction;
263 return m_staticFriction;
272 m_dynamicFriction = friction;
281 return m_dynamicFriction;
290 m_linearDamping = damping;
299 return m_linearDamping;
309 void setDensity(
float density);
319 return m_inverseMass;
344 float m_staticFriction;
345 float m_dynamicFriction;
346 float m_linearDamping;
353 #ifndef DOXYGEN_SHOULD_SKIP_THIS 358 #endif // GF_PHYSICS_BODY_H Vector2f getLinearVelocity() const
Get the linear velocity of the body.
Definition: PhysicsBody.h:133
The row has a dynamic layout.
void setLinearDamping(float damping)
Set the linear damping of the body.
Definition: PhysicsBody.h:289
float getInverseMass() const
Get the inverse mass of the body.
Definition: PhysicsBody.h:318
Base class for all render targets (window, texture, ...)
Definition: RenderTarget.h:73
Type getType() const
Get the type of the body.
Definition: PhysicsBody.h:79
Vector2f getAcceleration() const
Get the acceleration of the body.
Definition: PhysicsBody.h:160
Define the states used for drawing to a RenderTarget.
Definition: RenderStates.h:82
A physics body.
Definition: PhysicsBody.h:56
float getAngle() const
Get the angle of the body.
Definition: PhysicsBody.h:178
Type
Type of body.
Definition: PhysicsBody.h:61
float getDynamicFriction() const
Get the dynamic friction coefficient of the body.
Definition: PhysicsBody.h:280
float getLinearDamping() const
Get the linear damping of the body.
Definition: PhysicsBody.h:298
Static body with infinite mass.
Definition: PhysicsBody.h:62
The namespace for gf classes.
Definition: Action.h:35
float getStaticFriction() const
Get the static friction coefficient of the body.
Definition: PhysicsBody.h:262
float angle(Direction direction)
Get an angle from a direction.
void setRestitution(float restitution)
Set the restitution of the body of the body.
Definition: PhysicsBody.h:235
Vector2f getPosition() const
Get the position of the body.
Definition: PhysicsBody.h:110
Data about the collision between two objects.
Definition: Collision.h:43
void setAngle(float angle)
Set the angle of the body.
Definition: PhysicsBody.h:187
void turn(float arc)
Change the angle of the body.
Definition: PhysicsBody.h:196
The geometry of a physics body.
Definition: PhysicsGeometry.h:46
void setDynamicFriction(float friction)
Set the dynamic friction coefficient of the body.
Definition: PhysicsBody.h:271
float getRestitution() const
Get the restitution of the body of the body.
Definition: PhysicsBody.h:244
Dynamic bodies with finite mass.
Definition: PhysicsBody.h:63
void setStaticFriction(float friction)
Set the static friction coefficient of the body.
Definition: PhysicsBody.h:253
void setLinearVelocity(Vector2f velocity)
Set the linear velocity of the body.
Definition: PhysicsBody.h:142