PhysicsProperties Struct Reference
[Shapes]

Manages the physics settings for a Shape. More...

#include <NodeProperties.h>

List of all members.

Public Attributes

float friction
 Friction for this object (0 - 1).
float restitution
 Restitution (elasticity) of this object (0 - 1).
float density
 Density of this object, 0 means a static body.
bool preventRotation
 Lock rotation of this body.
b2Body * physicsBody
 Pointer to the Box2D body generated for this object.
PhysicsController * controller
 Pointer to the PhysicsController for this object.


Detailed Description

Manages the physics settings for a Shape.

See also:
b2BodyDef, b2ShapeDef

Member Data Documentation

Pointer to the Box2D body generated for this object.

The user must either generate the Box2D body herself, or construct a PhysicsController object to control a particular Shape, which will generate the necessary body based on the Shape's physics settings and geometry.

One can also use SceneNode::addPhysicsObject( Shape* ) to insert a physically controller object conveniently.

See also:
PhysicsController, SceneNode::addPhysicsObject ( Shape* )

PhysicsController* PhysicsProperties::controller

Pointer to the PhysicsController for this object.

This is set if the Shape is under the control of a PhysicsController.


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

Generated on Fri Feb 22 15:56:22 2008 for Scene2D by  doxygen 1.5.5