Public Member Functions | Public Attributes
b2BodyDef Struct Reference

#include <b2Body.h>

List of all members.

Public Member Functions

 b2BodyDef ()
 This constructor sets the body definition default values.

Public Attributes

bool active
 Does this body start out active?
bool allowSleep
float32 angle
 The world angle of the body in radians.
float32 angularDamping
float32 angularVelocity
 The angular velocity of the body.
bool awake
 Is this body initially awake or sleeping?
bool bullet
bool fixedRotation
 Should this body be prevented from rotating? Useful for characters.
float32 gravityScale
 Scale the gravity applied to this body.
float32 linearDamping
b2Vec2 linearVelocity
 The linear velocity of the body's origin in world co-ordinates.
b2Vec2 position
b2BodyType type
void * userData
 Use this to store application specific body data.

Detailed Description

A body definition holds all the data needed to construct a rigid body. You can safely re-use body definitions. Shapes are added to a body after construction.

Definition at line 51 of file b2Body.h.


Constructor & Destructor Documentation

b2BodyDef::b2BodyDef ( ) [inline]

This constructor sets the body definition default values.

Definition at line 54 of file b2Body.h.


Member Data Documentation

Does this body start out active?

Definition at line 116 of file b2Body.h.

Set this flag to false if this body should never fall asleep. Note that this increases CPU usage.

Definition at line 101 of file b2Body.h.

The world angle of the body in radians.

Definition at line 81 of file b2Body.h.

Angular damping is use to reduce the angular velocity. The damping parameter can be larger than 1.0f but the damping effect becomes sensitive to the time step when the damping parameter is large.

Definition at line 97 of file b2Body.h.

The angular velocity of the body.

Definition at line 87 of file b2Body.h.

Is this body initially awake or sleeping?

Definition at line 104 of file b2Body.h.

Is this a fast moving body that should be prevented from tunneling through other moving bodies? Note that all bodies are prevented from tunneling through kinematic and static bodies. This setting is only considered on dynamic bodies.

Warning:
You should use this flag sparingly since it increases processing time.

Definition at line 113 of file b2Body.h.

Should this body be prevented from rotating? Useful for characters.

Definition at line 107 of file b2Body.h.

Scale the gravity applied to this body.

Definition at line 122 of file b2Body.h.

Linear damping is use to reduce the linear velocity. The damping parameter can be larger than 1.0f but the damping effect becomes sensitive to the time step when the damping parameter is large.

Definition at line 92 of file b2Body.h.

The linear velocity of the body's origin in world co-ordinates.

Definition at line 84 of file b2Body.h.

The world position of the body. Avoid creating bodies at the origin since this can lead to many overlapping shapes.

Definition at line 78 of file b2Body.h.

The body type: static, kinematic, or dynamic. Note: if a dynamic body would have zero mass, the mass is set to one.

Definition at line 74 of file b2Body.h.

Use this to store application specific body data.

Definition at line 119 of file b2Body.h.


The documentation for this struct was generated from the following file:


mvsim
Author(s):
autogenerated on Thu Sep 7 2017 09:27:49