Changeset 8556 for code/branches/presentation/src/modules/objects/collisionshapes/SphereCollisionShape.cc
- Timestamp:
- May 23, 2011, 11:40:58 PM (13 years ago)
- Location:
- code/branches/presentation
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation
- Property svn:mergeinfo changed
/code/branches/pickup (added) merged: 8255,8375,8381,8422,8433,8486,8489,8502,8534-8536,8543,8554-8555
- Property svn:mergeinfo changed
-
code/branches/presentation/src/modules/objects/collisionshapes/SphereCollisionShape.cc
r5781 r8556 27 27 */ 28 28 29 /** 30 @file SphereCollisionShape.cc 31 @brief Implementation of the SphereCollisionShape class. 32 */ 33 29 34 #include "SphereCollisionShape.h" 30 35 … … 33 38 #include "core/CoreIncludes.h" 34 39 #include "core/XMLPort.h" 40 #include "tools/BulletConversions.h" 35 41 36 42 namespace orxonox … … 38 44 CreateFactory(SphereCollisionShape); 39 45 46 /** 47 @brief 48 Constructor. registers and initializes the object. 49 */ 40 50 SphereCollisionShape::SphereCollisionShape(BaseObject* creator) : CollisionShape(creator) 41 51 { … … 66 76 } 67 77 78 /** 79 @brief 80 Is called when the scale of the SphereCollisionShape has changed. 81 */ 82 void SphereCollisionShape::changedScale() 83 { 84 CollisionShape::changedScale(); 85 86 // Resize the internal collision shape 87 // TODO: Assuming setLocalScaling works. 88 //this->collisionShape_->setLocalScaling(multi_cast<btVector3>(this->getScale3D())); 89 if(!this->hasUniformScaling()) 90 { 91 CCOUT(1) << "Error: Non-uniform scaling is not yet supported." << endl; 92 return; 93 } 94 95 this->setRadius(this->radius_*this->getScale()); 96 } 97 98 /** 99 @brief 100 Creates a new internal collision shape for the SphereCollisionShape. 101 @return 102 Returns a pointer to the newly created btSphereShape. 103 */ 68 104 btCollisionShape* SphereCollisionShape::createNewShape() const 69 105 {
Note: See TracChangeset
for help on using the changeset viewer.