Changeset 2514 for code/branches/presentation/src/orxonox/objects/collisionshapes/PlaneCollisionShape.cc
- Timestamp:
- Dec 21, 2008, 2:44:00 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation/src/orxonox/objects/collisionshapes/PlaneCollisionShape.cc
r2459 r2514 46 46 this->normal_ = Vector3(0, 1, 0); 47 47 this->offset_ = 0.0f; 48 update Plane();48 updateShape(); 49 49 50 50 this->registerVariables(); … … 59 59 void PlaneCollisionShape::registerVariables() 60 60 { 61 registerVariable(this->normal_, variableDirection::toclient, new NetworkCallback< PlaneCollisionShape>(this, &PlaneCollisionShape::updatePlane));62 registerVariable(this->offset_, variableDirection::toclient, new NetworkCallback< PlaneCollisionShape>(this, &PlaneCollisionShape::updatePlane));61 registerVariable(this->normal_, variableDirection::toclient, new NetworkCallback<CollisionShape>(this, &CollisionShape::updateShape)); 62 registerVariable(this->offset_, variableDirection::toclient, new NetworkCallback<CollisionShape>(this, &CollisionShape::updateShape)); 63 63 } 64 64 … … 71 71 } 72 72 73 void PlaneCollisionShape::updatePlane()73 btCollisionShape* PlaneCollisionShape::createNewShape() const 74 74 { 75 if (this->collisionShape_) 76 delete this->collisionShape_; 77 this->collisionShape_ = new btStaticPlaneShape(omni_cast<btVector3>(this->normal_), this->offset_); 78 this->updateParent(); 75 return new btStaticPlaneShape(omni_cast<btVector3>(this->normal_), this->offset_); 79 76 } 80 77 }
Note: See TracChangeset
for help on using the changeset viewer.