Changeset 2514 for code/branches/presentation/src/orxonox/objects/collisionshapes/SphereCollisionShape.cc
- Timestamp:
- Dec 21, 2008, 2:44:00 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation/src/orxonox/objects/collisionshapes/SphereCollisionShape.cc
r2459 r2514 45 45 46 46 this->radius_ = 1.0f; 47 updateS phere();47 updateShape(); 48 48 49 49 this->registerVariables(); … … 58 58 void SphereCollisionShape::registerVariables() 59 59 { 60 registerVariable(this->radius_, variableDirection::toclient, new NetworkCallback< SphereCollisionShape>(this, &SphereCollisionShape::updateSphere));60 registerVariable(this->radius_, variableDirection::toclient, new NetworkCallback<CollisionShape>(this, &CollisionShape::updateShape)); 61 61 } 62 62 … … 68 68 } 69 69 70 void SphereCollisionShape::updateSphere()70 btCollisionShape* SphereCollisionShape::createNewShape() const 71 71 { 72 if (this->collisionShape_) 73 delete this->collisionShape_; 74 // When we recreate the shape, we have to inform the parent about this to update the shape 75 this->collisionShape_ = new btSphereShape(this->radius_); 76 this->updateParent(); 72 return new btSphereShape(this->radius_); 77 73 } 78 74 }
Note: See TracChangeset
for help on using the changeset viewer.