21SShapeCapsule::SShapeCapsule(
const std::string& shapeName,
SNode* node,
const Ogre::Real& radius,
const Ogre::Real& height) :
SShape(shapeName,
SShape::SO3_CAPSULE_COLLISION)
23 Ogre::Vector3 poffset = Ogre::Vector3::ZERO;
30#ifdef USE_COLLISION_NOSCALE
33 mRadius = std::max(radius, 0.0001f) * scale.x;
34 mHeight = std::max(height, 0.0001f) * scale.y;
37 mRadius = std::max(radius, 0.0001f);
38 mHeight = std::max(height, 0.0001f);
41 mBaseRotation = Ogre::Quaternion(sqrt(0.5f), 0.0f, 0.0f, sqrt(0.5f));
45SShapeCapsule::SShapeCapsule(
const std::string& shapeName,
SNode* node,
const Ogre::Real& radius,
const Ogre::Real& height,
const Ogre::Vector3& offset,
const Ogre::Quaternion& quat) :
SShape(shapeName,
SShape::SO3_CAPSULE_COLLISION)
47 Ogre::Vector3 poffset = Ogre::Vector3::ZERO;
55#ifdef USE_COLLISION_NOSCALE
58 mRadius = std::max(radius, 0.0001f) * scale.x;
59 mHeight = std::max(height, 0.0001f) * scale.y;
62 mRadius = std::max(radius, 0.0001f);
63 mHeight = std::max(height, 0.0001f);
65 mBaseRotation = Ogre::Quaternion(sqrt(0.5f), 0.0f, 0.0f, sqrt(0.5f)) * quat;