- Timestamp:
- Dec 15, 2008, 7:57:48 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation/src/orxonox/objects/collisionshapes/CollisionShape.cc
r2459 r2469 38 38 39 39 #include "CompoundCollisionShape.h" 40 #include "objects/worldentities/WorldEntity.h" 40 41 41 42 namespace orxonox … … 55 56 this->orientation_ = Quaternion::IDENTITY; 56 57 this->scale_ = Vector3::UNIT_SCALE; 58 59 this->registerVariables(); 57 60 } 58 61 … … 81 84 void CollisionShape::parentChanged() 82 85 { 83 CompoundCollisionShape* parent = dynamic_cast<CompoundCollisionShape*>(Synchronisable::getSynchronisable(this->parentID_)); 84 if (parent) 85 parent->addChildShape(this); 86 Synchronisable* synchronisable = Synchronisable::getSynchronisable(this->parentID_); 87 CompoundCollisionShape* CCSparent = dynamic_cast<CompoundCollisionShape*>(synchronisable); 88 if (CCSparent) 89 CCSparent->addChildShape(this); 90 else 91 { 92 WorldEntity* WEparent = dynamic_cast<WorldEntity*>(synchronisable); 93 if (WEparent) 94 WEparent->attachCollisionShape(this); 95 } 86 96 } 87 97
Note: See TracChangeset
for help on using the changeset viewer.