40 #ifndef _physicsmultispherecollisionshape_cpp
41 #define _physicsmultispherecollisionshape_cpp
43 #include "Physics/multispherecollisionshape.h"
44 #include "collisionshapemanager.h"
45 #include "stringtool.h"
47 #include "btBulletDynamicsCommon.h"
58 if(Locations.size() != Radii.size())
60 Whole Spheres = Locations.size();
61 btVector3* BulletLocs =
new btVector3[Spheres];
62 btScalar* BulletRadii =
new btScalar[Spheres];
63 for(
Whole X = 0 ; X < Spheres ; X++ )
65 BulletLocs[X] = Locations[X].GetBulletVector3();
66 BulletRadii[X] = Radii[X];
69 Construct(Name,
new btMultiSphereShape(BulletLocs,BulletRadii,Spheres));
99 if(!OneName) { MEZZ_EXCEPTION(
Exception::PARAMETERS_EXCEPTION,
"Could not find Name Attribute on CollsionShape Node during preparation for deserialization"); }
105 std::vector<Vector3> Locations;
106 std::vector<Real> Radii;
151 {
return static_cast<btMultiSphereShape*
>(
ShapeBase); }
202 {
return String(
"MultiSphereCollisionShape"); }