36 class btCollisionObject;
61 PhysicsObject():m_world(0), m_physicalObject(0),m_collisionGroup(0), m_stateChanged(true), m_id(
"") {
62 setLockingEnabled(
true);
64 struct defaultCallback {
74 void setPhysicalObject(btCollisionObject *obj);
77 void forgetPhysicalObject(
bool removeFromWorld=
true);
82 return m_physicalObject;
87 return m_physicalObject;
91 virtual void updateSceneObject();
101 virtual void setTransformation(
const geom::Mat &m);
103 virtual void transform(
const geom::Mat &m);
111 void setCollisionMargin(
float margin);
114 void setFriction(
float friction);
117 void setRollingFriction(
float friction);
120 void setCollisionGroup(
int group);
123 int getCollisionGroup();
126 void setContactResponse(
bool response);
129 bool hasContactResponse();
132 void setRestitution(
float restitution);
135 void activate(
bool forceActivation =
false);
137 int getCollisionObjectType();
139 void setCollisionObjectType(
int type);
141 int getCollisionFlags();
143 void setCollisionFlags(
int flags);
158 void setObjectID(std::string
const &
id);
161 std::string getObjectID();
164 std::string getObjectID()
const;
btCollisionObject * m_physicalObject
internal physical object
Definition: PhysicsObject.h:48
The General Function Template.
Definition: Function.h:284
undocument this line if you encounter any issues!
Definition: Any.h:37
Class interface for un-copyable classes.
Definition: Uncopyable.h:64
bool m_stateChanged
is true if the physical state of the object has changed since the last updateSceneObject()
Definition: PhysicsObject.h:53
Function< R, A, B, C > function(Object &obj, R(Object::*method)(A, B, C))
Create Function instances from member functions.
Definition: Function.h:376
A physical world that handles physical objects.
Definition: PhysicsWorld.h:56
utils::Function< void, PhysicsObject *, PhysicsObject *, geom::Vec > m_collisionCallback
Definition: PhysicsObject.h:55
virtual const btCollisionObject * getCollisionObject() const
Definition: PhysicsObject.h:86
std::string m_id
Definition: PhysicsObject.h:57
#define ICLPhysics_API
Definition: CompatMacros.h:181
virtual void prepareForRendering()
called by the scene before it's rendered (calling purely virtual updateSceneObject)
Definition: PhysicsObject.h:94
virtual btCollisionObject * getCollisionObject()
returns internal physical object as collision object
Definition: PhysicsObject.h:81
static void scale(const int deg, xcomplex *P)
Definition: PolynomialSolver.h:133
PhysicsWorld * m_world
physicsworld this object has been added to
Definition: PhysicsObject.h:46
Definition: FixedVector.h:40
PhysicsObject()
Default constructor (initializint m_physicalObject with 0)
Definition: PhysicsObject.h:61
This class combines an physical object and it's graphical representation in ICL.
Definition: PhysicsObject.h:44
The SceneObject class defines visible objects in scenes or scene graph nodes.
Definition: SceneObject.h:140
int m_collisionGroup
collisionGroup this object belongs to
Definition: PhysicsObject.h:50