Changeset 1922 for code/branches/physics/src
- Timestamp:
- Oct 14, 2008, 5:58:59 PM (16 years ago)
- Location:
- code/branches/physics/src/ogreode
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/physics/src/ogreode/CMakeLists.txt
r1919 r1922 18 18 19 19 ADD_LIBRARY(ogreode_orxonox SHARED ${OGREODE_SRC_FILES}) 20 21 TARGET_LINK_LIBRARIES(ogreode_orxonox ${ODE_LIBRARIES}) 22 -
code/branches/physics/src/ogreode/OgreOdeBody.cpp
r1919 r1922 91 91 //UserDefinedObject(), 92 92 _name(name), 93 _world(world),94 _modify_parent_orientation(true)93 _modify_parent_orientation(true), 94 _world(world) 95 95 { 96 96 _body_count++; … … 818 818 // We can't do this properly without mesh collision 819 819 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; 822 823 for (pi = wf->planes->begin(); pi != piend; ++pi) 823 824 { … … 853 854 return collided; 854 855 } 856 -
code/branches/physics/src/ogreode/OgreOdeBody.h
r1919 r1922 418 418 419 419 #endif 420 -
code/branches/physics/src/ogreode/OgreOdeCollision.cpp
r1919 r1922 322 322 } 323 323 //------------------------------------------------------------------------------------------------ 324 -
code/branches/physics/src/ogreode/OgreOdeDebugContact.cpp
r1919 r1922 28 28 //------------------------------------------------------------------------------------------------ 29 29 DebugContact::DebugContact(const String &name, World *world) : 30 _enabled(false), 30 31 _name(name), 31 _world(world), 32 _enabled(false) 32 _world(world) 33 33 { 34 34 // scene node … … 115 115 int charHeight, 116 116 const ColourValue &color) 117 : mpCam(NULL) 118 , mpWin(NULL) 119 , mpFont(NULL) 117 : mFontName(fontName) 118 , mType("DebugContact") 120 119 , mName(name) 121 120 , mCaption(caption) 122 , mFontName(fontName) 121 , mHorizontalAlignment(H_LEFT) 122 , mVerticalAlignment(V_BELOW) 123 , mColor(color) 123 124 , mCharHeight(charHeight) 124 , mColor(color)125 , mType("DebugContact")126 , mTimeUntilNextToggle(0)127 125 , mSpaceWidth(0) 128 126 , mUpdateColors(true) 129 127 , mOnTop(false) 130 , mHorizontalAlignment(H_LEFT) 131 , mVerticalAlignment(V_BELOW) 128 , mTimeUntilNextToggle(0) 132 129 , mAdditionalHeight(0.0) 130 , mpCam(NULL) 131 , mpWin(NULL) 132 , mpFont(NULL) 133 133 , mNode(node) 134 134 … … 317 317 bind->setBinding(COLOUR_BINDING, cbuf); 318 318 319 size_t charlen = mCaption.size(); 319 // Unused variable 320 //size_t charlen = mCaption.size(); 320 321 Real *pPCBuff = static_cast<Real*>(ptbuf->lock(HardwareBuffer::HBL_DISCARD)); 321 322 … … 326 327 // Derive space width from a capital A 327 328 if (mSpaceWidth == 0) 328 mSpaceWidth = mpFont->getGlyphAspectRatio('A') * mCharHeight * 2.0;329 mSpaceWidth = (unsigned int)(mpFont->getGlyphAspectRatio('A') * mCharHeight * 2.0); 329 330 330 331 // for calculation of AABB -
code/branches/physics/src/ogreode/OgreOdeDebugContact.h
r1919 r1922 161 161 162 162 #endif 163 -
code/branches/physics/src/ogreode/OgreOdeDebugObject.cpp
r1919 r1922 160 160 case DebugObject::Mode_Static: 161 161 setMaterial("OgreOdeDebugLines/Static"); 162 break; 163 164 case DebugObject::Mode_Unknown: 165 // don't do anything. Not handled. 162 166 break; 163 167 } -
code/branches/physics/src/ogreode/OgreOdeEntityInformer.cpp
r1919 r1922 262 262 //------------------------------------------------------------------------------------------------ 263 263 EntityInformer::EntityInformer(Entity *entity,const Matrix4 &transform) : 264 _radius (-1), 265 _size (Vector3(-1,-1,-1)), 266 _center (Vector3(-1,-1,-1)), 264 267 _vertices (0), 265 268 _indices (0), 266 269 _vertex_count (0), 267 270 _index_count (0), 268 _size (Vector3(-1,-1,-1)),269 _center (Vector3(-1,-1,-1)),270 _radius (-1),271 271 _bone_mapping (0) 272 272 { … … 275 275 //------------------------------------------------------------------------------------------------ 276 276 EntityInformer::EntityInformer() : 277 _radius (-1), 278 _size (Vector3(-1,-1,-1)), 279 _center (Vector3(-1,-1,-1)), 277 280 _vertices (0), 278 281 _indices (0), 279 282 _vertex_count (0), 280 283 _index_count (0), 281 _size (Vector3(-1,-1,-1)),282 _center (Vector3(-1,-1,-1)),283 _radius (-1),284 284 _bone_mapping (0) 285 285 { -
code/branches/physics/src/ogreode/OgreOdeEntityInformer.h
r1919 r1922 77 77 EntityInformerReuse(const Ogre::MeshPtr &mesh, const Ogre::Vector3 &scale = Ogre::Vector3::UNIT_SCALE, bool forceRecreate = false); 78 78 79 ~EntityInformerReuse();79 virtual ~EntityInformerReuse(); 80 80 81 81 /** Creates TriangleMeshGeometry using TriangleMeshDataPtr -
code/branches/physics/src/ogreode/OgreOdeGeometry.cpp
r1919 r1922 20 20 Geometry::Geometry(World *world, Space* space): 21 21 UserDefinedObject(), 22 _geom (0), 23 _max_contacts (32), 22 24 _contact_high_water_mark (0), 23 25 _last_contact_num(0), 24 _max_contacts (32),25 _debug_contacts (0),26 26 _contacts (0), 27 _encapsulator (0),28 27 _debug_obj (0), 29 28 _debug_node (0), 29 _debug_contacts (0), 30 _encapsulator (0), 30 31 _user_data (0), 31 32 _user_object (0), 32 _geom (0),33 33 _world(world) 34 34 { … … 1211 1211 Ogre::Real thickness) : 1212 1212 Geometry(world, space), 1213 _max_height (scale.y), 1213 1214 _sample_width(scale.x), 1214 1215 _sample_height(scale.z), 1215 _ max_height (scale.y),1216 _centered(centered), 1216 1217 _halfWorldSizeX(worldSizeX * 0.5), 1217 _halfWorldSizeZ(worldSizeZ * 0.5), 1218 _centered(centered) 1218 _halfWorldSizeZ(worldSizeZ * 0.5) 1219 1219 { 1220 1220 dHeightfieldDataID heightid = dGeomHeightfieldDataCreate(); -
code/branches/physics/src/ogreode/OgreOdeGeometry.h
r1919 r1922 395 395 void changeTriangleMeshData(TriangleMeshDataPtr dataPtr); 396 396 397 TriangleMeshDataPtr TriangleMeshGeometry::getTriangleMeshData(){ return _dataPtr; }397 TriangleMeshDataPtr getTriangleMeshData(){ return _dataPtr; } 398 398 399 399 ~TriangleMeshGeometry(); -
code/branches/physics/src/ogreode/OgreOdeSpace.cpp
r1919 r1922 14 14 //------------------------------------------------------------------------------------------------ 15 15 Space::Space(World *world, const Space* space) : 16 _ world(world),17 _ internal_collisions (true)16 _internal_collisions (true), 17 _world(world) 18 18 { 19 19 } -
code/branches/physics/src/ogreode/OgreOdeStepper.cpp
r1919 r1922 21 21 _world (world), 22 22 _paused (false), 23 _listener (0),24 23 _auto_pre (false), 25 24 _auto_post (false), 25 _listener (0), 26 26 _root (0), 27 27 _step_size (step_size), … … 267 267 StepHandler(world, stepModeType, step_size, max_interval, time_scale), 268 268 _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) 271 271 { 272 272 if (frame_rate == Ogre::Real(0)) … … 278 278 { 279 279 _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)); 281 281 if (_next_frame_step_count == 0) 282 282 _next_frame_step_count = 1; -
code/branches/physics/src/ogreode/OgreOdeWorld.cpp
r1919 r1922 158 158 size_t World::getAutoSleepAverageSamplesCount() 159 159 { 160 return (Real)dWorldGetAutoDisableAverageSamplesCount(_world);160 return dWorldGetAutoDisableAverageSamplesCount(_world); 161 161 } 162 162 //------------------------------------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.