Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1922


Ignore:
Timestamp:
Oct 14, 2008, 5:58:59 PM (16 years ago)
Author:
rgrieder
Message:

Minor adjustments to OgreODE when compiling under gcc.

Location:
code/branches/physics/src/ogreode
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • code/branches/physics/src/ogreode/CMakeLists.txt

    r1919 r1922  
    1818
    1919ADD_LIBRARY(ogreode_orxonox SHARED ${OGREODE_SRC_FILES})
     20
     21TARGET_LINK_LIBRARIES(ogreode_orxonox ${ODE_LIBRARIES})
     22
  • code/branches/physics/src/ogreode/OgreOdeBody.cpp

    r1919 r1922  
    9191    //UserDefinedObject(),
    9292    _name(name),
    93     _world(world),
    94         _modify_parent_orientation(true)
     93        _modify_parent_orientation(true),
     94    _world(world)
    9595{
    9696        _body_count++;
     
    818818        // We can't do this properly without mesh collision
    819819        geom = *proxy;
    820         Ogre::Real maxdist = -1.0f;
    821         const Ogre::Plane* bestPlane = 0;
     820                // Two unused variables
     821        //Ogre::Real maxdist = -1.0f;
     822        //const Ogre::Plane* bestPlane = 0;
    822823        for (pi = wf->planes->begin(); pi != piend; ++pi)
    823824        {
     
    853854    return collided;
    854855}
     856
  • code/branches/physics/src/ogreode/OgreOdeBody.h

    r1919 r1922  
    418418
    419419#endif
     420
  • code/branches/physics/src/ogreode/OgreOdeCollision.cpp

    r1919 r1922  
    322322}
    323323//------------------------------------------------------------------------------------------------
     324
  • code/branches/physics/src/ogreode/OgreOdeDebugContact.cpp

    r1919 r1922  
    2828    //------------------------------------------------------------------------------------------------
    2929    DebugContact::DebugContact(const String &name, World *world) :
     30        _enabled(false),
    3031        _name(name),
    31         _world(world),
    32         _enabled(false)
     32        _world(world)
    3333    {
    3434        // scene node
     
    115115                                int charHeight,
    116116                                const ColourValue &color)
    117         : mpCam(NULL)
    118         , mpWin(NULL)
    119         , mpFont(NULL)
     117        : mFontName(fontName)
     118        , mType("DebugContact")
    120119        , mName(name)
    121120        , mCaption(caption)
    122         , mFontName(fontName)
     121        , mHorizontalAlignment(H_LEFT)
     122        , mVerticalAlignment(V_BELOW)
     123        , mColor(color)
    123124        , mCharHeight(charHeight)
    124         , mColor(color)
    125         , mType("DebugContact")
    126         , mTimeUntilNextToggle(0)
    127125        , mSpaceWidth(0)
    128126        , mUpdateColors(true)
    129127        , mOnTop(false)
    130         , mHorizontalAlignment(H_LEFT)
    131         , mVerticalAlignment(V_BELOW)
     128        , mTimeUntilNextToggle(0)
    132129        , mAdditionalHeight(0.0)
     130        , mpCam(NULL)
     131        , mpWin(NULL)
     132        , mpFont(NULL)
    133133        , mNode(node)
    134134
     
    317317        bind->setBinding(COLOUR_BINDING, cbuf);
    318318
    319         size_t charlen = mCaption.size();
     319                // Unused variable
     320        //size_t charlen = mCaption.size();
    320321        Real *pPCBuff = static_cast<Real*>(ptbuf->lock(HardwareBuffer::HBL_DISCARD));
    321322
     
    326327        // Derive space width from a capital A
    327328        if (mSpaceWidth == 0)
    328             mSpaceWidth = mpFont->getGlyphAspectRatio('A') * mCharHeight * 2.0;
     329            mSpaceWidth = (unsigned int)(mpFont->getGlyphAspectRatio('A') * mCharHeight * 2.0);
    329330
    330331        // for calculation of AABB
  • code/branches/physics/src/ogreode/OgreOdeDebugContact.h

    r1919 r1922  
    161161
    162162#endif
     163
  • code/branches/physics/src/ogreode/OgreOdeDebugObject.cpp

    r1919 r1922  
    160160                        case DebugObject::Mode_Static:
    161161                                setMaterial("OgreOdeDebugLines/Static");
     162                        break;
     163
     164                        case DebugObject::Mode_Unknown:
     165                                // don't do anything. Not handled.
    162166                        break;
    163167                }
  • code/branches/physics/src/ogreode/OgreOdeEntityInformer.cpp

    r1919 r1922  
    262262//------------------------------------------------------------------------------------------------
    263263EntityInformer::EntityInformer(Entity *entity,const Matrix4 &transform) :
     264        _radius (-1),
     265        _size (Vector3(-1,-1,-1)),
     266        _center (Vector3(-1,-1,-1)),
    264267        _vertices (0),
    265268        _indices (0),
    266269        _vertex_count (0),
    267270        _index_count (0),
    268         _size (Vector3(-1,-1,-1)),
    269         _center (Vector3(-1,-1,-1)),
    270         _radius (-1),
    271271        _bone_mapping (0)
    272272{
     
    275275//------------------------------------------------------------------------------------------------
    276276EntityInformer::EntityInformer() :
     277                _radius (-1),
     278                _size (Vector3(-1,-1,-1)),
     279                _center (Vector3(-1,-1,-1)),
    277280                _vertices (0),
    278281                _indices (0),
    279282                _vertex_count (0),
    280283                _index_count (0),
    281                 _size (Vector3(-1,-1,-1)),
    282                 _center (Vector3(-1,-1,-1)),
    283                 _radius (-1),
    284284        _bone_mapping (0)
    285285{
  • code/branches/physics/src/ogreode/OgreOdeEntityInformer.h

    r1919 r1922  
    7777                EntityInformerReuse(const Ogre::MeshPtr &mesh, const Ogre::Vector3 &scale = Ogre::Vector3::UNIT_SCALE, bool forceRecreate = false);
    7878               
    79                 ~EntityInformerReuse();
     79                virtual ~EntityInformerReuse();
    8080               
    8181                /** Creates TriangleMeshGeometry using TriangleMeshDataPtr
  • code/branches/physics/src/ogreode/OgreOdeGeometry.cpp

    r1919 r1922  
    2020Geometry::Geometry(World *world, Space* space):
    2121    UserDefinedObject(),
     22        _geom (0),
     23        _max_contacts (32),
    2224        _contact_high_water_mark (0),
    2325    _last_contact_num(0),
    24         _max_contacts (32),
    25     _debug_contacts (0),
    2626        _contacts (0),
    27         _encapsulator (0),
    2827        _debug_obj (0),
    2928        _debug_node (0),
     29    _debug_contacts (0),
     30        _encapsulator (0),
    3031        _user_data (0),
    3132        _user_object (0),
    32         _geom (0),
    3333    _world(world)
    3434{
     
    12111211                                Ogre::Real thickness) :
    12121212                        Geometry(world, space),
     1213                        _max_height (scale.y),
    12131214                        _sample_width(scale.x),
    12141215                        _sample_height(scale.z),
    1215                         _max_height (scale.y),
     1216                        _centered(centered),
    12161217                        _halfWorldSizeX(worldSizeX * 0.5),
    1217                         _halfWorldSizeZ(worldSizeZ * 0.5),
    1218                         _centered(centered)
     1218                        _halfWorldSizeZ(worldSizeZ * 0.5)
    12191219{
    12201220        dHeightfieldDataID heightid = dGeomHeightfieldDataCreate();
  • code/branches/physics/src/ogreode/OgreOdeGeometry.h

    r1919 r1922  
    395395                void changeTriangleMeshData(TriangleMeshDataPtr dataPtr);
    396396               
    397                 TriangleMeshDataPtr TriangleMeshGeometry::getTriangleMeshData(){ return _dataPtr; }
     397                TriangleMeshDataPtr getTriangleMeshData(){ return _dataPtr; }
    398398               
    399399                ~TriangleMeshGeometry();
  • code/branches/physics/src/ogreode/OgreOdeSpace.cpp

    r1919 r1922  
    1414//------------------------------------------------------------------------------------------------
    1515Space::Space(World *world, const Space* space) :
    16     _world(world),
    17     _internal_collisions (true)
     16    _internal_collisions (true),
     17    _world(world)
    1818{
    1919}
  • code/branches/physics/src/ogreode/OgreOdeStepper.cpp

    r1919 r1922  
    2121    _world  (world),
    2222    _paused (false),
    23     _listener (0),
    2423    _auto_pre (false),
    2524    _auto_post (false),
     25    _listener (0),
    2626    _root  (0),
    2727    _step_size (step_size),
     
    267267        StepHandler(world, stepModeType, step_size, max_interval, time_scale),
    268268        _dbl_step_size(step_size * 2),
    269         _frame_rate (frame_rate),
    270         _inv_step_size(1.0 / frame_rate)
     269        _inv_step_size(1.0 / frame_rate),
     270        _frame_rate (frame_rate)
    271271{
    272272    if (frame_rate == Ogre::Real(0))
     
    278278    {
    279279        _fixed_frame_rate = true;
    280         _next_frame_step_count = _frame_rate / (_step_size * _time_scale);
     280        _next_frame_step_count = (unsigned int)(_frame_rate / (_step_size * _time_scale));
    281281        if (_next_frame_step_count == 0)
    282282            _next_frame_step_count = 1;
  • code/branches/physics/src/ogreode/OgreOdeWorld.cpp

    r1919 r1922  
    158158size_t World::getAutoSleepAverageSamplesCount()
    159159{
    160     return (Real)dWorldGetAutoDisableAverageSamplesCount(_world);
     160    return dWorldGetAutoDisableAverageSamplesCount(_world);
    161161}
    162162//------------------------------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.