// find axes with longest length
Vector3 cap_dir; //std::max(box_afExtent.x,std::max(box_afExtent.y,box_afExtent.z));
- Real cap_dirLength; //std::max(box_afExtent.x,std::max(box_afExtent.y,box_afExtent.z));
- Real cap_radius; // max axe length
+ Real cap_dirLength = 0; //std::max(box_afExtent.x,std::max(box_afExtent.y,box_afExtent.z));
+ Real cap_radius = 0; // max axe length
if (box_afExtent.x - box_afExtent.y > 0 && box_afExtent.x - box_afExtent.z > 0)
{
cap_dir = Vector3::UNIT_X;
cap_dirLength = box_afExtent.y;
cap_radius = std::max (box_afExtent.x, box_afExtent.z);
}
- else if (box_afExtent.z - box_afExtent.y > 0 && box_afExtent.z - box_afExtent.y > 0)
+ else if (box_afExtent.z - box_afExtent.x > 0 && box_afExtent.z - box_afExtent.y > 0)
{
cap_dir = Vector3::UNIT_Z;
cap_dirLength = box_afExtent.z;
Ogre::TextureFilterOptions filter;
if (filtermode == 0)
filter = Ogre::TFO_NONE;
- if (filtermode == 1)
+ else if (filtermode == 1)
filter = Ogre::TFO_BILINEAR;
- if (filtermode == 2)
+ else if (filtermode == 2)
filter = Ogre::TFO_TRILINEAR;
- if (filtermode == 3)
+ else if (filtermode == 3)
filter = Ogre::TFO_ANISOTROPIC;
Ogre::MaterialManager::getSingleton().setDefaultTextureFiltering(filter);
Ogre::TextureUnitState::TextureTransformType type;
if (xform_type == "scroll_x")
type = Ogre::TextureUnitState::TT_TRANSLATE_U;
- if (xform_type == "scroll_y")
+ else if (xform_type == "scroll_y")
type = Ogre::TextureUnitState::TT_TRANSLATE_V;
- if (xform_type == "rotate")
+ else if (xform_type == "rotate")
type = Ogre::TextureUnitState::TT_ROTATE;
- if (xform_type == "scale_x")
+ else if (xform_type == "scale_x")
type = Ogre::TextureUnitState::TT_SCALE_U;
- if (xform_type == "scale_y")
+ else if (xform_type == "scale_y")
type = Ogre::TextureUnitState::TT_SCALE_V;
+ else
+ return false;
Ogre::WaveformType wavetype;
if (wave == "sine")
wavetype = Ogre::WFT_SINE;
- if (wave == "triangle")
+ else if (wave == "triangle")
wavetype = Ogre::WFT_TRIANGLE;
- if (wave == "square")
+ else if (wave == "square")
wavetype = Ogre::WFT_SQUARE;
- if (wave == "sawtooth")
+ else if (wave == "sawtooth")
wavetype = Ogre::WFT_SAWTOOTH;
- if (wave == "inverse_sawtooth")
+ else if (wave == "inverse_sawtooth")
wavetype = Ogre::WFT_INVERSE_SAWTOOTH;
- if (wave == "pwm")
+ else if (wave == "pwm")
wavetype = Ogre::WFT_PWM;
+ else
+ return false;
state->setTransformAnimation(type, wavetype, base, frequency, phase, amplitude);
}