Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 11, 2015, 10:06:04 PM (9 years ago)
Author:
landauf
Message:

details, made debug drawer more configurable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/libraries/tools/DebugDrawer.cc

    r10191 r10193  
    146146        Ogre::Matrix4 transform(rotation);
    147147        transform.setTrans(centre + rotation * Ogre::Vector3(0, height / 2, 0));
    148         this->buildCircle(transform, radius, segmentsCount, colour, alpha);
     148        this->buildCircle(transform, radius, segmentsCount, colour);
    149149        this->buildFilledCircle(transform, radius, segmentsCount, colour, true, alpha);
    150150
    151151        transform.setTrans(centre + rotation * Ogre::Vector3(0, -height / 2, 0));
    152         this->buildCircle(transform, radius, segmentsCount, colour, alpha);
     152        this->buildCircle(transform, radius, segmentsCount, colour);
    153153        this->buildFilledCircle(transform, radius, segmentsCount, colour, false, alpha);
    154154
     
    181181        Ogre::Matrix4 transform(rotation);
    182182        transform.setTrans(centre + rotation * Ogre::Vector3(0, -height / 2, 0));
    183         this->buildCircle(transform, radius, segmentsCount, colour, alpha);
     183        this->buildCircle(transform, radius, segmentsCount, colour);
    184184        this->buildFilledCircle(transform, radius, segmentsCount, colour, false, alpha);
    185185
     
    300300    void DebugDrawer::drawCircle(const Ogre::Vector3& centre, const Ogre::Quaternion& rotation, float radius, const Ogre::ColourValue& colour, bool isFilled)
    301301    {
    302         int segmentsCount = std::min(100.0, radius / 2.5);
     302        int segmentsCount = std::min<int>(100, (int) (radius / 2.5));
    303303
    304304        Ogre::Matrix4 transform(rotation);
     
    312312    void DebugDrawer::drawCylinder(const Ogre::Vector3& centre, const Ogre::Quaternion& rotation, float radius, float height, const Ogre::ColourValue& colour, bool isFilled)
    313313    {
    314         int segmentsCount = std::min(100.0, radius / 2.5);
     314        int segmentsCount = std::min<int>(100, (int) (radius / 2.5));
    315315
    316316        if (isFilled)
     
    322322    void DebugDrawer::drawCone(const Ogre::Vector3& centre, const Ogre::Quaternion& rotation, float radius, float height, const Ogre::ColourValue& colour, bool isFilled)
    323323    {
    324         int segmentsCount = std::min(100.0, radius / 2.5);
     324        int segmentsCount = std::min<int>(100, (int) (radius / 2.5));
    325325
    326326        if (isFilled)
Note: See TracChangeset for help on using the changeset viewer.