You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
(24) |
May
(5) |
Jun
(11) |
Jul
(17) |
Aug
(1) |
Sep
(11) |
Oct
|
Nov
|
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
|
Feb
|
Mar
(2) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2008 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <st...@us...> - 2006-04-22 15:08:39
|
Revision: 420 Author: stenyak Date: 2006-04-22 08:08:30 -0700 (Sat, 22 Apr 2006) ViewCVS: http://svn.sourceforge.net/motorsport/?rev=420&view=rev Log Message: ----------- Modified graphics engine: now rendering a frame for each mesh that is loaded, so that loadprogress can be seen in real time. Modified Paths: -------------- trunk/src/guiEngine.cpp trunk/src/vehicle/body.cpp trunk/src/vehicle/vehicle.cpp trunk/src/world/area.cpp Modified: trunk/src/guiEngine.cpp =================================================================== --- trunk/src/guiEngine.cpp 2006-04-22 14:28:39 UTC (rev 419) +++ trunk/src/guiEngine.cpp 2006-04-22 15:08:30 UTC (rev 420) @@ -110,7 +110,7 @@ tmpOgreCamera = SystemData::getSystemDataPointer ()->ogreSceneManager->createCamera ("Loadscreen camera"); tmpOgreCamera->setFixedYawAxis (true, Ogre::Vector3 (0, 0, 1)); - tmpOgreCamera->setPosition (Ogre::Vector3 (30, 30, 10)); + tmpOgreCamera->setPosition (Ogre::Vector3 (-3, 3, 1)); tmpOgreCamera->lookAt (Ogre::Vector3 (0, 0, 0)); tmpOgreCamera->setNearClipDistance (0.100); SystemData::getSystemDataPointer()->ogreWindow->removeAllViewports (); Modified: trunk/src/vehicle/body.cpp =================================================================== --- trunk/src/vehicle/body.cpp 2006-04-22 14:28:39 UTC (rev 419) +++ trunk/src/vehicle/body.cpp 2006-04-22 15:08:30 UTC (rev 420) @@ -54,6 +54,7 @@ OgreObject * ogreChild = new OgreObject(this, childData, getId()); ogreObjects[ogreChild->getId()] = ogreChild; ogreChild->setOgreReference(ogreObjects[ogreObject->getId()], rotDiff, posDiff); + SystemData::getSystemDataPointer()->ogreWindow->update (); } } } Modified: trunk/src/vehicle/vehicle.cpp =================================================================== --- trunk/src/vehicle/vehicle.cpp 2006-04-22 14:28:39 UTC (rev 419) +++ trunk/src/vehicle/vehicle.cpp 2006-04-22 15:08:30 UTC (rev 420) @@ -98,21 +98,25 @@ { Wheel * tmp = new Wheel (this, t); components[tmp->getName()] = tmp; + SystemData::getSystemDataPointer()->ogreWindow->update (); } if (t->getName() == "suspension.unidimensional") { Unidimensional * tmp = new Unidimensional (this, t); components[tmp->getName()] = tmp; + SystemData::getSystemDataPointer()->ogreWindow->update (); } if (t->getName() == "suspension.fixed") { Fixed * tmp = new Fixed (this, t); components[tmp->getName()] = tmp; + SystemData::getSystemDataPointer()->ogreWindow->update (); } if (t->getName() == "suspension.doublewishbone") { DoubleWishbone * tmp = new DoubleWishbone (this, t); components[tmp->getName()] = tmp; + SystemData::getSystemDataPointer()->ogreWindow->update (); } if (t->getName() == "camera") { Modified: trunk/src/world/area.cpp =================================================================== --- trunk/src/world/area.cpp 2006-04-22 14:28:39 UTC (rev 419) +++ trunk/src/world/area.cpp 2006-04-22 15:08:30 UTC (rev 420) @@ -113,6 +113,7 @@ #else dGeomTriMeshDataBuildDouble (ground, vertices, sizeof (dVector3), vertex_count, indices, index_count, 3 * sizeof (unsigned int)); #endif + SystemData::getSystemDataPointer()->ogreWindow->update (); } } } @@ -135,6 +136,7 @@ tmp->setRotation (rotation); partList.push_back (tmp); tmp->stepGraphics(); + SystemData::getSystemDataPointer()->ogreWindow->update (); } } if (t->getName() == "vehicleLocation") @@ -166,12 +168,14 @@ planeNode = pOgreSceneManager->getRootSceneNode()->createChildSceneNode(); planeNode->attachObject(planeEntity); areaBodyID = dBodyCreate (World::getWorldPointer ()->ghostWorldID); + SystemData::getSystemDataPointer()->ogreWindow->update (); // FIXME should be part of the world, not the area log->loadscreen (LOG_CCREATOR, "Creating the area sky"); Ogre::Quaternion rotationToZAxis; rotationToZAxis.FromRotationMatrix (Ogre::Matrix3 (1, 0, 0, 0, 0, -1, 0, 1, 0)); SystemData::getSystemDataPointer()->ogreSceneManager->setSkyBox (true, skyMaterialName.c_str(), skyDistance, skyDrawFirst, rotationToZAxis); + SystemData::getSystemDataPointer()->ogreWindow->update (); // create the checkpoint sphere dGeomID checkpointID = dCreateSphere (World::getWorldPointer()->spaceID, checkpointRadius); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <st...@us...> - 2006-04-22 14:28:51
|
Revision: 419 Author: stenyak Date: 2006-04-22 07:28:39 -0700 (Sat, 22 Apr 2006) ViewCVS: http://svn.sourceforge.net/motorsport/?rev=419&view=rev Log Message: ----------- Added a basic camera director AI to the graphics engine: pressing 'b' switches the camera director AI on/off. Current AI simply chooses closest area #0 camera to vehicle #0. Modified Paths: -------------- trunk/src/graphicsEngine.cpp trunk/src/inputEngine.cpp trunk/src/main.cpp trunk/src/system.cpp trunk/src/system.hpp Modified: trunk/src/graphicsEngine.cpp =================================================================== --- trunk/src/graphicsEngine.cpp 2006-04-22 13:53:53 UTC (rev 418) +++ trunk/src/graphicsEngine.cpp 2006-04-22 14:28:39 UTC (rev 419) @@ -171,6 +171,29 @@ World::getWorldPointer()->setActiveCamera(World::getWorldPointer ()->vehicleList[0]->cameraList[nextCam]); World::getWorldPointer()->activeVehicleCamera = World::getWorldPointer()->vehicleList[0]->cameraList[nextCam]; } + if (systemData->cameraDirector) + { + log->__format(LOG_DEVELOPER, "Finding closest camera"); + Vector3d vPos = World::getWorldPointer()->vehicleList[0]->getPosition(); + int closestCam = 0; + double closestDistance = 99999999999.0; + for (unsigned int i = 0; i<World::getWorldPointer()->areaList[0]->cameraList.size(); i++) + { + log->__format(LOG_DEVELOPER, "Checking cam#%i",i); + Ogre::Vector3 p = World::getWorldPointer()->areaList[0]->cameraList[i]->ogreCamera->getPosition(); + Vector3d cPos (p.x, p.y, p.z); + double distance = cPos.distance(vPos); + if (distance < closestDistance) + { + closestDistance = distance; + closestCam = i; + } + } + log->__format(LOG_DEVELOPER, "Closest camera: %i. Distance: %f", closestCam, closestDistance); + + World::getWorldPointer()->setActiveCamera(World::getWorldPointer ()->areaList[0]->cameraList[closestCam]); + World::getWorldPointer()->activeAreaCamera = World::getWorldPointer()->areaList[0]->cameraList[closestCam]; + } // Update Ogre's bodies positions with Ode's positions. int numberOfVehicles = World::getWorldPointer ()->vehicleList.size (); for (int currentVehicle = 0; currentVehicle < numberOfVehicles; currentVehicle++) Modified: trunk/src/inputEngine.cpp =================================================================== --- trunk/src/inputEngine.cpp 2006-04-22 13:53:53 UTC (rev 418) +++ trunk/src/inputEngine.cpp 2006-04-22 14:28:39 UTC (rev 419) @@ -113,6 +113,7 @@ SystemData::getSystemDataPointer()->axisMap[getIDKeyboardKey (SDLK_PRINT)]->setNewRawValue(0); SystemData::getSystemDataPointer()->axisMap[getIDKeyboardKey (SDLK_c)]->setNewRawValue(0); SystemData::getSystemDataPointer()->axisMap[getIDKeyboardKey (SDLK_v)]->setNewRawValue(0); + SystemData::getSystemDataPointer()->axisMap[getIDKeyboardKey (SDLK_b)]->setNewRawValue(0); } int InputEngine::computeStep (void) Modified: trunk/src/main.cpp =================================================================== --- trunk/src/main.cpp 2006-04-22 13:53:53 UTC (rev 418) +++ trunk/src/main.cpp 2006-04-22 14:28:39 UTC (rev 419) @@ -202,6 +202,10 @@ log->__format (LOG_DEVELOPER, "Processing a SDLK_KP_PLUS keypress..."); systemData->increaseDesiredPhysicsRate(); } + if (systemData->axisMap[getIDKeyboardKey(SDLK_b)]->getValue() == 1) + { + systemData->cameraDirector = !systemData->cameraDirector; + } } void recordVideoFrames () Modified: trunk/src/system.cpp =================================================================== --- trunk/src/system.cpp 2006-04-22 13:53:53 UTC (rev 418) +++ trunk/src/system.cpp 2006-04-22 14:28:39 UTC (rev 419) @@ -28,7 +28,8 @@ pauseStep(0), height(1), width(1), - videoRecordTimestep(0) + videoRecordTimestep(0), + cameraDirector(false) { //empty } Modified: trunk/src/system.hpp =================================================================== --- trunk/src/system.hpp 2006-04-22 13:53:53 UTC (rev 418) +++ trunk/src/system.hpp 2006-04-22 14:28:39 UTC (rev 419) @@ -213,6 +213,8 @@ Ogre::RenderWindow * ogreWindow; Ogre::SceneManager * ogreSceneManager; std::map <int, Axis * > axisMap; + + bool cameraDirector; }; #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <st...@us...> - 2006-04-22 13:54:00
|
Revision: 418 Author: stenyak Date: 2006-04-22 06:53:53 -0700 (Sat, 22 Apr 2006) ViewCVS: http://svn.sourceforge.net/motorsport/?rev=418&view=rev Log Message: ----------- Added autodisable code for area parts. Disabled by default via comments in code. Modified Paths: -------------- trunk/src/common/odeObject.cpp Modified: trunk/src/common/odeObject.cpp =================================================================== --- trunk/src/common/odeObject.cpp 2006-04-21 03:11:59 UTC (rev 417) +++ trunk/src/common/odeObject.cpp 2006-04-22 13:53:53 UTC (rev 418) @@ -30,6 +30,15 @@ this->name = name; bodyID = NULL; bodyID = dBodyCreate (World::getWorldPointer ()->worldID); + + //TODO make this optional via xml or something similar + /*/set autodisable + dBodySetAutoDisableFlag (bodyID, 1); + dBodySetAutoDisableLinearThreshold (bodyID, 0.15); + dBodySetAutoDisableAngularThreshold (bodyID, 0.20); + dBodySetAutoDisableSteps (bodyID, 1); + //*/ + dBodySetData (bodyID, static_cast<void*>(worldObject->getContainer())); dMass dmass; if (data.shape == "box") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <st...@us...> - 2006-04-21 03:46:53
|
Revision: 417 Author: stenyak Date: 2006-04-20 20:11:59 -0700 (Thu, 20 Apr 2006) ViewCVS: http://svn.sourceforge.net/motorsport/?rev=417&view=rev Log Message: ----------- Added mospland source files (.blend + textures). Added Paths: ----------- trunk/tools/blend2mosparea/mospland/ trunk/tools/blend2mosparea/mospland/export/ trunk/tools/blend2mosparea/mospland/export/.area.xml.swp trunk/tools/blend2mosparea/mospland/export/fence1.tga trunk/tools/blend2mosparea/mospland/export/kerb1.tga trunk/tools/blend2mosparea/mospland/export/mospSky_BK.jpg trunk/tools/blend2mosparea/mospland/export/mospSky_DN.jpg trunk/tools/blend2mosparea/mospland/export/mospSky_FR.jpg trunk/tools/blend2mosparea/mospland/export/mospSky_LF.jpg trunk/tools/blend2mosparea/mospland/export/mospSky_RT.jpg trunk/tools/blend2mosparea/mospland/export/mospSky_UP.jpg trunk/tools/blend2mosparea/mospland/export/road.tga trunk/tools/blend2mosparea/mospland/export/road2.tga trunk/tools/blend2mosparea/mospland/export/road_test.png trunk/tools/blend2mosparea/mospland/export/sand1.tga trunk/tools/blend2mosparea/mospland/export/sand2.tga trunk/tools/blend2mosparea/mospland/export/sign100.tga trunk/tools/blend2mosparea/mospland/export/sign150.tga trunk/tools/blend2mosparea/mospland/export/sign200.tga trunk/tools/blend2mosparea/mospland/export/sign50.tga trunk/tools/blend2mosparea/mospland/export/skybox.material trunk/tools/blend2mosparea/mospland/export/skybox.zip trunk/tools/blend2mosparea/mospland/export/startlights.tga trunk/tools/blend2mosparea/mospland/export/startsign.tga trunk/tools/blend2mosparea/mospland/export/startstand.tga trunk/tools/blend2mosparea/mospland/export/tire01.tga trunk/tools/blend2mosparea/mospland/export/tire02.tga trunk/tools/blend2mosparea/mospland/export/wall1.tga trunk/tools/blend2mosparea/mospland/mospland.blend trunk/tools/blend2mosparea/mospland/textures/ trunk/tools/blend2mosparea/mospland/textures/fence1.tga trunk/tools/blend2mosparea/mospland/textures/fence1.xcf trunk/tools/blend2mosparea/mospland/textures/kerb1.tga trunk/tools/blend2mosparea/mospland/textures/kerb1.xcf trunk/tools/blend2mosparea/mospland/textures/mospSky_BK.jpg trunk/tools/blend2mosparea/mospland/textures/mospSky_DN.jpg trunk/tools/blend2mosparea/mospland/textures/mospSky_FR.jpg trunk/tools/blend2mosparea/mospland/textures/mospSky_LF.jpg trunk/tools/blend2mosparea/mospland/textures/mospSky_RT.jpg trunk/tools/blend2mosparea/mospland/textures/mospSky_UP.jpg trunk/tools/blend2mosparea/mospland/textures/road.tga trunk/tools/blend2mosparea/mospland/textures/road.xcf trunk/tools/blend2mosparea/mospland/textures/road2.tga trunk/tools/blend2mosparea/mospland/textures/road_test.png trunk/tools/blend2mosparea/mospland/textures/road_test.xcf trunk/tools/blend2mosparea/mospland/textures/road_test_2.xcf trunk/tools/blend2mosparea/mospland/textures/sand.xcf trunk/tools/blend2mosparea/mospland/textures/sand1.tga trunk/tools/blend2mosparea/mospland/textures/sand2.tga trunk/tools/blend2mosparea/mospland/textures/sign100.tga trunk/tools/blend2mosparea/mospland/textures/sign150.tga trunk/tools/blend2mosparea/mospland/textures/sign200.tga trunk/tools/blend2mosparea/mospland/textures/sign50.tga trunk/tools/blend2mosparea/mospland/textures/startlights.tga trunk/tools/blend2mosparea/mospland/textures/startlights.xcf trunk/tools/blend2mosparea/mospland/textures/startsign.tga trunk/tools/blend2mosparea/mospland/textures/startsign.xcf trunk/tools/blend2mosparea/mospland/textures/startstand.tga trunk/tools/blend2mosparea/mospland/textures/tire01.tga trunk/tools/blend2mosparea/mospland/textures/tire01.xcf trunk/tools/blend2mosparea/mospland/textures/tire02.tga trunk/tools/blend2mosparea/mospland/textures/wall1.tga Added: trunk/tools/blend2mosparea/mospland/export/.area.xml.swp =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/export/.area.xml.swp ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/export/fence1.tga =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/export/fence1.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/export/kerb1.tga =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/export/kerb1.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/export/mospSky_BK.jpg =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/export/mospSky_BK.jpg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/export/mospSky_DN.jpg =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/export/mospSky_DN.jpg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/export/mospSky_FR.jpg =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/export/mospSky_FR.jpg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/export/mospSky_LF.jpg =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/export/mospSky_LF.jpg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/export/mospSky_RT.jpg =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/export/mospSky_RT.jpg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/export/mospSky_UP.jpg =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/export/mospSky_UP.jpg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/export/road.tga =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/export/road.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/export/road2.tga =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/export/road2.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/export/road_test.png =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/export/road_test.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/export/sand1.tga =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/export/sand1.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/export/sand2.tga =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/export/sand2.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/export/sign100.tga =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/export/sign100.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/export/sign150.tga =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/export/sign150.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/export/sign200.tga =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/export/sign200.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/export/sign50.tga =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/export/sign50.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/export/skybox.material =================================================================== --- trunk/tools/blend2mosparea/mospland/export/skybox.material (rev 0) +++ trunk/tools/blend2mosparea/mospland/export/skybox.material 2006-04-21 03:11:59 UTC (rev 417) @@ -0,0 +1,16 @@ +material skyboxMaterial +{ + technique + { + pass + { + lighting off + depth_write off + texture_unit + { + cubic_texture mospSky.jpg separateUV + tex_address_mode clamp + } + } + } +} Added: trunk/tools/blend2mosparea/mospland/export/skybox.zip =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/export/skybox.zip ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/export/startlights.tga =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/export/startlights.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/export/startsign.tga =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/export/startsign.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/export/startstand.tga =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/export/startstand.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/export/tire01.tga =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/export/tire01.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/export/tire02.tga =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/export/tire02.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/export/wall1.tga =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/export/wall1.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/mospland.blend =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/mospland.blend ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/textures/fence1.tga =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/textures/fence1.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/textures/fence1.xcf =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/textures/fence1.xcf ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/textures/kerb1.tga =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/textures/kerb1.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/textures/kerb1.xcf =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/textures/kerb1.xcf ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/textures/mospSky_BK.jpg =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/textures/mospSky_BK.jpg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/textures/mospSky_DN.jpg =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/textures/mospSky_DN.jpg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/textures/mospSky_FR.jpg =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/textures/mospSky_FR.jpg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/textures/mospSky_LF.jpg =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/textures/mospSky_LF.jpg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/textures/mospSky_RT.jpg =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/textures/mospSky_RT.jpg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/textures/mospSky_UP.jpg =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/textures/mospSky_UP.jpg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/textures/road.tga =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/textures/road.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/textures/road.xcf =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/textures/road.xcf ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/textures/road2.tga =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/textures/road2.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/textures/road_test.png =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/textures/road_test.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/textures/road_test.xcf =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/textures/road_test.xcf ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/textures/road_test_2.xcf =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/textures/road_test_2.xcf ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/textures/sand.xcf =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/textures/sand.xcf ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/textures/sand1.tga =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/textures/sand1.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/textures/sand2.tga =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/textures/sand2.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/textures/sign100.tga =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/textures/sign100.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/textures/sign150.tga =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/textures/sign150.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/textures/sign200.tga =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/textures/sign200.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/textures/sign50.tga =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/textures/sign50.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/textures/startlights.tga =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/textures/startlights.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/textures/startlights.xcf =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/textures/startlights.xcf ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/textures/startsign.tga =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/textures/startsign.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/textures/startsign.xcf =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/textures/startsign.xcf ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/textures/startstand.tga =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/textures/startstand.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/textures/tire01.tga =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/textures/tire01.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/textures/tire01.xcf =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/textures/tire01.xcf ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/textures/tire02.tga =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/textures/tire02.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/blend2mosparea/mospland/textures/wall1.tga =================================================================== (Binary files differ) Property changes on: trunk/tools/blend2mosparea/mospland/textures/wall1.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <st...@us...> - 2006-04-20 11:36:03
|
Revision: 416 Author: stenyak Date: 2006-04-20 04:35:36 -0700 (Thu, 20 Apr 2006) ViewCVS: http://svn.sourceforge.net/motorsport/?rev=416&view=rev Log Message: ----------- Replaced the cone with a CC-licensed one, made by vagos. Modified Paths: -------------- trunk/data/parts/cone/Scene.material trunk/data/parts/cone/part.xml Added Paths: ----------- trunk/data/parts/cone/cone.mesh trunk/data/parts/cone/readme.txt trunk/data/parts/cone/traffic-cone_tex.jpg Removed Paths: ------------- trunk/data/parts/cone/Cone.mesh trunk/data/parts/cone/Max-Realms_License.htm Deleted: trunk/data/parts/cone/Cone.mesh =================================================================== (Binary files differ) Deleted: trunk/data/parts/cone/Max-Realms_License.htm =================================================================== --- trunk/data/parts/cone/Max-Realms_License.htm 2006-04-20 11:11:29 UTC (rev 415) +++ trunk/data/parts/cone/Max-Realms_License.htm 2006-04-20 11:35:36 UTC (rev 416) @@ -1,23 +0,0 @@ -<html> -<body> -**Terms of Use License** - -<P>You have downloaded this file from <a href=http://www.max-realms.com>Max-Realms.Com</a> If you downloaded this file from anywhere else, please send a quick message here <a href=mailto:dav...@ma...>Max-Realms Webmaster</a></P> - -<P>WARNING: The file contained within this zip file is protected by US and International -copyright law. Models created by Max-Realms.Com are copyright protected by "branding". See -<a href=http://www.max-realms.com/branding.htm>Copyright Branding</a> for more information.</P> - -<p>The artist who created the model in this zip file retains all rights. -If you want to use this model for any purpose other than personal, non-commercial use, -you must contact the artist directly.</P> - -<P>author: David Goodman</P> -<P>email: dav...@ma...</P> - -<P>****************************************************************************************</P> -<P>All freebie downloads at Max-Realms.Com are for your benefit. If you would like to help support the website so that we can continue to bring you NEW and EXCLUSIVE 3d Studio Max stuff, please go to the web page below! Enjoy!</P> - -<a href=http://www.max-realms.com/support.htm>Support Max-Realms.Com</a> -</body> -</html> Modified: trunk/data/parts/cone/Scene.material =================================================================== --- trunk/data/parts/cone/Scene.material 2006-04-20 11:11:29 UTC (rev 415) +++ trunk/data/parts/cone/Scene.material 2006-04-20 11:35:36 UTC (rev 416) @@ -1,26 +1,40 @@ -material Material #1/SOLID/TEX +material base { + receive_shadows on technique { pass { - ambient 0 0 0 - diffuse 0.756191 0.756115 0.756115 - specular 0.500000 0.500000 0.500000 50.000000 - emissive 0.000000 0.000000 0.000000 + ambient 0.500000 0.500000 0.500000 1.000000 + diffuse 0.256787 0.579767 0.800000 1.000000 + specular 0.250000 0.250000 0.250000 1.000000 12.500000 + emissive 0.000000 0.000000 0.000000 1.000000 + texture_unit + { + texture traffic-cone_tex.jpg + tex_address_mode wrap + filtering trilinear + } } } } -material Material #2/SOLID/TEX +material cone { + receive_shadows on technique { pass { - ambient 0 0 0 - diffuse 0.756191 0.756115 0.756115 - specular 0.500000 0.500000 0.500000 50.000000 - emissive 0.000000 0.000000 0.000000 + ambient 0.500000 0.500000 0.500000 1.000000 + diffuse 0.456347 0.800000 0.000000 1.000000 + specular 0.250000 0.250000 0.250000 1.000000 12.500000 + emissive 0.000000 0.000000 0.000000 1.000000 + texture_unit + { + texture traffic-cone_tex.jpg + tex_address_mode wrap + filtering trilinear + } } } } Added: trunk/data/parts/cone/cone.mesh =================================================================== (Binary files differ) Property changes on: trunk/data/parts/cone/cone.mesh ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: trunk/data/parts/cone/part.xml =================================================================== --- trunk/data/parts/cone/part.xml 2006-04-20 11:11:29 UTC (rev 415) +++ trunk/data/parts/cone/part.xml 2006-04-20 11:35:36 UTC (rev 416) @@ -1,15 +1,15 @@ <?xml version="1.0" encoding="ISO-8859-1"?> <part - name = "Cone" - description = "A typical road cone." - author = "David Goodman" - contact = " david DOT n DOT goodman AT max-realms DOT com" - license = "The artist who created the model in this zip file retains all rights. If you want to use this model for any purpose other than personal, non-commercial use, you must contact the artist directly. Read Max-Realms_License.htm for more info." - mesh = "Cone.mesh" + name = "Traffic-cone" + description = "A typical traffic cone." + author = "Angelos Anadilinos (aka vagos)" + contact = "aggnos1 AT yahoo DOT com" + license = "Creative Commons Attribution-NonCommercial-ShareAlike License. For more info, read the readme.txt file." + mesh = "cone.mesh" mass = "3" > <box - size = "0.35 0.35 0.6" + size = "0.5 0.5 0.8" > </box> <!-- Added: trunk/data/parts/cone/readme.txt =================================================================== --- trunk/data/parts/cone/readme.txt (rev 0) +++ trunk/data/parts/cone/readme.txt 2006-04-20 11:35:36 UTC (rev 416) @@ -0,0 +1,14 @@ +Traffic-cone +by vagos (Angelos Anadilinos) +ag...@ya... + +This model is primarily made for the developing Motorsport simulator (http://www.motorsport-sim.org). +However, the model is released in the Creative Commons Attribution-NonCommercial-ShareAlike License, +so you can do what you want with the model as long as it doesn't break the license terms. + +NOTE: This license applies only to the model and it is not extended to the texture. +This is made from a photo found on www.fantasyjackpalance.com (all photos in this site are +copyrighted 2001-2003 www.fantasyjackpalance.com) +url: http://www.fantasyjackpalance.com/fjp/photos/misc/002/traffic-cone-2.jpg + +You may need to reload the texture because the paths won't probably be the same in your computer. Added: trunk/data/parts/cone/traffic-cone_tex.jpg =================================================================== (Binary files differ) Property changes on: trunk/data/parts/cone/traffic-cone_tex.jpg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <st...@us...> - 2006-04-20 11:11:38
|
Revision: 415 Author: stenyak Date: 2006-04-20 04:11:29 -0700 (Thu, 20 Apr 2006) ViewCVS: http://svn.sourceforge.net/motorsport/?rev=415&view=rev Log Message: ----------- Bufixed physics engine: now building single precision ODE meshes when appropriate. (patch #1473447, by ibrown) Bugfixed Msvc build: not using __format macro. (patch #1473447, by ibrown) Bugfixed fullscreen attribute parser (was reading a double value instead of a bool). Modified Paths: -------------- trunk/src/graphicsEngine.cpp trunk/src/log/logEngine.hpp trunk/src/world/area.cpp Modified: trunk/src/graphicsEngine.cpp =================================================================== --- trunk/src/graphicsEngine.cpp 2006-04-20 11:00:59 UTC (rev 414) +++ trunk/src/graphicsEngine.cpp 2006-04-20 11:11:29 UTC (rev 415) @@ -287,7 +287,7 @@ bpp = stoi(t->getAttribute("bpp")); renderer = t->getAttribute("renderer"); defaultNumMipMaps = stoi(t->getAttribute("defaultNumMipmaps")); - fullScreen = stod(t->getAttribute("fullScreen")); + fullScreen = stob(t->getAttribute("fullScreen")); if (t->getAttribute("sceneManager") == "ST_GENERIC") sceneManager = Ogre::ST_GENERIC; if (t->getAttribute("sceneManager") == "ST_EXTERIOR_CLOSE") sceneManager = Ogre::ST_EXTERIOR_CLOSE; if (t->getAttribute("sceneManager") == "ST_EXTERIOR_FAR") sceneManager = Ogre::ST_EXTERIOR_FAR; Modified: trunk/src/log/logEngine.hpp =================================================================== --- trunk/src/log/logEngine.hpp 2006-04-20 11:00:59 UTC (rev 414) +++ trunk/src/log/logEngine.hpp 2006-04-20 11:11:29 UTC (rev 415) @@ -12,7 +12,13 @@ #include <string> #include <map> #include <fstream> + +#ifdef _MSC_VER +// Apparently visual studio does not like this macro +#define __format format +#else #define __format(X ,Y, ...) format((X), std::string("[%s:%3i] " + std::string((Y))).c_str(),__FILE__, __LINE__, ##__VA_ARGS__) +#endif //forward declarations class GuiEngine; Modified: trunk/src/world/area.cpp =================================================================== --- trunk/src/world/area.cpp 2006-04-20 11:00:59 UTC (rev 414) +++ trunk/src/world/area.cpp 2006-04-20 11:11:29 UTC (rev 415) @@ -108,7 +108,11 @@ unsigned int *indices; getMeshInformation (ogreChild->getEntity()->getMesh (), vertex_count, vertices, index_count, indices, ogreChild->getNode()->getPosition(), ogreChild->getNode()->getOrientation(), ogreChild->getNode()->getScale()); log->__format (LOG_CCREATOR, "Building the ode mesh for the ground"); +#if defined(dSINGLE) + dGeomTriMeshDataBuildSingle (ground, vertices, sizeof (dVector3), vertex_count, indices, index_count, 3 * sizeof (unsigned int)); +#else dGeomTriMeshDataBuildDouble (ground, vertices, sizeof (dVector3), vertex_count, indices, index_count, 3 * sizeof (unsigned int)); +#endif } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <st...@us...> - 2006-04-20 11:01:29
|
Revision: 414 Author: stenyak Date: 2006-04-20 04:00:59 -0700 (Thu, 20 Apr 2006) ViewCVS: http://svn.sourceforge.net/motorsport/?rev=414&view=rev Log Message: ----------- Modified cone mesh and physics properties: it now has cone shape :) Added a couple of cubes to the mospland. Modified Paths: -------------- trunk/data/areas/mospland/area.xml trunk/data/parts/cone/part.xml Added Paths: ----------- trunk/data/parts/cone/Cone.mesh trunk/data/parts/cone/Max-Realms_License.htm trunk/data/parts/cone/Scene.material Removed Paths: ------------- trunk/data/parts/cone/cone.material trunk/data/parts/cone/cone.mesh trunk/data/parts/cone/conetexture.jpg Modified: trunk/data/areas/mospland/area.xml =================================================================== --- trunk/data/areas/mospland/area.xml 2006-04-20 10:29:25 UTC (rev 413) +++ trunk/data/areas/mospland/area.xml 2006-04-20 11:00:59 UTC (rev 414) @@ -255,8 +255,8 @@ clipping="0.100000 100.000000" /> <camera - name="camera.005" - position="63.658386 18.463703 2.521725" + name="camera.004" + position="-89.436378 72.925278 5.533426" rotation="0.500000 0.500000 0.500000 0.500000" scale="1.000000 1.000000 1.000000" target="0 0 0" @@ -266,8 +266,8 @@ clipping="0.100000 100.000000" /> <camera - name="camera.004" - position="-89.436378 72.925278 5.533426" + name="camera.006" + position="149.742828 -32.986179 2.521725" rotation="0.500000 0.500000 0.500000 0.500000" scale="1.000000 1.000000 1.000000" target="0 0 0" @@ -277,8 +277,8 @@ clipping="0.100000 100.000000" /> <camera - name="camera.007" - position="237.333115 -79.165588 17.831203" + name="camera.005" + position="63.658386 18.463703 2.521725" rotation="0.500000 0.500000 0.500000 0.500000" scale="1.000000 1.000000 1.000000" target="0 0 0" @@ -288,8 +288,8 @@ clipping="0.100000 100.000000" /> <camera - name="camera.006" - position="149.742828 -32.986179 2.521725" + name="camera.007" + position="237.333115 -79.165588 17.831203" rotation="0.500000 0.500000 0.500000 0.500000" scale="1.000000 1.000000 1.000000" target="0 0 0" @@ -317,26 +317,44 @@ > <cone name="cone" - position="-188.891907 -165.603455 2.415832" - rotation="0.992010 0.000000 0.000000 0.126161" - scale="2.000000 2.000000 2.000000" + position="-186.283615 -150.196426 0.610285" + rotation="0.998058 0.000000 0.000000 0.062286" + scale="0.350000 0.350000 0.600000" /> + <cone + name="cone.003" + position="-239.530319 -144.156876 0.610285" + rotation="0.998058 0.000000 0.000000 0.062286" + scale="0.350000 0.350000 0.600000" + /> + <cone + name="cone.001" + position="-206.497635 -150.812714 0.610285" + rotation="0.998058 0.000000 0.000000 0.062286" + scale="0.350000 0.350000 0.600000" + /> + <cone + name="cone.002" + position="-224.493057 -149.456894 0.590285" + rotation="0.998058 0.000000 0.000000 0.062286" + scale="0.350000 0.350000 0.600000" + /> <cube name="cube" position="-250.964355 -152.853439 2.415832" rotation="0.890023 0.000000 0.000000 0.455917" scale="2.000000 2.000000 2.000000" /> - <cube + <metalStand name="cube.001" - position="-259.688049 -141.892899 2.415832" - rotation="0.999271 0.000000 0.000000 -0.038182" + position="-269.914673 -124.510185 8.293638" + rotation="0.732426 0.000000 0.000000 -0.680847" scale="2.000000 2.000000 2.000000" /> - <metalStand - name="metalStand" - position="-257.003845 -148.044220 20.415832" - rotation="0 0 90" + <cube + name="cube.002" + position="-257.003845 -148.044220 2.415832" + rotation="0.933286 0.000000 0.000000 0.359133" scale="2.000000 2.000000 2.000000" /> </parts> Added: trunk/data/parts/cone/Cone.mesh =================================================================== (Binary files differ) Property changes on: trunk/data/parts/cone/Cone.mesh ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/data/parts/cone/Max-Realms_License.htm =================================================================== --- trunk/data/parts/cone/Max-Realms_License.htm (rev 0) +++ trunk/data/parts/cone/Max-Realms_License.htm 2006-04-20 11:00:59 UTC (rev 414) @@ -0,0 +1,23 @@ +<html> +<body> +**Terms of Use License** + +<P>You have downloaded this file from <a href=http://www.max-realms.com>Max-Realms.Com</a> If you downloaded this file from anywhere else, please send a quick message here <a href=mailto:dav...@ma...>Max-Realms Webmaster</a></P> + +<P>WARNING: The file contained within this zip file is protected by US and International +copyright law. Models created by Max-Realms.Com are copyright protected by "branding". See +<a href=http://www.max-realms.com/branding.htm>Copyright Branding</a> for more information.</P> + +<p>The artist who created the model in this zip file retains all rights. +If you want to use this model for any purpose other than personal, non-commercial use, +you must contact the artist directly.</P> + +<P>author: David Goodman</P> +<P>email: dav...@ma...</P> + +<P>****************************************************************************************</P> +<P>All freebie downloads at Max-Realms.Com are for your benefit. If you would like to help support the website so that we can continue to bring you NEW and EXCLUSIVE 3d Studio Max stuff, please go to the web page below! Enjoy!</P> + +<a href=http://www.max-realms.com/support.htm>Support Max-Realms.Com</a> +</body> +</html> Added: trunk/data/parts/cone/Scene.material =================================================================== --- trunk/data/parts/cone/Scene.material (rev 0) +++ trunk/data/parts/cone/Scene.material 2006-04-20 11:00:59 UTC (rev 414) @@ -0,0 +1,26 @@ +material Material #1/SOLID/TEX +{ + technique + { + pass + { + ambient 0 0 0 + diffuse 0.756191 0.756115 0.756115 + specular 0.500000 0.500000 0.500000 50.000000 + emissive 0.000000 0.000000 0.000000 + } + } +} +material Material #2/SOLID/TEX +{ + technique + { + pass + { + ambient 0 0 0 + diffuse 0.756191 0.756115 0.756115 + specular 0.500000 0.500000 0.500000 50.000000 + emissive 0.000000 0.000000 0.000000 + } + } +} Deleted: trunk/data/parts/cone/cone.material =================================================================== --- trunk/data/parts/cone/cone.material 2006-04-20 10:29:25 UTC (rev 413) +++ trunk/data/parts/cone/cone.material 2006-04-20 11:00:59 UTC (rev 414) @@ -1,18 +0,0 @@ -material coneMaterial -{ - receive_shadows on - technique - { - pass - { - ambient 0 0 0 - diffuse 0.756191 0.756115 0.756115 - specular 0.500000 0.500000 0.500000 50.000000 - emissive 0.000000 0.000000 0.000000 - texture_unit - { - texture conetexture.jpg - } - } - } -} Deleted: trunk/data/parts/cone/cone.mesh =================================================================== (Binary files differ) Deleted: trunk/data/parts/cone/conetexture.jpg =================================================================== (Binary files differ) Modified: trunk/data/parts/cone/part.xml =================================================================== --- trunk/data/parts/cone/part.xml 2006-04-20 10:29:25 UTC (rev 413) +++ trunk/data/parts/cone/part.xml 2006-04-20 11:00:59 UTC (rev 414) @@ -2,14 +2,14 @@ <part name = "Cone" description = "A typical road cone." - author = "Bruno Gonzalez Campo (STenyaK)" - contact = "stenyak AT gmx DOT net" - license = "Creative Commons Attribution-NonCommercial-ShareAlike License" - mesh = "cone.mesh" - mass = "50" + author = "David Goodman" + contact = " david DOT n DOT goodman AT max-realms DOT com" + license = "The artist who created the model in this zip file retains all rights. If you want to use this model for any purpose other than personal, non-commercial use, you must contact the artist directly. Read Max-Realms_License.htm for more info." + mesh = "Cone.mesh" + mass = "3" > <box - size = "1 1 2" + size = "0.35 0.35 0.6" > </box> <!-- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <st...@us...> - 2006-04-20 10:29:50
|
Revision: 413 Author: stenyak Date: 2006-04-20 03:29:25 -0700 (Thu, 20 Apr 2006) ViewCVS: http://svn.sourceforge.net/motorsport/?rev=413&view=rev Log Message: ----------- Added some more licensing info for the metalstands. Modified Paths: -------------- trunk/data/parts/metalStand/part.xml Added Paths: ----------- trunk/data/parts/metalStand/Max-Realms_License.htm Added: trunk/data/parts/metalStand/Max-Realms_License.htm =================================================================== --- trunk/data/parts/metalStand/Max-Realms_License.htm (rev 0) +++ trunk/data/parts/metalStand/Max-Realms_License.htm 2006-04-20 10:29:25 UTC (rev 413) @@ -0,0 +1,23 @@ +<html> +<body> +**Terms of Use License** + +<P>You have downloaded this file from <a href=http://www.max-realms.com>Max-Realms.Com</a> If you downloaded this file from anywhere else, please send a quick message here <a href=mailto:dav...@ma...>Max-Realms Webmaster</a></P> + +<P>WARNING: The file contained within this zip file is protected by US and International +copyright law. Models created by Max-Realms.Com are copyright protected by "branding". See +<a href=http://www.max-realms.com/branding.htm>Copyright Branding</a> for more information.</P> + +<p>The artist who created the model in this zip file retains all rights. +If you want to use this model for any purpose other than personal, non-commercial use, +you must contact the artist directly.</P> + +<P>author: David Goodman</P> +<P>email: dav...@ma...</P> + +<P>****************************************************************************************</P> +<P>All freebie downloads at Max-Realms.Com are for your benefit. If you would like to help support the website so that we can continue to bring you NEW and EXCLUSIVE 3d Studio Max stuff, please go to the web page below! Enjoy!</P> + +<a href=http://www.max-realms.com/support.htm>Support Max-Realms.Com</a> +</body> +</html> Modified: trunk/data/parts/metalStand/part.xml =================================================================== --- trunk/data/parts/metalStand/part.xml 2006-04-20 10:27:57 UTC (rev 412) +++ trunk/data/parts/metalStand/part.xml 2006-04-20 10:29:25 UTC (rev 413) @@ -4,7 +4,7 @@ description = "An empty metal stand, for use in race tracks" author = "David Goodman" contact = " david DOT n DOT goodman AT max-realms DOT com" - license = "The artist who created the model in this zip file retains all rights. If you want to use this model for any purpose other than personal, non-commercial use, you must contact the artist directly." + license = "The artist who created the model in this zip file retains all rights. If you want to use this model for any purpose other than personal, non-commercial use, you must contact the artist directly. Read Max-Realms_License.htm for more info." mesh = "metalstand.mesh" mass = "5000" > This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <st...@us...> - 2006-04-20 10:28:15
|
Revision: 412 Author: stenyak Date: 2006-04-20 03:27:57 -0700 (Thu, 20 Apr 2006) ViewCVS: http://svn.sourceforge.net/motorsport/?rev=412&view=rev Log Message: ----------- Added a metal stand part. Modified mospland: now featuring a metal stand in T1. Modified Paths: -------------- trunk/data/areas/mospland/area.xml Added Paths: ----------- trunk/data/parts/metalStand/ trunk/data/parts/metalStand/Scene.material trunk/data/parts/metalStand/metalstand.mesh trunk/data/parts/metalStand/part.xml Modified: trunk/data/areas/mospland/area.xml =================================================================== --- trunk/data/areas/mospland/area.xml 2006-04-20 03:46:15 UTC (rev 411) +++ trunk/data/areas/mospland/area.xml 2006-04-20 10:27:57 UTC (rev 412) @@ -333,10 +333,10 @@ rotation="0.999271 0.000000 0.000000 -0.038182" scale="2.000000 2.000000 2.000000" /> - <cube - name="cube.002" - position="-257.003845 -148.044220 2.415832" - rotation="0.933286 0.000000 0.000000 0.359133" + <metalStand + name="metalStand" + position="-257.003845 -148.044220 20.415832" + rotation="0 0 90" scale="2.000000 2.000000 2.000000" /> </parts> Added: trunk/data/parts/metalStand/Scene.material =================================================================== --- trunk/data/parts/metalStand/Scene.material (rev 0) +++ trunk/data/parts/metalStand/Scene.material 2006-04-20 10:27:57 UTC (rev 412) @@ -0,0 +1,28 @@ +material 1 - Default +{ + receive_shadows on + technique + { + pass + { + ambient 0.500000 0.500000 0.500000 1.000000 + diffuse 0.470588 0.470588 0.470588 1.000000 + specular 0.500000 0.500000 0.500000 1.000000 12.500000 + emissive 0.000000 0.000000 0.000000 1.000000 + } + } +} +material metal2 +{ + receive_shadows on + technique + { + pass + { + ambient 0.500000 0.500000 0.500000 1.000000 + diffuse 0.470588 0.470588 0.470588 1.000000 + specular 0.500000 0.500000 0.500000 1.000000 12.500000 + emissive 0.000000 0.000000 0.000000 1.000000 + } + } +} Added: trunk/data/parts/metalStand/metalstand.mesh =================================================================== (Binary files differ) Property changes on: trunk/data/parts/metalStand/metalstand.mesh ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/data/parts/metalStand/part.xml =================================================================== --- trunk/data/parts/metalStand/part.xml (rev 0) +++ trunk/data/parts/metalStand/part.xml 2006-04-20 10:27:57 UTC (rev 412) @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<part + name = "Metal Viewing Stands" + description = "An empty metal stand, for use in race tracks" + author = "David Goodman" + contact = " david DOT n DOT goodman AT max-realms DOT com" + license = "The artist who created the model in this zip file retains all rights. If you want to use this model for any purpose other than personal, non-commercial use, you must contact the artist directly." + mesh = "metalstand.mesh" + mass = "5000" + > + <box + size = "20 8 8" + > + </box> +<!-- + <sphere + radius = "2" + > + </sphere> + <cappedCylinder + length = "2" + radius = "1" + directionAxis = "z" + > + </cappedCylinder> +--> +</part> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <mck...@us...> - 2006-04-20 03:46:23
|
Revision: 411 Author: mckirkus Date: 2006-04-19 20:46:15 -0700 (Wed, 19 Apr 2006) ViewCVS: http://svn.sourceforge.net/motorsport/?rev=411&view=rev Log Message: ----------- Updated vs2003 batch files to work with the new 3pl directory structure. Modified Paths: -------------- trunk/src/prj/msvc2003/copy_debug_files.bat trunk/src/prj/msvc2003/copy_release_files.bat Modified: trunk/src/prj/msvc2003/copy_debug_files.bat =================================================================== --- trunk/src/prj/msvc2003/copy_debug_files.bat 2006-04-20 02:17:32 UTC (rev 410) +++ trunk/src/prj/msvc2003/copy_debug_files.bat 2006-04-20 03:46:15 UTC (rev 411) @@ -1,15 +1,17 @@ xcopy /y /E ..\..\..\3pl\windows\vc2003\lib\Debug\*.dll .\bin\Debug\ +xcopy /y /E %OGRE_HOME%\bin\debug\*.dll .\bin\debug + xcopy /y ..\..\*Config.xml .\bin\Debug xcopy /y ..\..\*Config.xsd .\bin\Debug -REM allow local overrides in the project directory -REM -xcopy /y .\*Config.xml .\bin\Debug mkdir .\bin\data xcopy /y /E ..\..\..\data .\bin\data mkdir .\bin\cfg xcopy /y /E ..\..\..\cfg .\bin\cfg + +REM allow local overrides in the project directory +REM \ No newline at end of file Modified: trunk/src/prj/msvc2003/copy_release_files.bat =================================================================== --- trunk/src/prj/msvc2003/copy_release_files.bat 2006-04-20 02:17:32 UTC (rev 410) +++ trunk/src/prj/msvc2003/copy_release_files.bat 2006-04-20 03:46:15 UTC (rev 411) @@ -1,16 +1,19 @@ xcopy /y /E ..\..\..\3pl\windows\vc2003\lib\Release\*.dll .\bin\Release\ +xcopy /y /E %OGRE_HOME%\bin\release\*.dll .\bin\release + xcopy /y ..\..\*Config.xml .\bin\Release xcopy /y ..\..\*Config.xsd .\bin\Release -REM allow local overrides in the project directory -REM -xcopy /y .\*Config.xml .\bin\Release - mkdir .\bin\data xcopy /y /E ..\..\..\data .\bin\data mkdir .\bin\cfg -xcopy /y /E ..\..\..\cfg .\bin\cfg \ No newline at end of file +xcopy /y /E ..\..\..\cfg .\bin\cfg + +REM allow local overrides in the project directory +REM + +xcopy /y .\*Config.xml .\bin\cfg \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <mck...@us...> - 2006-04-20 02:18:23
|
Revision: 410 Author: mckirkus Date: 2006-04-19 19:17:32 -0700 (Wed, 19 Apr 2006) ViewCVS: http://svn.sourceforge.net/motorsport/?rev=410&view=rev Log Message: ----------- Updated to use new lib and include directories associated with the OgreSDK. Modified Paths: -------------- trunk/src/prj/msvc2003/motorsport.vcproj Modified: trunk/src/prj/msvc2003/motorsport.vcproj =================================================================== --- trunk/src/prj/msvc2003/motorsport.vcproj 2006-04-19 22:37:41 UTC (rev 409) +++ trunk/src/prj/msvc2003/motorsport.vcproj 2006-04-20 02:17:32 UTC (rev 410) @@ -21,7 +21,7 @@ <Tool Name="VCCLCompilerTool" Optimization="0" - AdditionalIncludeDirectories="..\..;..\..\log;..\..\world;..\..\common;..\..\vehicle;..\..\tools;..\..\..\3pl\windows\vc2003\include;..\..\..\3pl\windows\vc2003\include\ode;..\..\..\3pl\windows\vc2003\include\ogre;..\..\..\3pl\windows\vc2003\include\SDL" + AdditionalIncludeDirectories="..\..;..\..\log;..\..\world;..\..\common;..\..\vehicle;..\..\tools;..\..\..\3pl\windows\vc2003\include;..\..\..\3pl\windows\vc2003\include\SDL;C:\OgreSDK\include" PreprocessorDefinitions="_DEBUG;WIN32;_WIN32;_WINDOWS;PLATFORM_WIN32" StringPooling="TRUE" BasicRuntimeChecks="3" @@ -43,7 +43,7 @@ OutputFile="$(ProjectDir)bin\$(ConfigurationName)\motorsport.exe" LinkIncremental="1" SuppressStartupBanner="TRUE" - AdditionalLibraryDirectories="..\..\..\3pl\windows\vc2003\lib;..\..\..\3pl\windows\vc2003\lib\Debug" + AdditionalLibraryDirectories="..\..\..\3pl\windows\vc2003\lib;..\..\..\3pl\windows\vc2003\lib\Debug;C:\OgreSDK\lib" IgnoreDefaultLibraryNames="msvcrt.lib" GenerateDebugInformation="TRUE" ProgramDatabaseFile=".\Debug/motorsport.pdb" @@ -95,7 +95,7 @@ InlineFunctionExpansion="1" EnableIntrinsicFunctions="TRUE" FavorSizeOrSpeed="1" - AdditionalIncludeDirectories="..\..;..\..\common;..\..\tools;..\..\world;..\..\vehicle;..\..\log;..\..\..\3pl\windows\vc2003\include;..\..\..\3pl\windows\vc2003\include\ode;..\..\..\3pl\windows\vc2003\include\ogre;..\..\..\3pl\windows\vc2003\include\SDL" + AdditionalIncludeDirectories="..\..;..\..\common;..\..\tools;..\..\world;..\..\vehicle;..\..\log;..\..\..\3pl\windows\vc2003\include;..\..\..\3pl\windows\vc2003\include\SDL;C:\OgreSDK\include" PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS" StringPooling="TRUE" RuntimeLibrary="2" @@ -118,7 +118,7 @@ OutputFile="$(ProjectDir)bin\$(ConfigurationName)\motorsport.exe" LinkIncremental="1" SuppressStartupBanner="TRUE" - AdditionalLibraryDirectories="..\..\..\3pl\windows\vc2003\lib;..\..\..\3pl\windows\vc2003\lib\Release" + AdditionalLibraryDirectories="..\..\..\3pl\windows\vc2003\lib;..\..\..\3pl\windows\vc2003\lib\Release;C:\OgreSDK\lib" GenerateDebugInformation="TRUE" ProgramDatabaseFile=".\Release/motorsport.pdb" SubSystem="2" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <st...@us...> - 2006-04-19 22:37:54
|
Revision: 409 Author: stenyak Date: 2006-04-19 15:37:41 -0700 (Wed, 19 Apr 2006) ViewCVS: http://svn.sourceforge.net/motorsport/?rev=409&view=rev Log Message: ----------- Renamed msvc2005 project files dir. Added Paths: ----------- trunk/src/prj/msvc2005/ Removed Paths: ------------- trunk/src/prj/vs2005/ Copied: trunk/src/prj/msvc2005 (from rev 408, trunk/src/prj/vs2005) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <mck...@us...> - 2006-04-19 21:21:36
|
Revision: 408 Author: mckirkus Date: 2006-04-19 14:21:22 -0700 (Wed, 19 Apr 2006) ViewCVS: http://svn.sourceforge.net/motorsport/?rev=408&view=rev Log Message: ----------- Added IBrown's Visual Studio 2005 Express folder and files to src/prj. Added Paths: ----------- trunk/src/prj/vs2005/ trunk/src/prj/vs2005/copy_debug_files.bat trunk/src/prj/vs2005/copy_release_files.bat trunk/src/prj/vs2005/graphicsConfig.xml trunk/src/prj/vs2005/logConfig.xml trunk/src/prj/vs2005/motorsport.sln trunk/src/prj/vs2005/motorsport.vcproj trunk/src/prj/vs2005/motorsport.vcproj.user Added: trunk/src/prj/vs2005/copy_debug_files.bat =================================================================== --- trunk/src/prj/vs2005/copy_debug_files.bat (rev 0) +++ trunk/src/prj/vs2005/copy_debug_files.bat 2006-04-19 21:21:22 UTC (rev 408) @@ -0,0 +1,19 @@ +xcopy /y /E ..\..\..\3pl\windows\vs2005\lib\Debug\*.dll .\bin\Debug\ + +xcopy /y /E %OGRE_HOME%\bin\debug\*.dll .\bin\debug + +xcopy /y ..\..\*Config.xml .\bin\Debug +xcopy /y ..\..\*Config.xsd .\bin\Debug + + + +mkdir .\bin\data +xcopy /y /E ..\..\..\data .\bin\data + +mkdir .\bin\cfg +xcopy /y /E ..\..\..\cfg .\bin\cfg + +REM allow local overrides in the project directory +REM + +xcopy /y .\*Config.xml .\bin\cfg \ No newline at end of file Added: trunk/src/prj/vs2005/copy_release_files.bat =================================================================== --- trunk/src/prj/vs2005/copy_release_files.bat (rev 0) +++ trunk/src/prj/vs2005/copy_release_files.bat 2006-04-19 21:21:22 UTC (rev 408) @@ -0,0 +1,19 @@ +xcopy /y /E ..\..\..\3pl\windows\vs2005\lib\Release\*.dll .\bin\Release\ + +xcopy /y /E %OGRE_HOME%\bin\release\*.dll .\bin\release + +xcopy /y ..\..\*Config.xml .\bin\Release +xcopy /y ..\..\*Config.xsd .\bin\Release + + +mkdir .\bin\data +xcopy /y /E ..\..\..\data .\bin\data + + +mkdir .\bin\cfg +xcopy /y /E ..\..\..\cfg .\bin\cfg + +REM allow local overrides in the project directory +REM + +xcopy /y .\*Config.xml .\bin\cfg Added: trunk/src/prj/vs2005/graphicsConfig.xml =================================================================== --- trunk/src/prj/vs2005/graphicsConfig.xml (rev 0) +++ trunk/src/prj/vs2005/graphicsConfig.xml 2006-04-19 21:21:22 UTC (rev 408) @@ -0,0 +1,30 @@ +<?xml version="1.0"?> +<graphicsConfig + _screenshotFile = "/dev/shm/screenframe%06i.jpg" + screenshotFile = "screenframe%02i.jpg" + initialScreenshotFileNumber = "0" + castAreaShadows = "true" + __vehicleRenderMode = "wireframe" + _vehicleRenderMode = "points" + vehicleRenderMode = "solid" + areaRenderMode = "solid" + > + <ogre + linuxPluginsDir = "/usr/lib/OGRE" + windowsPluginsDir = "." + sceneManager = "ST_GENERIC" + anisotropy = "1" + filtering = "TFO_BILINEAR" + _shadowTechnique = "SHADOWTYPE_NONE" + shadowTechnique = "SHADOWTYPE_STENCIL_MODULATIVE" + __shadowTechnique = "SHADOWTYPE_STENCIL_ADDITIVE" + ___shadowTechnique = "SHADOWTYPE_TEXTURE_MODULATIVE" + width = "800" + height = "600" + bpp = "0" + renderer = "OpenGL" + defaultNumMipmaps = "5" + fullScreen = "0" + > + </ogre> +</graphicsConfig> Added: trunk/src/prj/vs2005/logConfig.xml =================================================================== --- trunk/src/prj/vs2005/logConfig.xml (rev 0) +++ trunk/src/prj/vs2005/logConfig.xml 2006-04-19 21:21:22 UTC (rev 408) @@ -0,0 +1,10 @@ +<?xml version="1.0"?> +<logConfig + xmlns="http://motorsport-sim.org" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://motorsport-sim.org logConfig.xsd" + + globalLevel = "LOG_WARNING" + fileName = "motorsport.log" + textBuffer = "1024" +/> Added: trunk/src/prj/vs2005/motorsport.sln =================================================================== --- trunk/src/prj/vs2005/motorsport.sln (rev 0) +++ trunk/src/prj/vs2005/motorsport.sln 2006-04-19 21:21:22 UTC (rev 408) @@ -0,0 +1,19 @@ +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual C++ Express 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "motorsport", "motorsport.vcproj", "{308E9682-9B59-49BE-B5D7-63ACDF74EA71}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {308E9682-9B59-49BE-B5D7-63ACDF74EA71}.Debug|Win32.ActiveCfg = Debug|Win32 + {308E9682-9B59-49BE-B5D7-63ACDF74EA71}.Debug|Win32.Build.0 = Debug|Win32 + {308E9682-9B59-49BE-B5D7-63ACDF74EA71}.Release|Win32.ActiveCfg = Release|Win32 + {308E9682-9B59-49BE-B5D7-63ACDF74EA71}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal Added: trunk/src/prj/vs2005/motorsport.vcproj =================================================================== --- trunk/src/prj/vs2005/motorsport.vcproj (rev 0) +++ trunk/src/prj/vs2005/motorsport.vcproj 2006-04-19 21:21:22 UTC (rev 408) @@ -0,0 +1,557 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8.00" + Name="motorsport" + ProjectGUID="{308E9682-9B59-49BE-B5D7-63ACDF74EA71}" + RootNamespace="motorsport" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory=".\Debug" + IntermediateDirectory=".\Debug" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="_DEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="1" + TypeLibraryName=".\Debug/motorsport.tlb" + HeaderFileName="" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..\..;..\..\log;..\..\world;..\..\common;..\..\vehicle;..\..\tools;..\..\..\3pl\windows\vs2005\include;..\..\..\3pl\windows\vs2005\include\SDL;"$(OGRE_HOME)\include";"$(OGRE_HOME)\Dependencies\Include"" + PreprocessorDefinitions="WIN32, _DEBUG, _DEBUG, _CRT_SECURE_NO_DEPRECATE" + StringPooling="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + RuntimeTypeInfo="true" + UsePrecompiledHeader="0" + PrecompiledHeaderFile=".\Debug/motorsport.pch" + AssemblerListingLocation=".\Debug/" + ObjectFile=".\Debug/" + ProgramDataBaseFileName=".\Debug/" + WarningLevel="3" + SuppressStartupBanner="false" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="2057" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="xerces-c_2D.lib ode.lib OgreMain_d.lib SDLMain.lib SDL.lib user32.lib" + ShowProgress="0" + OutputFile="$(ProjectDir)bin\$(ConfigurationName)\motorsport.exe" + LinkIncremental="1" + SuppressStartupBanner="false" + AdditionalLibraryDirectories="..\..\..\3pl\windows\vs2005\lib\Debug;..\..\..\3pl\windows\vs2005\lib;"$(OGRE_HOME)\Dependencies\lib\Debug";"$(OGRE_HOME)\lib"" + IgnoreDefaultLibraryNames="msvcrt.lib" + GenerateDebugInformation="true" + ProgramDatabaseFile=".\Debug/motorsport.pdb" + SubSystem="2" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + Description="Copy debug files" + CommandLine="call copy_debug_files.bat" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory=".\Release" + IntermediateDirectory=".\Release" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="NDEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="1" + TypeLibraryName=".\Release/motorsport.tlb" + HeaderFileName="" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="2" + EnableIntrinsicFunctions="true" + FavorSizeOrSpeed="1" + WholeProgramOptimization="true" + AdditionalIncludeDirectories="..\..;..\..\log;..\..\world;..\..\common;..\..\vehicle;..\..\tools;..\..\..\3pl\windows\vs2005\include;..\..\..\3pl\windows\vs2005\include\SDL;"$(OGRE_HOME)\include";"$(OGRE_HOME)\Dependencies\Include"" + PreprocessorDefinitions="WIN32, _CRT_SECURE_NO_DEPRECATE" + StringPooling="true" + RuntimeLibrary="2" + BufferSecurityCheck="false" + EnableFunctionLevelLinking="false" + RuntimeTypeInfo="true" + UsePrecompiledHeader="0" + PrecompiledHeaderFile=".\Release/motorsport.pch" + AssemblerListingLocation=".\Release/" + ObjectFile=".\Release/" + ProgramDataBaseFileName=".\Release/" + WarningLevel="3" + SuppressStartupBanner="false" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="2057" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="xerces-c_2.lib ode.lib SDLMain.lib SDL.lib OgreMain.lib user32.lib" + OutputFile="$(ProjectDir)bin\$(ConfigurationName)\motorsport.exe" + LinkIncremental="1" + SuppressStartupBanner="true" + AdditionalLibraryDirectories="..\..\..\3pl\windows\vs2005\lib\Release;..\..\..\3pl\windows\vs2005\lib;"$(OGRE_HOME)\Dependencies\lib\Release";"$(OGRE_HOME)\lib"" + GenerateDebugInformation="true" + ProgramDatabaseFile=".\Release/motorsport.pdb" + SubSystem="2" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + Description="copy release files" + CommandLine="call copy_release_files.bat" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" + > + <File + RelativePath="..\..\graphicsEngine.cpp" + > + </File> + <File + RelativePath="..\..\graphicsEngine.hpp" + > + </File> + <File + RelativePath="..\..\guiEngine.cpp" + > + </File> + <File + RelativePath="..\..\guiEngine.hpp" + > + </File> + <File + RelativePath="..\..\inputEngine.cpp" + > + </File> + <File + RelativePath="..\..\inputEngine.hpp" + > + </File> + <File + RelativePath="..\..\main.cpp" + > + </File> + <File + RelativePath="..\..\main.hpp" + > + </File> + <File + RelativePath="..\..\physicsEngine.cpp" + > + </File> + <File + RelativePath="..\..\physicsEngine.hpp" + > + </File> + <File + RelativePath="..\..\system.cpp" + > + </File> + <File + RelativePath="..\..\system.hpp" + > + </File> + </Filter> + <Filter + Name="log" + > + <File + RelativePath="..\..\log\logEngine.cpp" + > + </File> + <File + RelativePath="..\..\log\logEngine.hpp" + > + </File> + </Filter> + <Filter + Name="tools" + > + <File + RelativePath="..\..\tools\MTest.h" + > + </File> + <File + RelativePath="..\..\tools\paths.cpp" + > + </File> + <File + RelativePath="..\..\tools\paths.hpp" + > + </File> + <File + RelativePath="..\..\tools\xercesc_fwd.hpp" + > + </File> + <File + RelativePath="..\..\tools\xmlParser.cpp" + > + </File> + <File + RelativePath="..\..\tools\xmlParser.hpp" + > + </File> + <File + RelativePath="..\..\tools\xmlTag.cpp" + > + </File> + <File + RelativePath="..\..\tools\xmlTag.hpp" + > + </File> + </Filter> + <Filter + Name="common" + > + <File + RelativePath="..\..\common\axis.cpp" + > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + ObjectFile="$(IntDir)/$(InputName)1.obj" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32" + > + <Tool + Name="VCCLCompilerTool" + ObjectFile="$(IntDir)/$(InputName)1.obj" + /> + </FileConfiguration> + </File> + <File + RelativePath="..\..\common\axis.hpp" + > + </File> + <File + RelativePath="..\..\common\camera.cpp" + > + </File> + <File + RelativePath="..\..\common\camera.hpp" + > + </File> + <File + RelativePath="..\..\common\location.cpp" + > + </File> + <File + RelativePath="..\..\common\location.hpp" + > + </File> + <File + RelativePath="..\..\common\odeObject.cpp" + > + </File> + <File + RelativePath="..\..\common\odeObject.hpp" + > + </File> + <File + RelativePath="..\..\common\ogreObject.cpp" + > + </File> + <File + RelativePath="..\..\common\ogreObject.hpp" + > + </File> + <File + RelativePath="..\..\common\quaternion.cpp" + > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + ObjectFile="$(IntDir)/$(InputName)1.obj" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32" + > + <Tool + Name="VCCLCompilerTool" + ObjectFile="$(IntDir)/$(InputName)1.obj" + /> + </FileConfiguration> + </File> + <File + RelativePath="..\..\common\quaternion.hpp" + > + </File> + <File + RelativePath="..\..\common\vector3d.cpp" + > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + ObjectFile="$(IntDir)/$(InputName)1.obj" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32" + > + <Tool + Name="VCCLCompilerTool" + ObjectFile="$(IntDir)/$(InputName)1.obj" + /> + </FileConfiguration> + </File> + <File + RelativePath="..\..\common\vector3d.hpp" + > + </File> + <File + RelativePath="..\..\common\worldObject.cpp" + > + </File> + <File + RelativePath="..\..\common\worldObject.hpp" + > + </File> + </Filter> + <Filter + Name="vehicle" + > + <File + RelativePath="..\..\vehicle\body.cpp" + > + </File> + <File + RelativePath="..\..\vehicle\body.hpp" + > + </File> + <File + RelativePath="..\..\vehicle\driveJoint.cpp" + > + </File> + <File + RelativePath="..\..\vehicle\driveJoint.hpp" + > + </File> + <File + RelativePath="..\..\vehicle\driveMass.cpp" + > + </File> + <File + RelativePath="..\..\vehicle\driveMass.hpp" + > + </File> + <File + RelativePath="..\..\vehicle\engine.cpp" + > + </File> + <File + RelativePath="..\..\vehicle\engine.hpp" + > + </File> + <File + RelativePath="..\..\vehicle\finalDrive.cpp" + > + </File> + <File + RelativePath="..\..\vehicle\finalDrive.hpp" + > + </File> + <File + RelativePath="..\..\vehicle\gearbox.cpp" + > + </File> + <File + RelativePath="..\..\vehicle\gearbox.hpp" + > + </File> + <File + RelativePath="..\..\vehicle\pedal.cpp" + > + </File> + <File + RelativePath="..\..\vehicle\pedal.hpp" + > + </File> + <File + RelativePath="..\..\vehicle\suspension.cpp" + > + </File> + <File + RelativePath="..\..\vehicle\suspension.hpp" + > + </File> + <File + RelativePath="..\..\vehicle\vehicle.cpp" + > + </File> + <File + RelativePath="..\..\vehicle\vehicle.hpp" + > + </File> + <File + RelativePath="..\..\vehicle\wheel.cpp" + > + </File> + <File + RelativePath="..\..\vehicle\wheel.hpp" + > + </File> + </Filter> + <Filter + Name="world" + > + <File + RelativePath="..\..\world\area.cpp" + > + </File> + <File + RelativePath="..\..\world\area.hpp" + > + </File> + <File + RelativePath="..\..\world\part.cpp" + > + </File> + <File + RelativePath="..\..\world\part.hpp" + > + </File> + <File + RelativePath="..\..\world\world.cpp" + > + </File> + <File + RelativePath="..\..\world\world.hpp" + > + </File> + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> Added: trunk/src/prj/vs2005/motorsport.vcproj.user =================================================================== --- trunk/src/prj/vs2005/motorsport.vcproj.user (rev 0) +++ trunk/src/prj/vs2005/motorsport.vcproj.user 2006-04-19 21:21:22 UTC (rev 408) @@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioUserFile + ProjectType="Visual C++" + Version="8.00" + ShowAllFiles="false" + > + <Configurations> + <Configuration + Name="Debug|Win32" + > + <DebugSettings + Command="$(TargetPath)" + WorkingDirectory="$(TargetDir)" + CommandArguments="" + Attach="false" + DebuggerType="3" + Remote="1" + RemoteMachine="" + RemoteCommand="" + HttpUrl="" + PDBPath="" + SQLDebugging="" + Environment="" + EnvironmentMerge="true" + DebuggerFlavor="0" + MPIRunCommand="" + MPIRunArguments="" + MPIRunWorkingDirectory="" + ApplicationCommand="" + ApplicationArguments="" + ShimCommand="" + MPIAcceptMode="" + MPIAcceptFilter="" + /> + </Configuration> + <Configuration + Name="Release|Win32" + > + <DebugSettings + Command="$(TargetPath)" + WorkingDirectory="$(TargetDir)" + CommandArguments="" + Attach="false" + DebuggerType="3" + Remote="1" + RemoteMachine="" + RemoteCommand="" + HttpUrl="" + PDBPath="" + SQLDebugging="" + Environment="" + EnvironmentMerge="true" + DebuggerFlavor="0" + MPIRunCommand="" + MPIRunArguments="" + MPIRunWorkingDirectory="" + ApplicationCommand="" + ApplicationArguments="" + ShimCommand="" + MPIAcceptMode="" + MPIAcceptFilter="" + /> + </Configuration> + </Configurations> +</VisualStudioUserFile> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <st...@us...> - 2006-04-19 19:43:55
|
Revision: 407 Author: stenyak Date: 2006-04-19 12:43:14 -0700 (Wed, 19 Apr 2006) ViewCVS: http://svn.sourceforge.net/motorsport/?rev=407&view=rev Log Message: ----------- Updated graphics engine: now works with Ogre v1.2.0 (Dagon). (by ibrown, patch #1471799) Bugfixed 3pl-linux script: now symlinks to all usr/lib ogre libraries. Modified physics engine: changed the internals to be consistent with the ODE build. i.e. if ODE is compiled in single-precision then motorsport is single-precision internally. If ODE is double precision then motorsport is double precision. Also eliminated the compiler warnings associated with this. (by ibrown, patch #1471799) Bugfixed the destructor code for cleaning the STL lists. The code was calling erase(i) in a loop that does i++. You cannot do that - it sort of works on linux (well mostly) but is always broken in windows. I changed it to just do a clear() outside the loop instead. This eliminates the crashes when closing the program. (by ibrown, patch #1471799) Modified graphics engine: updated the SDL HWND detection code so that it no longer needs to cast down to the open-gl renderer. It should work with DirectX now and is no longer a tempoary hack. (by ibrown, patch #1471799) Bugfixed area parser: now render mode is properly set. (by ibrown, patch #1471799) Modified makefile: now standard output text is writen to stdout.log, instead of being lost in /dev/null. Modified Paths: -------------- trunk/3pl/linux/mklinks.sh trunk/cfg/graphicsConfig.xml trunk/src/common/odeObject.cpp trunk/src/common/odeObject.hpp trunk/src/common/ogreObject.cpp trunk/src/common/quaternion.cpp trunk/src/common/quaternion.hpp trunk/src/common/vector3d.cpp trunk/src/common/vector3d.hpp trunk/src/common/worldObject.cpp trunk/src/graphicsEngine.cpp trunk/src/makefile trunk/src/tools/xmlTag.cpp trunk/src/world/area.cpp Modified: trunk/3pl/linux/mklinks.sh =================================================================== --- trunk/3pl/linux/mklinks.sh 2006-04-19 14:16:19 UTC (rev 406) +++ trunk/3pl/linux/mklinks.sh 2006-04-19 19:43:14 UTC (rev 407) @@ -13,5 +13,7 @@ cd lib d=$origin/lib ln -s /home/stenyak$d/OGRE + ln -s /home/stenyak$d + for i in /home/stenyak$d/*Ogre*; do ln -s $i; done ln -s $d/ode cd .. Modified: trunk/cfg/graphicsConfig.xml =================================================================== --- trunk/cfg/graphicsConfig.xml 2006-04-19 14:16:19 UTC (rev 406) +++ trunk/cfg/graphicsConfig.xml 2006-04-19 19:43:14 UTC (rev 407) @@ -10,6 +10,7 @@ areaRenderMode = "solid" > <ogre + _linuxPluginsDir = "../3pl/linux/lib/OGRE" linuxPluginsDir = "/usr/lib/OGRE" windowsPluginsDir = "plugins" sceneManager = "ST_GENERIC" Modified: trunk/src/common/odeObject.cpp =================================================================== --- trunk/src/common/odeObject.cpp 2006-04-19 14:16:19 UTC (rev 406) +++ trunk/src/common/odeObject.cpp 2006-04-19 19:43:14 UTC (rev 407) @@ -69,16 +69,16 @@ dGeomTransformSetCleanup (geomIDs["GeomSpace(B)"], 0); // create collision geoms - geomIDs["Geom(A)"] = dCreateBox (0, data.length, data.width, data.height / 2.0); - geomIDs["Geom(B)"] = dCreateBox (0, data.length / 2.0, data.width / 2.0, data.height / 2.0); + geomIDs["Geom(A)"] = dCreateBox (0, data.length, data.width, data.height / 2.0f); + geomIDs["Geom(B)"] = dCreateBox (0, data.length / 2.0f, data.width / 2.0f, data.height / 2.0f); // insert collision geoms into transformation spaces dGeomTransformSetGeom (geomIDs["GeomSpace(A)"], geomIDs["Geom(A)"]); dGeomTransformSetGeom (geomIDs["GeomSpace(B)"], geomIDs["Geom(B)"]); // apply offsets to the collision geoms - dGeomSetPosition (geomIDs["Geom(A)"], 0, 0, - data.height / 4.0); - dGeomSetPosition (geomIDs["Geom(B)"], -data.width / 6, 0, (data.height / 4.0) + 0.1); + dGeomSetPosition (geomIDs["Geom(A)"], 0.f, 0.f, - data.height / 4.0f); + dGeomSetPosition (geomIDs["Geom(B)"], -data.width / 6.f, 0.f, (data.height / 4.0f) + 0.1f); // associate the dBody with the 2 collision geoms via the transformation spaces dGeomSetBody (geomIDs["GeomSpace(A)"], bodyID); @@ -108,9 +108,9 @@ dBodySetData (bodyID, static_cast<void*>(worldObject->getContainer())); dMass dmass; dMassSetParameters (&dmass, data.mass, - 0, 0, 0, - 0.237, 0.237, 0.409, - 0, 0, 0); + 0., 0., 0., + 0.237f, 0.237f, 0.409f, + 0., 0., 0.); geomIDs[name] = dCreateCCylinder (World::getWorldPointer ()->spaceID, data.radius, data.width); dBodySetLinearVel (bodyID, 0, 0, 0); dBodySetAngularVel (bodyID, 0, 0, 0); @@ -152,9 +152,8 @@ worldObject->getLog()->__format (LOG_DEVELOPER, "Removing geom id=%s", i->first.c_str()); dGeomDestroy (i->second); i->second = NULL; - geomIDs.erase(i); } - + geomIDs.clear(); dBodyDestroy (bodyID); bodyID = NULL; this->worldObject = NULL; Modified: trunk/src/common/odeObject.hpp =================================================================== --- trunk/src/common/odeObject.hpp 2006-04-19 14:16:19 UTC (rev 406) +++ trunk/src/common/odeObject.hpp 2006-04-19 19:43:14 UTC (rev 407) @@ -55,11 +55,11 @@ class PartOdeData { public: - double mass; + dReal mass; std::string shape; Vector3d size; - double radius; - double length; + dReal radius; + dReal length; int directionAxis; PartOdeData() @@ -76,10 +76,10 @@ class BodyOdeData { public: - double length; - double width; - double height; - double mass; + dReal length; + dReal width; + dReal height; + dReal mass; BodyOdeData() { @@ -91,9 +91,9 @@ class WheelOdeData { public: - double radius; - double width; - double mass; + dReal radius; + dReal width; + dReal mass; WheelOdeData() { @@ -104,10 +104,10 @@ class BoneOdeData { public: - double length; - double radius; - double mass; - double density; + dReal length; + dReal radius; + dReal mass; + dReal density; bool useMass; BoneOdeData() { Modified: trunk/src/common/ogreObject.cpp =================================================================== --- trunk/src/common/ogreObject.cpp 2006-04-19 14:16:19 UTC (rev 406) +++ trunk/src/common/ogreObject.cpp 2006-04-19 19:43:14 UTC (rev 407) @@ -62,7 +62,7 @@ worldObject->getLog()->__format (LOG_DEVELOPER, "Removing entity id=%s", entity->getName().c_str()); node->detachObject(entity); if (entity->isAttached()) worldObject->getLog()->__format(LOG_WARNING, "Entity \"%s\" (%s) still attached somewhere!.", name.c_str(), entity->getName().c_str()); - SystemData::getSystemDataPointer()->ogreSceneManager->removeEntity (entity); + SystemData::getSystemDataPointer()->ogreSceneManager->destroyEntity (entity); entity = NULL; } Modified: trunk/src/common/quaternion.cpp =================================================================== --- trunk/src/common/quaternion.cpp 2006-04-19 14:16:19 UTC (rev 406) +++ trunk/src/common/quaternion.cpp 2006-04-19 19:43:14 UTC (rev 407) @@ -17,17 +17,21 @@ // empty } -Quaternion::Quaternion (double _w, double _x, double _y, double _z) +Quaternion::Quaternion (dReal _w, dReal _x, dReal _y, dReal _z) : w(_w), x(_x), y(_y),z(_z) { // empty } -void Quaternion::SetFromEuler(double phi, double theta, double psi) +void Quaternion::SetFromEuler(dReal phi, dReal theta, dReal psi) { // euler degrees to euler radians - const double piK = 3.14159265358979323846264338327950288419716939937510 / 180; - phi *= piK; +#if defined(dSINGLE) + const dReal piK = (dReal)(3.14159265358979323846 / 180.); +#else + const dReal piK = 3.14159265358979323846264338327950288419716939937510 / 180.; +#endif + phi *= piK; theta *= piK; psi *= piK; // euler angles to ode matrix @@ -43,7 +47,7 @@ z = tmpQuaternion[3]; } -Quaternion::Quaternion (double phi, double theta, double psi) +Quaternion::Quaternion (dReal phi, dReal theta, dReal psi) { SetFromEuler(phi, theta, psi); } @@ -66,8 +70,8 @@ Quaternion::Quaternion(const std::string &srcString) { std::stringstream tmpString (srcString); - const double magicValue = 0.123456789101112131415; - double tmpW, tmpX, tmpY, tmpZ = magicValue; + const dReal magicValue = 0.123456789f; + dReal tmpW, tmpX, tmpY, tmpZ = magicValue; tmpString >> tmpW >> tmpX >> tmpY >> tmpZ; if ( tmpZ == magicValue ) { SetFromEuler (tmpW, tmpX, tmpY); Modified: trunk/src/common/quaternion.hpp =================================================================== --- trunk/src/common/quaternion.hpp 2006-04-19 14:16:19 UTC (rev 406) +++ trunk/src/common/quaternion.hpp 2006-04-19 19:43:14 UTC (rev 407) @@ -17,13 +17,13 @@ class Quaternion { public: - double w; - double x; - double y; - double z; + dReal w; + dReal x; + dReal y; + dReal z; Quaternion (); // defaults to (1, 0, 0, 0) - Quaternion (double w, double x, double y, double z);// from quaternion values - Quaternion (double phi, double theta, double psi); // from Euler angles + Quaternion (dReal w, dReal x, dReal y, dReal z);// from quaternion values + Quaternion (dReal phi, dReal theta, dReal psi); // from Euler angles Quaternion (dQuaternion odeQuaternion); // from ode quaternion Quaternion (const dReal * odeQuaternion); // from ode array Quaternion (const std::string &srcString); // from std::string @@ -43,7 +43,7 @@ Vector3d rotateObject (Vector3d objectPosition); private: - void SetFromEuler(double phi, double theta, double psi); // bad name + void SetFromEuler(dReal phi, dReal theta, dReal psi); // bad name }; #endif Modified: trunk/src/common/vector3d.cpp =================================================================== --- trunk/src/common/vector3d.cpp 2006-04-19 14:16:19 UTC (rev 406) +++ trunk/src/common/vector3d.cpp 2006-04-19 19:43:14 UTC (rev 407) @@ -16,22 +16,22 @@ //empty } -Vector3d::Vector3d (double _x, double _y, double _z) +Vector3d::Vector3d (dReal _x, dReal _y, dReal _z) : x(_x), y(_y),z(_z) { //empty } -Vector3d::Vector3d(double qw, double qx, double qy, double qz) +Vector3d::Vector3d(dReal qw, dReal qx, dReal qy, dReal qz) { //from quaternion to euler radians - double sqw = qw*qw; - double sqx = qx*qx; - double sqy = qy*qy; - double sqz = qz*qz; + dReal sqw = qw*qw; + dReal sqx = qx*qx; + dReal sqy = qy*qy; + dReal sqz = qz*qz; - y = atan2(2.0 * (qx * qy + qz * qw), (sqx - sqy - sqz + sqw)); - x = -atan2(2.0 * (qy * qz + qx * qw), (-sqx - sqy + sqz + sqw)); - z = -asin(-2.0 * (qx * qz - qy * qw)); + y = atan2(2.0f * (qx * qy + qz * qw), (sqx - sqy - sqz + sqw)); + x = -atan2(2.0f * (qy * qz + qx * qw), (-sqx - sqy + sqz + sqw)); + z = -asin(-2.0f * (qx * qz - qy * qw)); } Vector3d::Vector3d (const dReal * odeArray) @@ -115,11 +115,11 @@ z -= k.z; return *this; } -double Vector3d::distance () const +dReal Vector3d::distance () const { return sqrt (x * x + y * y + z * z); } -double Vector3d::distance (const Vector3d & k) const +dReal Vector3d::distance (const Vector3d & k) const { return (*this - k).distance (); } @@ -169,7 +169,7 @@ .y) * (vec[1].x - vec[2].x); /* * normalize vector */ - double x, y, z, sum, sqr; + dReal x, y, z, sum, sqr; x = y = z = sum = 0; // square coordinates @@ -181,7 +181,7 @@ sum = x + y + z; // square root - sqr = pow (sum, (double) 0.5); + sqr = pow (sum, (dReal)0.5); if (!sqr) { sqr = 1; // wg. Division durch 0 @@ -198,7 +198,7 @@ Vector3d ret; size_t i, size; size = vec.size(); - double x, y, z; + dReal x, y, z; x = y = z = 0; for (i = 0; i < size; i++) { @@ -219,13 +219,17 @@ for (size_t i = 0; i < size; i++) { ret += vec[i]; } - ret.scalarDivide(size); //scalarDivide checks for div0 + ret.scalarDivide((dReal)size); //scalarDivide checks for div0 return ret; } Vector3d& Vector3d::degreesToRadians () { - const double piK = 3.14159265358979323846264338327950288419716939937510 / 180; +#if defined(dSINGLE) + const dReal piK = (dReal)(3.14159265358979323846 / 180.); +#else + const dReal piK = 3.14159265358979323846264338327950288419716939937510 / 180.; +#endif scalarMultiply(piK); return *this; } @@ -235,14 +239,14 @@ // im also uncertain if this->x is better then x. // but I have a vague memory about polymorph inheritance and problems. -Vector3d& Vector3d::scalarAdd(const double value) +Vector3d& Vector3d::scalarAdd(const dReal value) { this->x += value; this->y += value; this->z += value; return *this; } -Vector3d& Vector3d::scalarMultiply(const double value) +Vector3d& Vector3d::scalarMultiply(const dReal value) { this->x *= value; this->y *= value; @@ -250,7 +254,7 @@ return *this; } -Vector3d& Vector3d::scalarDivide(const double value) +Vector3d& Vector3d::scalarDivide(const dReal value) { if (value != 0) { this->x /= value; Modified: trunk/src/common/vector3d.hpp =================================================================== --- trunk/src/common/vector3d.hpp 2006-04-19 14:16:19 UTC (rev 406) +++ trunk/src/common/vector3d.hpp 2006-04-19 19:43:14 UTC (rev 407) @@ -16,12 +16,12 @@ class Vector3d { public: - double x; - double y; - double z; + dReal x; + dReal y; + dReal z; Vector3d (); - Vector3d (double x, double y, double z); // from separated components - Vector3d(double qw, double qx, double qy, double qz); // from quaternion to euler radians + Vector3d (dReal x, dReal y, dReal z); // from separated components + Vector3d(dReal qw, dReal qx, dReal qy, dReal qz); // from quaternion to euler radians Vector3d (const dReal * odeArray); // from ode array // Vector3d (const Vector3d & cpy); default copy constructor used. Vector3d (const std::string &srcString); @@ -36,12 +36,12 @@ Vector3d operator* (const Vector3d & k) const; const Vector3d & operator+= (const Vector3d & k); const Vector3d & operator-= (const Vector3d & k); - double distance () const; - double distance (const Vector3d & k) const; + dReal distance () const; + dReal distance (const Vector3d & k) const; Vector3d & degreesToRadians(); - Vector3d & scalarAdd(const double value); - Vector3d & scalarMultiply(const double value); - Vector3d & scalarDivide(const double value); + Vector3d & scalarAdd(const dReal value); + Vector3d & scalarMultiply(const dReal value); + Vector3d & scalarDivide(const dReal value); const Vector3d GetCrossProduct (const std::vector < Vector3d > &vec); }; Modified: trunk/src/common/worldObject.cpp =================================================================== --- trunk/src/common/worldObject.cpp 2006-04-19 14:16:19 UTC (rev 406) +++ trunk/src/common/worldObject.cpp 2006-04-19 19:43:14 UTC (rev 407) @@ -44,21 +44,21 @@ } WorldObject::~WorldObject () { - log->__format(LOG_CCREATOR, "Deleting myself. Id #%s.", id.c_str(), getFullName().c_str()); + log->__format(LOG_CCREATOR, "Deleting myself. Id #%s. Full Name: %s", id.c_str(), getFullName().c_str()); OgreObjectsIt i = ogreObjects.begin(); for(;i != ogreObjects.end(); i++) { delete i->second; i->second = NULL; - ogreObjects.erase(i); } + ogreObjects.clear(); OdeObjectsIt j = odeObjects.begin(); for(;j != odeObjects.end(); j++) { delete j->second; j->second = NULL; - odeObjects.erase(j); } + odeObjects.clear(); worldObjects.erase(this->id); delete log; log = NULL; Modified: trunk/src/graphicsEngine.cpp =================================================================== --- trunk/src/graphicsEngine.cpp 2006-04-19 14:16:19 UTC (rev 406) +++ trunk/src/graphicsEngine.cpp 2006-04-19 19:43:14 UTC (rev 407) @@ -10,7 +10,6 @@ #ifdef WIN32 # define WIN32_LEAN_AND_MEAN # include <windows.h> -# include "OgreWin32Window.h" #endif #include "OgreNoMemoryMacros.h" #include "graphicsEngine.hpp" @@ -242,8 +241,8 @@ screenshotFilename.assign ("frame%i.jpg"); initialFrame = 0; castAreaShadows = true; - vehicleRenderMode = Ogre::SDL_SOLID; - areaRenderMode = Ogre::SDL_SOLID; + vehicleRenderMode = Ogre::PM_SOLID; + areaRenderMode = Ogre::PM_SOLID; #ifdef WIN32 std::string ogrePluginsDir = "plugins"; #else @@ -270,9 +269,9 @@ if ( tag->getAttribute("vehicleRenderMode") == "points") vehicleRenderMode = 1; if ( tag->getAttribute("vehicleRenderMode") == "wireframe") vehicleRenderMode = 2; if ( tag->getAttribute("vehicleRenderMode") == "solid") vehicleRenderMode = 3; - if ( tag->getAttribute("areaRenderMode") == "points") vehicleRenderMode = 1; - if ( tag->getAttribute("areaRenderMode") == "wireframe") vehicleRenderMode = 2; - if ( tag->getAttribute("areaRenderMode") == "solid") vehicleRenderMode = 3; + if ( tag->getAttribute("areaRenderMode") == "points") areaRenderMode = 1; + if ( tag->getAttribute("areaRenderMode") == "wireframe") areaRenderMode = 2; + if ( tag->getAttribute("areaRenderMode") == "solid") areaRenderMode = 3; XmlTag * t = tag->getTag(0); for (int i = 0; i < tag->nTags(); t = tag->getTag(++i)) { if (t->getName() == "ogre") @@ -365,20 +364,19 @@ systemData->ogreWindow = ogreRoot->initialise (true); setupResources (); #ifdef WIN32 - // This is a bit of a hack way to get the HWND from Ogre. - // Currently only works for the OpenGL renderer. - log->__format (LOG_WARNING, "Windows version: temporary hackish workaround in order to get SDL input working"); - char tmp[64]; - Ogre::Win32Window* ow32_win = static_cast<Ogre::Win32Window*>(systemData->ogreWindow); - if (ow32_win != NULL) - { - sprintf(tmp, "SDL_WINDOWID=%d", ow32_win->getWindowHandle()); - _putenv(tmp); - } + + char tmp[64]; + // New method: As proposed by Sinbad. + // This method always works. + HWND hWnd; + systemData->ogreWindow->getCustomAttribute("HWND", &hWnd); + sprintf(tmp, "SDL_WINDOWID=%d", hWnd); + _putenv(tmp); + #endif log->__format (LOG_DEVELOPER, "Getting ogre scene manager"); // Set shadowing system - systemData->ogreSceneManager = ogreRoot->getSceneManager (sceneManager); + systemData->ogreSceneManager = ogreRoot->createSceneManager (sceneManager); systemData->ogreSceneManager->setShadowTechnique(shadowTechnique); systemData->ogreSceneManager->setAmbientLight(Ogre::ColourValue(0.67, 0.94, 1.00)); systemData->ogreSceneManager->setShadowColour(Ogre::ColourValue(0.5, 0.5, 0.5)); Modified: trunk/src/makefile =================================================================== --- trunk/src/makefile 2006-04-19 14:16:19 UTC (rev 406) +++ trunk/src/makefile 2006-04-19 19:43:14 UTC (rev 407) @@ -285,7 +285,7 @@ .PHONY: run run: @echo "---Run...-------------------------------------" - LD_LIBRARY_PATH=$(LD_LIBRARY_PATH)$(subst $(Pat_space),$(Pat_empty),$(patsubst %,:%,$(LIBRARY_DIRS))); ./motorsport 2>/dev/null + LD_LIBRARY_PATH=$(LD_LIBRARY_PATH)$(subst $(Pat_space),$(Pat_empty),$(patsubst %,:%,$(LIBRARY_DIRS))); ./motorsport 2>stdout.log @echo "----------------------------------------------" .PHONY: tags Modified: trunk/src/tools/xmlTag.cpp =================================================================== --- trunk/src/tools/xmlTag.cpp 2006-04-19 14:16:19 UTC (rev 406) +++ trunk/src/tools/xmlTag.cpp 2006-04-19 19:43:14 UTC (rev 407) @@ -53,6 +53,7 @@ if (n == NULL) { if (logging) log->__format(LOG_ERROR, "Empty tag (%s)!", getFullName().c_str()); + return; } if (n->getNodeType() != DOMNode::ELEMENT_NODE) { Modified: trunk/src/world/area.cpp =================================================================== --- trunk/src/world/area.cpp 2006-04-19 14:16:19 UTC (rev 406) +++ trunk/src/world/area.cpp 2006-04-19 19:43:14 UTC (rev 407) @@ -184,22 +184,24 @@ void Area::setRenderDetail(int renderMode) { - Ogre::SceneDetailLevel mode; + Ogre::PolygonMode mode; switch (renderMode) { case 1: - mode = Ogre::SDL_POINTS; + mode = Ogre::PM_POINTS; break; case 2: - mode = Ogre::SDL_WIREFRAME; + mode = Ogre::PM_WIREFRAME; break; case 3: - mode = Ogre::SDL_SOLID; + mode = Ogre::PM_SOLID; break; } - planeEntity->setRenderDetail(mode); - //UNCOMMENT ME - // if (areaEntity != 0) areaEntity->setRenderDetail(mode); + int size = cameraList.size (); + for (int i = 0; i < size; i++) + { + cameraList[i]->ogreCamera->setPolygonMode(mode); + } } void getMeshInformation (Ogre::MeshPtr mesh, size_t & vertex_count, dVector3 * &vertices, size_t & index_count, unsigned *&indices, const Ogre::Vector3 & position, const Ogre::Quaternion & orient, const Ogre::Vector3 & scale) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <st...@us...> - 2006-04-19 14:16:35
|
Revision: 406 Author: stenyak Date: 2006-04-19 07:16:19 -0700 (Wed, 19 Apr 2006) ViewCVS: http://svn.sourceforge.net/motorsport/?rev=406&view=rev Log Message: ----------- Removed two unnecessary dirs in 3pl/linux. Added a small script that symlinks to libraries in 3pl/linux (initially hardcoded to work only on STenyaK's system). Added Paths: ----------- trunk/3pl/linux/mklinks.sh Removed Paths: ------------- trunk/3pl/linux/share/ trunk/3pl/linux/usr/ Added: trunk/3pl/linux/mklinks.sh =================================================================== --- trunk/3pl/linux/mklinks.sh (rev 0) +++ trunk/3pl/linux/mklinks.sh 2006-04-19 14:16:19 UTC (rev 406) @@ -0,0 +1,17 @@ +#!/bin/bash +origin=/usr + +cd include +d=$origin/include + ln -s /home/stenyak$d/OGRE + ln -s $d/freetype2 + ln -s $d/OGRE + ln -s $d/SDL + ln -s $d/xercesc +cd .. + +cd lib +d=$origin/lib + ln -s /home/stenyak$d/OGRE + ln -s $d/ode +cd .. Property changes on: trunk/3pl/linux/mklinks.sh ___________________________________________________________________ Name: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <st...@us...> - 2006-04-19 10:43:40
|
Revision: 405 Author: stenyak Date: 2006-04-19 03:43:24 -0700 (Wed, 19 Apr 2006) ViewCVS: http://svn.sourceforge.net/motorsport/?rev=405&view=rev Log Message: ----------- Fixed wrong area reference in default world. Modified Paths: -------------- trunk/data/worlds/default.xml Modified: trunk/data/worlds/default.xml =================================================================== --- trunk/data/worlds/default.xml 2006-04-18 18:03:11 UTC (rev 404) +++ trunk/data/worlds/default.xml 2006-04-19 10:43:24 UTC (rev 405) @@ -62,7 +62,7 @@ --> </vehicleList> <area - directory = "land" + directory = "mospland" > </area> </world> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <st...@us...> - 2006-04-18 18:15:20
|
Revision: 404 Author: stenyak Date: 2006-04-18 11:03:11 -0700 (Tue, 18 Apr 2006) ViewCVS: http://svn.sourceforge.net/motorsport/?rev=404&view=rev Log Message: ----------- Added "mospland" (with 3d mesh) as default area. Modified Paths: -------------- trunk/data/worlds/default.xml Added Paths: ----------- trunk/data/areas/mospland/ trunk/data/areas/mospland/1.material trunk/data/areas/mospland/Cube.mesh trunk/data/areas/mospland/Mesh.001.mesh trunk/data/areas/mospland/Mesh.005.mesh trunk/data/areas/mospland/Mesh.006.mesh trunk/data/areas/mospland/Mesh.008.mesh trunk/data/areas/mospland/Mesh.009.mesh trunk/data/areas/mospland/Mesh.010.mesh trunk/data/areas/mospland/Mesh.011.mesh trunk/data/areas/mospland/Mesh.012.mesh trunk/data/areas/mospland/Mesh.013.mesh trunk/data/areas/mospland/Mesh.017.mesh trunk/data/areas/mospland/Mesh.018.mesh trunk/data/areas/mospland/Mesh.019.mesh trunk/data/areas/mospland/Mesh.020.mesh trunk/data/areas/mospland/Mesh.022.mesh trunk/data/areas/mospland/Mesh.mesh trunk/data/areas/mospland/Plane.003.mesh trunk/data/areas/mospland/Plane.004.mesh trunk/data/areas/mospland/Plane.005.mesh trunk/data/areas/mospland/Plane.006.mesh trunk/data/areas/mospland/Plane.007.mesh trunk/data/areas/mospland/Plane.008.mesh trunk/data/areas/mospland/Plane.009.mesh trunk/data/areas/mospland/Plane.010.mesh trunk/data/areas/mospland/Plane.mesh trunk/data/areas/mospland/area.xml trunk/data/areas/mospland/fence1.tga trunk/data/areas/mospland/kerb1.tga trunk/data/areas/mospland/mospSky_BK.jpg trunk/data/areas/mospland/mospSky_DN.jpg trunk/data/areas/mospland/mospSky_FR.jpg trunk/data/areas/mospland/mospSky_LF.jpg trunk/data/areas/mospland/mospSky_RT.jpg trunk/data/areas/mospland/mospSky_UP.jpg trunk/data/areas/mospland/road.tga trunk/data/areas/mospland/road2.tga trunk/data/areas/mospland/road_test.png trunk/data/areas/mospland/sand1.tga trunk/data/areas/mospland/sand2.tga trunk/data/areas/mospland/sign100.tga trunk/data/areas/mospland/sign150.tga trunk/data/areas/mospland/sign200.tga trunk/data/areas/mospland/sign50.tga trunk/data/areas/mospland/skybox.material trunk/data/areas/mospland/skybox.zip trunk/data/areas/mospland/startlights.tga trunk/data/areas/mospland/startsign.tga trunk/data/areas/mospland/startstand.tga trunk/data/areas/mospland/tire01.tga trunk/data/areas/mospland/tire02.tga trunk/data/areas/mospland/wall1.tga Added: trunk/data/areas/mospland/1.material =================================================================== --- trunk/data/areas/mospland/1.material (rev 0) +++ trunk/data/areas/mospland/1.material 2006-04-18 18:03:11 UTC (rev 404) @@ -0,0 +1,184 @@ +material fence +{ + receive_shadows on + technique + { + pass + { + ambient 0.500000 0.500000 0.500000 1.000000 + diffuse 0.640000 0.640000 0.640000 1.000000 + specular 0.500000 0.500000 0.500000 1.000000 12.500000 + emissive 0.000000 0.000000 0.000000 1.000000 + } + } +} +material startsign +{ + receive_shadows on + technique + { + pass + { + ambient 0.500000 0.500000 0.500000 1.000000 + diffuse 0.640000 0.640000 0.640000 1.000000 + specular 0.500000 0.500000 0.500000 1.000000 12.500000 + emissive 0.000000 0.000000 0.000000 1.000000 + texture_unit + { + texture startsign.tga + tex_address_mode wrap + filtering trilinear + } + } + } +} +material wall +{ + receive_shadows on + technique + { + pass + { + ambient 0.500000 0.500000 0.500000 1.000000 + diffuse 0.800000 0.800000 0.800000 1.000000 + specular 0.500000 0.500000 0.500000 1.000000 12.500000 + emissive 0.100000 0.100000 0.100000 1.000000 + texture_unit + { + texture wall1.tga + tex_address_mode wrap + filtering trilinear + } + } + } +} +material sign +{ + receive_shadows on + technique + { + pass + { + ambient 0.500000 0.500000 0.500000 1.000000 + diffuse 0.640000 0.640000 0.640000 1.000000 + specular 0.500000 0.500000 0.500000 1.000000 12.500000 + emissive 0.000000 0.000000 0.000000 1.000000 + } + } +} +material startlights +{ + receive_shadows on + technique + { + pass + { + ambient 0.500000 0.500000 0.500000 1.000000 + diffuse 0.640000 0.640000 0.640000 1.000000 + specular 0.500000 0.500000 0.500000 1.000000 12.500000 + emissive 0.000000 0.000000 0.000000 1.000000 + texture_unit + { + texture startlights.tga + tex_address_mode wrap + filtering trilinear + } + } + } +} +material sand +{ + receive_shadows on + technique + { + pass + { + ambient 0.500000 0.500000 0.500000 1.000000 + diffuse 0.800000 0.800000 0.800000 1.000000 + specular 0.500000 0.500000 0.500000 1.000000 12.500000 + emissive 0.000000 0.000000 0.000000 1.000000 + texture_unit + { + texture sand1.tga + tex_address_mode wrap + filtering trilinear + } + } + } +} +material wall/TWOSIDE +{ + receive_shadows on + technique + { + pass + { + ambient 0.500000 0.500000 0.500000 1.000000 + diffuse 0.800000 0.800000 0.800000 1.000000 + specular 0.500000 0.500000 0.500000 1.000000 12.500000 + emissive 0.100000 0.100000 0.100000 1.000000 + cull_hardware none + cull_software none + texture_unit + { + texture wall1.tga + tex_address_mode wrap + filtering trilinear + } + } + } +} +material road.001 +{ + receive_shadows on + technique + { + pass + { + ambient 0.500000 0.500000 0.500000 1.000000 + diffuse 0.800000 0.800000 0.800000 1.000000 + specular 0.300000 0.300000 0.300000 1.000000 10.000000 + emissive 0.000000 0.000000 0.000000 1.000000 + texture_unit + { + texture road.tga + tex_address_mode wrap + filtering trilinear + } + } + } +} +material kerb +{ + receive_shadows on + technique + { + pass + { + ambient 0.500000 0.500000 0.500000 1.000000 + diffuse 0.800000 0.800000 0.800000 1.000000 + specular 0.500000 0.500000 0.500000 1.000000 12.500000 + emissive 0.000000 0.000000 0.000000 1.000000 + texture_unit + { + texture kerb1.tga + tex_address_mode wrap + filtering trilinear + } + } + } +} +material startstand +{ + receive_shadows on + technique + { + pass + { + ambient 0.500000 0.500000 0.500000 1.000000 + diffuse 0.640000 0.640000 0.640000 1.000000 + specular 0.500000 0.500000 0.500000 1.000000 12.500000 + emissive 0.000000 0.000000 0.000000 1.000000 + } + } +} Added: trunk/data/areas/mospland/Cube.mesh =================================================================== (Binary files differ) Property changes on: trunk/data/areas/mospland/Cube.mesh ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/data/areas/mospland/Mesh.001.mesh =================================================================== (Binary files differ) Property changes on: trunk/data/areas/mospland/Mesh.001.mesh ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/data/areas/mospland/Mesh.005.mesh =================================================================== (Binary files differ) Property changes on: trunk/data/areas/mospland/Mesh.005.mesh ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/data/areas/mospland/Mesh.006.mesh =================================================================== (Binary files differ) Property changes on: trunk/data/areas/mospland/Mesh.006.mesh ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/data/areas/mospland/Mesh.008.mesh =================================================================== (Binary files differ) Property changes on: trunk/data/areas/mospland/Mesh.008.mesh ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/data/areas/mospland/Mesh.009.mesh =================================================================== (Binary files differ) Property changes on: trunk/data/areas/mospland/Mesh.009.mesh ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/data/areas/mospland/Mesh.010.mesh =================================================================== (Binary files differ) Property changes on: trunk/data/areas/mospland/Mesh.010.mesh ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/data/areas/mospland/Mesh.011.mesh =================================================================== (Binary files differ) Property changes on: trunk/data/areas/mospland/Mesh.011.mesh ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/data/areas/mospland/Mesh.012.mesh =================================================================== (Binary files differ) Property changes on: trunk/data/areas/mospland/Mesh.012.mesh ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/data/areas/mospland/Mesh.013.mesh =================================================================== (Binary files differ) Property changes on: trunk/data/areas/mospland/Mesh.013.mesh ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/data/areas/mospland/Mesh.017.mesh =================================================================== (Binary files differ) Property changes on: trunk/data/areas/mospland/Mesh.017.mesh ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/data/areas/mospland/Mesh.018.mesh =================================================================== (Binary files differ) Property changes on: trunk/data/areas/mospland/Mesh.018.mesh ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/data/areas/mospland/Mesh.019.mesh =================================================================== (Binary files differ) Property changes on: trunk/data/areas/mospland/Mesh.019.mesh ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/data/areas/mospland/Mesh.020.mesh =================================================================== (Binary files differ) Property changes on: trunk/data/areas/mospland/Mesh.020.mesh ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/data/areas/mospland/Mesh.022.mesh =================================================================== (Binary files differ) Property changes on: trunk/data/areas/mospland/Mesh.022.mesh ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/data/areas/mospland/Mesh.mesh =================================================================== (Binary files differ) Property changes on: trunk/data/areas/mospland/Mesh.mesh ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/data/areas/mospland/Plane.003.mesh =================================================================== (Binary files differ) Property changes on: trunk/data/areas/mospland/Plane.003.mesh ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/data/areas/mospland/Plane.004.mesh =================================================================== (Binary files differ) Property changes on: trunk/data/areas/mospland/Plane.004.mesh ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/data/areas/mospland/Plane.005.mesh =================================================================== (Binary files differ) Property changes on: trunk/data/areas/mospland/Plane.005.mesh ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/data/areas/mospland/Plane.006.mesh =================================================================== (Binary files differ) Property changes on: trunk/data/areas/mospland/Plane.006.mesh ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/data/areas/mospland/Plane.007.mesh =================================================================== (Binary files differ) Property changes on: trunk/data/areas/mospland/Plane.007.mesh ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/data/areas/mospland/Plane.008.mesh =================================================================== (Binary files differ) Property changes on: trunk/data/areas/mospland/Plane.008.mesh ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/data/areas/mospland/Plane.009.mesh =================================================================== (Binary files differ) Property changes on: trunk/data/areas/mospland/Plane.009.mesh ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/data/areas/mospland/Plane.010.mesh =================================================================== (Binary files differ) Property changes on: trunk/data/areas/mospland/Plane.010.mesh ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/data/areas/mospland/Plane.mesh =================================================================== (Binary files differ) Property changes on: trunk/data/areas/mospland/Plane.mesh ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/data/areas/mospland/area.xml =================================================================== --- trunk/data/areas/mospland/area.xml (rev 0) +++ trunk/data/areas/mospland/area.xml 2006-04-18 18:03:11 UTC (rev 404) @@ -0,0 +1,343 @@ +<?xml version="1.0"?> +<area + name="MospLand" + position="-3.000000 0.000000 0.000000" + rotation="1.000000 0.000000 0.000000 0.000000" + scale="1.000000 1.000000 1.000000" + description="A small racetrack located in the desert" + author="habalux" + contact="habalux AT gmail DOT com" + license="Creative Commons Attribution-NonCommercial-ShareAlike License" + checkpointPosition="-166 -152 5" + checkpointRadius="10.0" + > + <vehicleLocation + name="paceCar" + position="-155.224152 -156.375732 1.418862" + rotation="0.004433 0.000000 0.000000 0.999990" + scale="1.000000 1.000000 1.000000" + /> + <ground + name="ground" + position="3.000000 0.000000 0.000000" + rotation="1.000000 0.000000 0.000000 0.000000" + scale="1.000000 1.000000 1.000000" + height="-10.0" + > + <mesh + name="Curve.031" + position="0.000000 0.000000 0.000000" + rotation="1.000000 0.000000 0.000000 0.000000" + scale="1.000000 1.000000 1.000000" + file="Mesh.022.mesh" + /> + <mesh + name="Curve.019" + position="0.000000 0.000000 0.000000" + rotation="1.000000 0.000000 0.000000 0.000000" + scale="1.000000 1.000000 1.000000" + file="Mesh.018.mesh" + /> + <mesh + name="Curve.018" + position="0.000000 0.000000 0.000000" + rotation="1.000000 0.000000 0.000000 0.000000" + scale="1.000000 1.000000 1.000000" + file="Mesh.017.mesh" + /> + <mesh + name="Curve.017" + position="0.000000 0.000000 0.000000" + rotation="1.000000 0.000000 0.000000 0.000000" + scale="1.000000 1.000000 1.000000" + file="Mesh.001.mesh" + /> + <mesh + name="Curve.010" + position="0.000000 0.000000 0.000000" + rotation="1.000000 0.000000 0.000000 0.000000" + scale="1.000000 1.000000 1.000000" + file="Mesh.013.mesh" + /> + <mesh + name="Plane.009" + position="-166.752228 -152.577881 7.507215" + rotation="1.000000 0.000000 0.000000 0.000000" + scale="1.000000 1.000000 1.000000" + file="Plane.mesh" + /> + <mesh + name="Plane.005" + position="-120.799988 -161.745514 1.232995" + rotation="1.000000 0.000000 0.000000 0.000000" + scale="1.000000 1.000000 1.000000" + file="Plane.006.mesh" + /> + <mesh + name="Plane.004" + position="-170.799988 -161.745514 1.232995" + rotation="1.000000 0.000000 0.000000 0.000000" + scale="1.000000 1.000000 1.000000" + file="Plane.005.mesh" + /> + <mesh + name="Plane.007" + position="62.988724 108.753685 0.952717" + rotation="0.992546 0.000000 0.000000 -0.121869" + scale="1.000000 1.000000 1.000000" + file="Plane.008.mesh" + /> + <mesh + name="Plane.006" + position="111.503525 96.657593 0.952717" + rotation="0.992546 0.000000 0.000000 -0.121869" + scale="1.000000 1.000000 1.000000" + file="Plane.007.mesh" + /> + <mesh + name="Plane.003" + position="-167.400330 -156.977875 3.029389" + rotation="1.000000 0.000000 0.000000 0.000000" + scale="1.000000 1.000000 1.000000" + file="Plane.004.mesh" + /> + <mesh + name="Cube" + position="0.000000 0.000000 0.000000" + rotation="1.000000 0.000000 0.000000 0.000000" + scale="1.000000 1.000000 1.000000" + file="Cube.mesh" + /> + <mesh + name="Plane.002" + position="0.000000 0.000000 0.000000" + rotation="1.000000 0.000000 0.000000 0.000000" + scale="1.000000 1.000000 1.000000" + file="Plane.003.mesh" + /> + <mesh + name="Curve.020" + position="0.000000 0.000000 0.000000" + rotation="1.000000 0.000000 0.000000 0.000000" + scale="1.000000 1.000000 1.000000" + file="Mesh.020.mesh" + /> + <mesh + name="Curve.008" + position="0.000000 0.000000 0.000000" + rotation="1.000000 0.000000 0.000000 0.000000" + scale="1.000000 1.000000 1.000000" + file="Mesh.011.mesh" + /> + <mesh + name="Curve.009" + position="0.000000 0.000000 0.000000" + rotation="1.000000 0.000000 0.000000 0.000000" + scale="1.000000 1.000000 1.000000" + file="Mesh.012.mesh" + /> + <mesh + name="Curve.006" + position="0.000000 0.000000 0.000000" + rotation="1.000000 0.000000 0.000000 0.000000" + scale="1.000000 1.000000 1.000000" + file="Mesh.009.mesh" + /> + <mesh + name="Curve.007" + position="0.000000 0.000000 0.000000" + rotation="1.000000 0.000000 0.000000 0.000000" + scale="1.000000 1.000000 1.000000" + file="Mesh.010.mesh" + /> + <mesh + name="Curve.004" + position="0.000000 0.000000 0.000000" + rotation="1.000000 0.000000 0.000000 0.000000" + scale="1.000000 1.000000 1.000000" + file="Mesh.019.mesh" + /> + <mesh + name="Curve.005" + position="0.000000 0.000000 0.000000" + rotation="1.000000 0.000000 0.000000 0.000000" + scale="1.000000 1.000000 1.000000" + file="Mesh.008.mesh" + /> + <mesh + name="Curve" + position="0.000000 0.000000 0.000000" + rotation="1.000000 0.000000 0.000000 0.000000" + scale="1.000000 1.000000 1.000000" + file="Mesh.mesh" + /> + <mesh + name="Curve.003" + position="0.000000 0.000000 0.000000" + rotation="1.000000 0.000000 0.000000 0.000000" + scale="1.000000 1.000000 1.000000" + file="Mesh.006.mesh" + /> + <mesh + name="Curve.001" + position="0.000000 0.000000 0.000000" + rotation="1.000000 0.000000 0.000000 0.000000" + scale="1.000000 1.000000 1.000000" + file="Mesh.005.mesh" + /> + <mesh + name="Plane.010" + position="-166.740417 -152.577881 6.098033" + rotation="1.000000 0.000000 0.000000 0.000000" + scale="1.000000 1.000000 1.000000" + file="Plane.010.mesh" + /> + <mesh + name="Plane.008" + position="14.473938 120.849777 0.952717" + rotation="0.992546 0.000000 0.000000 -0.121869" + scale="1.000000 1.000000 1.000000" + file="Plane.009.mesh" + /> + </ground> + <camera + name="camera.002" + position="-231.028122 -46.287857 12.560727" + rotation="0.500000 0.500000 0.500000 0.500000" + scale="1.000000 1.000000 1.000000" + target="0 0 0" + projectionType="perspective" + fov="37.849289" + normal="0.0 0.0 -1.0" + clipping="0.100000 100.000000" + /> + <sky + name="sky" + position="3.000000 -1.000000 0.000000" + rotation="1.000000 0.000000 0.000000 0.000000" + scale="1.000000 1.000000 1.000000" + height="-2.0" + materialName="skyboxMaterial" + distance="5000.0" + drawFirst="1" + /> + <camera + name="camera.001" + position="-253.687897 -136.221863 9.050756" + rotation="0.500000 0.500000 0.500000 0.500000" + scale="1.000000 1.000000 1.000000" + target="0 0 0" + projectionType="perspective" + fov="37.849289" + normal="0.0 0.0 -1.0" + clipping="0.100000 100.000000" + /> + <camera + name="camera.003" + position="-215.425842 64.894089 4.529526" + rotation="0.500000 0.500000 0.500000 0.500000" + scale="1.000000 1.000000 1.000000" + target="0 0 0" + projectionType="perspective" + fov="37.849289" + normal="0.0 0.0 -1.0" + clipping="0.100000 100.000000" + /> + <camera + name="camera" + position="-176.195297 -168.292038 2.956962" + rotation="0.500000 0.500000 0.500000 0.500000" + scale="1.000000 1.000000 1.000000" + target="0 0 0" + projectionType="perspective" + fov="37.849289" + normal="0.0 0.0 -1.0" + clipping="0.100000 100.000000" + /> + <camera + name="camera.005" + position="63.658386 18.463703 2.521725" + rotation="0.500000 0.500000 0.500000 0.500000" + scale="1.000000 1.000000 1.000000" + target="0 0 0" + projectionType="perspective" + fov="37.849289" + normal="0.0 0.0 -1.0" + clipping="0.100000 100.000000" + /> + <camera + name="camera.004" + position="-89.436378 72.925278 5.533426" + rotation="0.500000 0.500000 0.500000 0.500000" + scale="1.000000 1.000000 1.000000" + target="0 0 0" + projectionType="perspective" + fov="37.849289" + normal="0.0 0.0 -1.0" + clipping="0.100000 100.000000" + /> + <camera + name="camera.007" + position="237.333115 -79.165588 17.831203" + rotation="0.500000 0.500000 0.500000 0.500000" + scale="1.000000 1.000000 1.000000" + target="0 0 0" + projectionType="perspective" + fov="37.849289" + normal="0.0 0.0 -1.0" + clipping="0.100000 100.000000" + /> + <camera + name="camera.006" + position="149.742828 -32.986179 2.521725" + rotation="0.500000 0.500000 0.500000 0.500000" + scale="1.000000 1.000000 1.000000" + target="0 0 0" + projectionType="perspective" + fov="37.849289" + normal="0.0 0.0 -1.0" + clipping="0.100000 100.000000" + /> + <camera + name="camera.008" + position="63.136379 -90.007713 17.831203" + rotation="0.500000 0.500000 0.500000 0.500000" + scale="1.000000 1.000000 1.000000" + target="0 0 0" + projectionType="perspective" + fov="37.849289" + normal="0.0 0.0 -1.0" + clipping="0.100000 100.000000" + /> + <parts + name="parts" + position="3.000000 -2.000000 0.000000" + rotation="1.000000 0.000000 0.000000 0.000000" + scale="1.000000 1.000000 1.000000" + > + <cone + name="cone" + position="-188.891907 -165.603455 2.415832" + rotation="0.992010 0.000000 0.000000 0.126161" + scale="2.000000 2.000000 2.000000" + /> + <cube + name="cube" + position="-250.964355 -152.853439 2.415832" + rotation="0.890023 0.000000 0.000000 0.455917" + scale="2.000000 2.000000 2.000000" + /> + <cube + name="cube.001" + position="-259.688049 -141.892899 2.415832" + rotation="0.999271 0.000000 0.000000 -0.038182" + scale="2.000000 2.000000 2.000000" + /> + <cube + name="cube.002" + position="-257.003845 -148.044220 2.415832" + rotation="0.933286 0.000000 0.000000 0.359133" + scale="2.000000 2.000000 2.000000" + /> + </parts> + </area> Added: trunk/data/areas/mospland/fence1.tga =================================================================== (Binary files differ) Property changes on: trunk/data/areas/mospland/fence1.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/data/areas/mospland/kerb1.tga =================================================================== (Binary files differ) Property changes on: trunk/data/areas/mospland/kerb1.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/data/areas/mospland/mospSky_BK.jpg =================================================================== (Binary files differ) Property changes on: trunk/data/areas/mospland/mospSky_BK.jpg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/data/areas/mospland/mospSky_DN.jpg =================================================================== (Binary files differ) Property changes on: trunk/data/areas/mospland/mospSky_DN.jpg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/data/areas/mospland/mospSky_FR.jpg =================================================================== (Binary files differ) Property changes on: trunk/data/areas/mospland/mospSky_FR.jpg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/data/areas/mospland/mospSky_LF.jpg =================================================================== (Binary files differ) Property changes on: trunk/data/areas/mospland/mospSky_LF.jpg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/data/areas/mospland/mospSky_RT.jpg =================================================================== (Binary files differ) Property changes on: trunk/data/areas/mospland/mospSky_RT.jpg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/data/areas/mospland/mospSky_UP.jpg =================================================================== (Binary files differ) Property changes on: trunk/data/areas/mospland/mospSky_UP.jpg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/data/areas/mospland/road.tga =================================================================== (Binary files differ) Property changes on: trunk/data/areas/mospland/road.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/data/areas/mospland/road2.tga =================================================================== (Binary files differ) Property changes on: trunk/data/areas/mospland/road2.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/data/areas/mospland/road_test.png =================================================================== (Binary files differ) Property changes on: trunk/data/areas/mospland/road_test.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/data/areas/mospland/sand1.tga =================================================================== (Binary files differ) Property changes on: trunk/data/areas/mospland/sand1.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/data/areas/mospland/sand2.tga =================================================================== (Binary files differ) Property changes on: trunk/data/areas/mospland/sand2.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/data/areas/mospland/sign100.tga =================================================================== (Binary files differ) Property changes on: trunk/data/areas/mospland/sign100.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/data/areas/mospland/sign150.tga =================================================================== (Binary files differ) Property changes on: trunk/data/areas/mospland/sign150.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/data/areas/mospland/sign200.tga =================================================================== (Binary files differ) Property changes on: trunk/data/areas/mospland/sign200.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/data/areas/mospland/sign50.tga =================================================================== (Binary files differ) Property changes on: trunk/data/areas/mospland/sign50.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/data/areas/mospland/skybox.material =================================================================== --- trunk/data/areas/mospland/skybox.material (rev 0) +++ trunk/data/areas/mospland/skybox.material 2006-04-18 18:03:11 UTC (rev 404) @@ -0,0 +1,16 @@ +material skyboxMaterial +{ + technique + { + pass + { + lighting off + depth_write off + texture_unit + { + cubic_texture mospSky.jpg separateUV + tex_address_mode clamp + } + } + } +} Added: trunk/data/areas/mospland/skybox.zip =================================================================== (Binary files differ) Property changes on: trunk/data/areas/mospland/skybox.zip ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/data/areas/mospland/startlights.tga =================================================================== (Binary files differ) Property changes on: trunk/data/areas/mospland/startlights.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/data/areas/mospland/startsign.tga =================================================================== (Binary files differ) Property changes on: trunk/data/areas/mospland/startsign.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/data/areas/mospland/startstand.tga =================================================================== (Binary files differ) Property changes on: trunk/data/areas/mospland/startstand.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/data/areas/mospland/tire01.tga =================================================================== (Binary files differ) Property changes on: trunk/data/areas/mospland/tire01.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/data/areas/mospland/tire02.tga =================================================================== (Binary files differ) Property changes on: trunk/data/areas/mospland/tire02.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/data/areas/mospland/wall1.tga =================================================================== (Binary files differ) Property changes on: trunk/data/areas/mospland/wall1.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: trunk/data/worlds/default.xml =================================================================== --- trunk/data/worlds/default.xml 2006-04-10 20:28:17 UTC (rev 403) +++ trunk/data/worlds/default.xml 2006-04-18 18:03:11 UTC (rev 404) @@ -62,7 +62,7 @@ --> </vehicleList> <area - directory = "testingGround" + directory = "land" > </area> </world> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <st...@us...> - 2006-04-10 20:29:11
|
Revision: 403 Author: stenyak Date: 2006-04-10 13:28:17 -0700 (Mon, 10 Apr 2006) ViewCVS: http://svn.sourceforge.net/motorsport/?rev=403&view=rev Log Message: ----------- Added support for multimesh areas. Simplified area.xml format. Fixed bug in physics engine: car parts no longer collides with invisible checkpoint sphere. Modified physics engine: big fps gain in multimesh areas thanks to not checking for collisions between them (duh). Area graphics models are now handled automatically using OgreObjects. Added area exporter to the tools. Usage is very similar to the vehicle exporter. Modified testingGround area to reflect the new are.xml format. Modified Paths: -------------- trunk/data/areas/testingGround/area.xml trunk/src/common/ogreObject.cpp trunk/src/common/ogreObject.hpp trunk/src/physicsEngine.cpp trunk/src/todo trunk/src/world/area.cpp trunk/src/world/area.hpp Added Paths: ----------- trunk/tools/blend2mosparea/ trunk/tools/blend2mosparea/blend2mosparea.py trunk/tools/blend2mosparea/blend2mosparea.xsl trunk/tools/blend2mosparea/readme.txt Modified: trunk/data/areas/testingGround/area.xml =================================================================== --- trunk/data/areas/testingGround/area.xml 2006-04-10 04:21:32 UTC (rev 402) +++ trunk/data/areas/testingGround/area.xml 2006-04-10 20:28:17 UTC (rev 403) @@ -9,9 +9,8 @@ checkpointRadius = "5" > <ground + name="ground" height = "0.0" - materialName = "groundMaterial" - mesh = "none" > </ground> <sky @@ -42,88 +41,82 @@ > </cube> </parts> - <vehiclePositionList + <vehicleLocation + name = "paceCar" + position = "0 0 2" + rotation = "10 5 15" > - <vehicle - name = "paceCar" - position = "0 0 2" - rotation = "10 5 15" - > - </vehicle> - <vehicle - name = "grid01" - position = "15 15 2" - rotation = "0 0 0" - > - </vehicle> - <vehicle - name = "grid02" - position = "10 10 2" - rotation = "0 0 0" - > - </vehicle> - <vehicle - name = "grid03" - position = "5 15 2" - rotation = "0 0 0" - > - </vehicle> - <vehicle - name = "grid04" - position = "0 10 2" - rotation = "0 0 0" - > - </vehicle> - <vehicle - name = "grid05" - position = "-5 15 2" - rotation = "0 0 0" - > - </vehicle> - <vehicle - name = "grid06" - position = "-10 10 2" - rotation = "0 0 0" - > - </vehicle> - <vehicle - name = "parking01" - position = "-20 -10 2" - rotation = "0 0 90" - > - </vehicle> - </vehiclePositionList> - <cameraList + </vehicleLocation> + <vehicleLocation + name = "grid01" + position = "15 15 2" + rotation = "0 0 0" > - <camera - name = "driver" - position = "6 0 1.7" - target = "0.1 0.5 0.4" - > - </camera> - <camera - name = "wheel" - position = "20 -15 0.2" - target = "1.44 -0.86 -0.4" - > - </camera> - <camera - name = "bodyCenter" - position = "-10 -5 2" - target = "0 0 0" - > - </camera> - <camera - name = "helicopter" - position = "0 0 70" - target = "0 0 0" - > - </camera> - <camera - name = "frontGrill" - position = "20 0 0.1" - target = "2.23 0 -0.1" - > - </camera> - </cameraList> + </vehicleLocation> + <vehicleLocation + name = "grid02" + position = "10 10 2" + rotation = "0 0 0" + > + </vehicleLocation> + <vehicleLocation + name = "grid03" + position = "5 15 2" + rotation = "0 0 0" + > + </vehicleLocation> + <vehicleLocation + name = "grid04" + position = "0 10 2" + rotation = "0 0 0" + > + </vehicleLocation> + <vehicleLocation + name = "grid05" + position = "-5 15 2" + rotation = "0 0 0" + > + </vehicleLocation> + <vehicleLocation + name = "grid06" + position = "-10 10 2" + rotation = "0 0 0" + > + </vehicleLocation> + <vehicleLocation + name = "parking01" + position = "-20 -10 2" + rotation = "0 0 90" + > + </vehicleLocation> + <camera + name = "driver" + position = "6 0 1.7" + target = "0.1 0.5 0.4" + > + </camera> + <camera + name = "wheel" + position = "20 -15 0.2" + target = "1.44 -0.86 -0.4" + > + </camera> + <camera + name = "bodyCenter" + position = "-10 -5 2" + target = "0 0 0" + > + </camera> + <camera + name = "helicopter" + position = "0 0 70" + target = "0 0 0" + > + </camera> + <camera + name = "frontGrill" + position = "20 0 0.1" + target = "2.23 0 -0.1" + > + </camera> </area> Modified: trunk/src/common/ogreObject.cpp =================================================================== --- trunk/src/common/ogreObject.cpp 2006-04-10 04:21:32 UTC (rev 402) +++ trunk/src/common/ogreObject.cpp 2006-04-10 20:28:17 UTC (rev 403) @@ -89,6 +89,10 @@ } +Ogre::Entity * OgreObject::getEntity() +{ + return entity; +} Ogre::SceneNode * OgreObject::getNode() { return node; Modified: trunk/src/common/ogreObject.hpp =================================================================== --- trunk/src/common/ogreObject.hpp 2006-04-10 04:21:32 UTC (rev 402) +++ trunk/src/common/ogreObject.hpp 2006-04-10 20:28:17 UTC (rev 403) @@ -48,6 +48,7 @@ void setOgreReference(OgreObject * ogreObject, Quaternion rotationDiff, Vector3d positionDiff); void stepGraphics(); Ogre::SceneNode * getNode(); + Ogre::Entity * getEntity(); }; class OgreObjectData { Modified: trunk/src/physicsEngine.cpp =================================================================== --- trunk/src/physicsEngine.cpp 2006-04-10 04:21:32 UTC (rev 402) +++ trunk/src/physicsEngine.cpp 2006-04-10 20:28:17 UTC (rev 403) @@ -80,6 +80,10 @@ // TODO: allow jointed bodies to collide by default (truck and trailer), and use attached data to identify bodies that should not collide (wheels and vehicle body). At least until creation of geoms via boolean operations is possible. dBodyID b1 = dGeomGetBody (o1); dBodyID b2 = dGeomGetBody (o2); + if (b1 == 0 && b2 == 0) + { + return; + } if (b1 && b2 && dAreConnected (b1, b2)) { return; @@ -106,6 +110,7 @@ // Collision with the checkpoint object. This assumes all spheres are a checkpoint, so FIXME. if (dGeomGetClass (o1) == dSphereClass || dGeomGetClass (o2) == dSphereClass) { + return; } contact[i].surface.mu = 0.6; contact[i].surface.slip1 = 0.0; Modified: trunk/src/todo =================================================================== --- trunk/src/todo 2006-04-10 04:21:32 UTC (rev 402) +++ trunk/src/todo 2006-04-10 20:28:17 UTC (rev 403) @@ -1,3 +1,4 @@ +add support for suspension arm meshes in the car exporter add support for multiple meshes per world object set proper coords system in the world finish suspension rotations thing Modified: trunk/src/world/area.cpp =================================================================== --- trunk/src/world/area.cpp 2006-04-10 04:21:32 UTC (rev 402) +++ trunk/src/world/area.cpp 2006-04-10 20:28:17 UTC (rev 403) @@ -80,8 +80,37 @@ if (t->getName() == "ground") { groundHeight = stod (t->getAttribute("height")); - groundMaterialName = t->getAttribute("materialName"); - mesh = t->getAttribute("mesh"); + OgreObjectData ogreData; + ogreData.meshPath = ""; + //create main mesh + ogreData.meshPath = getPath() + ogreData.meshPath; + OgreObject * ogreObject = new OgreObject(this, ogreData, getId(), false); + ogreObjects[ogreObject->getId()] = ogreObject; + //create child meshes + XmlTag * u = t->getTag(0); for (int i = 0; i < t->nTags(); u = t->getTag(++i)) + { + if (u->getName() == "mesh") + { + log->__format (LOG_CCREATOR, "Creating an ogre mesh for the ground"); + OgreObjectData childData; + childData.meshPath = getPath() + u->getAttribute("file"); + Vector3d posDiff (u->getAttribute("position")); + Quaternion rotDiff (u->getAttribute("rotation")); + OgreObject * ogreChild = new OgreObject(this, childData, getId()); + ogreObjects[ogreChild->getId()] = ogreChild; + ogreChild->setOgreReference(ogreObjects[ogreObject->getId()], rotDiff, posDiff); + // declare ode mesh + dTriMeshDataID ground = dGeomTriMeshDataCreate (); + dGeomSetBody (dCreateTriMesh (World::getWorldPointer ()->spaceID, ground, 0, 0, 0), 0); + + size_t vertex_count, index_count; + dVector3 * vertices; + unsigned int *indices; + getMeshInformation (ogreChild->getEntity()->getMesh (), vertex_count, vertices, index_count, indices, ogreChild->getNode()->getPosition(), ogreChild->getNode()->getOrientation(), ogreChild->getNode()->getScale()); + log->__format (LOG_CCREATOR, "Building the ode mesh for the ground"); + dGeomTriMeshDataBuildDouble (ground, vertices, sizeof (dVector3), vertex_count, indices, index_count, 3 * sizeof (unsigned int)); + } + } } if (t->getName() == "sky") { @@ -104,27 +133,15 @@ tmp->stepGraphics(); } } - if (t->getName() == "vehiclePositionList") + if (t->getName() == "vehicleLocation") { - XmlTag * u = t->getTag(0); for (int j = 0; j < t->nTags(); u = t->getTag(++j)) - { - if (u->getName() == "vehicle") - { - Location * tmp = new Location (u); - vehiclePositionMap[tmp->getName()] = tmp; - } - } + Location * tmp = new Location (t); + vehiclePositionMap[tmp->getName()] = tmp; } - if (t->getName() == "cameraList") + if (t->getName() == "camera") { - XmlTag * u = t->getTag(0); for (int j = 0; j < t->nTags(); u = t->getTag(++j)) - { - if (u->getName() == "camera") - { - Camera * tmp = new Camera (this, u); - cameraList.push_back(tmp); - } - } + Camera * tmp = new Camera (this, t); + cameraList.push_back(tmp); } } } @@ -152,32 +169,6 @@ rotationToZAxis.FromRotationMatrix (Ogre::Matrix3 (1, 0, 0, 0, 0, -1, 0, 1, 0)); SystemData::getSystemDataPointer()->ogreSceneManager->setSkyBox (true, skyMaterialName.c_str(), skyDistance, skyDrawFirst, rotationToZAxis); - log->loadscreen (LOG_CCREATOR, "Creating the area ground"); - // declare ode mesh - dTriMeshDataID ground = dGeomTriMeshDataCreate (); - dGeomSetBody (dCreateTriMesh (World::getWorldPointer ()->spaceID, ground, 0, 0, 0), 0); - - if (mesh != "none") - { - log->loadscreen (LOG_CCREATOR, "Creating loading the ogre area mesh"); - areaEntity = SystemData::getSystemDataPointer ()->ogreSceneManager->createEntity ("ground", getPath() + mesh); - Ogre::SceneNode * areaNode = static_cast < Ogre::SceneNode * >(SystemData::getSystemDataPointer ()->ogreSceneManager->getRootSceneNode ()->createChild ()); - areaNode->attachObject (areaEntity); - areaNode->setScale (1, 1, 1); - areaNode->setPosition (0, 0, 0); - Quaternion quat (0, 0, 0); - areaNode->setOrientation (quat.w, quat.x, quat.y, quat.z); - size_t vertex_count, index_count; - dVector3 * vertices; - unsigned int *indices; - getMeshInformation (areaEntity->getMesh (), vertex_count, vertices, index_count, indices, areaNode->getPosition(), areaNode->getOrientation(), areaNode->getScale()); - log->loadscreen (LOG_CCREATOR, "Building the ode area mesh"); - dGeomTriMeshDataBuildDouble (ground, vertices, sizeof (dVector3), vertex_count, indices, index_count, 3 * sizeof (unsigned int)); - // dGeomTriMeshDataDestroy (ground); - } else { - areaEntity = 0; - } - // create the checkpoint sphere dGeomID checkpointID = dCreateSphere (World::getWorldPointer()->spaceID, checkpointRadius); dGeomSetBody (checkpointID, 0); @@ -187,7 +178,8 @@ void Area::setCastShadows(bool castShadows) { planeEntity->setCastShadows(castShadows); - if (areaEntity != 0) areaEntity->setCastShadows(castShadows); + //UNCOMMENT ME + //if (areaEntity != 0) areaEntity->setCastShadows(castShadows); } void Area::setRenderDetail(int renderMode) @@ -206,7 +198,8 @@ break; } planeEntity->setRenderDetail(mode); - if (areaEntity != 0) areaEntity->setRenderDetail(mode); + //UNCOMMENT ME + // if (areaEntity != 0) areaEntity->setRenderDetail(mode); } void getMeshInformation (Ogre::MeshPtr mesh, size_t & vertex_count, dVector3 * &vertices, size_t & index_count, unsigned *&indices, const Ogre::Vector3 & position, const Ogre::Quaternion & orient, const Ogre::Vector3 & scale) Modified: trunk/src/world/area.hpp =================================================================== --- trunk/src/world/area.hpp 2006-04-10 04:21:32 UTC (rev 402) +++ trunk/src/world/area.hpp 2006-04-10 20:28:17 UTC (rev 403) @@ -40,13 +40,10 @@ std::vector < Part * > partList; std::vector < Camera * > cameraList; - dGeomID bodyGeomID; dBodyID areaBodyID; Ogre::SceneNode * planeNode; Ogre::Entity * planeEntity; - Ogre::Entity * areaEntity; - Ogre::SceneNode * areaNode; void setCastShadows(bool castShadows); void setRenderDetail(int renderMode); }; Added: trunk/tools/blend2mosparea/blend2mosparea.py =================================================================== --- trunk/tools/blend2mosparea/blend2mosparea.py (rev 0) +++ trunk/tools/blend2mosparea/blend2mosparea.py 2006-04-10 20:28:17 UTC (rev 403) @@ -0,0 +1,108 @@ +#!BPY + +""" +Name: 'Blend2MospArea exporter' +Blender: 237 +Group: 'Export' +Tooltip: 'Exports the current scene to a Motorsport area' +""" + +__author__ = ['Bruno Gonzalez (STenyaK)'] +__version__ = '1.0.0' +__url__ = ['Motorsport website, http://www.motorsport-sim.org', + 'Motorsport forum, http://forum.rscnet.org/forumdisplay.php?f=577'] +__bpydoc__ = """\ +Exports the current scene to a Motorsport area. +""" + +import os +import ogreexport +import ogredotscene + +class Blend2MospAreaApplication: + """Motorsport Exporter + """ + def __init__(self): + print "Motorsport Exporter initiated." + self.setOgreXmlConverterApp ('OgreXMLConverter') + self.setExportPath(ogreexport.os.path.dirname(ogreexport.Blender.Get('filename'))+"/export") + self.scene = ogreexport.Blender.Scene.GetCurrent().getName() + + def setXSLT (self, path): + self.xslt = path + + def setIndenter (self, path): + self.indenter = path + + def setExportPath(self, path): + self.path = path + return + + def setOgreXmlConverterApp(self, path): + self.ogreXmlConverterApp = path + return + + def exportAll(self): + print "Exporting Motorsport area..." + try: + os.mkdir(self.path) + except: + print "Error while trying to create dir" + self.exportMeshes() + self.exportScene() + self.exportTextures() + self.transformScene() + return + + def cleanAll(self): + try: + os.remove(self.path+"/*mesh.xml") + except: + print "Error while trying to remove mesh.xml files" + try: + os.remove("OgreXMLConverter.log") + except: + print "Error while trying to remove OgreXMLConverter log file" + try: + os.remove(self.path+"/"+self.scene+".xml") + except: + print "Error while trying to remove "+self.scene+".xml files" + return + + def exportMeshes(self): + ogreexport.OGRE_XML_CONVERTER = self.ogreXmlConverterApp + ogreexport.refreshGUI() + ogreexport.pathString = ogreexport.Draw.Create ( self.path ) + ogreexport.export(ogreexport.selectedObjectsList) + return + + def exportScene(self): + dsApp = ogredotscene.DotSceneExporterApplication() + dsApp.sceneExporter.settings.path = self.path + dsApp.sceneExporter.settings.doProperties = 1 + dsApp.sceneExporter.export() + return + + def exportTextures(self): + print "exportTextures() not coded yet." + return + + def transformScene(self): + os.system("pwd") + os.system("xsltproc " +self.xslt+ " " +self.path+ "/" +self.scene+ ".xml > " +self.path+ "/area.xml.tmp") + os.system(self.indenter+ " " +self.path+ "/area.xml.tmp " +self.path+ "/area.xml") + return + + +###### +# Main +###### +if (__name__ == "__main__"): + application = Blend2MospAreaApplication() + application.setOgreXmlConverterApp ('OgreXMLConverter') + application.setXSLT ("/home/stenyak/dev/motorsport/tools/blend2mosparea/blend2mosparea.xsl") + application.setIndenter ("/home/stenyak/dev/motorsport/tools/xmlIndenter/xmlIndenter.sh") + application.setExportPath(ogreexport.os.path.dirname(ogreexport.Blender.Get('filename'))+"/export") + application.exportAll() + #application.cleanAll() + print "###### Done! Area exported! :) ######" Added: trunk/tools/blend2mosparea/blend2mosparea.xsl =================================================================== --- trunk/tools/blend2mosparea/blend2mosparea.xsl (rev 0) +++ trunk/tools/blend2mosparea/blend2mosparea.xsl 2006-04-10 20:28:17 UTC (rev 403) @@ -0,0 +1,135 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> + +<xsl:template match="/"> + <xsl:for-each select="scene/nodes"> + <xsl:apply-templates select="node"/> + </xsl:for-each> +</xsl:template> + +<xsl:template match="node"> + <xsl:choose> + <xsl:when test="entity"> + <xsl:apply-templates select="entity"/> + </xsl:when> + <xsl:when test="camera"> + <xsl:apply-templates select="camera"/> + </xsl:when> + <xsl:when test="userData/property/@name = 'type'"> + <xsl:apply-templates select="userData"/> + </xsl:when> + <xsl:otherwise> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="camera"> + <camera> + <xsl:attribute name="name"> + <xsl:value-of select="../@name"/> + </xsl:attribute> + <xsl:attribute name="position"> + <xsl:value-of select="../position/@x"/><xsl:text> </xsl:text> + <xsl:value-of select="../position/@y"/><xsl:text> </xsl:text> + <xsl:value-of select="../position/@z"/> + </xsl:attribute> + <xsl:attribute name="rotation"> + <xsl:value-of select="../rotation/@qw"/><xsl:text> </xsl:text> + <xsl:value-of select="../rotation/@qx"/><xsl:text> </xsl:text> + <xsl:value-of select="../rotation/@qy"/><xsl:text> </xsl:text> + <xsl:value-of select="../rotation/@qz"/> + </xsl:attribute> + <xsl:attribute name="scale"> + <xsl:value-of select="../scale/@x"/><xsl:text> </xsl:text> + <xsl:value-of select="../scale/@y"/><xsl:text> </xsl:text> + <xsl:value-of select="../scale/@z"/> + </xsl:attribute> + <xsl:for-each select="../userData/property"> + <xsl:if test="@name = 'target'"> + <xsl:attribute name="target"><xsl:value-of select="@data"/></xsl:attribute> + </xsl:if> + </xsl:for-each> + <xsl:attribute name="projectionType"><xsl:value-of select="@projectionType"/></xsl:attribute> + <xsl:attribute name="fov"><xsl:value-of select="@fov"/></xsl:attribute> + <xsl:attribute name="normal"><xsl:apply-templates select="normal"/></xsl:attribute> + <xsl:attribute name="clipping"><xsl:apply-templates select="clipping"/></xsl:attribute> + </camera> +</xsl:template> + +<xsl:template match="normal"> + <xsl:value-of select="@x"/><xsl:text> </xsl:text> + <xsl:value-of select="@y"/><xsl:text> </xsl:text> + <xsl:value-of select="@z"/> +</xsl:template> + +<xsl:template match="clipping"> + <xsl:value-of select="@near"/><xsl:text> </xsl:text> + <xsl:value-of select="@far"/> +</xsl:template> + +<xsl:template match="userData"> + <xsl:for-each select="property"> + <xsl:if test="@name = 'type'"> + <xsl:element name="{@data}"> + <xsl:for-each select="../.."> + <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute> + <xsl:attribute name="position"> + <xsl:value-of select="position/@x"/><xsl:text> </xsl:text> + <xsl:value-of select="position/@y"/><xsl:text> </xsl:text> + <xsl:value-of select="position/@z"/> + </xsl:attribute> + <xsl:attribute name="rotation"> + <xsl:value-of select="rotation/@qw"/><xsl:text> </xsl:text> + <xsl:value-of select="rotation/@qx"/><xsl:text> </xsl:text> + <xsl:value-of select="rotation/@qy"/><xsl:text> </xsl:text> + <xsl:value-of select="rotation/@qz"/> + </xsl:attribute> + <xsl:attribute name="scale"> + <xsl:value-of select="scale/@x"/><xsl:text> </xsl:text> + <xsl:value-of select="scale/@y"/><xsl:text> </xsl:text> + <xsl:value-of select="scale/@z"/> + </xsl:attribute> + </xsl:for-each> + <xsl:for-each select="../property"> + <xsl:if test="@name != 'type'"> + <xsl:attribute name="{@name}"> + <xsl:value-of select="@data"/> + </xsl:attribute> + </xsl:if> + </xsl:for-each> + <xsl:for-each select="../.."> + <xsl:apply-templates select="node"/> + </xsl:for-each> + </xsl:element> + </xsl:if> + </xsl:for-each> +</xsl:template> + +<xsl:template match="entity"> + <mesh> + <xsl:attribute name="name"> + <xsl:value-of select="@name"/> + </xsl:attribute> + <xsl:attribute name="position"> + <xsl:value-of select="../position/@x"/><xsl:text> </xsl:text> + <xsl:value-of select="../position/@y"/><xsl:text> </xsl:text> + <xsl:value-of select="../position/@z"/> + </xsl:attribute> + <xsl:attribute name="rotation"> + <xsl:value-of select="../rotation/@qw"/><xsl:text> </xsl:text> + <xsl:value-of select="../rotation/@qx"/><xsl:text> </xsl:text> + <xsl:value-of select="../rotation/@qy"/><xsl:text> </xsl:text> + <xsl:value-of select="../rotation/@qz"/> + </xsl:attribute> + <xsl:attribute name="scale"> + <xsl:value-of select="../scale/@x"/><xsl:text> </xsl:text> + <xsl:value-of select="../scale/@y"/><xsl:text> </xsl:text> + <xsl:value-of select="../scale/@z"/> + </xsl:attribute> + <xsl:attribute name="file"> + <xsl:value-of select="@meshFile"/> + </xsl:attribute> + </mesh> +</xsl:template> + +</xsl:stylesheet> Added: trunk/tools/blend2mosparea/readme.txt =================================================================== --- trunk/tools/blend2mosparea/readme.txt (rev 0) +++ trunk/tools/blend2mosparea/readme.txt 2006-04-10 20:28:17 UTC (rev 403) @@ -0,0 +1,14 @@ +Installation: + +-Copy "blend2mosparea.py" to your blender plugins directory. In typical unix systems, that's "~/.blender/scripts/". +-Edit the file, and customize the last lines (application.set*) so that they point to the appropriate directories. + +Usage: + +-Start blender. +-Open the area .blend file. +-Assuming the .blend file follows the necessary rules, start the exporter plugin. You can usually do this by clicking "File" > "Export" > "Blend2MospArea exporter". + +That's it. Your track will have been exported to the specified dir, which by default is "[.blend directory]/export/". + +There's no gui at the moment. All errors will be reported via console, check it when the exported track doesn't work. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <mck...@us...> - 2006-04-10 04:21:37
|
Revision: 402 Author: mckirkus Date: 2006-04-09 21:21:32 -0700 (Sun, 09 Apr 2006) ViewCVS: http://svn.sourceforge.net/motorsport/?rev=402&view=rev Log Message: ----------- Updated the Visual Studio 7.1 (MSVC2003) project file to include new/changed files. Updated the batch files to copy the trunk/cfg files to bin/cfg. Modified Paths: -------------- trunk/src/prj/msvc2003/copy_debug_files.bat trunk/src/prj/msvc2003/copy_release_files.bat trunk/src/prj/msvc2003/motorsport.vcproj Modified: trunk/src/prj/msvc2003/copy_debug_files.bat =================================================================== --- trunk/src/prj/msvc2003/copy_debug_files.bat 2006-04-07 14:39:56 UTC (rev 401) +++ trunk/src/prj/msvc2003/copy_debug_files.bat 2006-04-10 04:21:32 UTC (rev 402) @@ -11,3 +11,5 @@ mkdir .\bin\data xcopy /y /E ..\..\..\data .\bin\data +mkdir .\bin\cfg +xcopy /y /E ..\..\..\cfg .\bin\cfg Modified: trunk/src/prj/msvc2003/copy_release_files.bat =================================================================== --- trunk/src/prj/msvc2003/copy_release_files.bat 2006-04-07 14:39:56 UTC (rev 401) +++ trunk/src/prj/msvc2003/copy_release_files.bat 2006-04-10 04:21:32 UTC (rev 402) @@ -11,3 +11,6 @@ mkdir .\bin\data xcopy /y /E ..\..\..\data .\bin\data + +mkdir .\bin\cfg +xcopy /y /E ..\..\..\cfg .\bin\cfg \ No newline at end of file Modified: trunk/src/prj/msvc2003/motorsport.vcproj =================================================================== --- trunk/src/prj/msvc2003/motorsport.vcproj 2006-04-07 14:39:56 UTC (rev 401) +++ trunk/src/prj/msvc2003/motorsport.vcproj 2006-04-10 04:21:32 UTC (rev 402) @@ -21,7 +21,7 @@ <Tool Name="VCCLCompilerTool" Optimization="0" - AdditionalIncludeDirectories="..\..;..\..\data;..\..\graphics;..\..\gui;..\..\input;..\..\log;..\..\physics;..\..\tools;..\..\..\3pl\windows\vc2003\include;..\..\..\3pl\windows\vc2003\include\ode;..\..\..\3pl\windows\vc2003\include\ogre;..\..\..\3pl\windows\vc2003\include\SDL" + AdditionalIncludeDirectories="..\..;..\..\log;..\..\world;..\..\common;..\..\vehicle;..\..\tools;..\..\..\3pl\windows\vc2003\include;..\..\..\3pl\windows\vc2003\include\ode;..\..\..\3pl\windows\vc2003\include\ogre;..\..\..\3pl\windows\vc2003\include\SDL" PreprocessorDefinitions="_DEBUG;WIN32;_WIN32;_WINDOWS;PLATFORM_WIN32" StringPooling="TRUE" BasicRuntimeChecks="3" @@ -95,7 +95,7 @@ InlineFunctionExpansion="1" EnableIntrinsicFunctions="TRUE" FavorSizeOrSpeed="1" - AdditionalIncludeDirectories="..\..;..\..\data;..\..\graphics;..\..\gui;..\..\input;..\..\log;..\..\physics;..\..\tools;..\..\..\3pl\windows\vc2003\include;..\..\..\3pl\windows\vc2003\include\ode;..\..\..\3pl\windows\vc2003\include\ogre;..\..\..\3pl\windows\vc2003\include\SDL" + AdditionalIncludeDirectories="..\..;..\..\common;..\..\tools;..\..\world;..\..\vehicle;..\..\log;..\..\..\3pl\windows\vc2003\include;..\..\..\3pl\windows\vc2003\include\ode;..\..\..\3pl\windows\vc2003\include\ogre;..\..\..\3pl\windows\vc2003\include\SDL" PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS" StringPooling="TRUE" RuntimeLibrary="2" @@ -162,200 +162,253 @@ Name="Source Files" Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"> <File + RelativePath="..\..\graphicsEngine.cpp"> + </File> + <File + RelativePath="..\..\graphicsEngine.hpp"> + </File> + <File + RelativePath="..\..\guiEngine.cpp"> + </File> + <File + RelativePath="..\..\guiEngine.hpp"> + </File> + <File + RelativePath="..\..\inputEngine.cpp"> + </File> + <File + RelativePath="..\..\inputEngine.hpp"> + </File> + <File RelativePath="..\..\main.cpp"> - <FileConfiguration - Name="Debug|Win32"> - <Tool - Name="VCCLCompilerTool" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - UsePrecompiledHeader="0"/> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32"> - <Tool - Name="VCCLCompilerTool" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - UsePrecompiledHeader="0"/> - </FileConfiguration> </File> <File + RelativePath="..\..\main.hpp"> + </File> + <File + RelativePath="..\..\physicsEngine.cpp"> + </File> + <File + RelativePath="..\..\physicsEngine.hpp"> + </File> + <File RelativePath="..\..\system.cpp"> - <FileConfiguration - Name="Debug|Win32"> - <Tool - Name="VCCLCompilerTool" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - UsePrecompiledHeader="0"/> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32"> - <Tool - Name="VCCLCompilerTool" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - UsePrecompiledHeader="0"/> - </FileConfiguration> </File> + <File + RelativePath="..\..\system.hpp"> + </File> </Filter> <Filter - Name="data"> + Name="log" + Filter=""> <File - RelativePath="..\..\data\bodyData.cpp"> + RelativePath="..\..\log\logEngine.cpp"> </File> <File - RelativePath="..\..\data\cameraData.cpp"> + RelativePath="..\..\log\logEngine.hpp"> </File> + </Filter> + <Filter + Name="tools" + Filter=""> <File - RelativePath="..\..\data\driveJointData.cpp"> + RelativePath="..\..\tools\MTest.h"> </File> <File - RelativePath="..\..\data\engineData.cpp"> + RelativePath="..\..\tools\paths.cpp"> </File> <File - RelativePath="..\..\data\finalDriveData.cpp"> + RelativePath="..\..\tools\paths.hpp"> </File> <File - RelativePath="..\..\data\gearboxData.cpp"> + RelativePath="..\..\tools\xercesc_fwd.hpp"> </File> <File - RelativePath="..\..\data\part.hpp"> + RelativePath="..\..\tools\xmlParser.cpp"> </File> <File - RelativePath="..\..\data\partData.cpp"> + RelativePath="..\..\tools\xmlParser.hpp"> </File> <File - RelativePath="..\..\data\pedal.hpp"> + RelativePath="..\..\tools\xmlTag.cpp"> </File> <File - RelativePath="..\..\data\pedalData.cpp"> + RelativePath="..\..\tools\xmlTag.hpp"> </File> + </Filter> + <Filter + Name="common" + Filter=""> <File - RelativePath="..\..\data\suspensionData.cpp"> + RelativePath="..\..\common\axis.cpp"> + <FileConfiguration + Name="Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + ObjectFile="$(IntDir)/$(InputName)1.obj"/> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32"> + <Tool + Name="VCCLCompilerTool" + ObjectFile="$(IntDir)/$(InputName)1.obj"/> + </FileConfiguration> </File> <File - RelativePath="..\..\data\trackData.cpp"> + RelativePath="..\..\common\axis.hpp"> </File> <File - RelativePath="..\..\data\vehicleData.cpp"> + RelativePath="..\..\common\camera.cpp"> </File> <File - RelativePath="..\..\data\vehiclePosition.cpp"> + RelativePath="..\..\common\camera.hpp"> </File> <File - RelativePath="..\..\data\wheelData.cpp"> + RelativePath="..\..\common\location.cpp"> </File> <File - RelativePath="..\..\data\worldData.cpp"> + RelativePath="..\..\common\location.hpp"> </File> <File - RelativePath="..\..\data\worldObject.cpp"> + RelativePath="..\..\common\odeObject.cpp"> </File> <File - RelativePath="..\..\data\xmlParser.cpp"> + RelativePath="..\..\common\odeObject.hpp"> </File> - </Filter> - <Filter - Name="graphics"> <File - RelativePath="..\..\graphics\bodyGraphics.cpp"> + RelativePath="..\..\common\ogreObject.cpp"> </File> <File - RelativePath="..\..\graphics\cameraGraphics.cpp"> + RelativePath="..\..\common\ogreObject.hpp"> </File> <File - RelativePath="..\..\graphics\graphicsEngine.cpp"> + RelativePath="..\..\common\quaternion.cpp"> + <FileConfiguration + Name="Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + ObjectFile="$(IntDir)/$(InputName)1.obj"/> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32"> + <Tool + Name="VCCLCompilerTool" + ObjectFile="$(IntDir)/$(InputName)1.obj"/> + </FileConfiguration> </File> <File - RelativePath="..\..\graphics\partGraphics.cpp"> + RelativePath="..\..\common\quaternion.hpp"> </File> <File - RelativePath="..\..\graphics\vehicleGraphics.cpp"> + RelativePath="..\..\common\vector3d.cpp"> + <FileConfiguration + Name="Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + ObjectFile="$(IntDir)/$(InputName)1.obj"/> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32"> + <Tool + Name="VCCLCompilerTool" + ObjectFile="$(IntDir)/$(InputName)1.obj"/> + </FileConfiguration> </File> <File - RelativePath="..\..\graphics\wheelGraphics.cpp"> + RelativePath="..\..\common\vector3d.hpp"> </File> - </Filter> - <Filter - Name="gui"> <File - RelativePath="..\..\gui\guiEngine.cpp"> + RelativePath="..\..\common\worldObject.cpp"> </File> + <File + RelativePath="..\..\common\worldObject.hpp"> + </File> </Filter> <Filter - Name="input"> + Name="vehicle" + Filter=""> <File - RelativePath="..\..\input\axis.cpp"> + RelativePath="..\..\vehicle\body.cpp"> </File> <File - RelativePath="..\..\input\cameraInput.cpp"> + RelativePath="..\..\vehicle\body.hpp"> </File> <File - RelativePath="..\..\input\inputEngine.cpp"> + RelativePath="..\..\vehicle\driveJoint.cpp"> </File> <File - RelativePath="..\..\input\partInput.cpp"> + RelativePath="..\..\vehicle\driveJoint.hpp"> </File> - </Filter> - <Filter - Name="log"> <File - RelativePath="..\..\log\logEngine.cpp"> + RelativePath="..\..\vehicle\driveMass.cpp"> </File> - </Filter> - <Filter - Name="physics"> <File - RelativePath="..\..\physics\bodyPhysics.cpp"> + RelativePath="..\..\vehicle\driveMass.hpp"> </File> <File - RelativePath="..\..\physics\cameraPhysics.cpp"> + RelativePath="..\..\vehicle\engine.cpp"> </File> <File - RelativePath="..\..\physics\driveJointPhysics.cpp"> + RelativePath="..\..\vehicle\engine.hpp"> </File> <File - RelativePath="..\..\physics\enginePhysics.cpp"> + RelativePath="..\..\vehicle\finalDrive.cpp"> </File> <File - RelativePath="..\..\physics\finalDrivePhysics.cpp"> + RelativePath="..\..\vehicle\finalDrive.hpp"> </File> <File - RelativePath="..\..\physics\gearboxPhysics.cpp"> + RelativePath="..\..\vehicle\gearbox.cpp"> </File> <File - RelativePath="..\..\physics\partPhysics.cpp"> + RelativePath="..\..\vehicle\gearbox.hpp"> </File> <File - RelativePath="..\..\physics\pedalPhysics.cpp"> + RelativePath="..\..\vehicle\pedal.cpp"> </File> <File - RelativePath="..\..\physics\physicsEngine.cpp"> + RelativePath="..\..\vehicle\pedal.hpp"> </File> <File - RelativePath="..\..\physics\suspensionPhysics.cpp"> + RelativePath="..\..\vehicle\suspension.cpp"> </File> <File - RelativePath="..\..\physics\vehiclePhysics.cpp"> + RelativePath="..\..\vehicle\suspension.hpp"> </File> <File - RelativePath="..\..\physics\wheelPhysics.cpp"> + RelativePath="..\..\vehicle\vehicle.cpp"> </File> + <File + RelativePath="..\..\vehicle\vehicle.hpp"> + </File> + <File + RelativePath="..\..\vehicle\wheel.cpp"> + </File> + <File + RelativePath="..\..\vehicle\wheel.hpp"> + </File> </Filter> <Filter - Name="tools" + Name="world" Filter=""> <File - RelativePath="..\..\tools\MTest.h"> + RelativePath="..\..\world\area.cpp"> </File> <File - RelativePath="..\..\tools\quaternion.cpp"> + RelativePath="..\..\world\area.hpp"> </File> <File - RelativePath="..\..\tools\vector3d.cpp"> + RelativePath="..\..\world\part.cpp"> </File> + <File + RelativePath="..\..\world\part.hpp"> + </File> + <File + RelativePath="..\..\world\world.cpp"> + </File> + <File + RelativePath="..\..\world\world.hpp"> + </File> </Filter> </Files> <Globals> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <st...@us...> - 2006-04-07 14:40:09
|
Revision: 401 Author: stenyak Date: 2006-04-07 07:39:56 -0700 (Fri, 07 Apr 2006) ViewCVS: http://svn.sourceforge.net/motorsport/?rev=401&view=rev Log Message: ----------- Added blend2mospvehicle readme file, with instructions on how to install and use the exporter. Added Paths: ----------- trunk/tools/blend2mospvehicle/readme.txt Added: trunk/tools/blend2mospvehicle/readme.txt =================================================================== --- trunk/tools/blend2mospvehicle/readme.txt (rev 0) +++ trunk/tools/blend2mospvehicle/readme.txt 2006-04-07 14:39:56 UTC (rev 401) @@ -0,0 +1,14 @@ +Installation: + +-Copy "blend2mospvehicle.py" to your blender plugins directory. In typical unix systems, that's "~/.blender/scripts/". +-Edit the file, and customize the last lines (application.set*) so that they point to the appropriate directories. + +Usage: + +-Start blender. +-Open the vehicle .blend file. +-Assuming the .blend file follows the necessary rules, start the exporter plugin. You can usually do this by clicking "File" > "Export" > "Blend2MospVehicle exporter". + +That's it. Your car will have been exported to the specified dir, which by default is "[.blend directory]/export/". + +There's no gui at the moment. All errors will be reported via console, check it when the exported car doesn't work. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <st...@us...> - 2006-04-07 14:26:24
|
Revision: 400 Author: stenyak Date: 2006-04-07 07:25:57 -0700 (Fri, 07 Apr 2006) ViewCVS: http://svn.sourceforge.net/motorsport/?rev=400&view=rev Log Message: ----------- Added support for cameras in the blend2mospvehicle exporter. Added customizable paths to xsl and indenter in the blend2mospvehicle exporter. Fixed a bug in the blen2mospvehicle exporter: it always exports gamedata now. Fixed a bug in the xml indenter: using basename for temporary files now, not whole path (which could lead to crashes). Modified vehicle.xml structure: now using "mesh" instead of "child" tags. "mesh" attribute is deprecated now for body and wheels. Modified vehicle and wheel classes: there's no need for a graphics mesh anymore. Modified internal data format: now "rear right wheel" becomes "rr wheel". Same for the other 3 corners and for suspension names. Modified cameras: when no proper "target" attribute is found, (0,0,0) is used. Updated mosp1 to the new xml format. Modified Paths: -------------- trunk/data/vehicles/mosp1/vehicle.xml trunk/src/common/camera.cpp trunk/src/common/ogreObject.cpp trunk/src/common/ogreObject.hpp trunk/src/vehicle/body.cpp trunk/src/vehicle/vehicle.cpp trunk/src/vehicle/wheel.cpp trunk/tools/blend2mospvehicle/blend2mospvehicle.py trunk/tools/blend2mospvehicle/blend2mospvehicle.xsl trunk/tools/xmlIndenter/xmlIndenter.sh Modified: trunk/data/vehicles/mosp1/vehicle.xml =================================================================== --- trunk/data/vehicles/mosp1/vehicle.xml 2006-04-07 09:46:06 UTC (rev 399) +++ trunk/data/vehicles/mosp1/vehicle.xml 2006-04-07 14:25:57 UTC (rev 400) @@ -32,14 +32,19 @@ dragCoefficient = "0.3" _frontalArea = "default" comment="default = width * height * 0.6" frontalArea = "1.5" - mesh = "body.mesh" > - <child - mesh= "wheel_front.mesh" + <mesh + file= "body.mesh" + position = "0 0 0" + rotation = "0 0 0" + > + </mesh> + <mesh + file= "wheel_front.mesh" position = "-1.5 0 0.6" rotation = "0 15 0" > - </child> + </mesh> </body> <pedal name = "clutchPedal" @@ -143,7 +148,7 @@ </steeringWheel> <!-- <suspension.unidimensional - name = "front right suspension" + name = "fr suspension" springConstant = "80500" dampingConstant = "2000" position = "+1.44 +0.857 -0.45" @@ -152,7 +157,7 @@ > </suspension.unidimensional> <suspension.doublewishbone - name = "front left suspension" + name = "fl suspension" springStiffness = "80500" springLengthAtEase = "0.5" damperFastBump = "2000" @@ -169,7 +174,7 @@ </suspension.doublewishbone> --> <suspension.unidimensional - name = "front left suspension" + name = "fl suspension" springConstant = "80500" dampingConstant = "2000" position = "+1.44 -0.857 -0.45" @@ -178,7 +183,7 @@ > </suspension.unidimensional> <suspension.doublewishbone - name = "front right suspension" + name = "fr suspension" springStiffness = "80500" springLengthAtEase = "0.5" damperFastBump = "2000" @@ -194,13 +199,13 @@ > </suspension.doublewishbone> <suspension.fixed - name = "rear right suspension" + name = "rr suspension" position = "-1.35 +0.88 -0.45" rotation = "-90 0 0" > </suspension.fixed> <suspension.doublewishbone - name = "rear left suspension" + name = "rl suspension" springStiffness = "80900" springLengthAtEase = "0.5" damperFastBump = "2000" @@ -217,7 +222,7 @@ </suspension.doublewishbone> <!-- <suspension.unidimensional - name = "rear right suspension" + name = "rr suspension" springConstant = "80900" dampingConstant = "2000" position = "-1.35 +0.88 -0.45" @@ -226,7 +231,7 @@ > </suspension.unidimensional> <suspension.doublewishbone - name = "rear right suspension" + name = "rr suspension" springStiffness = "80900" springLengthAtEase = "0.5" damperFastBump = "2000" @@ -242,7 +247,7 @@ > </suspension.doublewishbone> <suspension.unidimensional - name = "rear left suspension" + name = "rl suspension" springConstant = "80900" dampingConstant = "2000" position = "-1.35 -0.88 -0.45" @@ -251,7 +256,7 @@ > </suspension.unidimensional> <suspension.fixed - name = "rear left suspension" + name = "rl suspension" position = "-1.35 -0.88 -0.45" rotation = "+90 0 0" steeringAngle = "0" @@ -259,44 +264,64 @@ </suspension.fixed> --> <wheel - name = "front right wheel" + name = "fr wheel" mass = "15.1" radius = "0.34" width = "0.125" powered = "-1" renderMode="solid" - mesh = "wheel_front.mesh" > + <mesh + file = "wheel_front.mesh" + position = "0 0 0" + rotation = "0 0 0" + > + </mesh> </wheel> <wheel - name = "front left wheel" + name = "fl wheel" mass = "15.1" radius = "0.34" width = "0.125" powered = "+1" - mesh = "wheel_front.mesh" renderMode="solid" > + <mesh + file = "wheel_front.mesh" + position = "0 0 0" + rotation = "0 0 0" + > + </mesh> </wheel> <wheel - name = "rear right wheel" + name = "rr wheel" mass = "15.0" radius = "0.34" width = "0.125" powered = "-1" - mesh = "wheel_rear.mesh" renderMode="solid" > + <mesh + file= "wheel_rear.mesh" + position = "0 0 0" + rotation = "0 0 0" + > + </mesh> </wheel> <wheel - name = "rear left wheel" + name = "rl wheel" mass = "15.0" radius = "0.34" width = "0.125" powered = "+1" - mesh = "wheel_rear.mesh" renderMode="solid" > + <mesh + file = "wheel_rear.mesh" + position = "0 0 0" + rotation = "0 0 0" + > + </mesh> </wheel> <camera name = "hood" Modified: trunk/src/common/camera.cpp =================================================================== --- trunk/src/common/camera.cpp 2006-04-07 09:46:06 UTC (rev 399) +++ trunk/src/common/camera.cpp 2006-04-07 14:25:57 UTC (rev 400) @@ -38,7 +38,18 @@ { setName ( tag->getAttribute("name")); *positionOffset = Vector3d (tag->getAttribute("position")); - *targetOffset = Vector3d (tag->getAttribute("target")); + std::string t = ""; + if ( (t = tag->getAttribute("target")) != "") + { + *targetOffset = Vector3d (t); + } + /* + else + { + //TODO create a target based on "rotation" tag. + log->__format(LOG_ERROR, "Camera has no readable target!"); + } + */ } } Modified: trunk/src/common/ogreObject.cpp =================================================================== --- trunk/src/common/ogreObject.cpp 2006-04-07 09:46:06 UTC (rev 399) +++ trunk/src/common/ogreObject.cpp 2006-04-07 14:25:57 UTC (rev 400) @@ -28,40 +28,43 @@ { return id; } -OgreObject::OgreObject (WorldObject * worldObject, OgreObjectData data, std::string name) +OgreObject::OgreObject (WorldObject * worldObject, OgreObjectData data, std::string name, bool useMesh) { updateId(); this->worldObject = worldObject; this->name = name; + this->useMesh = useMesh; std::string meshPath = data.meshPath; entity = NULL; node = NULL; odeObject = NULL; - /* FIXME: uncomment me - bool error = true; - try { SystemData::getSystemDataPointer()->ogreSceneManager->getEntity (id); } - catch (Ogre::Exception & e) { error = false; } - if (error) worldObject->getLog()->__format(LOG_ERROR, "Entity \"#%s\" (%s) already exists!.", id.c_str(), name.c_str()); - */ - - entity = SystemData::getSystemDataPointer ()->ogreSceneManager->createEntity (id, meshPath); - entity->setCastShadows(true); - for(unsigned int i = 0; i < entity->getNumSubEntities(); i++) + if (useMesh) { - worldObject->getLog()->__format(LOG_CCREATOR, "Entity submesh #%i material: %s.", i, entity->getSubEntity(i)->getMaterialName().c_str() ); + entity = SystemData::getSystemDataPointer ()->ogreSceneManager->createEntity (id, meshPath); + entity->setCastShadows(true); + for(unsigned int i = 0; i < entity->getNumSubEntities(); i++) + { + worldObject->getLog()->__format(LOG_CCREATOR, "Entity submesh #%i material: %s.", i, entity->getSubEntity(i)->getMaterialName().c_str() ); + } } node = static_cast<Ogre::SceneNode*>(SystemData::getSystemDataPointer()->ogreSceneManager->getRootSceneNode()->createChild()); - node->attachObject (entity); - //entity->setRenderDetail(Ogre::SDL_WIREFRAME); + if (useMesh) + { + node->attachObject (entity); + //entity->setRenderDetail(Ogre::SDL_WIREFRAME); + } } OgreObject::~OgreObject () { - worldObject->getLog()->__format (LOG_DEVELOPER, "Removing entity id=%s", entity->getName().c_str()); - node->detachObject(entity); - if (entity->isAttached()) worldObject->getLog()->__format(LOG_WARNING, "Entity \"%s\" (%s) still attached somewhere!.", name.c_str(), entity->getName().c_str()); - SystemData::getSystemDataPointer()->ogreSceneManager->removeEntity (entity); - entity = NULL; + if (useMesh) + { + worldObject->getLog()->__format (LOG_DEVELOPER, "Removing entity id=%s", entity->getName().c_str()); + node->detachObject(entity); + if (entity->isAttached()) worldObject->getLog()->__format(LOG_WARNING, "Entity \"%s\" (%s) still attached somewhere!.", name.c_str(), entity->getName().c_str()); + SystemData::getSystemDataPointer()->ogreSceneManager->removeEntity (entity); + entity = NULL; + } worldObject->getLog()->__format (LOG_DEVELOPER, "Removing node id=%s", node->getName().c_str()); SystemData::getSystemDataPointer()->ogreSceneManager->destroySceneNode (node->getName()); Modified: trunk/src/common/ogreObject.hpp =================================================================== --- trunk/src/common/ogreObject.hpp 2006-04-07 09:46:06 UTC (rev 399) +++ trunk/src/common/ogreObject.hpp 2006-04-07 14:25:57 UTC (rev 400) @@ -35,12 +35,13 @@ std::string name; Ogre::Entity * entity; + bool useMesh; Ogre::SceneNode * node; OdeObject * odeObject; WorldObject * worldObject; std::string id; public: - OgreObject (WorldObject * worldObject, OgreObjectData data, std::string name); + OgreObject (WorldObject * worldObject, OgreObjectData data, std::string name, bool useMesh = true); ~OgreObject (); std::string getId(); void setOdeReference(OdeObject * odeObject); Modified: trunk/src/vehicle/body.cpp =================================================================== --- trunk/src/vehicle/body.cpp 2006-04-07 09:46:06 UTC (rev 399) +++ trunk/src/vehicle/body.cpp 2006-04-07 14:25:57 UTC (rev 400) @@ -35,20 +35,20 @@ data.mass = stod (tag->getAttribute("mass")); frontalArea = stod (tag->getAttribute("frontalArea")); dragCoefficient = stod (tag->getAttribute("dragCoefficient")); - ogreData.meshPath = tag->getAttribute("mesh"); + ogreData.meshPath = ""; //create main mesh ogreData.meshPath = getPath() + ogreData.meshPath; - OgreObject * ogreObject = new OgreObject(this, ogreData, getId()); + OgreObject * ogreObject = new OgreObject(this, ogreData, getId(), false); ogreObjects[ogreObject->getId()] = ogreObject; odeObjects[getName()] = new OdeObject(this, data, getName()); ogreObjects[ogreObject->getId()]->setOdeReference(getMainOdeObject()); //create child meshes XmlTag * t = tag->getTag(0); for (int i = 0; i < tag->nTags(); t = tag->getTag(++i)) { - if (t->getName() == "child") + if (t->getName() == "mesh") { OgreObjectData childData; - childData.meshPath = getPath() + t->getAttribute("mesh"); + childData.meshPath = getPath() + t->getAttribute("file"); Vector3d posDiff (t->getAttribute("position")); Quaternion rotDiff (t->getAttribute("rotation")); OgreObject * ogreChild = new OgreObject(this, childData, getId()); Modified: trunk/src/vehicle/vehicle.cpp =================================================================== --- trunk/src/vehicle/vehicle.cpp 2006-04-07 09:46:06 UTC (rev 399) +++ trunk/src/vehicle/vehicle.cpp 2006-04-07 14:25:57 UTC (rev 400) @@ -136,8 +136,8 @@ boltWheelsToSuspensions(); log->__format(LOG_DEVELOPER, "Setting some more drive joint pointers..."); - getDriveJoint("rearDiff")->setOutputPointer(getDriveMass("rear right wheel")); - getLSD("rearDiff")->setOutputPointer2(getDriveMass("rear left wheel")); + getDriveJoint("rearDiff")->setOutputPointer(getDriveMass("rr wheel")); + getLSD("rearDiff")->setOutputPointer2(getDriveMass("rl wheel")); getEngine("engine")->setGasPedal(getPedal("gasPedal")); getClutch("clutch")->setClutchPedal(getPedal("clutchPedal")); @@ -226,22 +226,22 @@ void Vehicle::placeWheelsOnSuspensions() { - getWheel("front right wheel")->applyRotation(getSuspension("front right suspension")->getSecondLinkRotation()); - getWheel("front right wheel")->setPosition(getSuspension("front right suspension")->getSecondLinkPosition()); - getWheel("front left wheel")->applyRotation(getSuspension("front left suspension")->getSecondLinkRotation()); - getWheel("front left wheel")->setPosition(getSuspension("front left suspension")->getSecondLinkPosition()); - getWheel("rear right wheel")->applyRotation(getSuspension("rear right suspension")->getSecondLinkRotation()); - getWheel("rear right wheel")->setPosition(getSuspension("rear right suspension")->getSecondLinkPosition()); - getWheel("rear left wheel")->applyRotation(getSuspension("rear left suspension")->getSecondLinkRotation()); - getWheel("rear left wheel")->setPosition(getSuspension("rear left suspension")->getSecondLinkPosition()); + getWheel("fr wheel")->applyRotation(getSuspension("fr suspension")->getSecondLinkRotation()); + getWheel("fr wheel")->setPosition(getSuspension("fr suspension")->getSecondLinkPosition()); + getWheel("fl wheel")->applyRotation(getSuspension("fl suspension")->getSecondLinkRotation()); + getWheel("fl wheel")->setPosition(getSuspension("fl suspension")->getSecondLinkPosition()); + getWheel("rr wheel")->applyRotation(getSuspension("rr suspension")->getSecondLinkRotation()); + getWheel("rr wheel")->setPosition(getSuspension("rr suspension")->getSecondLinkPosition()); + getWheel("rl wheel")->applyRotation(getSuspension("rl suspension")->getSecondLinkRotation()); + getWheel("rl wheel")->setPosition(getSuspension("rl suspension")->getSecondLinkPosition()); } void Vehicle::boltWheelsToSuspensions() { - getSuspension("front right suspension")->attach(getObject("body"), getObject("front right wheel")); - getSuspension("front left suspension")->attach(getObject("body"), getObject("front left wheel")); - getSuspension("rear right suspension")->attach(getObject("body"), getObject("rear right wheel")); - getSuspension("rear left suspension")->attach(getObject("body"), getObject("rear left wheel")); + getSuspension("fr suspension")->attach(getObject("body"), getObject("fr wheel")); + getSuspension("fl suspension")->attach(getObject("body"), getObject("fl wheel")); + getSuspension("rr suspension")->attach(getObject("body"), getObject("rr wheel")); + getSuspension("rl suspension")->attach(getObject("body"), getObject("rl wheel")); } void Vehicle::stepPhysics () @@ -293,7 +293,7 @@ double velocity = sqrt(tmp[0]*tmp[0]+tmp[1]*tmp[1]+tmp[2]*tmp[2]); tmp = dBodyGetPosition(getObject("body")->getMainOdeObject()->getBodyID()); double distance = sqrt(tmp[0]*tmp[0]+tmp[1]*tmp[1]+tmp[2]*tmp[2]); - log->log (LOG_ENDUSER, LOG_TELEMETRY | LOG_FILE, "%9.5f %12.8f %12.8f %12.8f %12.8f %s %12.8f", velocity, getDriveMass("engine")->getOutputAngularVel(), getDriveMass("finalDrive")->getInputAngularVel(), getWheel("rear right wheel")->getInputAngularVel(), getWheel("rear left wheel")->getInputAngularVel(), getGearbox("gearbox")->getCurrentGearName().c_str(), distance); + log->log (LOG_ENDUSER, LOG_TELEMETRY | LOG_FILE, "%9.5f %12.8f %12.8f %12.8f %12.8f %s %12.8f", velocity, getDriveMass("engine")->getOutputAngularVel(), getDriveMass("finalDrive")->getInputAngularVel(), getWheel("rr wheel")->getInputAngularVel(), getWheel("rl wheel")->getInputAngularVel(), getGearbox("gearbox")->getCurrentGearName().c_str(), distance); } } Modified: trunk/src/vehicle/wheel.cpp =================================================================== --- trunk/src/vehicle/wheel.cpp 2006-04-07 09:46:06 UTC (rev 399) +++ trunk/src/vehicle/wheel.cpp 2006-04-07 14:25:57 UTC (rev 400) @@ -41,20 +41,19 @@ data.width = stod(tag->getAttribute("width")); data.mass = stod(tag->getAttribute("mass")); powered = stod(tag->getAttribute("powered")); - ogreData.meshPath = tag->getAttribute("mesh"); //create main mesh ogreData.meshPath = getPath() + ogreData.meshPath; - OgreObject * ogreObject = new OgreObject(this, ogreData, getId()); + OgreObject * ogreObject = new OgreObject(this, ogreData, getId(), false); ogreObjects[ogreObject->getId()] = ogreObject; odeObjects[getId()] = new OdeObject(this, data, getId()); ogreObjects[ogreObject->getId()]->setOdeReference(getMainOdeObject()); //create child meshes XmlTag * t = tag->getTag(0); for (int i = 0; i < tag->nTags(); t = tag->getTag(++i)) { - if (t->getName() == "child") + if (t->getName() == "mesh") { OgreObjectData childData; - childData.meshPath = getPath() + t->getAttribute("mesh"); + childData.meshPath = getPath() + t->getAttribute("file"); Vector3d posDiff (t->getAttribute("position")); Quaternion rotDiff (t->getAttribute("rotation")); OgreObject * ogreChild = new OgreObject(this, childData, getId()); Modified: trunk/tools/blend2mospvehicle/blend2mospvehicle.py =================================================================== --- trunk/tools/blend2mospvehicle/blend2mospvehicle.py 2006-04-07 09:46:06 UTC (rev 399) +++ trunk/tools/blend2mospvehicle/blend2mospvehicle.py 2006-04-07 14:25:57 UTC (rev 400) @@ -28,6 +28,12 @@ self.setExportPath(ogreexport.os.path.dirname(ogreexport.Blender.Get('filename'))+"/export") self.scene = ogreexport.Blender.Scene.GetCurrent().getName() + def setXSLT (self, path): + self.xslt = path + + def setIndenter (self, path): + self.indenter = path + def setExportPath(self, path): self.path = path return @@ -73,6 +79,7 @@ def exportScene(self): dsApp = ogredotscene.DotSceneExporterApplication() dsApp.sceneExporter.settings.path = self.path + dsApp.sceneExporter.settings.doProperties = 1 dsApp.sceneExporter.export() return @@ -81,7 +88,9 @@ return def transformScene(self): - os.system("xsltproc blend2mospvehicle.xsl "+self.path+"/"+self.scene+".xml > " +self.path+ "/vehicle.xml") + os.system("pwd") + os.system("xsltproc " +self.xslt+ " " +self.path+ "/" +self.scene+ ".xml > " +self.path+ "/vehicle.xml.tmp") + os.system(self.indenter+ " " +self.path+ "/vehicle.xml.tmp " +self.path+ "/vehicle.xml") return @@ -91,7 +100,9 @@ if (__name__ == "__main__"): application = Blend2MospVehicleApplication() application.setOgreXmlConverterApp ('OgreXMLConverter') + application.setXSLT ("/home/stenyak/dev/motorsport/tools/blend2mospvehicle/blend2mospvehicle.xsl") + application.setIndenter ("/home/stenyak/dev/motorsport/tools/xmlIndenter/xmlIndenter.sh") application.setExportPath(ogreexport.os.path.dirname(ogreexport.Blender.Get('filename'))+"/export") application.exportAll() - application.cleanAll() - print "############ Done! #############" + #application.cleanAll() + print "###### Done! Vehicle exported! :) ######" Modified: trunk/tools/blend2mospvehicle/blend2mospvehicle.xsl =================================================================== --- trunk/tools/blend2mospvehicle/blend2mospvehicle.xsl 2006-04-07 09:46:06 UTC (rev 399) +++ trunk/tools/blend2mospvehicle/blend2mospvehicle.xsl 2006-04-07 14:25:57 UTC (rev 400) @@ -12,6 +12,9 @@ <xsl:when test="entity"> <xsl:apply-templates select="entity"/> </xsl:when> + <xsl:when test="camera"> + <xsl:apply-templates select="camera"/> + </xsl:when> <xsl:when test="userData/property/@name = 'type'"> <xsl:apply-templates select="userData"/> </xsl:when> @@ -20,6 +23,50 @@ </xsl:choose> </xsl:template> +<xsl:template match="camera"> + <camera> + <xsl:attribute name="name"> + <xsl:value-of select="../@name"/> + </xsl:attribute> + <xsl:attribute name="position"> + <xsl:value-of select="../position/@x"/><xsl:text> </xsl:text> + <xsl:value-of select="../position/@y"/><xsl:text> </xsl:text> + <xsl:value-of select="../position/@z"/> + </xsl:attribute> + <xsl:attribute name="rotation"> + <xsl:value-of select="../rotation/@qw"/><xsl:text> </xsl:text> + <xsl:value-of select="../rotation/@qx"/><xsl:text> </xsl:text> + <xsl:value-of select="../rotation/@qy"/><xsl:text> </xsl:text> + <xsl:value-of select="../rotation/@qz"/> + </xsl:attribute> + <xsl:attribute name="scale"> + <xsl:value-of select="../scale/@x"/><xsl:text> </xsl:text> + <xsl:value-of select="../scale/@y"/><xsl:text> </xsl:text> + <xsl:value-of select="../scale/@z"/> + </xsl:attribute> + <xsl:for-each select="../userData/property"> + <xsl:if test="@name = 'target'"> + <xsl:attribute name="target"><xsl:value-of select="@data"/></xsl:attribute> + </xsl:if> + </xsl:for-each> + <xsl:attribute name="projectionType"><xsl:value-of select="@projectionType"/></xsl:attribute> + <xsl:attribute name="fov"><xsl:value-of select="@fov"/></xsl:attribute> + <xsl:attribute name="normal"><xsl:apply-templates select="normal"/></xsl:attribute> + <xsl:attribute name="clipping"><xsl:apply-templates select="clipping"/></xsl:attribute> + </camera> +</xsl:template> + +<xsl:template match="normal"> + <xsl:value-of select="@x"/><xsl:text> </xsl:text> + <xsl:value-of select="@y"/><xsl:text> </xsl:text> + <xsl:value-of select="@z"/> +</xsl:template> + +<xsl:template match="clipping"> + <xsl:value-of select="@near"/><xsl:text> </xsl:text> + <xsl:value-of select="@far"/> +</xsl:template> + <xsl:template match="userData"> <xsl:for-each select="property"> <xsl:if test="@name = 'type'"> Modified: trunk/tools/xmlIndenter/xmlIndenter.sh =================================================================== --- trunk/tools/xmlIndenter/xmlIndenter.sh 2006-04-07 09:46:06 UTC (rev 399) +++ trunk/tools/xmlIndenter/xmlIndenter.sh 2006-04-07 14:25:57 UTC (rev 400) @@ -1,6 +1,6 @@ #!/bin/bash -tmp="/tmp/tmpIndent$1" -tmpa="/tmp/tmpIndentB$1" +tmp="/tmp/tmpIndent$(basename $1)" +tmpa="/tmp/tmpIndentB$(basename $1)" head -n 1 $1 > $2 max=$(wc -l $1|sed "s/\ .*//g") @@ -18,9 +18,11 @@ closed="0" reindent="0" max=$(wc -l $tmp|sed "s/\ .*//g") +echo -n "[$max]" for l in $(cat $tmp) do - echo "[$line / $max]" + #echo "[$line / $max]" + echo -n "." let line=$line+1 if [ "$closed" = "1" ] then @@ -72,3 +74,5 @@ fi fi done + +echo "[done!]" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <st...@us...> - 2006-04-07 09:46:22
|
Revision: 399 Author: stenyak Date: 2006-04-07 02:46:06 -0700 (Fri, 07 Apr 2006) ViewCVS: http://svn.sourceforge.net/motorsport/?rev=399&view=rev Log Message: ----------- Refactored xslt vehicle convertor. It now travles the nodes tree recursively, and imports all data. Modified Paths: -------------- trunk/tools/blend2mospvehicle/blend2mospvehicle.xsl Modified: trunk/tools/blend2mospvehicle/blend2mospvehicle.xsl =================================================================== --- trunk/tools/blend2mospvehicle/blend2mospvehicle.xsl 2006-04-06 23:37:51 UTC (rev 398) +++ trunk/tools/blend2mospvehicle/blend2mospvehicle.xsl 2006-04-07 09:46:06 UTC (rev 399) @@ -1,151 +1,88 @@ <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> + <xsl:template match="/"> -<vehicle> - <xsl:for-each select="scene/nodes/node"> -<xsl:if test="@name = 'vehicle'"> - <xsl:apply-templates select="userData"/> - <xsl:for-each select="node"> -<xsl:if test="@name = 'body'"> - <body> - <xsl:apply-templates select="userData"/> - <xsl:for-each select="node"><xsl:sort select="@name" order="ascending"/><xsl:if test="entity"> - <child> - <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute> - <xsl:attribute name="mesh"><xsl:apply-templates select="entity"/></xsl:attribute> - <xsl:attribute name="rotation"><xsl:apply-templates select="rotation"/></xsl:attribute> - <xsl:attribute name="position"><xsl:apply-templates select="position"/></xsl:attribute> - <xsl:if test="userData"><xsl:apply-templates select="userData"/></xsl:if> - </child> - </xsl:if></xsl:for-each> - </body> - </xsl:if></xsl:for-each> - <xsl:for-each select="node"> -<xsl:sort select="@name" order="ascending"/><xsl:if test="camera"> - <camera> - <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute> - <xsl:attribute name="position"><xsl:apply-templates select="position"/></xsl:attribute> - <xsl:attribute name="rotation"><xsl:apply-templates select="rotation"/></xsl:attribute> - <xsl:apply-templates select="camera"/> - </camera> - </xsl:if></xsl:for-each> - <xsl:for-each select="node"><xsl:if test="@name = 'engine'"> - <engine> - <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute> - <xsl:attribute name="position"><xsl:apply-templates select="position"/></xsl:attribute> - <xsl:attribute name="rotation"><xsl:apply-templates select="rotation"/></xsl:attribute> - <xsl:for-each select="userData"> - <xsl:attribute name="angularVelLimit"><xsl:value-of select="@angularVelLimit"/></xsl:attribute> - <xsl:attribute name="engineFriction"><xsl:value-of select="@engineFriction"/></xsl:attribute> - <xsl:attribute name="engineInertia"><xsl:value-of select="@engineInertia"/></xsl:attribute> - <xsl:attribute name="torqueLinearMultiplier"><xsl:value-of select="@torqueLinearMultiplier"/></xsl:attribute> - </xsl:for-each> - </engine> - </xsl:if></xsl:for-each> - <xsl:for-each select="node"><xsl:if test="@name = 'clutch'"> - <clutch> - <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute> - <xsl:attribute name="position"><xsl:apply-templates select="position"/></xsl:attribute> - <xsl:attribute name="rotation"><xsl:apply-templates select="rotation"/></xsl:attribute> - <xsl:attribute name="coeffDynamicFriction"><xsl:value-of select="@coeffDynamicFriction"/></xsl:attribute> - <xsl:attribute name="coeffStaticFriction"><xsl:value-of select="@coeffStaticFriction"/></xsl:attribute> - <xsl:attribute name="maxTorqueTransfer"><xsl:value-of select="@maxTorqueTransfer"/></xsl:attribute> - </clutch> - </xsl:if></xsl:for-each> - - <xsl:for-each select="node"><xsl:if test="@name = 'gearbox'"> - <gearbox> - <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute> - <xsl:attribute name="position"><xsl:apply-templates select="position"/></xsl:attribute> - <xsl:attribute name="rotation"><xsl:apply-templates select="rotation"/></xsl:attribute> - <xsl:attribute name="gearboxFriction"><xsl:value-of select="@gearboxFriction"/></xsl:attribute> - <xsl:attribute name="gearboxInertia"><xsl:value-of select="@gearboxInertia"/></xsl:attribute> - <xsl:for-each select="node"><xsl:if test="@name = 'gear'"> - <gear> - <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute> - <xsl:attribute name="rotation"><xsl:apply-templates select="rotation"/></xsl:attribute> - <xsl:attribute name="position"><xsl:apply-templates select="position"/></xsl:attribute> - <xsl:attribute name="number"><xsl:value-of select="@number"/></xsl:attribute> - <xsl:attribute name="ratio"><xsl:value-of select="@ratio"/></xsl:attribute> - </gear> - </xsl:if></xsl:for-each> - </gearbox> - </xsl:if></xsl:for-each> - <xsl:for-each select="node"><xsl:if test="@name = 'finalDrive'"> - <finalDrive> - <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute> - <xsl:attribute name="position"><xsl:apply-templates select="position"/></xsl:attribute> - <xsl:attribute name="rotation"><xsl:apply-templates select="rotation"/></xsl:attribute> - <xsl:attribute name="diffFriction"><xsl:value-of select="@diffFriction"/></xsl:attribute> - <xsl:attribute name="diffInertia"><xsl:value-of select="@diffInertia"/></xsl:attribute> - <xsl:attribute name="finalDriveRatio"><xsl:value-of select="@finalDriveRatio"/></xsl:attribute> - </finalDrive> - </xsl:if></xsl:for-each> - - <!-- TODO in mosp - <lights> - <xsl:attribute name="empty">dummy</xsl:attribute> - <xsl:for-each select="node"> -<xsl:sort select="@name" order="ascending"/> -<xsl:if test="light"> - Name = <xsl:value-of select="@name"/><br /> - PosRot = <xsl:apply-templates select="position"/>, <xsl:apply-templates select="rotation"/><br /> - Data: <xsl:apply-templates select="light"/> - </xsl:if></xsl:for-each> - </lights> - --> - </xsl:if></xsl:for-each> -</vehicle> + <xsl:for-each select="scene/nodes"> + <xsl:apply-templates select="node"/> + </xsl:for-each> </xsl:template> <xsl:template match="node"> + <xsl:choose> + <xsl:when test="entity"> + <xsl:apply-templates select="entity"/> + </xsl:when> + <xsl:when test="userData/property/@name = 'type'"> + <xsl:apply-templates select="userData"/> + </xsl:when> + <xsl:otherwise> + </xsl:otherwise> + </xsl:choose> </xsl:template> -<xsl:template match="light"> - <xsl:value-of select="@type"/> - </xsl:template> - <xsl:template match="camera"> - <xsl:attribute name="fov"> - <xsl:value-of select="@fov"/> - </xsl:attribute> - <xsl:attribute name="normal"> - <xsl:apply-templates select="normal"/> - </xsl:attribute> - <xsl:attribute name="clipping"> - <xsl:apply-templates select="clipping"/> - </xsl:attribute> - <xsl:attribute name="projectionType"> - <xsl:value-of select="@projectionType"/> - </xsl:attribute> - </xsl:template> - <xsl:template match="normal"> - <xsl:value-of select="@x"/><xsl:text> </xsl:text> - <xsl:value-of select="@y"/><xsl:text> </xsl:text> - <xsl:value-of select="@z"/> - </xsl:template> - <xsl:template match="clipping"> - <xsl:value-of select="@near"/><xsl:text> </xsl:text> - <xsl:value-of select="@far"/> - </xsl:template> - <xsl:template match="userData"> - <xsl:for-each select="property"> +<xsl:template match="userData"> + <xsl:for-each select="property"> + <xsl:if test="@name = 'type'"> + <xsl:element name="{@data}"> + <xsl:for-each select="../.."> + <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute> + <xsl:attribute name="position"> + <xsl:value-of select="position/@x"/><xsl:text> </xsl:text> + <xsl:value-of select="position/@y"/><xsl:text> </xsl:text> + <xsl:value-of select="position/@z"/> + </xsl:attribute> + <xsl:attribute name="rotation"> + <xsl:value-of select="rotation/@qw"/><xsl:text> </xsl:text> + <xsl:value-of select="rotation/@qx"/><xsl:text> </xsl:text> + <xsl:value-of select="rotation/@qy"/><xsl:text> </xsl:text> + <xsl:value-of select="rotation/@qz"/> + </xsl:attribute> + <xsl:attribute name="scale"> + <xsl:value-of select="scale/@x"/><xsl:text> </xsl:text> + <xsl:value-of select="scale/@y"/><xsl:text> </xsl:text> + <xsl:value-of select="scale/@z"/> + </xsl:attribute> + </xsl:for-each> + <xsl:for-each select="../property"> + <xsl:if test="@name != 'type'"> <xsl:attribute name="{@name}"> - <xsl:value-of select="@data"/> + <xsl:value-of select="@data"/> </xsl:attribute> + </xsl:if> </xsl:for-each> - </xsl:template> - <xsl:template match="entity"> - <xsl:value-of select="@meshFile"/> - </xsl:template> - <xsl:template match="position"> - <xsl:value-of select="@x"/><xsl:text> </xsl:text> - <xsl:value-of select="@y"/><xsl:text> </xsl:text> - <xsl:value-of select="@z"/> - </xsl:template> - <xsl:template match="rotation"> - <xsl:value-of select="@qw"/><xsl:text> </xsl:text> - <xsl:value-of select="@qx"/><xsl:text> </xsl:text> - <xsl:value-of select="@qy"/><xsl:text> </xsl:text> - <xsl:value-of select="@qz"/> - </xsl:template> + <xsl:for-each select="../.."> + <xsl:apply-templates select="node"/> + </xsl:for-each> + </xsl:element> + </xsl:if> + </xsl:for-each> +</xsl:template> + +<xsl:template match="entity"> + <mesh> + <xsl:attribute name="name"> + <xsl:value-of select="@name"/> + </xsl:attribute> + <xsl:attribute name="position"> + <xsl:value-of select="../position/@x"/><xsl:text> </xsl:text> + <xsl:value-of select="../position/@y"/><xsl:text> </xsl:text> + <xsl:value-of select="../position/@z"/> + </xsl:attribute> + <xsl:attribute name="rotation"> + <xsl:value-of select="../rotation/@qw"/><xsl:text> </xsl:text> + <xsl:value-of select="../rotation/@qx"/><xsl:text> </xsl:text> + <xsl:value-of select="../rotation/@qy"/><xsl:text> </xsl:text> + <xsl:value-of select="../rotation/@qz"/> + </xsl:attribute> + <xsl:attribute name="scale"> + <xsl:value-of select="../scale/@x"/><xsl:text> </xsl:text> + <xsl:value-of select="../scale/@y"/><xsl:text> </xsl:text> + <xsl:value-of select="../scale/@z"/> + </xsl:attribute> + <xsl:attribute name="file"> + <xsl:value-of select="@meshFile"/> + </xsl:attribute> + </mesh> +</xsl:template> + </xsl:stylesheet> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <st...@us...> - 2006-04-06 23:38:56
|
Revision: 398 Author: stenyak Date: 2006-04-06 16:37:51 -0700 (Thu, 06 Apr 2006) ViewCVS: http://svn.sourceforge.net/motorsport/?rev=398&view=rev Log Message: ----------- Added blend2mosp vehicle exporter (blender plugin). Added blend2mosp xslt convertor (dotscene2mosp). Added xmlIndenter. Added Paths: ----------- trunk/tools/ trunk/tools/blend2mospvehicle/ trunk/tools/blend2mospvehicle/blend2mospvehicle.py trunk/tools/blend2mospvehicle/blend2mospvehicle.xsl trunk/tools/xmlIndenter/ trunk/tools/xmlIndenter/xmlIndenter.sh Added: trunk/tools/blend2mospvehicle/blend2mospvehicle.py =================================================================== --- trunk/tools/blend2mospvehicle/blend2mospvehicle.py (rev 0) +++ trunk/tools/blend2mospvehicle/blend2mospvehicle.py 2006-04-06 23:37:51 UTC (rev 398) @@ -0,0 +1,97 @@ +#!BPY + +""" +Name: 'Blend2MospVehicle exporter' +Blender: 237 +Group: 'Export' +Tooltip: 'Exports the current scene to a Motorsport vehicle' +""" + +__author__ = ['Bruno Gonzalez (STenyaK)'] +__version__ = '1.0.0' +__url__ = ['Motorsport website, http://www.motorsport-sim.org', + 'Motorsport forum, http://forum.rscnet.org/forumdisplay.php?f=577'] +__bpydoc__ = """\ +Exports the current scene to a Motorsport vehicle. +""" + +import os +import ogreexport +import ogredotscene + +class Blend2MospVehicleApplication: + """Motorsport Exporter + """ + def __init__(self): + print "Motorsport Exporter initiated." + self.setOgreXmlConverterApp ('OgreXMLConverter') + self.setExportPath(ogreexport.os.path.dirname(ogreexport.Blender.Get('filename'))+"/export") + self.scene = ogreexport.Blender.Scene.GetCurrent().getName() + + def setExportPath(self, path): + self.path = path + return + + def setOgreXmlConverterApp(self, path): + self.ogreXmlConverterApp = path + return + + def exportAll(self): + print "Exporting Motorsport vehicle..." + try: + os.mkdir(self.path) + except: + print "Error while trying to create dir" + self.exportMeshes() + self.exportScene() + self.exportTextures() + self.transformScene() + return + + def cleanAll(self): + try: + os.remove(self.path+"/*mesh.xml") + except: + print "Error while trying to remove mesh.xml files" + try: + os.remove("OgreXMLConverter.log") + except: + print "Error while trying to remove OgreXMLConverter log file" + try: + os.remove(self.path+"/"+self.scene+".xml") + except: + print "Error while trying to remove "+self.scene+".xml files" + return + + def exportMeshes(self): + ogreexport.OGRE_XML_CONVERTER = self.ogreXmlConverterApp + ogreexport.refreshGUI() + ogreexport.pathString = ogreexport.Draw.Create ( self.path ) + ogreexport.export(ogreexport.selectedObjectsList) + return + + def exportScene(self): + dsApp = ogredotscene.DotSceneExporterApplication() + dsApp.sceneExporter.settings.path = self.path + dsApp.sceneExporter.export() + return + + def exportTextures(self): + print "exportTextures() not coded yet." + return + + def transformScene(self): + os.system("xsltproc blend2mospvehicle.xsl "+self.path+"/"+self.scene+".xml > " +self.path+ "/vehicle.xml") + return + + +###### +# Main +###### +if (__name__ == "__main__"): + application = Blend2MospVehicleApplication() + application.setOgreXmlConverterApp ('OgreXMLConverter') + application.setExportPath(ogreexport.os.path.dirname(ogreexport.Blender.Get('filename'))+"/export") + application.exportAll() + application.cleanAll() + print "############ Done! #############" Added: trunk/tools/blend2mospvehicle/blend2mospvehicle.xsl =================================================================== --- trunk/tools/blend2mospvehicle/blend2mospvehicle.xsl (rev 0) +++ trunk/tools/blend2mospvehicle/blend2mospvehicle.xsl 2006-04-06 23:37:51 UTC (rev 398) @@ -0,0 +1,151 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> +<xsl:template match="/"> +<vehicle> + <xsl:for-each select="scene/nodes/node"> +<xsl:if test="@name = 'vehicle'"> + <xsl:apply-templates select="userData"/> + <xsl:for-each select="node"> +<xsl:if test="@name = 'body'"> + <body> + <xsl:apply-templates select="userData"/> + <xsl:for-each select="node"><xsl:sort select="@name" order="ascending"/><xsl:if test="entity"> + <child> + <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute> + <xsl:attribute name="mesh"><xsl:apply-templates select="entity"/></xsl:attribute> + <xsl:attribute name="rotation"><xsl:apply-templates select="rotation"/></xsl:attribute> + <xsl:attribute name="position"><xsl:apply-templates select="position"/></xsl:attribute> + <xsl:if test="userData"><xsl:apply-templates select="userData"/></xsl:if> + </child> + </xsl:if></xsl:for-each> + </body> + </xsl:if></xsl:for-each> + <xsl:for-each select="node"> +<xsl:sort select="@name" order="ascending"/><xsl:if test="camera"> + <camera> + <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute> + <xsl:attribute name="position"><xsl:apply-templates select="position"/></xsl:attribute> + <xsl:attribute name="rotation"><xsl:apply-templates select="rotation"/></xsl:attribute> + <xsl:apply-templates select="camera"/> + </camera> + </xsl:if></xsl:for-each> + <xsl:for-each select="node"><xsl:if test="@name = 'engine'"> + <engine> + <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute> + <xsl:attribute name="position"><xsl:apply-templates select="position"/></xsl:attribute> + <xsl:attribute name="rotation"><xsl:apply-templates select="rotation"/></xsl:attribute> + <xsl:for-each select="userData"> + <xsl:attribute name="angularVelLimit"><xsl:value-of select="@angularVelLimit"/></xsl:attribute> + <xsl:attribute name="engineFriction"><xsl:value-of select="@engineFriction"/></xsl:attribute> + <xsl:attribute name="engineInertia"><xsl:value-of select="@engineInertia"/></xsl:attribute> + <xsl:attribute name="torqueLinearMultiplier"><xsl:value-of select="@torqueLinearMultiplier"/></xsl:attribute> + </xsl:for-each> + </engine> + </xsl:if></xsl:for-each> + <xsl:for-each select="node"><xsl:if test="@name = 'clutch'"> + <clutch> + <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute> + <xsl:attribute name="position"><xsl:apply-templates select="position"/></xsl:attribute> + <xsl:attribute name="rotation"><xsl:apply-templates select="rotation"/></xsl:attribute> + <xsl:attribute name="coeffDynamicFriction"><xsl:value-of select="@coeffDynamicFriction"/></xsl:attribute> + <xsl:attribute name="coeffStaticFriction"><xsl:value-of select="@coeffStaticFriction"/></xsl:attribute> + <xsl:attribute name="maxTorqueTransfer"><xsl:value-of select="@maxTorqueTransfer"/></xsl:attribute> + </clutch> + </xsl:if></xsl:for-each> + + <xsl:for-each select="node"><xsl:if test="@name = 'gearbox'"> + <gearbox> + <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute> + <xsl:attribute name="position"><xsl:apply-templates select="position"/></xsl:attribute> + <xsl:attribute name="rotation"><xsl:apply-templates select="rotation"/></xsl:attribute> + <xsl:attribute name="gearboxFriction"><xsl:value-of select="@gearboxFriction"/></xsl:attribute> + <xsl:attribute name="gearboxInertia"><xsl:value-of select="@gearboxInertia"/></xsl:attribute> + <xsl:for-each select="node"><xsl:if test="@name = 'gear'"> + <gear> + <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute> + <xsl:attribute name="rotation"><xsl:apply-templates select="rotation"/></xsl:attribute> + <xsl:attribute name="position"><xsl:apply-templates select="position"/></xsl:attribute> + <xsl:attribute name="number"><xsl:value-of select="@number"/></xsl:attribute> + <xsl:attribute name="ratio"><xsl:value-of select="@ratio"/></xsl:attribute> + </gear> + </xsl:if></xsl:for-each> + </gearbox> + </xsl:if></xsl:for-each> + <xsl:for-each select="node"><xsl:if test="@name = 'finalDrive'"> + <finalDrive> + <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute> + <xsl:attribute name="position"><xsl:apply-templates select="position"/></xsl:attribute> + <xsl:attribute name="rotation"><xsl:apply-templates select="rotation"/></xsl:attribute> + <xsl:attribute name="diffFriction"><xsl:value-of select="@diffFriction"/></xsl:attribute> + <xsl:attribute name="diffInertia"><xsl:value-of select="@diffInertia"/></xsl:attribute> + <xsl:attribute name="finalDriveRatio"><xsl:value-of select="@finalDriveRatio"/></xsl:attribute> + </finalDrive> + </xsl:if></xsl:for-each> + + <!-- TODO in mosp + <lights> + <xsl:attribute name="empty">dummy</xsl:attribute> + <xsl:for-each select="node"> +<xsl:sort select="@name" order="ascending"/> +<xsl:if test="light"> + Name = <xsl:value-of select="@name"/><br /> + PosRot = <xsl:apply-templates select="position"/>, <xsl:apply-templates select="rotation"/><br /> + Data: <xsl:apply-templates select="light"/> + </xsl:if></xsl:for-each> + </lights> + --> + </xsl:if></xsl:for-each> +</vehicle> +</xsl:template> + +<xsl:template match="node"> +</xsl:template> + +<xsl:template match="light"> + <xsl:value-of select="@type"/> + </xsl:template> + <xsl:template match="camera"> + <xsl:attribute name="fov"> + <xsl:value-of select="@fov"/> + </xsl:attribute> + <xsl:attribute name="normal"> + <xsl:apply-templates select="normal"/> + </xsl:attribute> + <xsl:attribute name="clipping"> + <xsl:apply-templates select="clipping"/> + </xsl:attribute> + <xsl:attribute name="projectionType"> + <xsl:value-of select="@projectionType"/> + </xsl:attribute> + </xsl:template> + <xsl:template match="normal"> + <xsl:value-of select="@x"/><xsl:text> </xsl:text> + <xsl:value-of select="@y"/><xsl:text> </xsl:text> + <xsl:value-of select="@z"/> + </xsl:template> + <xsl:template match="clipping"> + <xsl:value-of select="@near"/><xsl:text> </xsl:text> + <xsl:value-of select="@far"/> + </xsl:template> + <xsl:template match="userData"> + <xsl:for-each select="property"> + <xsl:attribute name="{@name}"> + <xsl:value-of select="@data"/> + </xsl:attribute> + </xsl:for-each> + </xsl:template> + <xsl:template match="entity"> + <xsl:value-of select="@meshFile"/> + </xsl:template> + <xsl:template match="position"> + <xsl:value-of select="@x"/><xsl:text> </xsl:text> + <xsl:value-of select="@y"/><xsl:text> </xsl:text> + <xsl:value-of select="@z"/> + </xsl:template> + <xsl:template match="rotation"> + <xsl:value-of select="@qw"/><xsl:text> </xsl:text> + <xsl:value-of select="@qx"/><xsl:text> </xsl:text> + <xsl:value-of select="@qy"/><xsl:text> </xsl:text> + <xsl:value-of select="@qz"/> + </xsl:template> +</xsl:stylesheet> Added: trunk/tools/xmlIndenter/xmlIndenter.sh =================================================================== --- trunk/tools/xmlIndenter/xmlIndenter.sh (rev 0) +++ trunk/tools/xmlIndenter/xmlIndenter.sh 2006-04-06 23:37:51 UTC (rev 398) @@ -0,0 +1,74 @@ +#!/bin/bash +tmp="/tmp/tmpIndent$1" +tmpa="/tmp/tmpIndentB$1" + +head -n 1 $1 > $2 +max=$(wc -l $1|sed "s/\ .*//g") +let max=$max-1 +tail -n $max $1 > $tmpa + +cat $tmpa | sed "s/>/>@/g" | tr "@" "\n" |tr "\n" "@" |sed "s/\">/\"@>/g"| sed "s/\"\/>/\"@\/>/g" |sed "s/\(<[^\ ]*\ \)/\1@/g" | sed "s/\ \([^\"]*\"[^\"]*\"\)/@\1/g" | sed "s/\([\ ]*\)\([^<]*[^@]*\)@/\1\2@\1/g" | sed "s/@[\ ]*@/@/g" | tr "@" "\n" > $tmp + +# | sed "s/[\ ]*\([^\ ]\)/\1/g" + +IFS=$'\t\n' + +line="0" +ntab="0" +closed="0" +reindent="0" +max=$(wc -l $tmp|sed "s/\ .*//g") +for l in $(cat $tmp) +do + echo "[$line / $max]" + let line=$line+1 + if [ "$closed" = "1" ] + then + # </ -- > + if [ "W$(echo $l |sed "s/<\/.*>/WEIO/g")O" = "WWEIOO" ]; then + let ntab=$ntab-4 + reindent="1" + fi + # < -- /> + if [ "W$(echo $l |sed "s/<.*\/>/WEIO/g")O" = "WWEIOO" ]; then + let ntab=$ntab-4 + reindent="1" + fi + fi + closed="0" + # /> + if [ "W$(echo $l |sed "s/\/>/WEIO/g")O" = "WWEIOO" ]; then + let ntab=$ntab-4 + closed="1" + fi + # > + if [ "W$(echo $l |sed "s/>/WEIO/g")O" = "WWEIOO" ]; then + closed="1" + fi + # text + perl -e "print ' 'x$ntab" >> $2 + echo "$l" >> $2 + if [ "$reindent" = "1" ]; then + let ntab=$ntab+4 + reindent="0" + fi + # < -- /> + if [ "W$(echo $l |sed "s/<.*\/>/WEIO/g")O" = "WWEIOO" ]; then + let ntab=$ntab-4 + else + # </ -- > + if [ "W$(echo $l |sed "s/<\/.*>/WEIO/g")O" = "WWEIOO" ]; then + let ntab=$ntab-4 + else + # < -- + if [ "W$(echo $l |sed "s/<[^>]*/WEIO/g")O" = "WWEIOO" ]; then + let ntab=$ntab+4 + else + # < -- > + if [ "W$(echo $l |sed "s/<[^>]*>/WEIO/g")O" = "WWEIOO" ]; then + let ntab=$ntab+4 + fi + fi + fi + fi +done Property changes on: trunk/tools/xmlIndenter/xmlIndenter.sh ___________________________________________________________________ Name: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <st...@us...> - 2006-04-06 23:33:48
|
Revision: 397 Author: stenyak Date: 2006-04-06 16:33:06 -0700 (Thu, 06 Apr 2006) ViewCVS: http://svn.sourceforge.net/motorsport/?rev=397&view=rev Log Message: ----------- Optimized the creation of dependencies for child meshes. Modified Paths: -------------- trunk/src/common/ogreObject.cpp trunk/src/vehicle/body.cpp trunk/src/vehicle/wheel.cpp Modified: trunk/src/common/ogreObject.cpp =================================================================== --- trunk/src/common/ogreObject.cpp 2006-03-22 01:01:13 UTC (rev 396) +++ trunk/src/common/ogreObject.cpp 2006-04-06 23:33:06 UTC (rev 397) @@ -38,10 +38,12 @@ node = NULL; odeObject = NULL; + /* FIXME: uncomment me bool error = true; try { SystemData::getSystemDataPointer()->ogreSceneManager->getEntity (id); } catch (Ogre::Exception & e) { error = false; } if (error) worldObject->getLog()->__format(LOG_ERROR, "Entity \"#%s\" (%s) already exists!.", id.c_str(), name.c_str()); + */ entity = SystemData::getSystemDataPointer ()->ogreSceneManager->createEntity (id, meshPath); entity->setCastShadows(true); @@ -75,12 +77,12 @@ void OgreObject::setOgreReference(OgreObject * ogreObject, Quaternion rotationDiff, Vector3d positionDiff) { - node->detachObject(entity); - delete node; + static_cast<Ogre::SceneNode*>(SystemData::getSystemDataPointer()->ogreSceneManager->getRootSceneNode())->removeChild(node); + ogreObject->getNode()->addChild(node); Ogre::Vector3 * pd = new Ogre::Vector3(positionDiff.x, positionDiff.y, positionDiff.z); Ogre::Quaternion * rd = new Ogre::Quaternion (rotationDiff.w, rotationDiff.x, rotationDiff.y, rotationDiff.z); - node = static_cast<Ogre::SceneNode*>(ogreObject->getNode()->createChild (*pd, *rd)); - node->attachObject (entity); + node->setPosition(*pd); + node->setOrientation(*rd); } Modified: trunk/src/vehicle/body.cpp =================================================================== --- trunk/src/vehicle/body.cpp 2006-03-22 01:01:13 UTC (rev 396) +++ trunk/src/vehicle/body.cpp 2006-04-06 23:33:06 UTC (rev 397) @@ -40,6 +40,8 @@ ogreData.meshPath = getPath() + ogreData.meshPath; OgreObject * ogreObject = new OgreObject(this, ogreData, getId()); ogreObjects[ogreObject->getId()] = ogreObject; + odeObjects[getName()] = new OdeObject(this, data, getName()); + ogreObjects[ogreObject->getId()]->setOdeReference(getMainOdeObject()); //create child meshes XmlTag * t = tag->getTag(0); for (int i = 0; i < tag->nTags(); t = tag->getTag(++i)) { @@ -55,8 +57,6 @@ } } } - odeObjects[getName()] = new OdeObject(this, data, getName()); - ogreObjects.begin()->second->setOdeReference(getMainOdeObject()); // set the air drag variables correctly if (frontalArea == 0) Modified: trunk/src/vehicle/wheel.cpp =================================================================== --- trunk/src/vehicle/wheel.cpp 2006-03-22 01:01:13 UTC (rev 396) +++ trunk/src/vehicle/wheel.cpp 2006-04-06 23:33:06 UTC (rev 397) @@ -46,9 +46,11 @@ ogreData.meshPath = getPath() + ogreData.meshPath; OgreObject * ogreObject = new OgreObject(this, ogreData, getId()); ogreObjects[ogreObject->getId()] = ogreObject; + odeObjects[getId()] = new OdeObject(this, data, getId()); + ogreObjects[ogreObject->getId()]->setOdeReference(getMainOdeObject()); //create child meshes XmlTag * t = tag->getTag(0); for (int i = 0; i < tag->nTags(); t = tag->getTag(++i)) - { + { if (t->getName() == "child") { OgreObjectData childData; @@ -61,8 +63,6 @@ } } } - odeObjects[getId()] = new OdeObject(this, data, getId()); - ogreObjects.begin()->second->setOdeReference(getMainOdeObject()); } Wheel::~Wheel () This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |