Changeset 182
- Timestamp:
- 02/27/2010 05:20:57 PM (2 years ago)
- Files:
-
- trunk/include/waterworld/sim2/Animats.h (modified) (1 diff)
- trunk/include/waterworld/sim2/PhysicalBody.h (modified) (1 diff)
- trunk/include/waterworld/sim2/World.h (modified) (1 diff)
- trunk/src/waterworld/sim2/World.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/include/waterworld/sim2/Animats.h
r175 r182 12 12 */ 13 13 typedef std::set<boost::intrusive_ptr<Animat> > Animats; 14 15 /** 16 * List of bodies 17 */ 18 //typedef std::set<boost::intrusive_ptr<palBodyBase> > Bodies; 14 19 } 15 20 trunk/include/waterworld/sim2/PhysicalBody.h
r175 r182 22 22 class PhysicalBody : public IntrusivePtrBase, private boost::noncopyable 23 23 { 24 boost::intrusive_ptr<Animat> m_animat; 25 palBody *m_body; 24 boost::intrusive_ptr<Animat> m_animat; 26 25 PhysicalBody(PhysicalBody const &body); 27 26 PhysicalBody &operator=(PhysicalBody const &body); 27 palBody *m_body; 28 28 public: 29 29 30 PhysicalBody(); 30 31 PhysicalBody(boost::intrusive_ptr<Animat> animat); trunk/include/waterworld/sim2/World.h
r175 r182 20 20 { 21 21 Animats m_animats; 22 //Bodies m_bodies; 22 23 World(); 23 24 World(World const &); trunk/src/waterworld/sim2/World.cpp
r181 r182 57 57 { 58 58 for(Animats::iterator i=m_animats.begin();i!=m_animats.end();++i) 59 { 59 60 (*i)->update(this, dt); 61 palContact contact; 62 pcd->GetContacts((palBodyBase *)(*i)->getPhysicalBody()->getBody(),contact); 63 } 60 64 palPhysics *tmp = getPhysics(); 61 65 if (tmp!=NULL) … … 92 96 body->setBody(sphere); 93 97 animat->setPhysicalBody(body); 98 99 if(pcd)pcd->NotifyCollision((palBodyBase *) sphere,true); //enable collision detection for the body 100 94 101 return body; 95 102 }
