42 #include "btBulletDynamicsCommon.h"
43 #include "BulletSoftBody/btSoftRigidDynamicsWorld.h"
50 if(tagSearch.
matches(node.getTags())) {
51 rigidInfo = createRigidInfo(node);
56 std::vector<tgRigidInfo*> tgRigidInfo::createRigidInfos(
const tgNodes& nodes,
const tgTagSearch& tagSearch)
58 std::vector<tgRigidInfo*> result;
59 for(
int i = 0; i < nodes.size(); i++) {
60 tgRigidInfo* r = createRigidInfo(nodes[i], tagSearch);
62 r->addTags(nodes[i].getTags());
74 if(tagSearch.
matches(pair.getTags())) {
75 rigidInfo = createRigidInfo(pair);
80 std::vector<tgRigidInfo*> tgRigidInfo::createRigidInfos(
const tgPairs& pairs,
const tgTagSearch& tagSearch)
82 std::vector<tgRigidInfo*> result;
83 for(
int i = 0; i < pairs.size(); i++) {
84 tgRigidInfo* r = createRigidInfo(pairs[i], tagSearch);
94 void tgRigidInfo::initRigidBody(
tgWorld& world)
109 double mass = rigid->
getMass();
118 body->setFlags(BT_ENABLE_GYROPSCOPIC_FORCE);
126 btRigidBody* body = tgCast::cast<btCollisionObject, btRigidBody>(
m_collisionObject);
131 const btRigidBody* body = tgCast::cast<btCollisionObject, btRigidBody>(
m_collisionObject);
147 std::set<btVector3> intersection;
149 std::set_intersection(s1.begin(), s1.end(),
150 s2.begin(), s2.end(),
151 intersection.begin());
152 return intersection.empty();
154 std::set<btVector3>::const_iterator ii;
155 std::set<btVector3>::const_iterator ij;
156 for (ii = s1.begin(); ii != s1.end(); ++ii) {
157 for (ij = s2.begin(); ij != s2.end(); ++ij) {
Contains the definition of class tgTagSearch.
Definition of abstract class tgRigidInfo.
virtual tgRigidInfo * getRigidInfoGroup()
virtual bool sharesNodesWith(const tgRigidInfo &other) const
virtual void setRigidBody(btRigidBody *rigidBody)
static btDynamicsWorld & worldToDynamicsWorld(const tgWorld &world)
virtual btCollisionShape * getCollisionShape(tgWorld &world) const =0
Definition of class tgPair.
Definition of class tgPairs.
Definition of class tgNodes.
Definition of class tgNode.
virtual btRigidBody * getRigidBody()
btCollisionObject * m_collisionObject
const bool matches(const tgTags &tags) const
Contains the definition of class tgWorld $Id$.
Contains the definition of class tgBulletUtil.
virtual double getMass() const =0
virtual btTransform getTransform() const =0
Rand seeding simular to the evolution and terrain classes.
virtual std::set< btVector3 > getContainedNodes() const =0