21SShapeCylinder::SShapeCylinder(
const std::string& shapeName,
SNode* node,
const Ogre::Real& radius,
const Ogre::Real& height) :
SShape(shapeName,
SShape::SO3_CYLINDER_COLLISION)
23 Ogre::Vector3 poffset = Ogre::Vector3::ZERO;
29#ifdef USE_COLLISION_NOSCALE
32 mRadius = std::max(radius, 0.0001f) * scale.x;
33 mHeight = std::max(height, 0.0001f) * scale.y;
36 mRadius = std::max(radius, 0.0001f);
37 mHeight = std::max(height, 0.0001f);
40 mBaseRotation = Ogre::Quaternion(sqrt(0.5f), 0.0f, 0.0f, sqrt(0.5f));
44SShapeCylinder::SShapeCylinder(
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_CYLINDER_COLLISION)
46 Ogre::Vector3 poffset = Ogre::Vector3::ZERO;
54#ifdef USE_COLLISION_NOSCALE
57 mRadius = std::max(radius, 0.0001f) * scale.x;
58 mHeight = std::max(height, 0.0001f) * scale.y;
61 mRadius = std::max(radius, 0.0001f);
62 mHeight = std::max(height, 0.0001f);
65 mBaseRotation = Ogre::Quaternion(sqrt(0.5f), 0.0f, 0.0f, sqrt(0.5f)) * quat;