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...> - 2008-01-04 22:23:45
|
Revision: 470
http://motorsport.svn.sourceforge.net/motorsport/?rev=470&view=rev
Author: stenyak
Date: 2008-01-04 14:23:30 -0800 (Fri, 04 Jan 2008)
Log Message:
-----------
Added notes on repository migration (svn -> hg).
Added Paths:
-----------
readme.txt
Added: readme.txt
===================================================================
--- readme.txt (rev 0)
+++ readme.txt 2008-01-04 22:23:30 UTC (rev 470)
@@ -0,0 +1,3 @@
+The Motorsport Subversion repository was migrated to Mercurial on January 2008.
+
+The new repository can be accessed as explained at http://www.motorsport-sim.org/index.php?go=taskView&tsk=794
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st...@us...> - 2008-01-04 22:19:42
|
Revision: 469
http://motorsport.svn.sourceforge.net/motorsport/?rev=469&view=rev
Author: stenyak
Date: 2008-01-04 14:19:06 -0800 (Fri, 04 Jan 2008)
Log Message:
-----------
Removed all existing code to enforce repository migration.
Removed Paths:
-------------
branches/
releases/
trunk/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2007-04-24 20:04:53
|
Revision: 468
http://svn.sourceforge.net/motorsport/?rev=468&view=rev
Author: habalux
Date: 2007-04-24 13:04:50 -0700 (Tue, 24 Apr 2007)
Log Message:
-----------
Applied fixes and cleanups patch by terrible (patch #1704925)
Modified Paths:
--------------
trunk/cfg/mainConfig.xml
trunk/cfg/physicsConfig.xml
trunk/src/common/axis.cpp
trunk/src/common/axis.hpp
trunk/src/common/camera.cpp
trunk/src/common/camera.hpp
trunk/src/common/location.cpp
trunk/src/common/location.hpp
trunk/src/common/odeObject.cpp
trunk/src/common/odeObject.hpp
trunk/src/common/ogreObject.cpp
trunk/src/common/ogreObject.hpp
trunk/src/common/quaternion.cpp
trunk/src/common/quaternion.hpp
trunk/src/common/shared.hpp
trunk/src/common/vector3d.cpp
trunk/src/common/vector3d.hpp
trunk/src/common/worldObject.cpp
trunk/src/common/worldObject.hpp
trunk/src/graphics.cpp
trunk/src/graphics.hpp
trunk/src/gui.cpp
trunk/src/gui.hpp
trunk/src/input.cpp
trunk/src/input.hpp
trunk/src/log/logEngine.cpp
trunk/src/log/logEngine.hpp
trunk/src/log/testLogEngine.cpp
trunk/src/main.cpp
trunk/src/main.hpp
trunk/src/physics.cpp
trunk/src/physics.hpp
trunk/src/system.cpp
trunk/src/system.hpp
trunk/src/tools/mospPath.cpp
trunk/src/tools/mospPath.hpp
trunk/src/tools/paths.cpp
trunk/src/tools/paths.hpp
trunk/src/tools/testAxis.cpp
trunk/src/tools/testVector3d.cpp
trunk/src/tools/xercesc_fwd.hpp
trunk/src/tools/xmlParser.cpp
trunk/src/tools/xmlParser.hpp
trunk/src/tools/xmlTag.cpp
trunk/src/tools/xmlTag.hpp
trunk/src/vehicle/body.cpp
trunk/src/vehicle/body.hpp
trunk/src/vehicle/driveJoint.cpp
trunk/src/vehicle/driveJoint.hpp
trunk/src/vehicle/driveMass.cpp
trunk/src/vehicle/driveMass.hpp
trunk/src/vehicle/engine.cpp
trunk/src/vehicle/engine.hpp
trunk/src/vehicle/finalDrive.cpp
trunk/src/vehicle/finalDrive.hpp
trunk/src/vehicle/gearbox.cpp
trunk/src/vehicle/gearbox.hpp
trunk/src/vehicle/pedal.cpp
trunk/src/vehicle/pedal.hpp
trunk/src/vehicle/suspension.cpp
trunk/src/vehicle/suspension.hpp
trunk/src/vehicle/vehicle.cpp
trunk/src/vehicle/vehicle.hpp
trunk/src/vehicle/wheel.cpp
trunk/src/vehicle/wheel.hpp
trunk/src/world/area.cpp
trunk/src/world/area.hpp
trunk/src/world/part.cpp
trunk/src/world/part.hpp
trunk/src/world/world.cpp
trunk/src/world/world.hpp
Modified: trunk/cfg/mainConfig.xml
===================================================================
--- trunk/cfg/mainConfig.xml 2007-03-15 20:14:41 UTC (rev 467)
+++ trunk/cfg/mainConfig.xml 2007-04-24 20:04:50 UTC (rev 468)
@@ -6,5 +6,5 @@
_videoRecordTimestep = "40" _="1000 / 40 = 25 frames per second"
videoRecordTimestep = "0"
- dataDir="../data"
+ dataDir="../data/"
/>
Modified: trunk/cfg/physicsConfig.xml
===================================================================
--- trunk/cfg/physicsConfig.xml 2007-03-15 20:14:41 UTC (rev 467)
+++ trunk/cfg/physicsConfig.xml 2007-04-24 20:04:50 UTC (rev 468)
@@ -6,8 +6,9 @@
>
<ode
_cfmValue = "default"
- cfmValue = "0.00000001"
- __cfmValue = "0.001"
+ __cfmValue = "0.00000001"
+ ___cfmValue = "0.001"
+ cfmValue = "0.000001"
_erpValue = "default"
erpValue = "0.8"
__erpValue = "0.5"
Modified: trunk/src/common/axis.cpp
===================================================================
--- trunk/src/common/axis.cpp 2007-03-15 20:14:41 UTC (rev 467)
+++ trunk/src/common/axis.cpp 2007-04-24 20:04:50 UTC (rev 468)
@@ -1,5 +1,5 @@
/*****************************************************************************\
-|* Copyright (C) 2003, 2006 "Motorsport" developers (*) *|
+|* Copyright (C) 2003, 2007 "Motorsport" developers (*) *|
|* Part of the "Motorsport" project (http://motorsport.sourceforge.net) *|
|* Licensed under the GNU General Public License (*) *|
|* *|
Modified: trunk/src/common/axis.hpp
===================================================================
--- trunk/src/common/axis.hpp 2007-03-15 20:14:41 UTC (rev 467)
+++ trunk/src/common/axis.hpp 2007-04-24 20:04:50 UTC (rev 468)
@@ -1,5 +1,5 @@
/*****************************************************************************\
-|* Copyright (C) 2003, 2006 "Motorsport" developers (*) *|
+|* Copyright (C) 2003, 2007 "Motorsport" developers (*) *|
|* Part of the "Motorsport" project (http://motorsport.sourceforge.net) *|
|* Licensed under the GNU General Public License (*) *|
|* *|
@@ -8,10 +8,11 @@
\*****************************************************************************/
#ifndef AXIS_HPP
-# define AXIS_HPP
-# include <limits>
-# include <string>
+#define AXIS_HPP
+#include <limits>
+#include <string>
+
class Axis
{
private:
Modified: trunk/src/common/camera.cpp
===================================================================
--- trunk/src/common/camera.cpp 2007-03-15 20:14:41 UTC (rev 467)
+++ trunk/src/common/camera.cpp 2007-04-24 20:04:50 UTC (rev 468)
@@ -1,5 +1,5 @@
/*****************************************************************************\
-|* Copyright (C) 2003, 2006 "Motorsport" developers (*) *|
+|* Copyright (C) 2003, 2007 "Motorsport" developers (*) *|
|* Part of the "Motorsport" project (http://motorsport.sourceforge.net) *|
|* Licensed under the GNU General Public License (*) *|
|* *|
@@ -8,18 +8,17 @@
\*****************************************************************************/
#include "camera.hpp"
-#include "Ogre.h"
-#include "OgreNoMemoryMacros.h"
+#include <Ogre.h>
+#include <OgreNoMemoryMacros.h>
#include "vector3d.hpp"
#include <cstdio>
#include "system.hpp"
#include "world.hpp"
#include "axis.hpp"
-#include "SDL/SDL_keysym.h"
-#include "ode/ode.h"
+#include <SDL/SDL_keysym.h>
+#include <ode/ode.h>
#include "log/logEngine.hpp"
#include "area.hpp"
-#include "vector3d.hpp"
pCamera Camera::create(XmlTag * tag)
{
@@ -45,12 +44,10 @@
ogreCamera->setNearClipDistance (0.100);
// ogreCamera->setAutoAspectRatio(true);
log->__format (LOG_DEVELOPER, "Creating a camera");
- positionOffset = new Vector3d (0, 0, 0);
targetOffset = new Vector3d (0, 0, 0);
positionID = 0;
targetID = 0;
isFree = false;
- delete positionOffset;
positionOffset = new Vector3d (tag->getAttribute("position"));
std::string t = "";
if ( (t = tag->getAttribute("target")) != "")
Modified: trunk/src/common/camera.hpp
===================================================================
--- trunk/src/common/camera.hpp 2007-03-15 20:14:41 UTC (rev 467)
+++ trunk/src/common/camera.hpp 2007-04-24 20:04:50 UTC (rev 468)
@@ -1,5 +1,5 @@
/*****************************************************************************\
-|* Copyright (C) 2003, 2006 "Motorsport" developers (*) *|
+|* Copyright (C) 2003, 2007 "Motorsport" developers (*) *|
|* Part of the "Motorsport" project (http://motorsport.sourceforge.net) *|
|* Licensed under the GNU General Public License (*) *|
|* *|
@@ -8,11 +8,12 @@
\*****************************************************************************/
#ifndef CAMERA_HPP
-# define CAMERA_HPP
-# include "ode/objects.h"
-# include "worldObject.hpp"
-# include <string>
+#define CAMERA_HPP
+#include <ode/objects.h>
+#include "worldObject.hpp"
+#include <string>
+
namespace Ogre {
class Camera;
};
Modified: trunk/src/common/location.cpp
===================================================================
--- trunk/src/common/location.cpp 2007-03-15 20:14:41 UTC (rev 467)
+++ trunk/src/common/location.cpp 2007-04-24 20:04:50 UTC (rev 468)
@@ -1,5 +1,5 @@
/*****************************************************************************\
-|* Copyright (C) 2003, 2006 "Motorsport" developers (*) *|
+|* Copyright (C) 2003, 2007 "Motorsport" developers (*) *|
|* Part of the "Motorsport" project (http://motorsport.sourceforge.net) *|
|* Licensed under the GNU General Public License (*) *|
|* *|
@@ -15,7 +15,7 @@
pLocation loc(new Location(tag));
return loc;
}
-pLocation Location::create(std::string name, Vector3d position, Quaternion rotation)
+pLocation Location::create(const std::string & name, Vector3d position, Quaternion rotation)
{
pLocation loc(new Location(name, position, rotation));
return loc;
@@ -27,7 +27,7 @@
position = Vector3d(tag->getAttribute("position"));
rotation = Quaternion(tag->getAttribute("rotation"));
}
-Location::Location (std::string name, Vector3d position, Quaternion rotation)
+Location::Location (const std::string & name, Vector3d position, Quaternion rotation)
{
this->name = name;
this->position = position;
Modified: trunk/src/common/location.hpp
===================================================================
--- trunk/src/common/location.hpp 2007-03-15 20:14:41 UTC (rev 467)
+++ trunk/src/common/location.hpp 2007-04-24 20:04:50 UTC (rev 468)
@@ -1,5 +1,5 @@
/*****************************************************************************\
-|* Copyright (C) 2003, 2006 "Motorsport" developers (*) *|
+|* Copyright (C) 2003, 2007 "Motorsport" developers (*) *|
|* Part of the "Motorsport" project (http://motorsport.sourceforge.net) *|
|* Licensed under the GNU General Public License (*) *|
|* *|
@@ -9,11 +9,12 @@
#ifndef LOCATION_HPP
#define LOCATION_HPP
+
#include "vector3d.hpp"
#include <string>
#include "quaternion.hpp"
#include "xmlTag.hpp"
-#include <common/shared.hpp>
+#include "common/shared.hpp"
SHARED_PTR_MAP(Location, pLocation, Locations, LocationsIt, wLocation);
@@ -24,10 +25,10 @@
Quaternion rotation;
std::string name;
Location (XmlTag * tag);
- Location (std::string name, Vector3d position, Quaternion rotation);
+ Location (const std::string & name, Vector3d position, Quaternion rotation);
public:
static pLocation create(XmlTag * tag);
- static pLocation create(std::string name, Vector3d position, Quaternion rotation);
+ static pLocation create(const std::string & name, Vector3d position, Quaternion rotation);
~Location ();
Vector3d getPosition();
Quaternion getRotation();
Modified: trunk/src/common/odeObject.cpp
===================================================================
--- trunk/src/common/odeObject.cpp 2007-03-15 20:14:41 UTC (rev 467)
+++ trunk/src/common/odeObject.cpp 2007-04-24 20:04:50 UTC (rev 468)
@@ -1,5 +1,5 @@
/*****************************************************************************\
-|* Copyright (C) 2003, 2006 "Motorsport" developers (*) *|
+|* Copyright (C) 2003, 2007 "Motorsport" developers (*) *|
|* Part of the "Motorsport" project (http://motorsport.sourceforge.net) *|
|* Licensed under the GNU General Public License (*) *|
|* *|
@@ -8,8 +8,8 @@
\*****************************************************************************/
#include "odeObject.hpp"
-#include "Ogre.h"
-#include "OgreNoMemoryMacros.h"
+#include <Ogre.h>
+#include <OgreNoMemoryMacros.h>
#include "system.hpp"
#include "vector3d.hpp"
#include "quaternion.hpp"
@@ -32,7 +32,7 @@
this->id = std::string(numberString);
instancesCount++;
}
-OdeObject::OdeObject (WorldObject * worldObject, pMeshOdeData data, std::string name)
+OdeObject::OdeObject (WorldObject * worldObject, pMeshOdeData data, const std::string & name)
{
updateId();
this->worldObject = worldObject;
@@ -56,7 +56,7 @@
dGeomTriMeshDataBuildDouble (ground, vertices, sizeof (dVector3), vertex_count, indices, index_count, 3 * sizeof (unsigned int));
#endif
}
-OdeObject::OdeObject (WorldObject * worldObject, pPartOdeData data, std::string name)
+OdeObject::OdeObject (WorldObject * worldObject, pPartOdeData data, const std::string & name)
{
updateId();
this->worldObject = worldObject;
@@ -92,7 +92,7 @@
dGeomSetBody (geomIDs[name], bodyID);
dBodySetMass (bodyID, &dmass);
}
-OdeObject::OdeObject (WorldObject * worldObject, std::string name)
+OdeObject::OdeObject (WorldObject * worldObject, const std::string & name)
{
updateId();
this->worldObject = worldObject;
@@ -100,7 +100,7 @@
bodyID = NULL;
bodyID = dBodyCreate (World::get()->ghostWorldID);
}
-OdeObject::OdeObject (WorldObject * worldObject, pBodyOdeData data, std::string name)
+OdeObject::OdeObject (WorldObject * worldObject, pBodyOdeData data, const std::string & name)
{
updateId();
this->worldObject = worldObject;
@@ -148,7 +148,7 @@
dBodySetLinearVel (bodyID, 0, 0, 0);
dBodySetAngularVel (bodyID, 0, 0, 0);
}
-OdeObject::OdeObject (WorldObject * worldObject, pBoneOdeData data, std::string name)
+OdeObject::OdeObject (WorldObject * worldObject, pBoneOdeData data, const std::string & name)
{
updateId();
this->worldObject = worldObject;
@@ -178,7 +178,7 @@
//TODO: check if there's anything left to do here with ODE...
worldObject->getLog()->__format (LOG_DEVELOPER, "Removing geoms");
GeomIDsIt i = geomIDs.begin();
- for(;i != geomIDs.end(); i++)
+ for(;i != geomIDs.end(); ++i)
{
worldObject->getLog()->__format (LOG_DEVELOPER, "Removing geom id=%s", i->first.c_str());
dGeomDestroy (i->second);
@@ -213,7 +213,7 @@
worldObject->getLog()->__format (LOG_ERROR, "No geoms!! OdeObj name=%s", this->getId().c_str());
}
GeomIDsIt i = geomIDs.begin();
- for(;i != geomIDs.end(); i++)
+ for(;i != geomIDs.end(); ++i)
{
dGeomSetPosition (i->second, position.x, position.y, position.z);
}
@@ -229,7 +229,7 @@
if (bodyID == 0)
{
GeomIDsIt i = geomIDs.begin();
- for(;i != geomIDs.end(); i++)
+ for(;i != geomIDs.end(); ++i)
{
dGeomSetRotation (i->second, rot);
}
@@ -280,7 +280,7 @@
{
return bodyID;
}
-dGeomID OdeObject::getGeomID(std::string name)
+dGeomID OdeObject::getGeomID(const std::string & name)
{
return geomIDs[name];
}
@@ -294,7 +294,7 @@
size_t index_offset = index_count;
// Calculate how many vertices and indices we're going to need
- for (int i = 0; i < mesh->getNumSubMeshes (); i++)
+ for (int i = 0; i < mesh->getNumSubMeshes (); ++i)
{
Ogre::SubMesh * submesh = mesh->getSubMesh (i);
@@ -325,7 +325,7 @@
added_shared = false;
// Run through the submeshes again, adding the data into the arrays
- for (int i = 0; i < mesh->getNumSubMeshes (); i++)
+ for (int i = 0; i < mesh->getNumSubMeshes (); ++i)
{
Ogre::SubMesh * submesh = mesh->getSubMesh (i);
Modified: trunk/src/common/odeObject.hpp
===================================================================
--- trunk/src/common/odeObject.hpp 2007-03-15 20:14:41 UTC (rev 467)
+++ trunk/src/common/odeObject.hpp 2007-04-24 20:04:50 UTC (rev 468)
@@ -1,5 +1,5 @@
/*****************************************************************************\
-|* Copyright (C) 2003, 2006 "Motorsport" developers (*) *|
+|* Copyright (C) 2003, 2007 "Motorsport" developers (*) *|
|* Part of the "Motorsport" project (http://motorsport.sourceforge.net) *|
|* Licensed under the GNU General Public License (*) *|
|* *|
@@ -9,10 +9,11 @@
#ifndef ODEOBJECT_HPP
#define ODEOBJECT_HPP
+
#include "log/logEngine.hpp"
#include "worldObject.hpp"
-#include "ode/objects.h"
-#include <shared.hpp>
+#include <ode/objects.h>
+#include "shared.hpp"
#include "vector3d.hpp"
class Quaternion;
@@ -39,11 +40,11 @@
std::string id;
public:
- OdeObject (WorldObject * worldObject, std::string name);
- OdeObject (WorldObject * worldObject, pMeshOdeData data, std::string name);
- OdeObject (WorldObject * worldObject, pPartOdeData data, std::string name);
- OdeObject (WorldObject * worldObject, pBodyOdeData data, std::string name);
- OdeObject (WorldObject * worldObject, pBoneOdeData data, std::string name);
+ OdeObject (WorldObject * worldObject, const std::string & name);
+ OdeObject (WorldObject * worldObject, pMeshOdeData data, const std::string & name);
+ OdeObject (WorldObject * worldObject, pPartOdeData data, const std::string & name);
+ OdeObject (WorldObject * worldObject, pBodyOdeData data, const std::string & name);
+ OdeObject (WorldObject * worldObject, pBoneOdeData data, const std::string & name);
~OdeObject ();
Vector3d getPosition();
Quaternion getRotation();
@@ -52,7 +53,7 @@
void setPosition (Vector3d position);
void setRotation (Quaternion rotation);
dBodyID getBodyID();
- dGeomID getGeomID(std::string name);
+ dGeomID getGeomID(const std::string & name);
std::string getId();
};
class MeshOdeData
Modified: trunk/src/common/ogreObject.cpp
===================================================================
--- trunk/src/common/ogreObject.cpp 2007-03-15 20:14:41 UTC (rev 467)
+++ trunk/src/common/ogreObject.cpp 2007-04-24 20:04:50 UTC (rev 468)
@@ -1,5 +1,5 @@
/*****************************************************************************\
-|* Copyright (C) 2003, 2006 "Motorsport" developers (*) *|
+|* Copyright (C) 2003, 2007 "Motorsport" developers (*) *|
|* Part of the "Motorsport" project (http://motorsport.sourceforge.net) *|
|* Licensed under the GNU General Public License (*) *|
|* *|
@@ -9,8 +9,8 @@
#include "ogreObject.hpp"
#include "system.hpp"
-#include "Ogre.h"
-#include "OgreNoMemoryMacros.h"
+#include <Ogre.h>
+#include <OgreNoMemoryMacros.h>
#include "vector3d.hpp"
#include "quaternion.hpp"
#include "odeObject.hpp"
@@ -28,7 +28,7 @@
{
return id;
}
-OgreObject::OgreObject (WorldObject * worldObject, pOgreObjectData data, std::string name, bool useMesh)
+OgreObject::OgreObject (WorldObject * worldObject, pOgreObjectData data, const std::string & name, bool useMesh)
{
updateId();
this->worldObject = worldObject;
@@ -42,7 +42,7 @@
{
entity = System::get()->ogreSceneManager->createEntity (id + name, meshPath);
entity->setCastShadows(true);
- for(unsigned int i = 0; i < entity->getNumSubEntities(); i++)
+ 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() );
}
@@ -62,6 +62,8 @@
node->detachObject(entity);
if (entity->isAttached()) worldObject->getLog()->__format(LOG_WARNING, "Entity \"%s\" (%s) still attached somewhere!.", name.c_str(), entity->getName().c_str());
System::get()->ogreSceneManager->destroyEntity (entity);
+ //Ivan: I don't know if this is equivalent, but exists in Ogre 1.0.6:
+ //System::get()->ogreSceneManager->removeEntity (entity);
entity = NULL;
}
Modified: trunk/src/common/ogreObject.hpp
===================================================================
--- trunk/src/common/ogreObject.hpp 2007-03-15 20:14:41 UTC (rev 467)
+++ trunk/src/common/ogreObject.hpp 2007-04-24 20:04:50 UTC (rev 468)
@@ -1,5 +1,5 @@
/*****************************************************************************\
-|* Copyright (C) 2003, 2006 "Motorsport" developers (*) *|
+|* Copyright (C) 2003, 2007 "Motorsport" developers (*) *|
|* Part of the "Motorsport" project (http://motorsport.sourceforge.net) *|
|* Licensed under the GNU General Public License (*) *|
|* *|
@@ -9,9 +9,10 @@
#ifndef OGREOBJECT_HPP
#define OGREOBJECT_HPP
+
#include "log/logEngine.hpp"
#include "worldObject.hpp"
-#include <shared.hpp>
+#include "shared.hpp"
namespace Ogre {
class Entity;
@@ -39,7 +40,7 @@
WorldObject * worldObject;
std::string id;
public:
- OgreObject (WorldObject * worldObject, pOgreObjectData data, std::string name, bool useMesh = true);
+ OgreObject (WorldObject * worldObject, pOgreObjectData data, const std::string & name, bool useMesh = true);
~OgreObject ();
std::string getId();
void setOdeReference(pOdeObject odeObject);
Modified: trunk/src/common/quaternion.cpp
===================================================================
--- trunk/src/common/quaternion.cpp 2007-03-15 20:14:41 UTC (rev 467)
+++ trunk/src/common/quaternion.cpp 2007-04-24 20:04:50 UTC (rev 468)
@@ -1,5 +1,5 @@
/*****************************************************************************\
-|* Copyright (C) 2003, 2006 "Motorsport" developers (*) *|
+|* Copyright (C) 2003, 2007 "Motorsport" developers (*) *|
|* Part of the "Motorsport" project (http://motorsport.sourceforge.net) *|
|* Licensed under the GNU General Public License (*) *|
|* *|
Modified: trunk/src/common/quaternion.hpp
===================================================================
--- trunk/src/common/quaternion.hpp 2007-03-15 20:14:41 UTC (rev 467)
+++ trunk/src/common/quaternion.hpp 2007-04-24 20:04:50 UTC (rev 468)
@@ -1,5 +1,5 @@
/*****************************************************************************\
-|* Copyright (C) 2003, 2006 "Motorsport" developers (*) *|
+|* Copyright (C) 2003, 2007 "Motorsport" developers (*) *|
|* Part of the "Motorsport" project (http://motorsport.sourceforge.net) *|
|* Licensed under the GNU General Public License (*) *|
|* *|
@@ -8,10 +8,11 @@
\*****************************************************************************/
#ifndef QUATERNION_HPP
-# define QUATERNION_HPP
-# include "ode/ode.h"
-# include <string>
+#define QUATERNION_HPP
+#include <ode/ode.h>
+#include <string>
+
class Vector3d;
class Quaternion
Modified: trunk/src/common/shared.hpp
===================================================================
--- trunk/src/common/shared.hpp 2007-03-15 20:14:41 UTC (rev 467)
+++ trunk/src/common/shared.hpp 2007-04-24 20:04:50 UTC (rev 468)
@@ -1,5 +1,5 @@
/*****************************************************************************\
-|* Copyright (C) 2003, 2006 "Motorsport" developers (*) *|
+|* Copyright (C) 2003, 2007 "Motorsport" developers (*) *|
|* Part of the "Motorsport" project (http://motorsport.sourceforge.net) *|
|* Licensed under the GNU General Public License (*) *|
|* *|
@@ -9,6 +9,7 @@
#ifndef SHARED_HPP
#define SHARED_HPP
+
#include <map>
#include <boost/shared_ptr.hpp>
#include <boost/enable_shared_from_this.hpp>
Modified: trunk/src/common/vector3d.cpp
===================================================================
--- trunk/src/common/vector3d.cpp 2007-03-15 20:14:41 UTC (rev 467)
+++ trunk/src/common/vector3d.cpp 2007-04-24 20:04:50 UTC (rev 468)
@@ -1,5 +1,5 @@
/*****************************************************************************\
-|* Copyright (C) 2003, 2006 "Motorsport" developers (*) *|
+|* Copyright (C) 2003, 2007 "Motorsport" developers (*) *|
|* Part of the "Motorsport" project (http://motorsport.sourceforge.net) *|
|* Licensed under the GNU General Public License (*) *|
|* *|
@@ -216,7 +216,7 @@
{
Vector3d ret;
size_t size = vec.size();
- for (size_t i = 0; i < size; i++) {
+ for (size_t i = 0; i < size; ++i) {
ret += vec[i];
}
ret.scalarDivide((dReal)size); //scalarDivide checks for div0
Modified: trunk/src/common/vector3d.hpp
===================================================================
--- trunk/src/common/vector3d.hpp 2007-03-15 20:14:41 UTC (rev 467)
+++ trunk/src/common/vector3d.hpp 2007-04-24 20:04:50 UTC (rev 468)
@@ -1,5 +1,5 @@
/*****************************************************************************\
-|* Copyright (C) 2003, 2006 "Motorsport" developers (*) *|
+|* Copyright (C) 2003, 2007 "Motorsport" developers (*) *|
|* Part of the "Motorsport" project (http://motorsport.sourceforge.net) *|
|* Licensed under the GNU General Public License (*) *|
|* *|
@@ -8,11 +8,12 @@
\*****************************************************************************/
#ifndef VECTOR3D_HPP
-# define VECTOR3D_HPP
-# include <vector>
-# include <cmath>
-# include "ode/ode.h"
+#define VECTOR3D_HPP
+#include <vector>
+#include <cmath>
+#include <ode/ode.h>
+
class Vector3d
{
public:
@@ -42,7 +43,7 @@
Vector3d & scalarAdd(const dReal value);
Vector3d & scalarMultiply(const dReal value);
Vector3d & scalarDivide(const dReal value);
- const Vector3d GetCrossProduct (const std::vector < Vector3d > &vec);
+ static const Vector3d GetCrossProduct (const std::vector < Vector3d > &vec);
};
#endif
Modified: trunk/src/common/worldObject.cpp
===================================================================
--- trunk/src/common/worldObject.cpp 2007-03-15 20:14:41 UTC (rev 467)
+++ trunk/src/common/worldObject.cpp 2007-04-24 20:04:50 UTC (rev 468)
@@ -1,5 +1,5 @@
/*****************************************************************************\
-|* Copyright (C) 2003, 2006 "Motorsport" developers (*) *|
+|* Copyright (C) 2003, 2007 "Motorsport" developers (*) *|
|* Part of the "Motorsport" project (http://motorsport.sourceforge.net) *|
|* Licensed under the GNU General Public License (*) *|
|* *|
@@ -61,7 +61,7 @@
this->xmlPath = container->getPath();
}
OdeObjectsIt j = odeObjects.begin();
- for(;j != odeObjects.end(); j++)
+ for(;j != odeObjects.end(); ++j)
{
if (j->second->getBodyID() == 0)
{
@@ -71,7 +71,7 @@
}
}
pWorldObject t = shared_from_this();
- for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++)
+ for (WorldObjectsIt i = objects.begin(); i != objects.end(); ++i)
{
if (i->second) i->second->setContainer(t);
}
@@ -91,7 +91,7 @@
{
pLogEngine log (LogEngine::create(LOG_DEVELOPER, "WorldObjects"));
WorldObjectsCIt i = worldObjects.begin();
- for(;i != worldObjects.end(); i++)
+ for(;i != worldObjects.end(); ++i)
{
if (i->second != NULL)
log->__format(LOG_DEVELOPER, "WorldObject id#%s.\t Full name: %s", i->second->getId().c_str(), i->second->getFullName().c_str());
@@ -106,6 +106,7 @@
{
//TODO use a Class::mospInternalPath()
std::string type;
+
if (0) type.clear();
else if (dynamic_cast<DoubleWishbone *>(this)) type = "doublewishbone";
else if (dynamic_cast<Fixed *>(this)) type = "fixed";
@@ -129,9 +130,10 @@
else if (dynamic_cast<World *> (this)) type = "world";
else if (dynamic_cast<Camera *> (this)) type = "camera";
else if (dynamic_cast<WorldObject *> (this)) type = "worldobject";
+
return "(" + type + ")" + name;
}
-void WorldObject::setName(std::string name)
+void WorldObject::setName(const std::string & name)
{
this->name = name;
log->setName(getFullName());
@@ -147,7 +149,7 @@
if (path == "/unknownPath/") return System::get()->getCurrentPath();
return path;
}
-void WorldObject::setPath(std::string path)
+void WorldObject::setPath(const std::string & path)
{
this->path = path;
}
@@ -155,7 +157,7 @@
{
return xmlPath;
}
-void WorldObject::setXmlPath(std::string xmlPath)
+void WorldObject::setXmlPath(const std::string & xmlPath)
{
this->xmlPath = xmlPath;
}
@@ -179,12 +181,12 @@
{
WorldObjectsIt i = objects.begin();
//step torque transfer objects first
- for (i = objects.begin(); i != objects.end(); i++)
+ for (i = objects.begin(); i != objects.end(); ++i)
{
if (boost::dynamic_pointer_cast<DriveJoint>(i->second)) i->second->stepPhysics();
}
//step the rest of objects
- for (i = objects.begin(); i != objects.end(); i++)
+ for (i = objects.begin(); i != objects.end(); ++i)
{
if (!(boost::dynamic_pointer_cast<DriveJoint>(i->second))) i->second->stepPhysics();
}
@@ -192,40 +194,40 @@
void WorldObject::stepGraphics ()
{
OgreObjectsIt o = ogreObjects.begin();
- for(;o != ogreObjects.end(); o++)
+ for(;o != ogreObjects.end(); ++o)
{
o->second->stepGraphics();
}
WorldObjectsIt i = objects.begin();
- for (; i != objects.end(); i++)
+ for (; i != objects.end(); ++i)
{
i->second->stepGraphics();
}
}
-pVehicle WorldObject::getVehicle(std::string name)
+pVehicle WorldObject::getVehicle(const std::string & name)
{
pVehicle tmp;
- for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++)
+ for (WorldObjectsIt i = objects.begin(); i != objects.end(); ++i)
{
if (i->first == ("(vehicle)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<Vehicle>(i->second)) break;
}
if (tmp == NULL) log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", name.c_str(), "Vehicle");
return tmp;
}
-pBody WorldObject::getBody (std::string name)
+pBody WorldObject::getBody (const std::string & name)
{
pBody tmp;
- for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++)
+ for (WorldObjectsIt i = objects.begin(); i != objects.end(); ++i)
{
if (i->first == ("(body)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<Body>(i->second)) break;
}
if (tmp == NULL) log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", name.c_str(), "Body");
return tmp;
}
-pDriveMass WorldObject::getDriveMass (std::string name)
+pDriveMass WorldObject::getDriveMass (const std::string & name)
{
pDriveMass tmp;
- for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++)
+ for (WorldObjectsIt i = objects.begin(); i != objects.end(); ++i)
{
if (i->first == ("(drivemass)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<DriveMass>(i->second)) break;
if (i->first == ("(engine)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<DriveMass>(i->second)) break;
@@ -236,10 +238,10 @@
if (tmp == NULL) log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", name.c_str(), "DriveMass");
return tmp;
}
-pDriveJoint WorldObject::getDriveJoint (std::string name)
+pDriveJoint WorldObject::getDriveJoint (const std::string & name)
{
pDriveJoint tmp;
- for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++)
+ for (WorldObjectsIt i = objects.begin(); i != objects.end(); ++i)
{
if (i->first == ("(drivejoint)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<DriveJoint>(i->second)) break;
if (i->first == ("(clutch)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<Clutch>(i->second)) break;
@@ -249,90 +251,90 @@
if (tmp == NULL) log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", name.c_str(), "DriveJoint");
return tmp;
}
-pClutch WorldObject::getClutch (std::string name)
+pClutch WorldObject::getClutch (const std::string & name)
{
pClutch tmp;
- for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++)
+ for (WorldObjectsIt i = objects.begin(); i != objects.end(); ++i)
{
if (i->first == ("(clutch)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<Clutch>(i->second)) break;
}
if (tmp == NULL) log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", name.c_str(), "Clutch");
return tmp;
}
-pGear WorldObject::getGear (std::string name)
+pGear WorldObject::getGear (const std::string & name)
{
pGear tmp;
- for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++)
+ for (WorldObjectsIt i = objects.begin(); i != objects.end(); ++i)
{
if (i->first == ("(gear)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<Gear>(i->second)) break;
}
if (tmp == NULL) log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", name.c_str(), "Gear");
return tmp;
}
-pLSD WorldObject::getLSD (std::string name)
+pLSD WorldObject::getLSD (const std::string & name)
{
pLSD tmp;
- for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++)
+ for (WorldObjectsIt i = objects.begin(); i != objects.end(); ++i)
{
if (i->first == ("(lsd)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<LSD>(i->second)) break;
}
if (tmp == NULL) log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", name.c_str(), "LSD");
return tmp;
}
-pEngine WorldObject::getEngine (std::string name)
+pEngine WorldObject::getEngine (const std::string & name)
{
pEngine tmp;
- for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++)
+ for (WorldObjectsIt i = objects.begin(); i != objects.end(); ++i)
{
if (i->first == ("(engine)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<Engine>(i->second)) break;
}
if (tmp == NULL) log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", name.c_str(), "Engine");
return tmp;
}
-pFinalDrive WorldObject::getFinalDrive (std::string name)
+pFinalDrive WorldObject::getFinalDrive (const std::string & name)
{
pFinalDrive tmp;
- for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++)
+ for (WorldObjectsIt i = objects.begin(); i != objects.end(); ++i)
{
if (i->first == ("(finaldrive)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<FinalDrive>(i->second)) break;
}
if (tmp == NULL) log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", name.c_str(), "FinalDrive");
return tmp;
}
-pGearbox WorldObject::getGearbox (std::string name)
+pGearbox WorldObject::getGearbox (const std::string & name)
{
pGearbox tmp;
- for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++)
+ for (WorldObjectsIt i = objects.begin(); i != objects.end(); ++i)
{
if (i->first == ("(gearbox)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<Gearbox>(i->second)) break;
}
if (tmp == NULL) log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", name.c_str(), "Gearbox");
return tmp;
}
-pGearboxGear WorldObject::getGearboxGear (std::string name)
+pGearboxGear WorldObject::getGearboxGear (const std::string & name)
{
pGearboxGear tmp;
- for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++)
+ for (WorldObjectsIt i = objects.begin(); i != objects.end(); ++i)
{
if (i->first == ("(gearboxgear)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<GearboxGear>(i->second)) break;
}
if (tmp == NULL) log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", name.c_str(), "GearboxGear");
return tmp;
}
-pPedal WorldObject::getPedal (std::string name)
+pPedal WorldObject::getPedal (const std::string & name)
{
pPedal tmp;
- for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++)
+ for (WorldObjectsIt i = objects.begin(); i != objects.end(); ++i)
{
if (i->first == ("(pedal)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<Pedal>(i->second)) break;
}
if (tmp == NULL) log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", name.c_str(), "Pedal");
return tmp;
}
-pSuspension WorldObject::getSuspension (std::string name)
+pSuspension WorldObject::getSuspension (const std::string & name)
{
pSuspension tmp;
- for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++)
+ for (WorldObjectsIt i = objects.begin(); i != objects.end(); ++i)
{
if (i->first == ("(suspension)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<Suspension>(i->second)) break;
if (i->first == ("(doublewishbone)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<DoubleWishbone>(i->second)) break;
@@ -342,36 +344,36 @@
if (tmp == NULL) log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", name.c_str(), "Suspension");
return tmp;
}
-pWheel WorldObject::getWheel (std::string name)
+pWheel WorldObject::getWheel (const std::string & name)
{
pWheel tmp;
- for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++)
+ for (WorldObjectsIt i = objects.begin(); i != objects.end(); ++i)
{
if (i->first == ("(wheel)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<Wheel>(i->second)) break;
}
if (tmp == NULL) log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", name.c_str(), "Wheel");
return tmp;
}
-pWorldObject WorldObject::getObject (std::string name)
+pWorldObject WorldObject::getObject (const std::string & name)
{
if (objects.find(name) == objects.end())
log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" from generic type \"%s\"", name.c_str(), "WorldObject");
return objects[name];
}
-pWorldObject WorldObject::getWorldObject (std::string name)
+pWorldObject WorldObject::getWorldObject (const std::string & name)
{
pWorldObject tmp;
- for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++)
+ for (WorldObjectsIt i = objects.begin(); i != objects.end(); ++i)
{
if (i->first == ("(worldobject)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<WorldObject>(i->second)) break;
}
if (tmp == NULL) log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", name.c_str(), "WorldObject");
return tmp;
}
-pCamera WorldObject::getCamera (std::string name)
+pCamera WorldObject::getCamera (const std::string & name)
{
pCamera tmp;
- for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++)
+ for (WorldObjectsIt i = objects.begin(); i != objects.end(); ++i)
{
if (i->first == (name) && i->second) if (tmp = boost::dynamic_pointer_cast<Camera>(i->second)) break;
if (i->first == ("(camera)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<Camera>(i->second)) break;
@@ -386,7 +388,7 @@
pCamera nextCam;
bool first = false;
bool found = false;
- for (;i != objects.end(); i++)
+ for (;i != objects.end(); ++i)
{
if (pCamera tmp = boost::dynamic_pointer_cast<Camera>(i->second))
{
@@ -399,6 +401,7 @@
{
nextCam = tmp;
found = false;
+ //TODO: Ivan: couldn't we just "break;" here?
}
if (activeCamera == tmp)
{
@@ -412,7 +415,7 @@
void WorldObject::pointCameras(pVehicle target)
{
WorldObjectsIt i = objects.begin();
- for(;i != objects.end(); i++)
+ for(;i != objects.end(); ++i)
{
if (pCamera tmp = boost::dynamic_pointer_cast<Camera>(i->second))
{
@@ -423,7 +426,7 @@
void WorldObject::positionCameras(dBodyID baseID)
{
WorldObjectsIt i = objects.begin();
- for(;i != objects.end(); i++)
+ for(;i != objects.end(); ++i)
{
if (pCamera tmp = boost::dynamic_pointer_cast<Camera>(i->second))
{
@@ -434,7 +437,7 @@
void WorldObject::positionCameras(pVehicle base)
{
WorldObjectsIt i = objects.begin();
- for(;i != objects.end(); i++)
+ for(;i != objects.end(); ++i)
{
if (pCamera tmp = boost::dynamic_pointer_cast<Camera>(i->second))
{
@@ -443,10 +446,10 @@
}
}
-pLocation WorldObject::getLocation (std::string name)
+pLocation WorldObject::getLocation (const std::string & name)
{
pLocation tmp;
- for (LocationsIt i = locations.begin(); i != locations.end(); i++)
+ for (LocationsIt i = locations.begin(); i != locations.end(); ++i)
{
if (i->first == name && i->second) if (tmp = boost::dynamic_pointer_cast<Location>(i->second)) break;
}
@@ -647,7 +650,7 @@
}
ogreObjects[ogreObject->getId()]->setOdeReference(getMainOdeObject());
}
-pLocation WorldObject::getLocationObject(std::string fullname)
+pLocation WorldObject::getLocationObject(const std::string & fullname)
{
pLocation tmp;
if (MospPath::getType(fullname) == "area")
@@ -664,7 +667,7 @@
log->__format(LOG_DEVELOPER, "Location name=%s", tmp->getName().c_str());
return tmp;
}
-pVehicle WorldObject::getVehicleObject(std::string fullname)
+pVehicle WorldObject::getVehicleObject(const std::string & fullname)
{
pVehicle tmp;
if ((tmp = boost::dynamic_pointer_cast<Vehicle>(getFirstObject(fullname))) == NULL)
@@ -672,7 +675,7 @@
log->__format(LOG_DEVELOPER, "Vehicle name=%s", tmp->getName().c_str());
return tmp;
}
-pArea WorldObject::getAreaObject(std::string fullname)
+pArea WorldObject::getAreaObject(const std::string & fullname)
{
pArea tmp;
if ((tmp = boost::dynamic_pointer_cast<Area>(getFirstObject(fullname))) == NULL)
@@ -680,7 +683,7 @@
log->__format(LOG_DEVELOPER, "Area name=%s", tmp->getName().c_str());
return tmp;
}
-pWorldObject WorldObject::getFirstObject(std::string fullname)
+pWorldObject WorldObject::getFirstObject(const std::string & fullname)
{
std::string type = MospPath::getType(fullname);
std::string name = MospPath::getName(fullname);
@@ -708,15 +711,15 @@
void WorldObject::addPosition (Vector3d diff)
{
OdeObjectsIt j = odeObjects.begin();
- for(;j != odeObjects.end(); j++)
+ for(;j != odeObjects.end(); ++j)
{
j->second->addPosition(diff);
}
- for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++)
+ for (WorldObjectsIt i = objects.begin(); i != objects.end(); ++i)
{
i->second->addPosition(diff);
}
- for (LocationsIt i = locations.begin(); i != locations.end(); i++)
+ for (LocationsIt i = locations.begin(); i != locations.end(); ++i)
{
i->second->addPosition(diff);
}
@@ -724,15 +727,15 @@
void WorldObject::addRotation (Vector3d origin, Quaternion diff)
{
OdeObjectsIt j = odeObjects.begin();
- for(;j != odeObjects.end(); j++)
+ for(;j != odeObjects.end(); ++j)
{
j->second->addRotation(origin, diff);
}
- for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++)
+ for (WorldObjectsIt i = objects.begin(); i != objects.end(); ++i)
{
i->second->addRotation(origin, diff);
}
- for (LocationsIt i = locations.begin(); i != locations.end(); i++)
+ for (LocationsIt i = locations.begin(); i != locations.end(); ++i)
{
i->second->addRotation(origin, diff);
}
@@ -746,10 +749,10 @@
{
return odeObjects.begin()->second->getRotation();
}
-pArea WorldObject::getArea(std::string name)
+pArea WorldObject::getArea(const std::string & name)
{
pArea tmp;
- for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++)
+ for (WorldObjectsIt i = objects.begin(); i != objects.end(); ++i)
{
if (i->first == ("(area)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<Area>(i->second)) break;
}
Modified: trunk/src/common/worldObject.hpp
===================================================================
--- trunk/src/common/worldObject.hpp 2007-03-15 20:14:41 UTC (rev 467)
+++ trunk/src/common/worldObject.hpp 2007-04-24 20:04:50 UTC (rev 468)
@@ -1,5 +1,5 @@
/*****************************************************************************\
-|* Copyright (C) 2003, 2006 "Motorsport" developers (*) *|
+|* Copyright (C) 2003, 2007 "Motorsport" developers (*) *|
|* Part of the "Motorsport" project (http://motorsport.sourceforge.net) *|
|* Licensed under the GNU General Public License (*) *|
|* *|
@@ -9,12 +9,13 @@
#ifndef WORLDOBJECT_HPP
#define WORLDOBJECT_HPP
+
#include "system.hpp"
#include "logEngine.hpp"
#include "ogreObject.hpp"
#include "odeObject.hpp"
#include "xmlTag.hpp"
-#include <shared.hpp>
+#include "shared.hpp"
//forward declatations
class Quaternion;
@@ -75,9 +76,9 @@
std::string getFullName();
std::string getPath();
std::string getXmlPath();
- void setName(std::string name);
- void setPath(std::string path);
- void setXmlPath(std::string xmlPath);
+ void setName(const std::string & name);
+ void setPath(const std::string & path);
+ void setXmlPath(const std::string & xmlPath);
static void logAll();
pLogEngine getLog();
@@ -98,30 +99,30 @@
virtual Vector3d getPosition ();
virtual Quaternion getRotation ();
- pLocation getLocationObject(std::string fullname);
- pVehicle getVehicleObject(std::string fullname);
- pArea getAreaObject(std::string fullname);
- pWorldObject getFirstObject(std::string fullname);
+ pLocation getLocationObject(const std::string & fullname);
+ pVehicle getVehicleObject(const std::string & fullname);
+ pArea getAreaObject(const std::string & fullname);
+ pWorldObject getFirstObject(const std::string & fullname);
- pLocation getLocation (std::string name);
+ pLocation getLocation (const std::string & name);
- pArea getArea(std::string name);
- pVehicle getVehicle(std::string name);
- pCamera getCamera (std::string name);
- pBody getBody (std::string name);
- pDriveJoint getDriveJoint (std::string name);
- pDriveMass getDriveMass (std::string name);
- pClutch getClutch (std::string name);
- pGear getGear (std::string name);
- pLSD getLSD (std::string name);
- pEngine getEngine (std::string name);
- pFinalDrive getFinalDrive (std::string name);
- pGearbox getGearbox (std::string name);
- pGearboxGear getGearboxGear (std::string name);
- pPedal getPedal (std::string name);
- pSuspension getSuspension (std::string name);
- pWheel getWheel (std::string name);
- pWorldObject getObject (std::string name);
- pWorldObject getWorldObject (std::string name);
+ pArea getArea(const std::string & name);
+ pVehicle getVehicle(const std::string & name);
+ pCamera getCamera (const std::string & name);
+ pBody getBody (const std::string & name);
+ pDriveJoint getDriveJoint (const std::string & name);
+ pDriveMass getDriveMass (const std::string & name);
+ pClutch getClutch (const std::string & name);
+ pGear getGear (const std::string & name);
+ pLSD getLSD (const std::string & name);
+ pEngine getEngine (const std::string & name);
+ pFinalDrive getFinalDrive (const std::string & name);
+ pGearbox getGearbox (const std::string & name);
+ pGearboxGear getGearboxGear (const std::string & name);
+ pPedal getPedal (const std::string & name);
+ pSuspension getSuspension (const std::string & name);
+ pWheel getWheel (const std::string & name);
+ pWorldObject getObject (const std::string & name);
+ pWorldObject getWorldObject (const std::string & name);
};
#endif
Modified: trunk/src/graphics.cpp
===================================================================
--- trunk/src/graphics.cpp 2007-03-15 20:14:41 UTC (rev 467)
+++ trunk/src/graphics.cpp 2007-04-24 20:04:50 UTC (rev 468)
@@ -1,5 +1,5 @@
/*****************************************************************************\
-|* Copyright (C) 2003, 2006 "Motorsport" developers (*) *|
+|* Copyright (C) 2003, 2007 "Motorsport" developers (*) *|
|* Part of the "Motorsport" project (http://motorsport.sourceforge.net) *|
|* Licensed under the GNU General Public License (*) *|
|* *|
@@ -11,14 +11,14 @@
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
#endif
-#include "OgreNoMemoryMacros.h"
+#include <OgreNoMemoryMacros.h>
#include "graphics.hpp"
#include "system.hpp"
-#include "Ogre.h"
-#include "OgreConfigFile.h"
-#include "SDL/SDL.h"
-#include "SDL/SDL_syswm.h"
-#include "SDL/SDL_keysym.h"
+#include <Ogre.h>
+#include <OgreConfigFile.h>
+#include <SDL/SDL.h>
+#include <SDL/SDL_syswm.h>
+#include <SDL/SDL_keysym.h>
#include "world.hpp"
#include "area.hpp"
#include "camera.hpp"
@@ -38,7 +38,7 @@
{
log->__format (LOG_ERROR, "No Ogre renderers available!");
}
- for (Ogre::RenderSystemList::iterator it = renderers->begin (); it != renderers->end (); it++)
+ for (Ogre::RenderSystemList::iterator it = renderers->begin (); it != renderers->end (); ++it)
{
renderSystem = (*it);
log->__format (LOG_DEVELOPER, "Locating desired renderer (%s).", renderer.c_str());
@@ -57,7 +57,7 @@
Ogre::Root::getSingleton ().setRenderSystem (renderSystem);
char resolution[32];
- sprintf (resolution, "%i x %i", width, height);
+ snprintf (resolution, 32, "%i x %i", width, height);
log->__format (LOG_ENDUSER, "Setting screen resolution and bpp: %s", resolution);
renderSystem->setConfigOption ("Video Mode", resolution);
}
@@ -139,12 +139,12 @@
}
}
- // take a screenshot if neededa
+ // take a screenshot if needed
if (System::get()->axisMap[getIDKeyboardKey(SDLK_PRINT)]->getValue() == 1)
{
static unsigned int count = initialFrame;
static char tmpName[64];
- sprintf (tmpName, screenshotFilename.c_str(), count++);
+ snprintf (tmpName, 64, screenshotFilename.c_str(), count++);
log->__format (LOG_ENDUSER, "Taking a screenshot in %s.", tmpName);
System::get()->ogreWindow->writeContentsToFile (tmpName);
}
@@ -342,7 +342,9 @@
Ogre::NameValuePairList misc;
std::string s = Ogre::StringConverter::toString((long)info.info.x11.display);
- s += ":" + tokens[1] +":";
+ //Ivan: the following doesn't work with OGRE 1.4.0:
+ //s += ":" + tokens[1] +":";
+ s += ":";
s += Ogre::StringConverter::toString((long)info.info.x11.window);
misc["parentWindowHandle"] = s;
System::get()->ogreWindow = ogreRoot->createRenderWindow("ogre", width, height, fullScreen, &misc);
@@ -368,13 +370,15 @@
// This method always works.
HWND hWnd;
System::get()->ogreWindow->getCustomAttribute("HWND", &hWnd);
- sprintf(tmp, "SDL_WINDOWID=%d", hWnd);
+ snprintf(tmp, 64, "SDL_WINDOWID=%d", hWnd);
_putenv(tmp);
#endif
log->__format (LOG_DEVELOPER, "Getting ogre scene manager");
// Set shadowing System::get()
System::get()->ogreSceneManager = ogreRoot->createSceneManager (sceneManager);
+ //Ivan: createSceneManager doesn't exist in 1.0.6, but this one exists:
+ //System::get()->ogreSceneManager = ogreRoot->getSceneManager (sceneManager);
System::get()->ogreSceneManager->setShadowTechnique(shadowTechnique);
System::get()->ogreSceneManager->setAmbientLight(Ogre::ColourValue(0.67, 0.94, 1.00));
System::get()->ogreSceneManager->setShadowColour(Ogre::ColourValue(0.5, 0.5, 0.5));
Modified: trunk/src/graphics.hpp
===================================================================
--- trunk/src/graphics.hpp 2007-03-15 20:14:41 UTC (rev 467)
+++ trunk/src/graphics.hpp 2007-04-24 20:04:50 UTC (rev 468)
@@ -1,5 +1,5 @@
/*****************************************************************************\
-|* Copyright (C) 2003, 2006 "Motorsport" developers (*) *|
+|* Copyright (C) 2003, 2007 "Motorsport" developers (*) *|
|* Part of the "Motorsport" project (http://motorsport.sourceforge.net) *|
|* Licensed under the GNU General Public License (*) *|
|* *|
@@ -7,7 +7,7 @@
|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
-#include <common/shared.hpp>
+#include "common/shared.hpp"
// Forward declarations
namespace Ogre { class Root; }
Modified: trunk/src/gui.cpp
===================================================================
--- trunk/src/gui.cpp 2007-03-15 20:14:41 UTC (rev 467)
+++ trunk/src/gui.cpp 2007-04-24 20:04:50 UTC (rev 468)
@@ -1,5 +1,5 @@
/*****************************************************************************\
-|* Copyright (C) 2003, 2006 "Motorsport" developers (*) *|
+|* Copyright (C) 2003, 2007 "Motorsport" developers (*) *|
|* Part of the "Motorsport" project (http://motorsport.sourceforge.net) *|
|* Licensed under the GNU General Public License (*) *|
|* *|
@@ -8,11 +8,11 @@
\*****************************************************************************/
#include "gui.hpp"
-#include "SDL/SDL.h"
+#include <SDL/SDL.h>
#include "system.hpp"
#include "logEngine.hpp"
-#include "Ogre.h"
-#include "OgreNoMemoryMacros.h"
+#include <Ogre.h>
+#include <OgreNoMemoryMacros.h>
#include "xmlTag.hpp"
using namespace Ogre;
Modified: trunk/src/gui.hpp
===================================================================
--- trunk/src/gui.hpp 2007-03-15 20:14:41 UTC (rev 467)
+++ trunk/src/gui.hpp 2007-04-24 20:04:50 UTC (rev 468)
@@ -1,5 +1,5 @@
/*****************************************************************************\
-|* Copyright (C) 2003, 2006 "Motorsport" developers (*) *|
+|* Copyright (C) 2003, 2007 "Motorsport" developers (*) *|
|* Part of the "Motorsport" project (http://motorsport.sourceforge.net) *|
|* Licensed under the GNU General Public License (*) *|
|* *|
@@ -7,8 +7,8 @@
|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
-#include "SDL/SDL.h"
-#include <common/shared.hpp>
+#include <SDL/SDL.h>
+#include "common/shared.hpp"
//forward declaration
namespace Ogre {
Modified: trunk/src/input.cpp
===================================================================
--- trunk/src/input.cpp 2007-03-15 20:14:41 UTC (rev 467)
+++ trunk/src/input.cpp 2007-04-24 20:04:50 UTC (rev 468)
@@ -1,5 +1,5 @@
/*****************************************************************************\
-|* Copyright (C) 2003, 2006 "Motorsport" developers (*) *|
+|* Copyright (C) 2003, 2007 "Motorsport" developers (*) *|
|* Part of the "Motorsport" project (http://motorsport.sourceforge.net) *|
|* Licensed under the GNU General Public License (*) *|
|* *|
@@ -8,8 +8,8 @@
\*****************************************************************************/
#include "input.hpp"
-#include "SDL/SDL_types.h"
-#include "SDL/SDL.h"
+#include <SDL/SDL_types.h>
+#include <SDL/SDL.h>
#include "system.hpp"
#include "world.hpp"
#include "log/logEngine.hpp"
Modified: trunk/src/input.hpp
===================================================================
--- trunk/src/input.hpp 2007-03-15 20:14:41 UTC (rev 467)
+++ trunk/src/input.hpp 2007-04-24 20:04:50 UTC (rev 468)
@@ -1,5 +1,5 @@
/*****************************************************************************\
-|* Copyright (C) 2003, 2006 "Motorsport" developers (*) *|
+|* Copyright (C) 2003, 2007 "Motorsport" developers (*) *|
|* Part of the "Motorsport" project (http://motorsport.sourceforge.net) *|
|* Licensed under the GNU General Public License (*) *|
|* *|
@@ -7,7 +7,7 @@
|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
-#include <common/shared.hpp>
+#include "common/shared.hpp"
// Forward declatation
SHARED_PTR_MAP(LogEngine, pLogEngine, LogEngines, LogEnginesIt, wLogEngine);
Modified: trunk/src/log/logEngine.cpp
===================================================================
--- trunk/src/log/logEngine.cpp 2007-03-15 20:14:41 UTC (rev 467)
+++ trunk/src/log/logEngine.cpp 2007-04-24 20:04:50 UTC (rev 468)
@@ -1,5 +1,5 @@
/*****************************************************************************\
-|* Copyright (C) 2003, 2006 "Motorsport" developers (*) *|
+|* Copyright (C) 2003, 2007 "Motorsport" developers (*) *|
|* Part of the "Motorsport" project (http://motorsport.sourceforge.net) *|
|* Licensed under the GNU General Public License (*) *|
|* *|
@@ -15,7 +15,7 @@
#include <iostream>
#include <string>
#include <sstream>
-#include <xmlTag.hpp>
+#include "xmlTag.hpp"
//TODO use iostreams for file management/writing
@@ -87,7 +87,7 @@
{
LogEnginesIt i = logEngines.begin();
LogEnginesIt d;
- for(;i != logEngines.end(); i++)
+ for(;i != logEngines.end(); ++i)
{
if (this == i->second.get())
{
@@ -113,7 +113,7 @@
void LogEngine::logAll()
{
LogEnginesIt i = logEngines.begin();
- for(;i != logEngines.end(); i++)
+ for(;i != logEngines.end(); ++i)
{
i->second->__format(LOG_DEVELOPER, "LogEngine Id: %s\t References #: %i", i->first.c_str(), i->second.use_count());
}
@@ -258,7 +258,7 @@
}
}
-void LogEngine::setName(std::string name)
+void LogEngine::setName(const std::string & name)
{
this->logName = name;
}
Modified: trunk/src/log/logEngine.hpp
===================================================================
--- trunk/src/log/logEngine.hpp 2007-03-15 20:14:41 UTC (rev 467)
+++ t...
[truncated message content] |
|
From: <ha...@us...> - 2007-03-15 20:14:47
|
Revision: 467
http://svn.sourceforge.net/motorsport/?rev=467&view=rev
Author: habalux
Date: 2007-03-15 13:14:41 -0700 (Thu, 15 Mar 2007)
Log Message:
-----------
fix for vehicle class compile error
Modified Paths:
--------------
trunk/src/vehicle/vehicle.cpp
Modified: trunk/src/vehicle/vehicle.cpp
===================================================================
--- trunk/src/vehicle/vehicle.cpp 2007-03-14 22:13:54 UTC (rev 466)
+++ trunk/src/vehicle/vehicle.cpp 2007-03-15 20:14:41 UTC (rev 467)
@@ -54,7 +54,7 @@
log->__format(LOG_DEVELOPER, "Deleting objects");
for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++)
{
- delete (i->second);
+ i->second.reset();
}
objects.clear();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2007-03-14 22:13:57
|
Revision: 466
http://svn.sourceforge.net/motorsport/?rev=466&view=rev
Author: habalux
Date: 2007-03-14 15:13:54 -0700 (Wed, 14 Mar 2007)
Log Message:
-----------
Made input work for Ogre GLX platform
Modified Paths:
--------------
trunk/src/graphics.cpp
Modified: trunk/src/graphics.cpp
===================================================================
--- trunk/src/graphics.cpp 2006-09-19 17:21:28 UTC (rev 465)
+++ trunk/src/graphics.cpp 2007-03-14 22:13:54 UTC (rev 466)
@@ -16,6 +16,8 @@
#include "system.hpp"
#include "Ogre.h"
#include "OgreConfigFile.h"
+#include "SDL/SDL.h"
+#include "SDL/SDL_syswm.h"
#include "SDL/SDL_keysym.h"
#include "world.hpp"
#include "area.hpp"
@@ -180,6 +182,9 @@
{
log->__format (LOG_DEVELOPER, "Unloading ogre window data from memory...");
delete (System::get()->ogreWindow);
+#ifdef LINUX
+ SDL_QuitSubSystem(SDL_INIT_VIDEO);
+#endif
}
Graphics::Graphics ()
@@ -312,10 +317,49 @@
ogreRoot->getRenderSystem ()->setConfigOption ("Full Screen", fullScreen ? "Yes" : "No");
log->__format (LOG_DEVELOPER, "Saving config file to removeme.cfg");
ogreRoot->saveConfig();
-
+#ifdef LINUX
+ // Make SDL input work with GLX platform
+ // Code borrowed from the Ogre wiki at http://www.ogre3d.org/wiki/index.php/Using_SDL_Input#Linux
+ if(SDL_WasInit(SDL_INIT_VIDEO)==0) {
+ ///SDL hasn't been initilized, we thus know that we're using the GLX platform, and need to initialize SDL ourselves
+
+ /// initialise root, without creating a window
+ ogreRoot->initialise(false);
+
+ SDL_Init(SDL_INIT_VIDEO);
+ ///set the window size
+ SDL_SetVideoMode(width, height,0,0); // create an SDL window
+
+ SDL_WM_SetCaption("Motorsport","motorsport");
+
+ SDL_SysWMinfo info;
+ SDL_VERSION(&info.version);
+
+ SDL_GetWMInfo(&info);
+
+ std::string dsp(&(DisplayString(info.info.x11.display)[1]));
+ std::vector<Ogre::String> tokens = Ogre::StringUtil::split(dsp, ".");
+
+ Ogre::NameValuePairList misc;
+ std::string s = Ogre::StringConverter::toString((long)info.info.x11.display);
+ s += ":" + tokens[1] +":";
+ s += Ogre::StringConverter::toString((long)info.info.x11.window);
+ misc["parentWindowHandle"] = s;
+ System::get()->ogreWindow = ogreRoot->createRenderWindow("ogre", width, height, fullScreen, &misc);
+
+ ///we need to set the window to be active by ourselves, since GLX by default sets it to false, but then activates it upon recieving some X event (which it will never recieve since we'll use SDL).
+ ///see OgreGLXWindow.cpp
+ System::get()->ogreWindow->setActive(true);
+ System::get()->ogreWindow->setAutoUpdated(true);
+ } else {
+#endif
// Here we choose to let the System::get() create a default rendering window
log->__format (LOG_DEVELOPER, "Initializing ogre root element");
- System::get()->ogreWindow = ogreRoot->initialise (true);
+ System::get()->ogreWindow = ogreRoot->initialise (true);
+#ifdef LINUX
+}
+#endif
+
setupResources ();
#ifdef WIN32
@@ -358,4 +402,3 @@
log->__format (LOG_DEVELOPER, "Removing temporary ogre file");
remove("removeme.cfg");
}
-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st...@us...> - 2006-09-19 17:31:44
|
Revision: 465
http://svn.sourceforge.net/motorsport/?rev=465&view=rev
Author: stenyak
Date: 2006-09-19 10:21:28 -0700 (Tue, 19 Sep 2006)
Log Message:
-----------
Enlarged quad tree collision space size (used to be 1000, now 1800m).
Enabled auto-sleeping by default.
Suspension rods no longer compute collisions.
Fixed physics config parser, wasn't correctly setting the ODE solver type.
Added some more checks to collision callback, just in case some unneeded collisions were being computed.
Added new tool: 4ds track to motorsport world converter. Unfinished, it only converts certain items and terrain tiles.
Added a hell of a lot new areas, which are to be used as tiles for 4D-Stunts imported tracks (using the new tool).
Modified Paths:
--------------
trunk/cfg/physicsConfig.xml
trunk/data/worlds/default.xml
trunk/src/common/odeObject.cpp
trunk/src/physics.cpp
trunk/src/world/world.cpp
trunk/tools/blend2mosparea/blend2mosparea.py
Added Paths:
-----------
trunk/data/areas/4ds.material
trunk/data/areas/i0x01/
trunk/data/areas/i0x01/area.xml
trunk/data/areas/i0x01/i0x01.mesh
trunk/data/areas/i0x04/
trunk/data/areas/i0x04/area.xml
trunk/data/areas/i0x04/i0x04.mesh
trunk/data/areas/i0x05/
trunk/data/areas/i0x05/area.xml
trunk/data/areas/i0x05/i0x05.mesh
trunk/data/areas/i0x06/
trunk/data/areas/i0x06/area.xml
trunk/data/areas/i0x06/i0x06.mesh
trunk/data/areas/i0x07/
trunk/data/areas/i0x07/area.xml
trunk/data/areas/i0x07/i0x07.mesh
trunk/data/areas/i0x08/
trunk/data/areas/i0x08/area.xml
trunk/data/areas/i0x08/i0x08.mesh
trunk/data/areas/i0x09/
trunk/data/areas/i0x09/area.xml
trunk/data/areas/i0x09/i0x09.mesh
trunk/data/areas/i0x0a/
trunk/data/areas/i0x0a/area.xml
trunk/data/areas/i0x0a/i0x0a.mesh
trunk/data/areas/i0x0b/
trunk/data/areas/i0x0b/area.xml
trunk/data/areas/i0x0b/i0x0b.mesh
trunk/data/areas/i0x0c/
trunk/data/areas/i0x0c/area.xml
trunk/data/areas/i0x0c/i0x0c.mesh
trunk/data/areas/i0x0d/
trunk/data/areas/i0x0d/area.xml
trunk/data/areas/i0x0d/i0x0d.mesh
trunk/data/areas/i0x0e/
trunk/data/areas/i0x0e/area.xml
trunk/data/areas/i0x0e/i0x0e.mesh
trunk/data/areas/i0x0f/
trunk/data/areas/i0x0f/area.xml
trunk/data/areas/i0x0f/i0x0f.mesh
trunk/data/areas/i0x10/
trunk/data/areas/i0x10/area.xml
trunk/data/areas/i0x10/i0x10.mesh
trunk/data/areas/i0x11/
trunk/data/areas/i0x11/area.xml
trunk/data/areas/i0x11/i0x11.mesh
trunk/data/areas/i0x12/
trunk/data/areas/i0x12/area.xml
trunk/data/areas/i0x12/i0x12.mesh
trunk/data/areas/i0x13/
trunk/data/areas/i0x13/area.xml
trunk/data/areas/i0x13/i0x13.mesh
trunk/data/areas/i0x14/
trunk/data/areas/i0x14/area.xml
trunk/data/areas/i0x14/i0x14.mesh
trunk/data/areas/i0x15/
trunk/data/areas/i0x15/area.xml
trunk/data/areas/i0x15/i0x15.mesh
trunk/data/areas/i0x16/
trunk/data/areas/i0x16/area.xml
trunk/data/areas/i0x16/i0x16.mesh
trunk/data/areas/i0x17/
trunk/data/areas/i0x17/area.xml
trunk/data/areas/i0x17/i0x17.mesh
trunk/data/areas/i0x18/
trunk/data/areas/i0x18/area.xml
trunk/data/areas/i0x18/i0x18.mesh
trunk/data/areas/i0x19/
trunk/data/areas/i0x19/area.xml
trunk/data/areas/i0x19/i0x19.mesh
trunk/data/areas/i0x1a/
trunk/data/areas/i0x1a/area.xml
trunk/data/areas/i0x1a/i0x1a.mesh
trunk/data/areas/i0x1b/
trunk/data/areas/i0x1b/area.xml
trunk/data/areas/i0x1b/i0x1b.mesh
trunk/data/areas/i0x1c/
trunk/data/areas/i0x1c/area.xml
trunk/data/areas/i0x1c/i0x1c.mesh
trunk/data/areas/i0x1d/
trunk/data/areas/i0x1d/area.xml
trunk/data/areas/i0x1d/i0x1d.mesh
trunk/data/areas/i0x1e/
trunk/data/areas/i0x1e/area.xml
trunk/data/areas/i0x1e/i0x1e.mesh
trunk/data/areas/i0x1f/
trunk/data/areas/i0x1f/area.xml
trunk/data/areas/i0x1f/i0x1f.mesh
trunk/data/areas/i0x20/
trunk/data/areas/i0x20/area.xml
trunk/data/areas/i0x20/i0x20.mesh
trunk/data/areas/i0x21/
trunk/data/areas/i0x21/area.xml
trunk/data/areas/i0x21/i0x21.mesh
trunk/data/areas/i0x22/
trunk/data/areas/i0x22/area.xml
trunk/data/areas/i0x22/i0x22.mesh
trunk/data/areas/i0x23/
trunk/data/areas/i0x23/area.xml
trunk/data/areas/i0x23/i0x23.mesh
trunk/data/areas/i0x24/
trunk/data/areas/i0x24/area.xml
trunk/data/areas/i0x24/i0x24.mesh
trunk/data/areas/i0x24.001/
trunk/data/areas/i0x24.001/area.xml
trunk/data/areas/i0x24.001/i0x24.001.mesh
trunk/data/areas/i0x25/
trunk/data/areas/i0x25/area.xml
trunk/data/areas/i0x25/i0x25.mesh
trunk/data/areas/i0x26/
trunk/data/areas/i0x26/area.xml
trunk/data/areas/i0x26/i0x26.mesh
trunk/data/areas/i0x27/
trunk/data/areas/i0x27/area.xml
trunk/data/areas/i0x27/i0x27.mesh
trunk/data/areas/i0x28/
trunk/data/areas/i0x28/area.xml
trunk/data/areas/i0x28/i0x28.mesh
trunk/data/areas/i0x29/
trunk/data/areas/i0x29/area.xml
trunk/data/areas/i0x29/i0x29.mesh
trunk/data/areas/i0x2a/
trunk/data/areas/i0x2a/area.xml
trunk/data/areas/i0x2a/i0x2a.mesh
trunk/data/areas/i0x2b/
trunk/data/areas/i0x2b/area.xml
trunk/data/areas/i0x2b/i0x2b.mesh
trunk/data/areas/i0x2c/
trunk/data/areas/i0x2c/area.xml
trunk/data/areas/i0x2c/i0x2c.mesh
trunk/data/areas/i0x2d/
trunk/data/areas/i0x2d/area.xml
trunk/data/areas/i0x2d/i0x2d.mesh
trunk/data/areas/i0x2e/
trunk/data/areas/i0x2e/area.xml
trunk/data/areas/i0x2e/i0x2e.mesh
trunk/data/areas/i0x2f/
trunk/data/areas/i0x2f/area.xml
trunk/data/areas/i0x2f/i0x2f.mesh
trunk/data/areas/i0x30/
trunk/data/areas/i0x30/area.xml
trunk/data/areas/i0x30/i0x30.mesh
trunk/data/areas/i0x31/
trunk/data/areas/i0x31/area.xml
trunk/data/areas/i0x31/i0x31.mesh
trunk/data/areas/i0x32/
trunk/data/areas/i0x32/area.xml
trunk/data/areas/i0x32/i0x32.mesh
trunk/data/areas/i0x33/
trunk/data/areas/i0x33/area.xml
trunk/data/areas/i0x33/i0x33.mesh
trunk/data/areas/i0x34/
trunk/data/areas/i0x34/area.xml
trunk/data/areas/i0x34/i0x34.mesh
trunk/data/areas/i0x35/
trunk/data/areas/i0x35/area.xml
trunk/data/areas/i0x35/i0x35.mesh
trunk/data/areas/i0x36/
trunk/data/areas/i0x36/area.xml
trunk/data/areas/i0x36/i0x36.mesh
trunk/data/areas/i0x37/
trunk/data/areas/i0x37/area.xml
trunk/data/areas/i0x37/i0x37.mesh
trunk/data/areas/i0x38/
trunk/data/areas/i0x38/area.xml
trunk/data/areas/i0x38/i0x38.mesh
trunk/data/areas/i0x38.001/
trunk/data/areas/i0x38.001/area.xml
trunk/data/areas/i0x38.001/i0x38.001.mesh
trunk/data/areas/i0x39/
trunk/data/areas/i0x39/area.xml
trunk/data/areas/i0x39/i0x39.mesh
trunk/data/areas/i0x3a/
trunk/data/areas/i0x3a/area.xml
trunk/data/areas/i0x3a/i0x3a.mesh
trunk/data/areas/i0x3b/
trunk/data/areas/i0x3b/area.xml
trunk/data/areas/i0x3b/i0x3b.mesh
trunk/data/areas/i0x3c/
trunk/data/areas/i0x3c/area.xml
trunk/data/areas/i0x3c/i0x3c.mesh
trunk/data/areas/i0x3d/
trunk/data/areas/i0x3d/area.xml
trunk/data/areas/i0x3d/i0x3d.mesh
trunk/data/areas/i0x3e/
trunk/data/areas/i0x3e/area.xml
trunk/data/areas/i0x3e/i0x3e.mesh
trunk/data/areas/i0x3f/
trunk/data/areas/i0x3f/area.xml
trunk/data/areas/i0x3f/i0x3f.mesh
trunk/data/areas/i0x40/
trunk/data/areas/i0x40/area.xml
trunk/data/areas/i0x40/i0x40.mesh
trunk/data/areas/i0x41/
trunk/data/areas/i0x41/area.xml
trunk/data/areas/i0x41/i0x41.mesh
trunk/data/areas/i0x42/
trunk/data/areas/i0x42/area.xml
trunk/data/areas/i0x42/i0x42.mesh
trunk/data/areas/i0x43/
trunk/data/areas/i0x43/area.xml
trunk/data/areas/i0x43/i0x43.mesh
trunk/data/areas/i0x44/
trunk/data/areas/i0x44/area.xml
trunk/data/areas/i0x44/i0x44.mesh
trunk/data/areas/i0x45/
trunk/data/areas/i0x45/area.xml
trunk/data/areas/i0x45/i0x45.mesh
trunk/data/areas/i0x46/
trunk/data/areas/i0x46/area.xml
trunk/data/areas/i0x46/i0x46.mesh
trunk/data/areas/i0x47/
trunk/data/areas/i0x47/area.xml
trunk/data/areas/i0x47/i0x47.mesh
trunk/data/areas/i0x48/
trunk/data/areas/i0x48/area.xml
trunk/data/areas/i0x48/i0x48.mesh
trunk/data/areas/i0x49/
trunk/data/areas/i0x49/area.xml
trunk/data/areas/i0x49/i0x49.mesh
trunk/data/areas/i0x4a/
trunk/data/areas/i0x4a/area.xml
trunk/data/areas/i0x4a/i0x4a.mesh
trunk/data/areas/i0x4b/
trunk/data/areas/i0x4b/area.xml
trunk/data/areas/i0x4b/i0x4b.mesh
trunk/data/areas/i0x4c/
trunk/data/areas/i0x4c/area.xml
trunk/data/areas/i0x4c/i0x4c.mesh
trunk/data/areas/i0x4d/
trunk/data/areas/i0x4d/area.xml
trunk/data/areas/i0x4d/i0x4d.mesh
trunk/data/areas/i0x4e/
trunk/data/areas/i0x4e/area.xml
trunk/data/areas/i0x4e/i0x4e.mesh
trunk/data/areas/i0x4f/
trunk/data/areas/i0x4f/area.xml
trunk/data/areas/i0x4f/i0x4f.mesh
trunk/data/areas/i0x50/
trunk/data/areas/i0x50/area.xml
trunk/data/areas/i0x50/i0x50.mesh
trunk/data/areas/i0x51/
trunk/data/areas/i0x51/area.xml
trunk/data/areas/i0x51/i0x51.mesh
trunk/data/areas/i0x52/
trunk/data/areas/i0x52/area.xml
trunk/data/areas/i0x52/i0x52.mesh
trunk/data/areas/i0x53/
trunk/data/areas/i0x53/area.xml
trunk/data/areas/i0x53/i0x53.mesh
trunk/data/areas/i0x54/
trunk/data/areas/i0x54/area.xml
trunk/data/areas/i0x54/i0x54.mesh
trunk/data/areas/i0x55/
trunk/data/areas/i0x55/area.xml
trunk/data/areas/i0x55/i0x55.mesh
trunk/data/areas/i0x56/
trunk/data/areas/i0x56/area.xml
trunk/data/areas/i0x56/i0x56.mesh
trunk/data/areas/i0x57/
trunk/data/areas/i0x57/area.xml
trunk/data/areas/i0x57/i0x57.mesh
trunk/data/areas/i0x58/
trunk/data/areas/i0x58/area.xml
trunk/data/areas/i0x58/i0x58.mesh
trunk/data/areas/i0x59/
trunk/data/areas/i0x59/area.xml
trunk/data/areas/i0x59/i0x59.mesh
trunk/data/areas/i0x5a/
trunk/data/areas/i0x5a/area.xml
trunk/data/areas/i0x5a/i0x5a.mesh
trunk/data/areas/i0x5b/
trunk/data/areas/i0x5b/area.xml
trunk/data/areas/i0x5b/i0x5b.mesh
trunk/data/areas/i0x5c/
trunk/data/areas/i0x5c/area.xml
trunk/data/areas/i0x5c/i0x5c.mesh
trunk/data/areas/i0x5d/
trunk/data/areas/i0x5d/area.xml
trunk/data/areas/i0x5d/i0x5d.mesh
trunk/data/areas/i0x5e/
trunk/data/areas/i0x5e/area.xml
trunk/data/areas/i0x5e/i0x5e.mesh
trunk/data/areas/i0x5f/
trunk/data/areas/i0x5f/area.xml
trunk/data/areas/i0x5f/i0x5f.mesh
trunk/data/areas/i0x5f.001/
trunk/data/areas/i0x5f.001/area.xml
trunk/data/areas/i0x5f.001/i0x5f.001.mesh
trunk/data/areas/i0x60/
trunk/data/areas/i0x60/area.xml
trunk/data/areas/i0x60/i0x60.mesh
trunk/data/areas/i0x61/
trunk/data/areas/i0x61/area.xml
trunk/data/areas/i0x61/i0x61.mesh
trunk/data/areas/i0x62/
trunk/data/areas/i0x62/area.xml
trunk/data/areas/i0x62/i0x62.mesh
trunk/data/areas/i0x63/
trunk/data/areas/i0x63/area.xml
trunk/data/areas/i0x63/i0x63.mesh
trunk/data/areas/i0x64/
trunk/data/areas/i0x64/area.xml
trunk/data/areas/i0x64/i0x64.mesh
trunk/data/areas/i0x65/
trunk/data/areas/i0x65/area.xml
trunk/data/areas/i0x65/i0x65.mesh
trunk/data/areas/i0x66/
trunk/data/areas/i0x66/area.xml
trunk/data/areas/i0x66/i0x66.mesh
trunk/data/areas/i0x67/
trunk/data/areas/i0x67/area.xml
trunk/data/areas/i0x67/i0x67.mesh
trunk/data/areas/i0x68/
trunk/data/areas/i0x68/area.xml
trunk/data/areas/i0x68/i0x68.mesh
trunk/data/areas/i0x69/
trunk/data/areas/i0x69/area.xml
trunk/data/areas/i0x69/i0x69.mesh
trunk/data/areas/i0x6a/
trunk/data/areas/i0x6a/area.xml
trunk/data/areas/i0x6a/i0x6a.mesh
trunk/data/areas/i0x6b/
trunk/data/areas/i0x6b/area.xml
trunk/data/areas/i0x6b/i0x6b.mesh
trunk/data/areas/i0x6c/
trunk/data/areas/i0x6c/area.xml
trunk/data/areas/i0x6c/i0x6c.mesh
trunk/data/areas/i0x6d/
trunk/data/areas/i0x6d/area.xml
trunk/data/areas/i0x6d/i0x6d.mesh
trunk/data/areas/i0x6e/
trunk/data/areas/i0x6e/area.xml
trunk/data/areas/i0x6e/i0x6e.mesh
trunk/data/areas/i0x6f/
trunk/data/areas/i0x6f/area.xml
trunk/data/areas/i0x6f/i0x6f.mesh
trunk/data/areas/i0x70/
trunk/data/areas/i0x70/area.xml
trunk/data/areas/i0x70/i0x70.mesh
trunk/data/areas/i0x71/
trunk/data/areas/i0x71/area.xml
trunk/data/areas/i0x71/i0x71.mesh
trunk/data/areas/i0x72/
trunk/data/areas/i0x72/area.xml
trunk/data/areas/i0x72/i0x72.mesh
trunk/data/areas/i0x73/
trunk/data/areas/i0x73/area.xml
trunk/data/areas/i0x73/i0x73.mesh
trunk/data/areas/i0x74/
trunk/data/areas/i0x74/area.xml
trunk/data/areas/i0x74/i0x74.mesh
trunk/data/areas/i0x75/
trunk/data/areas/i0x75/area.xml
trunk/data/areas/i0x75/i0x75.mesh
trunk/data/areas/i0x76/
trunk/data/areas/i0x76/area.xml
trunk/data/areas/i0x76/i0x76.mesh
trunk/data/areas/i0x77/
trunk/data/areas/i0x77/area.xml
trunk/data/areas/i0x77/i0x77.mesh
trunk/data/areas/i0x78/
trunk/data/areas/i0x78/area.xml
trunk/data/areas/i0x78/i0x78.mesh
trunk/data/areas/i0x79/
trunk/data/areas/i0x79/area.xml
trunk/data/areas/i0x79/i0x79.mesh
trunk/data/areas/i0x7a/
trunk/data/areas/i0x7a/area.xml
trunk/data/areas/i0x7a/i0x7a.mesh
trunk/data/areas/i0x7b/
trunk/data/areas/i0x7b/area.xml
trunk/data/areas/i0x7b/i0x7b.mesh
trunk/data/areas/i0x7c/
trunk/data/areas/i0x7c/area.xml
trunk/data/areas/i0x7c/i0x7c.mesh
trunk/data/areas/i0x7d/
trunk/data/areas/i0x7d/area.xml
trunk/data/areas/i0x7d/i0x7d.mesh
trunk/data/areas/i0x7e/
trunk/data/areas/i0x7e/area.xml
trunk/data/areas/i0x7e/i0x7e.mesh
trunk/data/areas/i0x7f/
trunk/data/areas/i0x7f/area.xml
trunk/data/areas/i0x7f/i0x7f.mesh
trunk/data/areas/i0x80/
trunk/data/areas/i0x80/area.xml
trunk/data/areas/i0x80/i0x80.mesh
trunk/data/areas/i0x81/
trunk/data/areas/i0x81/area.xml
trunk/data/areas/i0x81/i0x81.mesh
trunk/data/areas/i0x82/
trunk/data/areas/i0x82/area.xml
trunk/data/areas/i0x82/i0x82.mesh
trunk/data/areas/i0x83/
trunk/data/areas/i0x83/area.xml
trunk/data/areas/i0x83/i0x83.mesh
trunk/data/areas/i0x84/
trunk/data/areas/i0x84/area.xml
trunk/data/areas/i0x84/i0x84.mesh
trunk/data/areas/i0x85/
trunk/data/areas/i0x85/area.xml
trunk/data/areas/i0x85/i0x85.mesh
trunk/data/areas/i0x86/
trunk/data/areas/i0x86/area.xml
trunk/data/areas/i0x86/i0x86.mesh
trunk/data/areas/i0x87/
trunk/data/areas/i0x87/area.xml
trunk/data/areas/i0x87/i0x87.mesh
trunk/data/areas/i0x88/
trunk/data/areas/i0x88/area.xml
trunk/data/areas/i0x88/i0x88.mesh
trunk/data/areas/i0x89/
trunk/data/areas/i0x89/area.xml
trunk/data/areas/i0x89/i0x89.mesh
trunk/data/areas/i0x8a/
trunk/data/areas/i0x8a/area.xml
trunk/data/areas/i0x8a/i0x8a.mesh
trunk/data/areas/i0x8b/
trunk/data/areas/i0x8b/area.xml
trunk/data/areas/i0x8b/i0x8b.mesh
trunk/data/areas/i0x8c/
trunk/data/areas/i0x8c/area.xml
trunk/data/areas/i0x8c/i0x8c.mesh
trunk/data/areas/i0x8d/
trunk/data/areas/i0x8d/area.xml
trunk/data/areas/i0x8d/i0x8d.mesh
trunk/data/areas/i0x8e/
trunk/data/areas/i0x8e/area.xml
trunk/data/areas/i0x8e/i0x8e.mesh
trunk/data/areas/i0x8f/
trunk/data/areas/i0x8f/area.xml
trunk/data/areas/i0x8f/i0x8f.mesh
trunk/data/areas/i0x90/
trunk/data/areas/i0x90/area.xml
trunk/data/areas/i0x90/i0x90.mesh
trunk/data/areas/i0x91/
trunk/data/areas/i0x91/area.xml
trunk/data/areas/i0x91/i0x91.mesh
trunk/data/areas/i0x92/
trunk/data/areas/i0x92/area.xml
trunk/data/areas/i0x92/i0x92.mesh
trunk/data/areas/i0x93/
trunk/data/areas/i0x93/area.xml
trunk/data/areas/i0x93/i0x93.mesh
trunk/data/areas/i0x94/
trunk/data/areas/i0x94/area.xml
trunk/data/areas/i0x94/i0x94.mesh
trunk/data/areas/i0x95/
trunk/data/areas/i0x95/area.xml
trunk/data/areas/i0x95/i0x95.mesh
trunk/data/areas/i0x96/
trunk/data/areas/i0x96/area.xml
trunk/data/areas/i0x96/i0x96.mesh
trunk/data/areas/i0x97/
trunk/data/areas/i0x97/area.xml
trunk/data/areas/i0x97/i0x97.mesh
trunk/data/areas/i0x98/
trunk/data/areas/i0x98/area.xml
trunk/data/areas/i0x98/i0x98.mesh
trunk/data/areas/i0x99/
trunk/data/areas/i0x99/area.xml
trunk/data/areas/i0x99/i0x99.mesh
trunk/data/areas/i0x9a/
trunk/data/areas/i0x9a/area.xml
trunk/data/areas/i0x9a/i0x9a.mesh
trunk/data/areas/i0x9b/
trunk/data/areas/i0x9b/area.xml
trunk/data/areas/i0x9b/i0x9b.mesh
trunk/data/areas/i0x9c/
trunk/data/areas/i0x9c/area.xml
trunk/data/areas/i0x9c/i0x9c.mesh
trunk/data/areas/i0x9d/
trunk/data/areas/i0x9d/area.xml
trunk/data/areas/i0x9d/i0x9d.mesh
trunk/data/areas/i0x9e/
trunk/data/areas/i0x9e/area.xml
trunk/data/areas/i0x9e/i0x9e.mesh
trunk/data/areas/i0x9f/
trunk/data/areas/i0x9f/area.xml
trunk/data/areas/i0x9f/i0x9f.mesh
trunk/data/areas/i0xa0/
trunk/data/areas/i0xa0/area.xml
trunk/data/areas/i0xa0/i0xa0.mesh
trunk/data/areas/i0xa1/
trunk/data/areas/i0xa1/area.xml
trunk/data/areas/i0xa1/i0xa1.mesh
trunk/data/areas/i0xa2/
trunk/data/areas/i0xa2/area.xml
trunk/data/areas/i0xa2/i0xa2.mesh
trunk/data/areas/i0xa3/
trunk/data/areas/i0xa3/area.xml
trunk/data/areas/i0xa3/i0xa3.mesh
trunk/data/areas/i0xa4/
trunk/data/areas/i0xa4/area.xml
trunk/data/areas/i0xa4/i0xa4.mesh
trunk/data/areas/i0xa5/
trunk/data/areas/i0xa5/area.xml
trunk/data/areas/i0xa5/i0xa5.mesh
trunk/data/areas/i0xa6/
trunk/data/areas/i0xa6/area.xml
trunk/data/areas/i0xa6/i0xa6.mesh
trunk/data/areas/i0xa7/
trunk/data/areas/i0xa7/area.xml
trunk/data/areas/i0xa7/i0xa7.mesh
trunk/data/areas/i0xa8/
trunk/data/areas/i0xa8/area.xml
trunk/data/areas/i0xa8/i0xa8.mesh
trunk/data/areas/i0xa9/
trunk/data/areas/i0xa9/area.xml
trunk/data/areas/i0xa9/i0xa9.mesh
trunk/data/areas/i0xaa/
trunk/data/areas/i0xaa/area.xml
trunk/data/areas/i0xaa/i0xaa.mesh
trunk/data/areas/i0xab/
trunk/data/areas/i0xab/area.xml
trunk/data/areas/i0xab/i0xab.mesh
trunk/data/areas/i0xac/
trunk/data/areas/i0xac/area.xml
trunk/data/areas/i0xac/i0xac.mesh
trunk/data/areas/i0xad/
trunk/data/areas/i0xad/area.xml
trunk/data/areas/i0xad/i0xad.mesh
trunk/data/areas/i0xae/
trunk/data/areas/i0xae/area.xml
trunk/data/areas/i0xae/i0xae.mesh
trunk/data/areas/i0xaf/
trunk/data/areas/i0xaf/area.xml
trunk/data/areas/i0xaf/i0xaf.mesh
trunk/data/areas/i0xb0/
trunk/data/areas/i0xb0/area.xml
trunk/data/areas/i0xb0/i0xb0.mesh
trunk/data/areas/i0xb1/
trunk/data/areas/i0xb1/area.xml
trunk/data/areas/i0xb1/i0xb1.mesh
trunk/data/areas/i0xb2/
trunk/data/areas/i0xb2/area.xml
trunk/data/areas/i0xb2/i0xb2.mesh
trunk/data/areas/i0xb3/
trunk/data/areas/i0xb3/area.xml
trunk/data/areas/i0xb3/i0xb3.mesh
trunk/data/areas/i0xb4/
trunk/data/areas/i0xb4/area.xml
trunk/data/areas/i0xb4/i0xb4.mesh
trunk/data/areas/i0xb5/
trunk/data/areas/i0xb5/area.xml
trunk/data/areas/i0xb5/i0xb5.mesh
trunk/data/areas/t0x00/
trunk/data/areas/t0x00/area.xml
trunk/data/areas/t0x00/t0x00.mesh
trunk/data/areas/t0x01/
trunk/data/areas/t0x01/area.xml
trunk/data/areas/t0x01/t0x01.mesh
trunk/data/areas/t0x02/
trunk/data/areas/t0x02/area.xml
trunk/data/areas/t0x02/t0x02.mesh
trunk/data/areas/t0x03/
trunk/data/areas/t0x03/area.xml
trunk/data/areas/t0x03/t0x03.mesh
trunk/data/areas/t0x04/
trunk/data/areas/t0x04/area.xml
trunk/data/areas/t0x04/t0x04.mesh
trunk/data/areas/t0x05/
trunk/data/areas/t0x05/area.xml
trunk/data/areas/t0x05/t0x05.mesh
trunk/data/areas/t0x06/
trunk/data/areas/t0x06/area.xml
trunk/data/areas/t0x06/t0x06.mesh
trunk/data/areas/t0x07/
trunk/data/areas/t0x07/area.xml
trunk/data/areas/t0x07/t0x07.mesh
trunk/data/areas/t0x08/
trunk/data/areas/t0x08/area.xml
trunk/data/areas/t0x08/t0x08.mesh
trunk/data/areas/t0x08.001/
trunk/data/areas/t0x08.001/area.xml
trunk/data/areas/t0x08.001/t0x08.001.mesh
trunk/data/areas/t0x09/
trunk/data/areas/t0x09/area.xml
trunk/data/areas/t0x09/t0x09.mesh
trunk/data/areas/t0x0a/
trunk/data/areas/t0x0a/area.xml
trunk/data/areas/t0x0a/t0x0a.mesh
trunk/data/areas/t0x0b/
trunk/data/areas/t0x0b/area.xml
trunk/data/areas/t0x0b/t0x0b.mesh
trunk/data/areas/t0x0c/
trunk/data/areas/t0x0c/area.xml
trunk/data/areas/t0x0c/t0x0c.mesh
trunk/data/areas/t0x0d/
trunk/data/areas/t0x0d/area.xml
trunk/data/areas/t0x0d/t0x0d.mesh
trunk/data/areas/t0x0e/
trunk/data/areas/t0x0e/area.xml
trunk/data/areas/t0x0e/t0x0e.mesh
trunk/data/areas/t0x0f/
trunk/data/areas/t0x0f/area.xml
trunk/data/areas/t0x0f/t0x0f.mesh
trunk/data/areas/t0x10/
trunk/data/areas/t0x10/area.xml
trunk/data/areas/t0x10/t0x10.mesh
trunk/data/areas/t0x11/
trunk/data/areas/t0x11/area.xml
trunk/data/areas/t0x11/t0x11.mesh
trunk/data/areas/t0x12/
trunk/data/areas/t0x12/area.xml
trunk/data/areas/t0x12/t0x12.mesh
trunk/tools/4dstrk2mospworld/
trunk/tools/4dstrk2mospworld/Makefile
trunk/tools/4dstrk2mospworld/main.cpp
trunk/tools/4dstrk2mospworld/test.trk
Modified: trunk/cfg/physicsConfig.xml
===================================================================
--- trunk/cfg/physicsConfig.xml 2006-09-14 23:16:22 UTC (rev 464)
+++ trunk/cfg/physicsConfig.xml 2006-09-19 17:21:28 UTC (rev 465)
@@ -11,8 +11,8 @@
_erpValue = "default"
erpValue = "0.8"
__erpValue = "0.5"
- __stepType = "dWorldStep"
- stepType = "dWorldQuickStep"
+ stepType = "dWorldStep"
+ __stepType = "dWorldQuickStep"
_stepType = "dWorldStepFast1"
dWorldStepFast1MaxIterations = "100"
>
Added: trunk/data/areas/4ds.material
===================================================================
--- trunk/data/areas/4ds.material (rev 0)
+++ trunk/data/areas/4ds.material 2006-09-19 17:21:28 UTC (rev 465)
@@ -0,0 +1,280 @@
+material windmill1
+{
+ receive_shadows on
+ technique
+ {
+ pass
+ {
+ ambient 0.500000 0.500000 0.500000
+ diffuse 0.640000 0.240000 0.240000
+ specular 0.500000 0.500000 0.500000 50.000000
+ emissive 0.000000 0.000000 0.000000
+ }
+ }
+}
+material bridge
+{
+ receive_shadows on
+ technique
+ {
+ pass
+ {
+ ambient 0.500000 0.500000 0.500000
+ diffuse 0.640000 0.640000 0.640000
+ specular 0.500000 0.500000 0.500000 50.000000
+ emissive 0.000000 0.000000 0.000000
+ }
+ }
+}
+material finish
+{
+ receive_shadows on
+ technique
+ {
+ pass
+ {
+ ambient 0.500000 0.500000 0.500000
+ diffuse 0.640000 0.640000 0.640000
+ specular 0.500000 0.500000 0.500000 50.000000
+ emissive 0.000000 0.000000 0.000000
+ }
+ }
+}
+material dirt
+{
+ receive_shadows on
+ technique
+ {
+ pass
+ {
+ ambient 0.500000 0.500000 0.500000
+ diffuse 0.640000 0.400000 0.080000
+ specular 0.500000 0.500000 0.500000 50.000000
+ emissive 0.000000 0.000000 0.000000
+ }
+ }
+}
+material wall
+{
+ receive_shadows on
+ technique
+ {
+ pass
+ {
+ ambient 0.500000 0.500000 0.500000
+ diffuse 0.640000 0.560000 0.160000
+ specular 0.500000 0.500000 0.500000 50.000000
+ emissive 0.000000 0.000000 0.000000
+ }
+ }
+}
+material house
+{
+ receive_shadows on
+ technique
+ {
+ pass
+ {
+ ambient 0.500000 0.500000 0.500000
+ diffuse 0.800000 0.400000 0.160000
+ specular 0.500000 0.500000 0.500000 50.000000
+ emissive 0.000000 0.000000 0.000000
+ }
+ }
+}
+material ship4
+{
+ receive_shadows on
+ technique
+ {
+ pass
+ {
+ ambient 0.500000 0.500000 0.500000
+ diffuse 0.640000 0.320000 0.320000
+ specular 0.500000 0.500000 0.500000 50.000000
+ emissive 0.000000 0.000000 0.000000
+ }
+ }
+}
+material ship3
+{
+ receive_shadows on
+ technique
+ {
+ pass
+ {
+ ambient 0.500000 0.500000 0.500000
+ diffuse 0.240000 0.240000 0.240000
+ specular 0.500000 0.500000 0.500000 50.000000
+ emissive 0.000000 0.000000 0.000000
+ }
+ }
+}
+material ship2
+{
+ receive_shadows on
+ technique
+ {
+ pass
+ {
+ ambient 0.500000 0.500000 0.500000
+ diffuse 0.640000 0.640000 0.640000
+ specular 0.500000 0.500000 0.500000 50.000000
+ emissive 0.000000 0.000000 0.000000
+ }
+ }
+}
+material tree
+{
+ receive_shadows on
+ technique
+ {
+ pass
+ {
+ ambient 0.500000 0.500000 0.500000
+ diffuse 0.560000 0.320000 0.320000
+ specular 0.500000 0.500000 0.500000 50.000000
+ emissive 0.000000 0.000000 0.000000
+ }
+ }
+}
+material tenniscourt
+{
+ receive_shadows on
+ technique
+ {
+ pass
+ {
+ ambient 0.500000 0.500000 0.500000
+ diffuse 0.640000 0.640000 0.640000
+ specular 0.500000 0.500000 0.500000 50.000000
+ emissive 0.000000 0.000000 0.000000
+ }
+ }
+}
+material window
+{
+ receive_shadows on
+ technique
+ {
+ pass
+ {
+ ambient 0.500000 0.500000 0.500000
+ diffuse 0.640000 0.640000 0.640000
+ specular 0.500000 0.500000 0.500000 50.000000
+ emissive 0.000000 0.000000 0.000000
+ }
+ }
+}
+material windmill2
+{
+ receive_shadows on
+ technique
+ {
+ pass
+ {
+ ambient 0.500000 0.500000 0.500000
+ diffuse 0.640000 0.640000 0.640000
+ specular 0.500000 0.500000 0.500000 50.000000
+ emissive 0.000000 0.000000 0.000000
+ }
+ }
+}
+material curb
+{
+ receive_shadows on
+ technique
+ {
+ pass
+ {
+ ambient 0.500000 0.500000 0.500000
+ diffuse 0.800000 0.000000 0.000000
+ specular 0.500000 0.500000 0.500000 50.000000
+ emissive 0.000000 0.000000 0.000000
+ }
+ }
+}
+material ice
+{
+ receive_shadows on
+ technique
+ {
+ pass
+ {
+ ambient 0.500000 0.500000 0.500000
+ diffuse
+ specular 0.500000 0.500000 0.500000 50.000000
+ emissive 0.000000 0.000000 0.000000
+ }
+ }
+}
+material barn_roof
+{
+ receive_shadows on
+ technique
+ {
+ pass
+ {
+ ambient 0.500000 0.500000 0.500000
+ diffuse 0.640000 0.640000 0.640000
+ specular 0.500000 0.500000 0.500000 50.000000
+ emissive 0.000000 0.000000 0.000000
+ }
+ }
+}
+material ship
+{
+ receive_shadows on
+ technique
+ {
+ pass
+ {
+ ambient 0.500000 0.500000 0.500000
+ diffuse 0.000000 0.288373 0.670268
+ specular 0.500000 0.500000 0.500000 50.000000
+ emissive 0.000000 0.000000 0.000000
+ }
+ }
+}
+material barn
+{
+ receive_shadows on
+ technique
+ {
+ pass
+ {
+ ambient 0.500000 0.500000 0.500000
+ diffuse 0.800000 0.000000 0.000000
+ specular 0.500000 0.500000 0.500000 50.000000
+ emissive 0.000000 0.000000 0.000000
+ }
+ }
+}
+material road
+{
+ receive_shadows on
+ technique
+ {
+ pass
+ {
+ ambient 0.500000 0.500000 0.500000
+ diffuse 0.240000 0.240000 0.240000
+ specular 0.500000 0.500000 0.500000 50.000000
+ Emissive 0.000000 0.000000 0.000000
+ }
+ }
+}
+material ground
+{
+ receive_shadows on
+ technique
+ {
+ pass
+ {
+ ambient 0.500000 0.500000 0.500000
+ diffuse 0.000000 0.800000 0.000000
+ specular 0.500000 0.500000 0.500000 50.000000
+ emissive 0.000000 0.000000 0.000000
+ }
+ }
+}
Added: trunk/data/areas/i0x01/area.xml
===================================================================
--- trunk/data/areas/i0x01/area.xml (rev 0)
+++ trunk/data/areas/i0x01/area.xml 2006-09-19 17:21:28 UTC (rev 465)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<area xmlns:xi="http://www.w3.org/2001/XInclude">
+ <customData
+ name = "4ds-i0x01"
+ description = "A 4D-Stunts tile, id=i0x01"
+ author="habalux"
+ contact="habalux AT gmail DOT com"
+ license="Creative Commons Attribution-NonCommercial-ShareAlike License"
+ checkpointPosition="0 0 0"
+ checkpointRadius="2.0"
+ >
+ <ground>
+ <mesh
+ name="i0x01"
+ position="0.000000 0.000000 0.000000"
+ rotation="1.000000 0.000000 0.000000 0.000000"
+ scale="30.000000 30.000000 30.000000"
+ file="i0x01.mesh"
+ />
+ </ground>
+ <parts>
+ </parts>
+ </customData>
+ <location name = "paceCar" position = "0 0 5" rotation = "0 0 0"/>
+ <location name = "grid01" position = "0 3 5" rotation = "0 0 0"/>
+ <location name = "grid02" position = "3 0 5" rotation = "0 0 0"/>
+ <location name = "grid03" position = "3 3 5" rotation = "0 0 0"/>
+ <subobject name = "camera01"><camera>
+ <customData position = "5 5 3" target = "0 0 0"/>
+ </camera></subobject>
+</area>
Added: trunk/data/areas/i0x01/i0x01.mesh
===================================================================
(Binary files differ)
Property changes on: trunk/data/areas/i0x01/i0x01.mesh
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/data/areas/i0x04/area.xml
===================================================================
--- trunk/data/areas/i0x04/area.xml (rev 0)
+++ trunk/data/areas/i0x04/area.xml 2006-09-19 17:21:28 UTC (rev 465)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<area xmlns:xi="http://www.w3.org/2001/XInclude">
+ <customData
+ name = "4ds-i0x04"
+ description = "A 4D-Stunts tile, id=i0x04"
+ author="habalux"
+ contact="habalux AT gmail DOT com"
+ license="Creative Commons Attribution-NonCommercial-ShareAlike License"
+ checkpointPosition="0 0 0"
+ checkpointRadius="2.0"
+ >
+ <ground>
+ <mesh
+ name="i0x04"
+ position="0.000000 0.000000 0.000000"
+ rotation="1.000000 0.000000 0.000000 0.000000"
+ scale="30.000000 30.000000 30.000000"
+ file="i0x04.mesh"
+ />
+ </ground>
+ <parts>
+ </parts>
+ </customData>
+ <location name = "paceCar" position = "0 0 5" rotation = "0 0 0"/>
+ <location name = "grid01" position = "0 3 5" rotation = "0 0 0"/>
+ <location name = "grid02" position = "3 0 5" rotation = "0 0 0"/>
+ <location name = "grid03" position = "3 3 5" rotation = "0 0 0"/>
+ <subobject name = "camera01"><camera>
+ <customData position = "5 5 3" target = "0 0 0"/>
+ </camera></subobject>
+</area>
Added: trunk/data/areas/i0x04/i0x04.mesh
===================================================================
(Binary files differ)
Property changes on: trunk/data/areas/i0x04/i0x04.mesh
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/data/areas/i0x05/area.xml
===================================================================
--- trunk/data/areas/i0x05/area.xml (rev 0)
+++ trunk/data/areas/i0x05/area.xml 2006-09-19 17:21:28 UTC (rev 465)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<area xmlns:xi="http://www.w3.org/2001/XInclude">
+ <customData
+ name = "4ds-i0x05"
+ description = "A 4D-Stunts tile, id=i0x05"
+ author="habalux"
+ contact="habalux AT gmail DOT com"
+ license="Creative Commons Attribution-NonCommercial-ShareAlike License"
+ checkpointPosition="0 0 0"
+ checkpointRadius="2.0"
+ >
+ <ground>
+ <mesh
+ name="i0x05"
+ position="0.000000 0.000000 0.000000"
+ rotation="1.000000 0.000000 0.000000 0.000000"
+ scale="30.000000 30.000000 30.000000"
+ file="i0x05.mesh"
+ />
+ </ground>
+ <parts>
+ </parts>
+ </customData>
+ <location name = "paceCar" position = "0 0 5" rotation = "0 0 0"/>
+ <location name = "grid01" position = "0 3 5" rotation = "0 0 0"/>
+ <location name = "grid02" position = "3 0 5" rotation = "0 0 0"/>
+ <location name = "grid03" position = "3 3 5" rotation = "0 0 0"/>
+ <subobject name = "camera01"><camera>
+ <customData position = "5 5 3" target = "0 0 0"/>
+ </camera></subobject>
+</area>
Added: trunk/data/areas/i0x05/i0x05.mesh
===================================================================
(Binary files differ)
Property changes on: trunk/data/areas/i0x05/i0x05.mesh
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/data/areas/i0x06/area.xml
===================================================================
--- trunk/data/areas/i0x06/area.xml (rev 0)
+++ trunk/data/areas/i0x06/area.xml 2006-09-19 17:21:28 UTC (rev 465)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<area xmlns:xi="http://www.w3.org/2001/XInclude">
+ <customData
+ name = "4ds-i0x06"
+ description = "A 4D-Stunts tile, id=i0x06"
+ author="habalux"
+ contact="habalux AT gmail DOT com"
+ license="Creative Commons Attribution-NonCommercial-ShareAlike License"
+ checkpointPosition="0 0 0"
+ checkpointRadius="2.0"
+ >
+ <ground>
+ <mesh
+ name="i0x06"
+ position="0.000000 0.000000 0.000000"
+ rotation="1.000000 0.000000 0.000000 0.000000"
+ scale="30.000000 30.000000 30.000000"
+ file="i0x06.mesh"
+ />
+ </ground>
+ <parts>
+ </parts>
+ </customData>
+ <location name = "paceCar" position = "0 0 5" rotation = "0 0 0"/>
+ <location name = "grid01" position = "0 3 5" rotation = "0 0 0"/>
+ <location name = "grid02" position = "3 0 5" rotation = "0 0 0"/>
+ <location name = "grid03" position = "3 3 5" rotation = "0 0 0"/>
+ <subobject name = "camera01"><camera>
+ <customData position = "5 5 3" target = "0 0 0"/>
+ </camera></subobject>
+</area>
Added: trunk/data/areas/i0x06/i0x06.mesh
===================================================================
(Binary files differ)
Property changes on: trunk/data/areas/i0x06/i0x06.mesh
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/data/areas/i0x07/area.xml
===================================================================
--- trunk/data/areas/i0x07/area.xml (rev 0)
+++ trunk/data/areas/i0x07/area.xml 2006-09-19 17:21:28 UTC (rev 465)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<area xmlns:xi="http://www.w3.org/2001/XInclude">
+ <customData
+ name = "4ds-i0x07"
+ description = "A 4D-Stunts tile, id=i0x07"
+ author="habalux"
+ contact="habalux AT gmail DOT com"
+ license="Creative Commons Attribution-NonCommercial-ShareAlike License"
+ checkpointPosition="0 0 0"
+ checkpointRadius="2.0"
+ >
+ <ground>
+ <mesh
+ name="i0x07"
+ position="0.000000 0.000000 0.000000"
+ rotation="1.000000 0.000000 0.000000 0.000000"
+ scale="30.000000 30.000000 30.000000"
+ file="i0x07.mesh"
+ />
+ </ground>
+ <parts>
+ </parts>
+ </customData>
+ <location name = "paceCar" position = "0 0 5" rotation = "0 0 0"/>
+ <location name = "grid01" position = "0 3 5" rotation = "0 0 0"/>
+ <location name = "grid02" position = "3 0 5" rotation = "0 0 0"/>
+ <location name = "grid03" position = "3 3 5" rotation = "0 0 0"/>
+ <subobject name = "camera01"><camera>
+ <customData position = "5 5 3" target = "0 0 0"/>
+ </camera></subobject>
+</area>
Added: trunk/data/areas/i0x07/i0x07.mesh
===================================================================
(Binary files differ)
Property changes on: trunk/data/areas/i0x07/i0x07.mesh
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/data/areas/i0x08/area.xml
===================================================================
--- trunk/data/areas/i0x08/area.xml (rev 0)
+++ trunk/data/areas/i0x08/area.xml 2006-09-19 17:21:28 UTC (rev 465)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<area xmlns:xi="http://www.w3.org/2001/XInclude">
+ <customData
+ name = "4ds-i0x08"
+ description = "A 4D-Stunts tile, id=i0x08"
+ author="habalux"
+ contact="habalux AT gmail DOT com"
+ license="Creative Commons Attribution-NonCommercial-ShareAlike License"
+ checkpointPosition="0 0 0"
+ checkpointRadius="2.0"
+ >
+ <ground>
+ <mesh
+ name="i0x08"
+ position="0.000000 0.000000 0.000000"
+ rotation="1.000000 0.000000 0.000000 0.000000"
+ scale="30.000000 30.000000 30.000000"
+ file="i0x08.mesh"
+ />
+ </ground>
+ <parts>
+ </parts>
+ </customData>
+ <location name = "paceCar" position = "0 0 5" rotation = "0 0 0"/>
+ <location name = "grid01" position = "0 3 5" rotation = "0 0 0"/>
+ <location name = "grid02" position = "3 0 5" rotation = "0 0 0"/>
+ <location name = "grid03" position = "3 3 5" rotation = "0 0 0"/>
+ <subobject name = "camera01"><camera>
+ <customData position = "5 5 3" target = "0 0 0"/>
+ </camera></subobject>
+</area>
Added: trunk/data/areas/i0x08/i0x08.mesh
===================================================================
(Binary files differ)
Property changes on: trunk/data/areas/i0x08/i0x08.mesh
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/data/areas/i0x09/area.xml
===================================================================
--- trunk/data/areas/i0x09/area.xml (rev 0)
+++ trunk/data/areas/i0x09/area.xml 2006-09-19 17:21:28 UTC (rev 465)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<area xmlns:xi="http://www.w3.org/2001/XInclude">
+ <customData
+ name = "4ds-i0x09"
+ description = "A 4D-Stunts tile, id=i0x09"
+ author="habalux"
+ contact="habalux AT gmail DOT com"
+ license="Creative Commons Attribution-NonCommercial-ShareAlike License"
+ checkpointPosition="0 0 0"
+ checkpointRadius="2.0"
+ >
+ <ground>
+ <mesh
+ name="i0x09"
+ position="0.000000 0.000000 0.000000"
+ rotation="1.000000 0.000000 0.000000 0.000000"
+ scale="30.000000 30.000000 30.000000"
+ file="i0x09.mesh"
+ />
+ </ground>
+ <parts>
+ </parts>
+ </customData>
+ <location name = "paceCar" position = "0 0 5" rotation = "0 0 0"/>
+ <location name = "grid01" position = "0 3 5" rotation = "0 0 0"/>
+ <location name = "grid02" position = "3 0 5" rotation = "0 0 0"/>
+ <location name = "grid03" position = "3 3 5" rotation = "0 0 0"/>
+ <subobject name = "camera01"><camera>
+ <customData position = "5 5 3" target = "0 0 0"/>
+ </camera></subobject>
+</area>
Added: trunk/data/areas/i0x09/i0x09.mesh
===================================================================
(Binary files differ)
Property changes on: trunk/data/areas/i0x09/i0x09.mesh
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/data/areas/i0x0a/area.xml
===================================================================
--- trunk/data/areas/i0x0a/area.xml (rev 0)
+++ trunk/data/areas/i0x0a/area.xml 2006-09-19 17:21:28 UTC (rev 465)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<area xmlns:xi="http://www.w3.org/2001/XInclude">
+ <customData
+ name = "4ds-i0x0a"
+ description = "A 4D-Stunts tile, id=i0x0a"
+ author="habalux"
+ contact="habalux AT gmail DOT com"
+ license="Creative Commons Attribution-NonCommercial-ShareAlike License"
+ checkpointPosition="0 0 0"
+ checkpointRadius="2.0"
+ >
+ <ground>
+ <mesh
+ name="i0x0a"
+ position="0.000000 0.000000 0.000000"
+ rotation="1.000000 0.000000 0.000000 0.000000"
+ scale="30.000000 30.000000 30.000000"
+ file="i0x0a.mesh"
+ />
+ </ground>
+ <parts>
+ </parts>
+ </customData>
+ <location name = "paceCar" position = "0 0 5" rotation = "0 0 0"/>
+ <location name = "grid01" position = "0 3 5" rotation = "0 0 0"/>
+ <location name = "grid02" position = "3 0 5" rotation = "0 0 0"/>
+ <location name = "grid03" position = "3 3 5" rotation = "0 0 0"/>
+ <subobject name = "camera01"><camera>
+ <customData position = "5 5 3" target = "0 0 0"/>
+ </camera></subobject>
+</area>
Added: trunk/data/areas/i0x0a/i0x0a.mesh
===================================================================
(Binary files differ)
Property changes on: trunk/data/areas/i0x0a/i0x0a.mesh
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/data/areas/i0x0b/area.xml
===================================================================
--- trunk/data/areas/i0x0b/area.xml (rev 0)
+++ trunk/data/areas/i0x0b/area.xml 2006-09-19 17:21:28 UTC (rev 465)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<area xmlns:xi="http://www.w3.org/2001/XInclude">
+ <customData
+ name = "4ds-i0x0b"
+ description = "A 4D-Stunts tile, id=i0x0b"
+ author="habalux"
+ contact="habalux AT gmail DOT com"
+ license="Creative Commons Attribution-NonCommercial-ShareAlike License"
+ checkpointPosition="0 0 0"
+ checkpointRadius="2.0"
+ >
+ <ground>
+ <mesh
+ name="i0x0b"
+ position="0.000000 0.000000 0.000000"
+ rotation="1.000000 0.000000 0.000000 0.000000"
+ scale="30.000000 30.000000 30.000000"
+ file="i0x0b.mesh"
+ />
+ </ground>
+ <parts>
+ </parts>
+ </customData>
+ <location name = "paceCar" position = "0 0 5" rotation = "0 0 0"/>
+ <location name = "grid01" position = "0 3 5" rotation = "0 0 0"/>
+ <location name = "grid02" position = "3 0 5" rotation = "0 0 0"/>
+ <location name = "grid03" position = "3 3 5" rotation = "0 0 0"/>
+ <subobject name = "camera01"><camera>
+ <customData position = "5 5 3" target = "0 0 0"/>
+ </camera></subobject>
+</area>
Added: trunk/data/areas/i0x0b/i0x0b.mesh
===================================================================
(Binary files differ)
Property changes on: trunk/data/areas/i0x0b/i0x0b.mesh
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/data/areas/i0x0c/area.xml
===================================================================
--- trunk/data/areas/i0x0c/area.xml (rev 0)
+++ trunk/data/areas/i0x0c/area.xml 2006-09-19 17:21:28 UTC (rev 465)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<area xmlns:xi="http://www.w3.org/2001/XInclude">
+ <customData
+ name = "4ds-i0x0c"
+ description = "A 4D-Stunts tile, id=i0x0c"
+ author="habalux"
+ contact="habalux AT gmail DOT com"
+ license="Creative Commons Attribution-NonCommercial-ShareAlike License"
+ checkpointPosition="0 0 0"
+ checkpointRadius="2.0"
+ >
+ <ground>
+ <mesh
+ name="i0x0c"
+ position="0.000000 0.000000 0.000000"
+ rotation="1.000000 0.000000 0.000000 0.000000"
+ scale="30.000000 30.000000 30.000000"
+ file="i0x0c.mesh"
+ />
+ </ground>
+ <parts>
+ </parts>
+ </customData>
+ <location name = "paceCar" position = "0 0 5" rotation = "0 0 0"/>
+ <location name = "grid01" position = "0 3 5" rotation = "0 0 0"/>
+ <location name = "grid02" position = "3 0 5" rotation = "0 0 0"/>
+ <location name = "grid03" position = "3 3 5" rotation = "0 0 0"/>
+ <subobject name = "camera01"><camera>
+ <customData position = "5 5 3" target = "0 0 0"/>
+ </camera></subobject>
+</area>
Added: trunk/data/areas/i0x0c/i0x0c.mesh
===================================================================
(Binary files differ)
Property changes on: trunk/data/areas/i0x0c/i0x0c.mesh
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/data/areas/i0x0d/area.xml
===================================================================
--- trunk/data/areas/i0x0d/area.xml (rev 0)
+++ trunk/data/areas/i0x0d/area.xml 2006-09-19 17:21:28 UTC (rev 465)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<area xmlns:xi="http://www.w3.org/2001/XInclude">
+ <customData
+ name = "4ds-i0x0d"
+ description = "A 4D-Stunts tile, id=i0x0d"
+ author="habalux"
+ contact="habalux AT gmail DOT com"
+ license="Creative Commons Attribution-NonCommercial-ShareAlike License"
+ checkpointPosition="0 0 0"
+ checkpointRadius="2.0"
+ >
+ <ground>
+ <mesh
+ name="i0x0d"
+ position="0.000000 0.000000 0.000000"
+ rotation="1.000000 0.000000 0.000000 0.000000"
+ scale="30.000000 30.000000 30.000000"
+ file="i0x0d.mesh"
+ />
+ </ground>
+ <parts>
+ </parts>
+ </customData>
+ <location name = "paceCar" position = "0 0 5" rotation = "0 0 0"/>
+ <location name = "grid01" position = "0 3 5" rotation = "0 0 0"/>
+ <location name = "grid02" position = "3 0 5" rotation = "0 0 0"/>
+ <location name = "grid03" position = "3 3 5" rotation = "0 0 0"/>
+ <subobject name = "camera01"><camera>
+ <customData position = "5 5 3" target = "0 0 0"/>
+ </camera></subobject>
+</area>
Added: trunk/data/areas/i0x0d/i0x0d.mesh
===================================================================
(Binary files differ)
Property changes on: trunk/data/areas/i0x0d/i0x0d.mesh
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/data/areas/i0x0e/area.xml
===================================================================
--- trunk/data/areas/i0x0e/area.xml (rev 0)
+++ trunk/data/areas/i0x0e/area.xml 2006-09-19 17:21:28 UTC (rev 465)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<area xmlns:xi="http://www.w3.org/2001/XInclude">
+ <customData
+ name = "4ds-i0x0e"
+ description = "A 4D-Stunts tile, id=i0x0e"
+ author="habalux"
+ contact="habalux AT gmail DOT com"
+ license="Creative Commons Attribution-NonCommercial-ShareAlike License"
+ checkpointPosition="0 0 0"
+ checkpointRadius="2.0"
+ >
+ <ground>
+ <mesh
+ name="i0x0e"
+ position="0.000000 0.000000 0.000000"
+ rotation="1.000000 0.000000 0.000000 0.000000"
+ scale="30.000000 30.000000 30.000000"
+ file="i0x0e.mesh"
+ />
+ </ground>
+ <parts>
+ </parts>
+ </customData>
+ <location name = "paceCar" position = "0 0 5" rotation = "0 0 0"/>
+ <location name = "grid01" position = "0 3 5" rotation = "0 0 0"/>
+ <location name = "grid02" position = "3 0 5" rotation = "0 0 0"/>
+ <location name = "grid03" position = "3 3 5" rotation = "0 0 0"/>
+ <subobject name = "camera01"><camera>
+ <customData position = "5 5 3" target = "0 0 0"/>
+ </camera></subobject>
+</area>
Added: trunk/data/areas/i0x0e/i0x0e.mesh
===================================================================
(Binary files differ)
Property changes on: trunk/data/areas/i0x0e/i0x0e.mesh
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/data/areas/i0x0f/area.xml
===================================================================
--- trunk/data/areas/i0x0f/area.xml (rev 0)
+++ trunk/data/areas/i0x0f/area.xml 2006-09-19 17:21:28 UTC (rev 465)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<area xmlns:xi="http://www.w3.org/2001/XInclude">
+ <customData
+ name = "4ds-i0x0f"
+ description = "A 4D-Stunts tile, id=i0x0f"
+ author="habalux"
+ contact="habalux AT gmail DOT com"
+ license="Creative Commons Attribution-NonCommercial-ShareAlike License"
+ checkpointPosition="0 0 0"
+ checkpointRadius="2.0"
+ >
+ <ground>
+ <mesh
+ name="i0x0f"
+ position="0.000000 0.000000 0.000000"
+ rotation="1.000000 0.000000 0.000000 0.000000"
+ scale="30.000000 30.000000 30.000000"
+ file="i0x0f.mesh"
+ />
+ </ground>
+ <parts>
+ </parts>
+ </customData>
+ <location name = "paceCar" position = "0 0 5" rotation = "0 0 0"/>
+ <location name = "grid01" position = "0 3 5" rotation = "0 0 0"/>
+ <location name = "grid02" position = "3 0 5" rotation = "0 0 0"/>
+ <location name = "grid03" position = "3 3 5" rotation = "0 0 0"/>
+ <subobject name = "camera01"><camera>
+ <customData position = "5 5 3" target = "0 0 0"/>
+ </camera></subobject>
+</area>
Added: trunk/data/areas/i0x0f/i0x0f.mesh
===================================================================
(Binary files differ)
Property changes on: trunk/data/areas/i0x0f/i0x0f.mesh
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/data/areas/i0x10/area.xml
===================================================================
--- trunk/data/areas/i0x10/area.xml (rev 0)
+++ trunk/data/areas/i0x10/area.xml 2006-09-19 17:21:28 UTC (rev 465)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<area xmlns:xi="http://www.w3.org/2001/XInclude">
+ <customData
+ name = "4ds-i0x10"
+ description = "A 4D-Stunts tile, id=i0x10"
+ author="habalux"
+ contact="habalux AT gmail DOT com"
+ license="Creative Commons Attribution-NonCommercial-ShareAlike License"
+ checkpointPosition="0 0 0"
+ checkpointRadius="2.0"
+ >
+ <ground>
+ <mesh
+ name="i0x10"
+ position="0.000000 0.000000 0.000000"
+ rotation="1.000000 0.000000 0.000000 0.000000"
+ scale="30.000000 30.000000 30.000000"
+ file="i0x10.mesh"
+ />
+ </ground>
+ <parts>
+ </parts>
+ </customData>
+ <location name = "paceCar" position = "0 0 5" rotation = "0 0 0"/>
+ <location name = "grid01" position = "0 3 5" rotation = "0 0 0"/>
+ <location name = "grid02" position = "3 0 5" rotation = "0 0 0"/>
+ <location name = "grid03" position = "3 3 5" rotation = "0 0 0"/>
+ <subobject name = "camera01"><camera>
+ <customData position = "5 5 3" target = "0 0 0"/>
+ </camera></subobject>
+</area>
Added: trunk/data/areas/i0x10/i0x10.mesh
===================================================================
(Binary files differ)
Property changes on: trunk/data/areas/i0x10/i0x10.mesh
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/data/areas/i0x11/area.xml
===================================================================
--- trunk/data/areas/i0x11/area.xml (rev 0)
+++ trunk/data/areas/i0x11/area.xml 2006-09-19 17:21:28 UTC (rev 465)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<area xmlns:xi="http://www.w3.org/2001/XInclude">
+ <customData
+ name = "4ds-i0x11"
+ description = "A 4D-Stunts tile, id=i0x11"
+ author="habalux"
+ contact="habalux AT gmail DOT com"
+ license="Creative Commons Attribution-NonCommercial-ShareAlike License"
+ checkpointPosition="0 0 0"
+ checkpointRadius="2.0"
+ >
+ <ground>
+ <mesh
+ name="i0x11"
+ position="0.000000 0.000000 0.000000"
+ rotation="1.000000 0.000000 0.000000 0.000000"
+ scale="30.000000 30.000000 30.000000"
+ file="i0x11.mesh"
+ />
+ </ground>
+ <parts>
+ </parts>
+ </customData>
+ <location name = "paceCar" position = "0 0 5" rotation = "0 0 0"/>
+ <location name = "grid01" position = "0 3 5" rotation = "0 0 0"/>
+ <location name = "grid02" position = "3 0 5" rotation = "0 0 0"/>
+ <location name = "grid03" position = "3 3 5" rotation = "0 0 0"/>
+ <subobject name = "camera01"><camera>
+ <customData position = "5 5 3" target = "0 0 0"/>
+ </camera></subobject>
+</area>
Added: trunk/data/areas/i0x11/i0x11.mesh
===================================================================
(Binary files differ)
Property changes on: trunk/data/areas/i0x11/i0x11.mesh
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/data/areas/i0x12/area.xml
===================================================================
--- trunk/data/areas/i0x12/area.xml (rev 0)
+++ trunk/data/areas/i0x12/area.xml 2006-09-19 17:21:28 UTC (rev 465)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<area xmlns:xi="http://www.w3.org/2001/XInclude">
+ <customData
+ name = "4ds-i0x12"
+ description = "A 4D-Stunts tile, id=i0x12"
+ author="habalux"
+ contact="habalux AT gmail DOT com"
+ license="Creative Commons Attribution-NonCommercial-ShareAlike License"
+ checkpointPosition="0 0 0"
+ checkpointRadius="2.0"
+ >
+ <ground>
+ <mesh
+ name="i0x12"
+ position="0.000000 0.000000 0.000000"
+ rotation="1.000000 0.000000 0.000000 0.000000"
+ scale="30.000000 30.000000 30.000000"
+ file="i0x12.mesh"
+ />
+ </ground>
+ <parts>
+ </parts>
+ </customData>
+ <location name = "paceCar" position = "0 0 5" rotation = "0 0 0"/>
+ <location name = "grid01" position = "0 3 5" rotation = "0 0 0"/>
+ <location name = "grid02" position = "3 0 5" rotation = "0 0 0"/>
+ <location name = "grid03" position = "3 3 5" rotation = "0 0 0"/>
+ <subobject name = "camera01"><camera>
+ <customData position = "5 5 3" target = "0 0 0"/>
+ </camera></subobject>
+</area>
Added: trunk/data/areas/i0x12/i0x12.mesh
===================================================================
(Binary files differ)
Property changes on: trunk/data/areas/i0x12/i0x12.mesh
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/data/areas/i0x13/area.xml
===================================================================
--- trunk/data/areas/i0x13/area.xml (rev 0)
+++ trunk/data/areas/i0x13/area.xml 2006-09-19 17:21:28 UTC (rev 465)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<area xmlns:xi="http://www.w3.org/2001/XInclude">
+ <customData
+ name = "4ds-i0x13"
+ description = "A 4D-Stunts tile, id=i0x13"
+ author="habalux"
+ contact="habalux AT gmail DOT com"
+ license="Creative Commons Attribution-NonCommercial-ShareAlike License"
+ checkpointPosition="0 0 0"
+ checkpointRadius="2.0"
+ >
+ <ground>
+ <mesh
+ name="i0x13"
+ position="0.000000 0.000000 0.000000"
+ rotation="1.000000 0.000000 0.000000 0.000000"
+ scale="30.000000 30.000000 30.000000"
+ file="i0x13.mesh"
+ />
+ </ground>
+ <parts>
+ </parts>
+ </customData>
+ <location name = "paceCar" position = "0 0 5" rotation = "0 0 0"/>
+ <location name = "grid01" position = "0 3 5" rotation = "0 0 0"/>
+ <location name = "grid02" position = "3 0 5" rotation = "0 0 0"/>
+ <location name = "grid03" position = "3 3 5" rotation = "0 0 0"/>
+ <subobject name = "camera01"><camera>
+ <customData position = "5 5 3" target = "0 0 0"/>
+ </camera></subobject>
+</area>
Added: trunk/data/areas/i0x13/i0x13.mesh
===================================================================
(Binary files differ)
Property changes on: trunk/data/areas/i0x13/i0x13.mesh
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/data/areas/i0x14/area.xml
===================================================================
--- trunk/data/areas/i0x14/area.xml (rev 0)
+++ trunk/data/areas/i0x14/area.xml 2006-09-19 17:21:28 UTC (rev 465)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<area xmlns:xi="http://www.w3.org/2001/XInclude">
+ <customData
+ name = "4ds-i0x14"
+ description = "A 4D-Stunts tile, id=i0x14"
+ author="habalux"
+ contact="habalux AT gmail DOT com"
+ license="Creative Commons Attribution-NonCommercial-ShareAlike License"
+ checkpointPosition="0 0 0"
+ checkpointRadius="2.0"
+ >
+ <ground>
+ <mesh
+ name="i0x14"
+ position="0.000000 0.000000 0.000000"
+ rotation="1.000000 0.000000 0.000000 0.000000"
+ scale="30.000000 30.000000 30.000000"
+ file="i0x14.mesh"
+ />
+ </ground>
+ <parts>
+ </parts>
+ </customData>
+ <location name = "paceCar" position = "0 0 5" rotation = "0 0 0"/>
+ <location name = "grid01" position = "0 3 5" rotation = "0 0 0"/>
+ <location name = "grid02" position = "3 0 5" rotation = "0 0 0"/>
+ <location name = "grid03" position = "3 3 5" rotation = "0 0 0"/>
+ <subobject name = "camera01"><camera>
+ <customData position = "5 5 3" target = "0 0 0"/>
+ </camera></subobject>
+</area>
Added: trunk/data/areas/i0x14/i0x14.mesh
===================================================================
(Binary files differ)
Property changes on: trunk/data/areas/i0x14/i0x14.mesh
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/data/areas/i0x15/area.xml
===================================================================
--- trunk/data/areas/i0x15/area.xml (rev 0)
+++ trunk/data/areas/i0x15/area.xml 2006-09-19 17:21:28 UTC (rev 465)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<area xmlns:xi="http://www.w3.org/2001/XInclude">
+ <customData
+ name = "4ds-i0x15"
+ description = "A 4D-Stunts tile, id=i0x15"
+ author="habalux"
+ contact="habalux AT gmail DOT com"
+ license="Creative Commons Attribution-NonCommercial-ShareAlike License"
+ checkpointPosition="0 0 0"
+ checkpointRadius="2.0"
+ >
+ <ground>
+ <mesh
+ name="i0x15"
+ position="0.000000 0.000000 0.000000"
+ rotation="1.000000 0.000000 0.000000 0.000000"
+ scale="30.000000 30.000000 30.000000"
+ file="i0x15.mesh"
+ />
+ ...
[truncated message content] |
|
From: <st...@us...> - 2006-09-14 23:16:33
|
Revision: 464
http://svn.sourceforge.net/motorsport/?rev=464&view=rev
Author: stenyak
Date: 2006-09-14 16:16:22 -0700 (Thu, 14 Sep 2006)
Log Message:
-----------
Added option to use dQuickStep ODE solver, which is a bit less precise, but should be way faster.
Modified physics config; now uinsg dQuickStep solver by default.
Modified Paths:
--------------
trunk/cfg/physicsConfig.xml
trunk/src/physics.cpp
Modified: trunk/cfg/physicsConfig.xml
===================================================================
--- trunk/cfg/physicsConfig.xml 2006-09-14 19:53:32 UTC (rev 463)
+++ trunk/cfg/physicsConfig.xml 2006-09-14 23:16:22 UTC (rev 464)
@@ -11,7 +11,8 @@
_erpValue = "default"
erpValue = "0.8"
__erpValue = "0.5"
- stepType = "dWorldStep"
+ __stepType = "dWorldStep"
+ stepType = "dWorldQuickStep"
_stepType = "dWorldStepFast1"
dWorldStepFast1MaxIterations = "100"
>
Modified: trunk/src/physics.cpp
===================================================================
--- trunk/src/physics.cpp 2006-09-14 19:53:32 UTC (rev 463)
+++ trunk/src/physics.cpp 2006-09-14 23:16:22 UTC (rev 464)
@@ -56,6 +56,7 @@
if (t->getAttribute("erpValue") != "default") System::get()->setErpValue(stod(t->getAttribute("erpValue")));
if (t->getAttribute("stepType") == "dWorldStep") stepType = 1;
if (t->getAttribute("stepType") == "dWorldStepFast1") stepType = 2;
+ if (t->getAttribute("stepType") == "dWorldQuickStep") stepType = 3;
dWorldStepFast1MaxIterations = stoi (t->getAttribute("dWorldStepFast1MaxIterations"));
}
}
@@ -126,13 +127,17 @@
{
default:
case 1:
- // traditional (x^y), theorycally slowest, and most accurate physics calculations:
+ // traditional (usage: m^3 memory, m^2x^y cpu), slowest, most accurate
dWorldStep (World::get()->worldID, system->getDesiredPhysicsTimestep());
break;
case 2:
- // alternative (x*y), fastest and less accurate physics calculations:
+ // alternative, allowing to limit the number of iterations to perform
dWorldStepFast1 (World::get()->worldID, system->getDesiredPhysicsTimestep(), dWorldStepFast1MaxIterations);
break;
+ case 3:
+ // alternative (usage: m memory, m*N cpu), faster, less acurate
+ dWorldQuickStep (World::get()->worldID, system->getDesiredPhysicsTimestep());
+ break;
}
dJointGroupEmpty (World::get()->jointGroupID);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st...@us...> - 2006-09-14 19:54:05
|
Revision: 463
http://svn.sourceforge.net/motorsport/?rev=463&view=rev
Author: stenyak
Date: 2006-09-14 12:53:32 -0700 (Thu, 14 Sep 2006)
Log Message:
-----------
Wheel ODE physics now use generic rigidBody tags, just like Part class.
Removed specific OdeBody constructor for wheels, they now use generic constructors.
Modified mosp1 vehicle.xml file; now using the aforementioned rigidBody tags.
Removed a line that kept gas at 100%, used for debugging in previous revisions.
Updated ToDo list.
Modified Paths:
--------------
trunk/3pl/linux/mklinks.sh
trunk/cfg/graphicsConfig.xml
trunk/data/parts/cone/part.xml
trunk/data/parts/cube/part.xml
trunk/data/parts/metalStand/part.xml
trunk/data/vehicles/mosp1/vehicle.xml
trunk/data/worlds/default.xml
trunk/doc/developer/concepts/structure
trunk/src/common/odeObject.cpp
trunk/src/common/odeObject.hpp
trunk/src/common/worldObject.cpp
trunk/src/makefile
trunk/src/todo
trunk/src/vehicle/pedal.cpp
trunk/src/vehicle/wheel.cpp
Modified: trunk/3pl/linux/mklinks.sh
===================================================================
--- trunk/3pl/linux/mklinks.sh 2006-09-14 15:41:21 UTC (rev 462)
+++ trunk/3pl/linux/mklinks.sh 2006-09-14 19:53:32 UTC (rev 463)
@@ -3,9 +3,9 @@
cd include
d=$origin/include
-# ln -s /home/stenyak$d/OGRE
+ ln -s /home/stenyak$d/OGRE
ln -s $d/freetype2
-# ln -s $d/OGRE
+ ln -s $d/OGRE
ln -s $d/SDL
ln -s $d/xercesc
ln -s $d/boost
@@ -13,8 +13,8 @@
cd lib
d=$origin/lib
-# ln -s /home/stenyak$d/OGRE
+ ln -s /home/stenyak$d/OGRE
ln -s /home/stenyak$d
-# for i in /home/stenyak$d/*Ogre*; do ln -s $i; done
+ 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-09-14 15:41:21 UTC (rev 462)
+++ trunk/cfg/graphicsConfig.xml 2006-09-14 19:53:32 UTC (rev 463)
@@ -10,8 +10,8 @@
areaRenderMode = "solid"
>
<ogre
- _linuxPluginsDir = "../3pl/linux/lib/OGRE"
- linuxPluginsDir = "/usr/lib/OGRE"
+ linuxPluginsDir = "../3pl/linux/lib/OGRE"
+ _linuxPluginsDir = "/usr/lib/OGRE"
windowsPluginsDir = "plugins"
sceneManager = "ST_GENERIC"
anisotropy = "1"
Modified: trunk/data/parts/cone/part.xml
===================================================================
--- trunk/data/parts/cone/part.xml 2006-09-14 15:41:21 UTC (rev 462)
+++ trunk/data/parts/cone/part.xml 2006-09-14 19:53:32 UTC (rev 463)
@@ -7,7 +7,7 @@
<box size = "0.5 0.5 0.8"/>
<!--
<sphere radius = "2"/>
- <cappedCylinder length = "2" radius = "1" directionAxis = "z"/>
+ <capsule length = "2" radius = "1" directionAxis = "z"/>
-->
</rigidBody>
<graphicsMesh name="cone" file = "cone.mesh" scale = "1 1 1" position = "0 0 0" rotation = "0 0 0"/>
Modified: trunk/data/parts/cube/part.xml
===================================================================
--- trunk/data/parts/cube/part.xml 2006-09-14 15:41:21 UTC (rev 462)
+++ trunk/data/parts/cube/part.xml 2006-09-14 19:53:32 UTC (rev 463)
@@ -7,7 +7,7 @@
<box size = "2 2 2"/>
<!--
<sphere radius = "2"/>
- <cappedCylinder length = "2" radius = "1" directionAxis = "z"/>
+ <capsule length = "2" radius = "1" directionAxis = "z"/>
-->
</rigidBody>
<graphicsMesh name="cube" file = "cube.mesh" scale = "1 1 1" position = "0 0 0" rotation = "0 0 0"/>
Modified: trunk/data/parts/metalStand/part.xml
===================================================================
--- trunk/data/parts/metalStand/part.xml 2006-09-14 15:41:21 UTC (rev 462)
+++ trunk/data/parts/metalStand/part.xml 2006-09-14 19:53:32 UTC (rev 463)
@@ -7,7 +7,7 @@
<box size = "20 8 8"/>
<!--
<sphere radius = "2"/>
- <cappedCylinder length = "2" radius = "1" directionAxis = "z"/>
+ <capsule length = "2" radius = "1" directionAxis = "z"/>
-->
</rigidBody>
<graphicsMesh name="stand" file = "metalstand.mesh" scale = "1 1 1" position = "0 0 0" rotation = "0 0 0"/>
Modified: trunk/data/vehicles/mosp1/vehicle.xml
===================================================================
--- trunk/data/vehicles/mosp1/vehicle.xml 2006-09-14 15:41:21 UTC (rev 462)
+++ trunk/data/vehicles/mosp1/vehicle.xml 2006-09-14 19:53:32 UTC (rev 463)
@@ -90,19 +90,35 @@
</suspension.fixed></subobject>
-->
<subobject name="fr"><wheel>
- <customData mass="15.1" radius="0.34" width="0.125" powered="-1" renderMode="solid"/>
+ <customData powered="-1" renderMode="solid"/>
+ <rigidBody name="wheel">
+ <totalMass value="15.1"/>
+ <capsule radius="0.34" length="0.125" directionAxis="y"/>
+ </rigidBody>
<graphicsMesh name="wheel" file="wheel_front.mesh" scale="1 1 1" position="0 0 0" rotation="0 0 0"/>
</wheel></subobject>
<subobject name="fl"><wheel>
- <customData mass="15.1" radius="0.34" width="0.125" powered="+1" renderMode="solid"/>
+ <customData powered="+1" renderMode="solid"/>
+ <rigidBody name="wheel">
+ <totalMass value="15.1"/>
+ <capsule radius="0.34" length="0.125" directionAxis="y"/>
+ </rigidBody>
<graphicsMesh name="wheel" file="wheel_front.mesh" scale="1 1 1" position="0 0 0" rotation="0 0 0"/>
</wheel></subobject>
<subobject name="rr"><wheel>
- <customData mass="15.0" radius="0.34" width="0.125" powered="-1" renderMode="solid"/>
+ <customData powered="-1" renderMode="solid"/>
+ <rigidBody name="wheel">
+ <totalMass value="15.0"/>
+ <capsule radius="0.34" length="0.125" directionAxis="y"/>
+ </rigidBody>
<graphicsMesh name="wheel" file="wheel_rear.mesh" scale="1 1 1" position="0 0 0" rotation="0 0 0"/>
</wheel></subobject>
<subobject name="rl"><wheel>
- <customData mass="15.0" radius="0.34" width="0.125" powered="+1" renderMode="solid"/>
+ <customData powered="+1" renderMode="solid"/>
+ <rigidBody name="wheel">
+ <totalMass value="15.0"/>
+ <capsule radius="0.34" length="0.125" directionAxis="y"/>
+ </rigidBody>
<graphicsMesh name="wheel" file="wheel_rear.mesh" scale="1 1 1" position="0 0 0" rotation="0 0 0"/>
</wheel></subobject>
<subobject name="hood"><camera>
Modified: trunk/data/worlds/default.xml
===================================================================
--- trunk/data/worlds/default.xml 2006-09-14 15:41:21 UTC (rev 462)
+++ trunk/data/worlds/default.xml 2006-09-14 19:53:32 UTC (rev 463)
@@ -7,14 +7,14 @@
skyMaterialName="skyboxMaterial"
skyDistance="5000.0"
skyDrawFirst="1"
- height="-15"
+ height="-0"
>
</customData>
- <!--<sharedobject name="main"><area
+ <sharedobject name="main"><area
model="mosptracing"
>
</area></sharedobject>
- <sharedobject name="tile1"><area
+ <!--<sharedobject name="tile1"><area
model="mospland2006.r7"
>
</area></sharedobject>
@@ -29,16 +29,16 @@
_model="quattros1"
>
</vehicle></sharedobject>
- <sharedobject name="main"><area
+ <!--<sharedobject name="main"><area
model="testingGround"
>
- </area></sharedobject>
- <sharedobject name="bg"><area
- model="mospland"
+ </area></sharedobject>-->
+ <sharedobject name="land"><area
+ model="mosptracing"
>
</area></sharedobject>
- <location name="bg" position="0 0 0" rotation="0 0 0"/>
- <location-area first="(location)bg" second="(area)bg"/>
- <location-vehicle first="(area)bg/paceCar" second="(vehicle)main" />
+ <location name="land" position="0 0 -10" rotation="10 0 0"/>
+ <location-area first="(location)land" second="(area)land"/>
+ <location-vehicle first="(area)main/paceCar" second="(vehicle)main" />
<vehicle-driver first="(vehicle)main" second="user" />
</world>
Modified: trunk/doc/developer/concepts/structure
===================================================================
--- trunk/doc/developer/concepts/structure 2006-09-14 15:41:21 UTC (rev 462)
+++ trunk/doc/developer/concepts/structure 2006-09-14 19:53:32 UTC (rev 463)
@@ -1,12 +1,6 @@
<object>
- <sharedobject>
- <object/>
- </sharedobject>
-
- <subobject>
- <object/>
- </subobject>
-
+ <sharedobject> <object/> </sharedobject>
+ <subobject> <object/> </subobject>
<baseobject>
<mesh scale/> <box/> <capsule/> <sphere/>
<mass/> <density/>
@@ -16,11 +10,8 @@
<rendermode????/>
<location/>
</baseobject>
-
<location/>
-
<link>
<hinge1/> <fixed/> <proportional/>
</link>
-
</object>
Modified: trunk/src/common/odeObject.cpp
===================================================================
--- trunk/src/common/odeObject.cpp 2006-09-14 15:41:21 UTC (rev 462)
+++ trunk/src/common/odeObject.cpp 2006-09-14 19:53:32 UTC (rev 463)
@@ -84,7 +84,7 @@
geomIDs[name] = dCreateSphere (World::get()->spaceID, data->radius);
dMassSetSphereTotal (&dmass, data->mass, data->radius);
}
- if (data->shape == "cappedCylinder")
+ if (data->shape == "capsule")
{
geomIDs[name] = dCreateCCylinder (World::get()->spaceID, data->radius, data->length);
dMassSetCappedCylinderTotal (&dmass, data->mass, data->directionAxis, data->radius, data->length);
@@ -148,25 +148,6 @@
dBodySetLinearVel (bodyID, 0, 0, 0);
dBodySetAngularVel (bodyID, 0, 0, 0);
}
-OdeObject::OdeObject (WorldObject * worldObject, pWheelOdeData data, std::string name)
-{
- updateId();
- this->worldObject = worldObject;
- this->name = name;
- bodyID = NULL;
- bodyID = dBodyCreate (World::get()->worldID);
- dBodySetData (bodyID, static_cast<void*>(worldObject->getContainer().get()));
- dMass dmass;
- dMassSetParameters (&dmass, data->mass,
- 0., 0., 0.,
- 0.237f, 0.237f, 0.409f,
- 0., 0., 0.);
- geomIDs[name] = dCreateCCylinder (World::get()->spaceID, data->radius, data->width);
- dBodySetLinearVel (bodyID, 0, 0, 0);
- dBodySetAngularVel (bodyID, 0, 0, 0);
- dGeomSetBody (geomIDs[name], bodyID);
- dBodySetMass (bodyID, &dmass);
-}
OdeObject::OdeObject (WorldObject * worldObject, pBoneOdeData data, std::string name)
{
updateId();
Modified: trunk/src/common/odeObject.hpp
===================================================================
--- trunk/src/common/odeObject.hpp 2006-09-14 15:41:21 UTC (rev 462)
+++ trunk/src/common/odeObject.hpp 2006-09-14 19:53:32 UTC (rev 463)
@@ -22,7 +22,6 @@
SHARED_PTR(MeshOdeData, pMeshOdeData, wMeshOdeData);
SHARED_PTR(PartOdeData, pPartOdeData, wPartOdeData);
SHARED_PTR(BodyOdeData, pBodyOdeData, wBodyOdeData);
-SHARED_PTR(WheelOdeData, pWheelOdeData, wWheelOdeData);
SHARED_PTR(BoneOdeData, pBoneOdeData, wBoneOdeData);
SHARED_PTR_MAP(OgreObject, pOgreObject, OgreObjects, OgreObjectsIt, wOgreObject);
@@ -44,7 +43,6 @@
OdeObject (WorldObject * worldObject, pMeshOdeData data, std::string name);
OdeObject (WorldObject * worldObject, pPartOdeData data, std::string name);
OdeObject (WorldObject * worldObject, pBodyOdeData data, std::string name);
- OdeObject (WorldObject * worldObject, pWheelOdeData data, std::string name);
OdeObject (WorldObject * worldObject, pBoneOdeData data, std::string name);
~OdeObject ();
Vector3d getPosition();
@@ -104,19 +102,6 @@
}
~BodyOdeData() {};
};
-class WheelOdeData
-{
- public:
- dReal radius;
- dReal width;
- dReal mass;
-
- WheelOdeData()
- {
- mass = width = radius = 0;
- }
- ~WheelOdeData() {};
-};
class BoneOdeData
{
public:
Modified: trunk/src/common/worldObject.cpp
===================================================================
--- trunk/src/common/worldObject.cpp 2006-09-14 15:41:21 UTC (rev 462)
+++ trunk/src/common/worldObject.cpp 2006-09-14 19:53:32 UTC (rev 463)
@@ -609,7 +609,7 @@
data->shape = u->getName();
data->radius = stod(u->getAttribute("radius"));
}
- if (u->getName() == "cappedCylinder")
+ if (u->getName() == "capsule")
{
data->shape = u->getName();
data->radius = stod(u->getAttribute("radius"));
Modified: trunk/src/makefile
===================================================================
--- trunk/src/makefile 2006-09-14 15:41:21 UTC (rev 462)
+++ trunk/src/makefile 2006-09-14 19:53:32 UTC (rev 463)
@@ -48,10 +48,10 @@
ifeq ("$(PLATFORM)", "LINUX")
TYPE :=
EXE_EXT :=
-BASE_INCLUDE_DIR := /usr/include
-BASE_LIBRARY_DIR := /usr/lib
-#BASE_INCLUDE_DIR := $(PWD)/../3pl/linux/include
-#BASE_LIBRARY_DIR := $(PWD)/../3pl/linux/lib
+#BASE_INCLUDE_DIR := /usr/include
+#BASE_LIBRARY_DIR := /usr/lib
+BASE_INCLUDE_DIR := $(PWD)/../3pl/linux/include
+BASE_LIBRARY_DIR := $(PWD)/../3pl/linux/lib
PLATFORM_CFLAGS :=
LD_FLAGS:=
endif
Modified: trunk/src/todo
===================================================================
--- trunk/src/todo 2006-09-14 15:41:21 UTC (rev 462)
+++ trunk/src/todo 2006-09-14 19:53:32 UTC (rev 463)
@@ -1,4 +1,3 @@
-add support for rotation and traslation of areas
autosleep using averaged positions/velocities
new suspension spring+damper can't rotate properly yet, lacks a joint or 2 at the ends.
add support for suspension arm meshes in the car exporter
Modified: trunk/src/vehicle/pedal.cpp
===================================================================
--- trunk/src/vehicle/pedal.cpp 2006-09-14 15:41:21 UTC (rev 462)
+++ trunk/src/vehicle/pedal.cpp 2006-09-14 19:53:32 UTC (rev 463)
@@ -61,8 +61,6 @@
if (currentAngle == 0) {
currentAngle = System::get()->axisMap[getIDKeyboardKey(SDLK_UP)]->getValue() * 3 / 3;
} } } }
- //REMOVE ME!
- currentAngle = 1;
} else if (getName() == "(pedal)brake")
{
currentAngle = 1 - System::get()->axisMap[getIDJoyAxis(0,1)]->getValue();
Modified: trunk/src/vehicle/wheel.cpp
===================================================================
--- trunk/src/vehicle/wheel.cpp 2006-09-14 15:41:21 UTC (rev 462)
+++ trunk/src/vehicle/wheel.cpp 2006-09-14 19:53:32 UTC (rev 463)
@@ -33,8 +33,6 @@
void Wheel::readCustomDataTag(XmlTag * tag)
{
log->__format (LOG_DEVELOPER, "Starting to parse a wheel node");
- pWheelOdeData data(new WheelOdeData);
- pOgreObjectData ogreData(new OgreObjectData);
userDriver = false;
powered = 0;
inputAngularVel = 0.0;
@@ -45,11 +43,7 @@
outputTorqueTransfer = 0.0;
inertia = 1.0;
friction = 0.1;
- data->radius = stod(tag->getAttribute("radius"));
- data->width = stod(tag->getAttribute("width"));
- data->mass = stod(tag->getAttribute("mass"));
powered = stod(tag->getAttribute("powered"));
- odeObjects[getId()] = pOdeObject(new OdeObject(this, data, getId()));
}
Wheel::~Wheel ()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st...@us...> - 2006-09-14 15:41:49
|
Revision: 462
http://svn.sourceforge.net/motorsport/?rev=462&view=rev
Author: stenyak
Date: 2006-09-14 08:41:21 -0700 (Thu, 14 Sep 2006)
Log Message:
-----------
Removed redundant skybox.zip file.
Recoded all the rotation-position handling code; it's now properly abstracted and works for all classes, except for Vehicle (which has to to use its main body as reference) and Suspensions (double wishbone suspension is still a bit hardcoded so we need hacks).
Added a new camera "down" to mosp1 vehicle.
Modified default world: now loads 2 areas, one of which is moved to 0,0,0.
Modified Paths:
--------------
trunk/data/vehicles/mosp1/vehicle.xml
trunk/data/worlds/default.xml
trunk/src/common/camera.cpp
trunk/src/common/location.cpp
trunk/src/common/location.hpp
trunk/src/common/odeObject.cpp
trunk/src/common/odeObject.hpp
trunk/src/common/worldObject.cpp
trunk/src/common/worldObject.hpp
trunk/src/vehicle/suspension.cpp
trunk/src/vehicle/vehicle.cpp
trunk/src/vehicle/vehicle.hpp
trunk/src/world/area.cpp
trunk/src/world/area.hpp
Removed Paths:
-------------
trunk/data/areas/testingGround/skybox.zip
Deleted: trunk/data/areas/testingGround/skybox.zip
===================================================================
(Binary files differ)
Modified: trunk/data/vehicles/mosp1/vehicle.xml
===================================================================
--- trunk/data/vehicles/mosp1/vehicle.xml 2006-09-14 10:46:48 UTC (rev 461)
+++ trunk/data/vehicles/mosp1/vehicle.xml 2006-09-14 15:41:21 UTC (rev 462)
@@ -114,6 +114,9 @@
<subobject name="main"><camera>
<customData position="-10 0 2" target="2 0 0"/>
</camera></subobject>
+ <subobject name="down"><camera>
+ <customData position="0 0 -10" target="0.002 0 0"/>
+ </camera></subobject>
<subobject name="frontRightWheel"><camera>
<customData position="0.2 -1.2 -0.25" target="0.4 -1.2 -0.25"/>
</camera></subobject>
Modified: trunk/data/worlds/default.xml
===================================================================
--- trunk/data/worlds/default.xml 2006-09-14 10:46:48 UTC (rev 461)
+++ trunk/data/worlds/default.xml 2006-09-14 15:41:21 UTC (rev 462)
@@ -7,7 +7,7 @@
skyMaterialName="skyboxMaterial"
skyDistance="5000.0"
skyDrawFirst="1"
- height="-1.5"
+ height="-15"
>
</customData>
<!--<sharedobject name="main"><area
@@ -29,16 +29,16 @@
_model="quattros1"
>
</vehicle></sharedobject>
- <sharedobject name="bg"><area
+ <sharedobject name="main"><area
model="testingGround"
>
</area></sharedobject>
- <sharedobject name="main"><area
+ <sharedobject name="bg"><area
model="mospland"
>
</area></sharedobject>
- <!--<location name="la" position="0 0 -2.5" rotation="60 60 0"/>
- <location-area first="(location)la" second="(area)main"/>-->
- <location-vehicle first="(area)main/paceCar" second="(vehicle)main" />
+ <location name="bg" position="0 0 0" rotation="0 0 0"/>
+ <location-area first="(location)bg" second="(area)bg"/>
+ <location-vehicle first="(area)bg/paceCar" second="(vehicle)main" />
<vehicle-driver first="(vehicle)main" second="user" />
</world>
Modified: trunk/src/common/camera.cpp
===================================================================
--- trunk/src/common/camera.cpp 2006-09-14 10:46:48 UTC (rev 461)
+++ trunk/src/common/camera.cpp 2006-09-14 15:41:21 UTC (rev 462)
@@ -44,7 +44,6 @@
ogreCamera->setFixedYawAxis (true, Ogre::Vector3 (0, 0, 1));
ogreCamera->setNearClipDistance (0.100);
// ogreCamera->setAutoAspectRatio(true);
- ogreCamera->setPolygonMode(Ogre::PM_SOLID);
log->__format (LOG_DEVELOPER, "Creating a camera");
positionOffset = new Vector3d (0, 0, 0);
targetOffset = new Vector3d (0, 0, 0);
Modified: trunk/src/common/location.cpp
===================================================================
--- trunk/src/common/location.cpp 2006-09-14 10:46:48 UTC (rev 461)
+++ trunk/src/common/location.cpp 2006-09-14 15:41:21 UTC (rev 462)
@@ -52,3 +52,27 @@
{
return name;
}
+void Location::addRotation (Vector3d origin, Quaternion diff)
+{
+ Vector3d rotMovement = diff.rotateObject(this->getPosition() - origin);
+ this->setPosition (origin + rotMovement);
+
+ Quaternion current = this->getRotation();
+ Quaternion newrot = diff * current;
+ setRotation (newrot);
+}
+void Location::addPosition (Vector3d diff)
+{
+ Vector3d current = this->getPosition();
+ Vector3d newpos = current + diff;
+ this->setPosition (newpos);
+}
+void Location::setPosition (Vector3d position)
+{
+ this->position = position;
+}
+
+void Location::setRotation (Quaternion rotation)
+{
+ this->rotation = rotation;
+}
Modified: trunk/src/common/location.hpp
===================================================================
--- trunk/src/common/location.hpp 2006-09-14 10:46:48 UTC (rev 461)
+++ trunk/src/common/location.hpp 2006-09-14 15:41:21 UTC (rev 462)
@@ -32,6 +32,11 @@
Vector3d getPosition();
Quaternion getRotation();
std::string getName();
+
+ void addPosition (Vector3d diff);
+ void addRotation (Vector3d origin, Quaternion diff);
+ void setRotation (Quaternion newRotation);
+ void setPosition (Vector3d newPosition);
};
#endif
Modified: trunk/src/common/odeObject.cpp
===================================================================
--- trunk/src/common/odeObject.cpp 2006-09-14 10:46:48 UTC (rev 461)
+++ trunk/src/common/odeObject.cpp 2006-09-14 15:41:21 UTC (rev 462)
@@ -42,7 +42,7 @@
dTriMeshDataID ground = dGeomTriMeshDataCreate ();
dGeomID geom = dCreateTriMesh (World::get()->spaceID, ground, 0, 0, 0);
dGeomSetBody (geom, 0);
- //geomIDs[name+id] = geom;
+ geomIDs[name+id] = geom;
size_t vertex_count, index_count;
dVector3 * vertices;
unsigned int *indices;
@@ -208,10 +208,29 @@
bodyID = NULL;
this->worldObject = NULL;
}
+void OdeObject::addRotation (Vector3d origin, Quaternion diff)
+{
+ Vector3d rotMovement = diff.rotateObject(this->getPosition() - origin);
+ this->setPosition (origin + rotMovement);
+
+ Quaternion current = this->getRotation();
+ Quaternion newrot = diff * current;
+ setRotation (newrot);
+}
+void OdeObject::addPosition (Vector3d diff)
+{
+ Vector3d current = this->getPosition();
+ Vector3d newpos = current + diff;
+ this->setPosition (newpos);
+}
void OdeObject::setPosition (Vector3d position)
{
if (bodyID == 0)
{
+ if (geomIDs.begin() == geomIDs.end())
+ {
+ worldObject->getLog()->__format (LOG_ERROR, "No geoms!! OdeObj name=%s", this->getId().c_str());
+ }
GeomIDsIt i = geomIDs.begin();
for(;i != geomIDs.end(); i++)
{
@@ -239,7 +258,6 @@
}
Vector3d OdeObject::getPosition()
{
- const dReal * tmp;
Vector3d result(0,0,0);
if (bodyID == 0)
{
@@ -247,11 +265,11 @@
{
//empty
} else {
- tmp = dGeomGetPosition (geomIDs.begin()->second);
+ const dReal * tmp = dGeomGetPosition (geomIDs.begin()->second);
result = Vector3d(tmp[0], tmp[1], tmp[2]);
}
} else {
- tmp = dBodyGetPosition (bodyID);
+ const dReal * tmp = dBodyGetPosition (bodyID);
result = Vector3d(tmp[0], tmp[1], tmp[2]);
}
//const dReal * tmp = dBodyGetPosition (bodyID);
Modified: trunk/src/common/odeObject.hpp
===================================================================
--- trunk/src/common/odeObject.hpp 2006-09-14 10:46:48 UTC (rev 461)
+++ trunk/src/common/odeObject.hpp 2006-09-14 15:41:21 UTC (rev 462)
@@ -49,6 +49,8 @@
~OdeObject ();
Vector3d getPosition();
Quaternion getRotation();
+ void addPosition (Vector3d diff);
+ void addRotation (Vector3d origin, Quaternion diff);
void setPosition (Vector3d position);
void setRotation (Quaternion rotation);
dBodyID getBodyID();
Modified: trunk/src/common/worldObject.cpp
===================================================================
--- trunk/src/common/worldObject.cpp 2006-09-14 10:46:48 UTC (rev 461)
+++ trunk/src/common/worldObject.cpp 2006-09-14 15:41:21 UTC (rev 462)
@@ -202,52 +202,6 @@
i->second->stepGraphics();
}
}
-void WorldObject::setPosition (Vector3d position)
-{
- OdeObjectsIt j = odeObjects.begin();
- for(;j != odeObjects.end(); j++)
- {
- j->second->setPosition(position);
- }
-}
-Vector3d WorldObject::getPosition ()
-{
- if (odeObjects.begin() == odeObjects.end()) log->__format(LOG_ERROR, "No ode objects here!");
- return odeObjects.begin()->second->getPosition();
-}
-Quaternion WorldObject::getRotation ()
-{
- return odeObjects.begin()->second->getRotation();
-}
-void WorldObject::setRotation (Quaternion rotation)
-{
- OdeObjectsIt j = odeObjects.begin();
- for(;j != odeObjects.end(); j++)
- {
- j->second->setRotation(rotation);
- }
-}
-void WorldObject::applyRotation (Quaternion rotation)
-{
- OdeObjectsIt j = odeObjects.begin();
- for(;j != odeObjects.end(); j++)
- {
- j->second->setPosition ( rotation.rotateObject(j->second->getPosition()) );
- Quaternion finalRotation = rotation * j->second->getRotation();
- j->second->setRotation (finalRotation);
- }
-}
-pArea WorldObject::getArea(std::string name)
-{
- pArea tmp;
- for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++)
- {
- if (i->first == ("(area)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<Area>(i->second)) break;
- }
- if (tmp == NULL) log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", name.c_str(), "Area");
- return tmp;
-}
-
pVehicle WorldObject::getVehicle(std::string name)
{
pVehicle tmp;
@@ -580,32 +534,30 @@
}
t = tag->getTag(0); for (int i = 0; i < tag->nTags(); t = tag->getTag(++i))
{
- if (t->getName() == "location-vehicle")
+ if (t->getName() == "location-area")
{
- log->__format (LOG_CCREATOR, "Setting vehicle location");
+ log->__format (LOG_CCREATOR, "Setting area location");
std::string f= t->getAttribute("first");
std::string s= t->getAttribute("second");
pLocation first = getLocationObject(f);
- pVehicle second = getVehicleObject(s);
+ pArea second = getAreaObject(s);
- second->applyRotation(first->getRotation());
+ second->addRotation(Vector3d(0,0,0),first->getRotation());
second->setPosition(first->getPosition());
}
}
t = tag->getTag(0); for (int i = 0; i < tag->nTags(); t = tag->getTag(++i))
{
- if (t->getName() == "location-area")
+ if (t->getName() == "location-vehicle")
{
- log->__format (LOG_CCREATOR, "Setting area location");
+ log->__format (LOG_CCREATOR, "Setting vehicle location");
std::string f= t->getAttribute("first");
std::string s= t->getAttribute("second");
pLocation first = getLocationObject(f);
- pArea second = getAreaObject(s);
+ pVehicle second = getVehicleObject(s);
- //FIXME: might have to also relocate locations!
- //second->setPosition(Vector3d(0, 0, 0));
- //second->applyRotation(first->getRotation());
- //second->setPosition(first->getPosition());
+ second->addRotation(Vector3d(0,0,0),first->getRotation());
+ second->addPosition(first->getPosition());
}
}
t = tag->getTag(0); for (int i = 0; i < tag->nTags(); t = tag->getTag(++i))
@@ -736,3 +688,71 @@
log->__format(LOG_DEVELOPER, "Object name=%s", tmp->getName().c_str());
return tmp;
}
+
+void WorldObject::setRotation (Quaternion newRotation)
+{
+ //FIXME: should set rotation regardless of current one... dunno if quats substraction is right or not
+ Vector3d initialPos = this->getPosition();
+ this->setPosition(Vector3d(0,0,0));
+
+ Quaternion diff = newRotation - getRotation();
+ this->addRotation(Vector3d(0,0,0), diff);
+
+ this->setPosition(initialPos);
+}
+void WorldObject::setPosition (Vector3d newPosition)
+{
+ Vector3d diff = newPosition - getPosition();
+ this->addPosition (diff);
+}
+void WorldObject::addPosition (Vector3d diff)
+{
+ OdeObjectsIt j = odeObjects.begin();
+ for(;j != odeObjects.end(); j++)
+ {
+ j->second->addPosition(diff);
+ }
+ for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++)
+ {
+ i->second->addPosition(diff);
+ }
+ for (LocationsIt i = locations.begin(); i != locations.end(); i++)
+ {
+ i->second->addPosition(diff);
+ }
+}
+void WorldObject::addRotation (Vector3d origin, Quaternion diff)
+{
+ OdeObjectsIt j = odeObjects.begin();
+ for(;j != odeObjects.end(); j++)
+ {
+ j->second->addRotation(origin, diff);
+ }
+ for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++)
+ {
+ i->second->addRotation(origin, diff);
+ }
+ for (LocationsIt i = locations.begin(); i != locations.end(); i++)
+ {
+ i->second->addRotation(origin, diff);
+ }
+}
+Vector3d WorldObject::getPosition ()
+{
+ if (odeObjects.begin() == odeObjects.end()) log->__format(LOG_ERROR, "No ode objects here!");
+ return odeObjects.begin()->second->getPosition();
+}
+Quaternion WorldObject::getRotation ()
+{
+ return odeObjects.begin()->second->getRotation();
+}
+pArea WorldObject::getArea(std::string name)
+{
+ pArea tmp;
+ for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++)
+ {
+ if (i->first == ("(area)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<Area>(i->second)) break;
+ }
+ if (tmp == NULL) log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", name.c_str(), "Area");
+ return tmp;
+}
Modified: trunk/src/common/worldObject.hpp
===================================================================
--- trunk/src/common/worldObject.hpp 2006-09-14 10:46:48 UTC (rev 461)
+++ trunk/src/common/worldObject.hpp 2006-09-14 15:41:21 UTC (rev 462)
@@ -91,11 +91,12 @@
void positionCameras(pVehicle base);
pOdeObject getMainOdeObject();
+ void setRotation (Quaternion newRotation);
+ virtual void setPosition (Vector3d newPosition);
+ void addPosition (Vector3d diff);
+ void addRotation (Vector3d origin, Quaternion diff);
virtual Vector3d getPosition ();
virtual Quaternion getRotation ();
- virtual void setPosition (Vector3d position);
- virtual void setRotation (Quaternion rotation);
- virtual void applyRotation (Quaternion rotation);
pLocation getLocationObject(std::string fullname);
pVehicle getVehicleObject(std::string fullname);
Modified: trunk/src/vehicle/suspension.cpp
===================================================================
--- trunk/src/vehicle/suspension.cpp 2006-09-14 10:46:48 UTC (rev 461)
+++ trunk/src/vehicle/suspension.cpp 2006-09-14 15:41:21 UTC (rev 462)
@@ -54,16 +54,7 @@
}
void Suspension::setPosition (Vector3d position)
{
- // so final this.position must be position
- // so final components posicion must be:
- // store difference of position between component and this.position
- // move component to position + difference
- Vector3d posDiff = position - getPosition();
- for (OdeObjectsIt i = odeObjects.begin(); i != odeObjects.end(); i++)
- {
- Vector3d posDiff = i->second->getPosition() - getPosition();
- i->second->setPosition (position + posDiff);
- }
+ WorldObject::setPosition(position);
this->position = position;
}
double Unidimensional::getSteeringAngle()
Modified: trunk/src/vehicle/vehicle.cpp
===================================================================
--- trunk/src/vehicle/vehicle.cpp 2006-09-14 10:46:48 UTC (rev 461)
+++ trunk/src/vehicle/vehicle.cpp 2006-09-14 15:41:21 UTC (rev 462)
@@ -139,41 +139,10 @@
return getBody("main")->getMainOdeObject();
}
-void Vehicle::setPosition (Vector3d position)
-{
- Vector3d posDiff = position - getPosition();
- log->__format (LOG_DEVELOPER,"Difference in vehicle position: (%f, %f, %f).", posDiff.x, posDiff.y, posDiff.z);
- getBody("main")->setPosition ( getBody("main")->getPosition() + posDiff );
- for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++)
- {
- pWheel tmpWheel;
- if ( (tmpWheel = boost::dynamic_pointer_cast<Wheel>(i->second)))
- tmpWheel->getMainOdeObject()->setPosition ( tmpWheel->getMainOdeObject()->getPosition() + posDiff );
- pSuspension tmpSusp;
- if ( (tmpSusp = boost::dynamic_pointer_cast<Suspension>(i->second)))
- tmpSusp->setPosition ( tmpSusp->getPosition() + posDiff );
- }
-}
-
Vector3d Vehicle::getPosition ()
{
return getBody("main")->getPosition();
}
-
-void Vehicle::applyRotation (Quaternion rotation)
-{
- // apply rotation to wheels
- for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++)
- {
- pWheel tmpWheel;
- if ( (tmpWheel = boost::dynamic_pointer_cast<Wheel>(i->second))) tmpWheel->applyRotation (rotation);
- pSuspension tmpSusp;
- if ( (tmpSusp = boost::dynamic_pointer_cast<Suspension>(i->second))) tmpSusp->applyRotation (rotation);
- }
- // apply rotation to body
- getBody("main")->applyRotation (rotation);
-}
-
Quaternion Vehicle::getRotation ()
{
return getBody("main")->getRotation();
@@ -181,13 +150,13 @@
void Vehicle::placeWheelsOnSuspensions()
{
- getWheel("fr")->applyRotation(getSuspension("fr")->getSecondLinkRotation());
+ getWheel("fr")->addRotation (Vector3d(0,0,0), getSuspension("fr")->getSecondLinkRotation());
getWheel("fr")->setPosition (getSuspension("fr")->getSecondLinkPosition());
- getWheel("fl")->applyRotation(getSuspension("fl")->getSecondLinkRotation());
+ getWheel("fl")->addRotation (Vector3d(0,0,0), getSuspension("fl")->getSecondLinkRotation());
getWheel("fl")->setPosition (getSuspension("fl")->getSecondLinkPosition());
- getWheel("rr")->applyRotation(getSuspension("rr")->getSecondLinkRotation());
+ getWheel("rr")->addRotation (Vector3d(0,0,0), getSuspension("rr")->getSecondLinkRotation());
getWheel("rr")->setPosition (getSuspension("rr")->getSecondLinkPosition());
- getWheel("rl")->applyRotation(getSuspension("rl")->getSecondLinkRotation());
+ getWheel("rl")->addRotation (Vector3d(0,0,0), getSuspension("rl")->getSecondLinkRotation());
getWheel("rl")->setPosition (getSuspension("rl")->getSecondLinkPosition());
}
Modified: trunk/src/vehicle/vehicle.hpp
===================================================================
--- trunk/src/vehicle/vehicle.hpp 2006-09-14 10:46:48 UTC (rev 461)
+++ trunk/src/vehicle/vehicle.hpp 2006-09-14 15:41:21 UTC (rev 462)
@@ -42,11 +42,10 @@
void setUserDriver ();
void stepPhysics ();
- void setPosition (Vector3d position);
- void applyRotation (Quaternion rotation);
- Vector3d getPosition ();
- Quaternion getRotation ();
double getOutputTorque ();
pOdeObject getMainOdeObject();
+
+ Vector3d getPosition ();
+ Quaternion getRotation ();
};
#endif
Modified: trunk/src/world/area.cpp
===================================================================
--- trunk/src/world/area.cpp 2006-09-14 10:46:48 UTC (rev 461)
+++ trunk/src/world/area.cpp 2006-09-14 15:41:21 UTC (rev 462)
@@ -89,6 +89,7 @@
odeObjects[name+tmp->getId()] = tmp;
}
}
+ ogreObjects[ogreObject->getId()]->setOdeReference(getMainOdeObject());
}
if (t->getName() == "parts")
{
@@ -194,32 +195,3 @@
activeCamera = closestCam;
return activeCamera;
}
-void Area::setPosition (Vector3d position)
-{
- //WorldObject::setPosition(position);
- Vector3d posDiff = position - getPosition();
- log->__format (LOG_DEVELOPER,"Difference in area position: (%f, %f, %f).", posDiff.x, posDiff.y, posDiff.z);
- for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++)
- {
- i->second->setPosition ( i->second->getPosition() + posDiff );
- }
- OdeObjectsIt j = odeObjects.begin();
- for(;j != odeObjects.end(); j++)
- {
- j->second->setPosition( j->second->getPosition() + posDiff);
- }
-}
-void Area::applyRotation (Quaternion rotation)
-{
- for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++)
- {
- i->second->applyRotation (rotation);
- }
- OdeObjectsIt j = odeObjects.begin();
- for(;j != odeObjects.end(); j++)
- {
- j->second->setPosition ( rotation.rotateObject(j->second->getPosition()) );
- Quaternion finalRotation = rotation * j->second->getRotation();
- j->second->setRotation (finalRotation);
- }
-}
Modified: trunk/src/world/area.hpp
===================================================================
--- trunk/src/world/area.hpp 2006-09-14 10:46:48 UTC (rev 461)
+++ trunk/src/world/area.hpp 2006-09-14 15:41:21 UTC (rev 462)
@@ -40,8 +40,6 @@
~Area ();
pCamera getClosestCamera(Vector3d location);
- void setPosition (Vector3d position);
- void applyRotation (Quaternion rotation);
void setCastShadows(bool castShadows);
void setRenderDetail(int renderMode);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st...@us...> - 2006-09-14 10:47:14
|
Revision: 461
http://svn.sourceforge.net/motorsport/?rev=461&view=rev
Author: stenyak
Date: 2006-09-14 03:46:48 -0700 (Thu, 14 Sep 2006)
Log Message:
-----------
First steps towards proper object relocation code.
Modified Paths:
--------------
trunk/data/areas/mospland/area.xml
trunk/data/areas/testingGround/area.xml
trunk/data/worlds/default.xml
trunk/src/common/camera.cpp
trunk/src/common/odeObject.cpp
trunk/src/common/odeObject.hpp
trunk/src/common/worldObject.cpp
trunk/src/common/worldObject.hpp
trunk/src/vehicle/pedal.cpp
trunk/src/world/area.cpp
trunk/src/world/area.hpp
Modified: trunk/data/areas/mospland/area.xml
===================================================================
--- trunk/data/areas/mospland/area.xml 2006-09-12 18:44:19 UTC (rev 460)
+++ trunk/data/areas/mospland/area.xml 2006-09-14 10:46:48 UTC (rev 461)
@@ -242,9 +242,14 @@
<location
name="paceCar"
position="-155.224152 -156.375732 1.418862"
- rotation="0.004433 0.000000 0.000000 0.999990"
+ rotation="0 0 180"
scale="1.000000 1.000000 1.000000"
/>
+ rotation="0.004433 0.000000 0.000000 0.999990"
+ <subobject name="main"><camera>
+ <customData 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"/>
+ </camera></subobject>
<subobject name="camera.002"><camera>
<customData 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"/>
Modified: trunk/data/areas/testingGround/area.xml
===================================================================
--- trunk/data/areas/testingGround/area.xml 2006-09-12 18:44:19 UTC (rev 460)
+++ trunk/data/areas/testingGround/area.xml 2006-09-14 10:46:48 UTC (rev 461)
@@ -30,6 +30,9 @@
<subobject name = "driver"><camera>
<customData position = "6 0 1.7" target = "0.1 0.5 0.4"/>
</camera></subobject>
+ <subobject name = "main"><camera>
+ <customData position = "20 -15 0.2" target = "1.44 -0.86 -0.4"/>
+ </camera></subobject>
<subobject name = "wheel"><camera>
<customData position = "20 -15 0.2" target = "1.44 -0.86 -0.4"/>
</camera></subobject>
Modified: trunk/data/worlds/default.xml
===================================================================
--- trunk/data/worlds/default.xml 2006-09-12 18:44:19 UTC (rev 460)
+++ trunk/data/worlds/default.xml 2006-09-14 10:46:48 UTC (rev 461)
@@ -10,19 +10,6 @@
height="-1.5"
>
</customData>
- <sharedobject name="main"><vehicle
- model="mosp1"
- _model="quattros1"
- >
- </vehicle></sharedobject>
- <sharedobject name="bg"><area
- model="testingGround"
- >
- </area></sharedobject>
- <sharedobject name="main"><area
- model="mospland"
- >
- </area></sharedobject>
<!--<sharedobject name="main"><area
model="mosptracing"
>
@@ -36,15 +23,22 @@
_model="quattros1"
>
</vehicle></sharedobject>
- <location-vehicle first="(area)main/grid01" second="(vehicle)secondcar" />-->
-
-<!--
- <location name="la" position="0 0 5" rotation="0 0 0"/>
- <location name="lb" position="0 0 0" rotation="0 35 0"/>
- <location name="lc" position="0 0 0" rotation="15 15 0"/>
- <location-area first="(location)la" second="(area)main"/>
- <location-area first="(location)la" second="(area)main"/>
--->
+ <location-vehicle first="(area)main/grid01" second="(vehicle)secondcar"/>-->
+ <sharedobject name="main"><vehicle
+ model="mosp1"
+ _model="quattros1"
+ >
+ </vehicle></sharedobject>
+ <sharedobject name="bg"><area
+ model="testingGround"
+ >
+ </area></sharedobject>
+ <sharedobject name="main"><area
+ model="mospland"
+ >
+ </area></sharedobject>
+ <!--<location name="la" position="0 0 -2.5" rotation="60 60 0"/>
+ <location-area first="(location)la" second="(area)main"/>-->
<location-vehicle first="(area)main/paceCar" second="(vehicle)main" />
<vehicle-driver first="(vehicle)main" second="user" />
</world>
Modified: trunk/src/common/camera.cpp
===================================================================
--- trunk/src/common/camera.cpp 2006-09-12 18:44:19 UTC (rev 460)
+++ trunk/src/common/camera.cpp 2006-09-14 10:46:48 UTC (rev 461)
@@ -31,6 +31,12 @@
:WorldObject("camera")
{
constructFromTag(tag);
+
+ if (odeObjects.begin() == odeObjects.end())
+ {
+ pOdeObject tmp (new OdeObject(this, getId()));
+ odeObjects[name] = tmp;
+ }
}
void Camera::readCustomDataTag(XmlTag * tag)
{
@@ -38,6 +44,7 @@
ogreCamera->setFixedYawAxis (true, Ogre::Vector3 (0, 0, 1));
ogreCamera->setNearClipDistance (0.100);
// ogreCamera->setAutoAspectRatio(true);
+ ogreCamera->setPolygonMode(Ogre::PM_SOLID);
log->__format (LOG_DEVELOPER, "Creating a camera");
positionOffset = new Vector3d (0, 0, 0);
targetOffset = new Vector3d (0, 0, 0);
Modified: trunk/src/common/odeObject.cpp
===================================================================
--- trunk/src/common/odeObject.cpp 2006-09-12 18:44:19 UTC (rev 460)
+++ trunk/src/common/odeObject.cpp 2006-09-14 10:46:48 UTC (rev 461)
@@ -92,6 +92,14 @@
dGeomSetBody (geomIDs[name], bodyID);
dBodySetMass (bodyID, &dmass);
}
+OdeObject::OdeObject (WorldObject * worldObject, std::string name)
+{
+ updateId();
+ this->worldObject = worldObject;
+ this->name = name;
+ bodyID = NULL;
+ bodyID = dBodyCreate (World::get()->ghostWorldID);
+}
OdeObject::OdeObject (WorldObject * worldObject, pBodyOdeData data, std::string name)
{
updateId();
Modified: trunk/src/common/odeObject.hpp
===================================================================
--- trunk/src/common/odeObject.hpp 2006-09-12 18:44:19 UTC (rev 460)
+++ trunk/src/common/odeObject.hpp 2006-09-14 10:46:48 UTC (rev 461)
@@ -40,6 +40,7 @@
std::string id;
public:
+ OdeObject (WorldObject * worldObject, std::string name);
OdeObject (WorldObject * worldObject, pMeshOdeData data, std::string name);
OdeObject (WorldObject * worldObject, pPartOdeData data, std::string name);
OdeObject (WorldObject * worldObject, pBodyOdeData data, std::string name);
Modified: trunk/src/common/worldObject.cpp
===================================================================
--- trunk/src/common/worldObject.cpp 2006-09-12 18:44:19 UTC (rev 460)
+++ trunk/src/common/worldObject.cpp 2006-09-14 10:46:48 UTC (rev 461)
@@ -588,7 +588,6 @@
pLocation first = getLocationObject(f);
pVehicle second = getVehicleObject(s);
- second->setPosition(Vector3d(0, 0, 0));
second->applyRotation(first->getRotation());
second->setPosition(first->getPosition());
}
Modified: trunk/src/common/worldObject.hpp
===================================================================
--- trunk/src/common/worldObject.hpp 2006-09-12 18:44:19 UTC (rev 460)
+++ trunk/src/common/worldObject.hpp 2006-09-14 10:46:48 UTC (rev 461)
@@ -91,11 +91,11 @@
void positionCameras(pVehicle base);
pOdeObject getMainOdeObject();
- Vector3d getPosition ();
- Quaternion getRotation ();
- void setPosition (Vector3d position);
- void setRotation (Quaternion rotation);
- void applyRotation (Quaternion rotation);
+ virtual Vector3d getPosition ();
+ virtual Quaternion getRotation ();
+ virtual void setPosition (Vector3d position);
+ virtual void setRotation (Quaternion rotation);
+ virtual void applyRotation (Quaternion rotation);
pLocation getLocationObject(std::string fullname);
pVehicle getVehicleObject(std::string fullname);
Modified: trunk/src/vehicle/pedal.cpp
===================================================================
--- trunk/src/vehicle/pedal.cpp 2006-09-12 18:44:19 UTC (rev 460)
+++ trunk/src/vehicle/pedal.cpp 2006-09-14 10:46:48 UTC (rev 461)
@@ -61,6 +61,8 @@
if (currentAngle == 0) {
currentAngle = System::get()->axisMap[getIDKeyboardKey(SDLK_UP)]->getValue() * 3 / 3;
} } } }
+ //REMOVE ME!
+ currentAngle = 1;
} else if (getName() == "(pedal)brake")
{
currentAngle = 1 - System::get()->axisMap[getIDJoyAxis(0,1)]->getValue();
Modified: trunk/src/world/area.cpp
===================================================================
--- trunk/src/world/area.cpp 2006-09-12 18:44:19 UTC (rev 460)
+++ trunk/src/world/area.cpp 2006-09-14 10:46:48 UTC (rev 461)
@@ -116,10 +116,10 @@
if (odeObjects.begin() == odeObjects.end())
{
- positionCameras(dBodyCreate (World::get()->ghostWorldID));
- } else {
- positionCameras(odeObjects.begin()->second->getBodyID());
+ pOdeObject tmp (new OdeObject(this, getId()));
+ odeObjects[name] = tmp;
}
+ positionCameras(odeObjects.begin()->second->getBodyID());
System::get()->ogreWindow->update ();
@@ -194,3 +194,32 @@
activeCamera = closestCam;
return activeCamera;
}
+void Area::setPosition (Vector3d position)
+{
+ //WorldObject::setPosition(position);
+ Vector3d posDiff = position - getPosition();
+ log->__format (LOG_DEVELOPER,"Difference in area position: (%f, %f, %f).", posDiff.x, posDiff.y, posDiff.z);
+ for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++)
+ {
+ i->second->setPosition ( i->second->getPosition() + posDiff );
+ }
+ OdeObjectsIt j = odeObjects.begin();
+ for(;j != odeObjects.end(); j++)
+ {
+ j->second->setPosition( j->second->getPosition() + posDiff);
+ }
+}
+void Area::applyRotation (Quaternion rotation)
+{
+ for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++)
+ {
+ i->second->applyRotation (rotation);
+ }
+ OdeObjectsIt j = odeObjects.begin();
+ for(;j != odeObjects.end(); j++)
+ {
+ j->second->setPosition ( rotation.rotateObject(j->second->getPosition()) );
+ Quaternion finalRotation = rotation * j->second->getRotation();
+ j->second->setRotation (finalRotation);
+ }
+}
Modified: trunk/src/world/area.hpp
===================================================================
--- trunk/src/world/area.hpp 2006-09-12 18:44:19 UTC (rev 460)
+++ trunk/src/world/area.hpp 2006-09-14 10:46:48 UTC (rev 461)
@@ -40,6 +40,8 @@
~Area ();
pCamera getClosestCamera(Vector3d location);
+ void setPosition (Vector3d position);
+ void applyRotation (Quaternion rotation);
void setCastShadows(bool castShadows);
void setRenderDetail(int renderMode);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st...@us...> - 2006-09-12 18:45:00
|
Revision: 460
http://svn.sourceforge.net/motorsport/?rev=460&view=rev
Author: stenyak
Date: 2006-09-12 11:44:19 -0700 (Tue, 12 Sep 2006)
Log Message:
-----------
Created a new OdeObject intermediary data for arbitrary meshes.
Added support for Ode Objects that have no Bodies, but one or more geoms (lack of both will mean unexpected results).
Modified area xml format: now using "location"s instead of "vehicleLocation"s, and it's been taken out of custom tag, so is now generalized for all world objects.
Removed some unnecessary member properties in a couple of classes.
Added method to retrieve OdeObjects unique ID.
Fixed destructor of OdeObjects: no longer crashing when no body has been created.
Modified all get/set pos/rot methods so that geoms are used when no body has been created.
Added some checks when odeObjects are expected to exist.
Added parser for location-area tags (which allow to relocate areas within the world), although they're still not used.
Cameras can now handle origins with no ode bodies (targets still unfixed though!).
Modified default world xml file: it now loads both the testingGround and mospLand.
Updated all areas xml files to the new format.
Removed some unnecesary (common) resources which were accidentally left in last revisions.
Modified Paths:
--------------
trunk/3pl/linux/mklinks.sh
trunk/cfg/graphicsConfig.xml
trunk/data/areas/mospland/area.xml
trunk/data/areas/testingGround/area.xml
trunk/data/worlds/default.xml
trunk/src/common/camera.cpp
trunk/src/common/location.cpp
trunk/src/common/odeObject.cpp
trunk/src/common/odeObject.hpp
trunk/src/common/worldObject.cpp
trunk/src/common/worldObject.hpp
trunk/src/makefile
trunk/src/physics.cpp
trunk/src/world/area.cpp
trunk/src/world/area.hpp
trunk/src/world/world.cpp
trunk/src/world/world.hpp
Removed Paths:
-------------
trunk/data/areas/mospland/ground.material
trunk/data/areas/mospland/ground.png
trunk/data/areas/mospland/skybox.material
trunk/data/areas/mospland/skybox.zip
Modified: trunk/3pl/linux/mklinks.sh
===================================================================
--- trunk/3pl/linux/mklinks.sh 2006-09-12 03:47:56 UTC (rev 459)
+++ trunk/3pl/linux/mklinks.sh 2006-09-12 18:44:19 UTC (rev 460)
@@ -3,9 +3,9 @@
cd include
d=$origin/include
- ln -s /home/stenyak$d/OGRE
+# ln -s /home/stenyak$d/OGRE
ln -s $d/freetype2
- ln -s $d/OGRE
+# ln -s $d/OGRE
ln -s $d/SDL
ln -s $d/xercesc
ln -s $d/boost
@@ -13,8 +13,8 @@
cd lib
d=$origin/lib
- ln -s /home/stenyak$d/OGRE
+# ln -s /home/stenyak$d/OGRE
ln -s /home/stenyak$d
- for i in /home/stenyak$d/*Ogre*; do ln -s $i; done
+# 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-09-12 03:47:56 UTC (rev 459)
+++ trunk/cfg/graphicsConfig.xml 2006-09-12 18:44:19 UTC (rev 460)
@@ -10,8 +10,8 @@
areaRenderMode = "solid"
>
<ogre
- linuxPluginsDir = "../3pl/linux/lib/OGRE"
- _linuxPluginsDir = "/usr/lib/OGRE"
+ _linuxPluginsDir = "../3pl/linux/lib/OGRE"
+ linuxPluginsDir = "/usr/lib/OGRE"
windowsPluginsDir = "plugins"
sceneManager = "ST_GENERIC"
anisotropy = "1"
Modified: trunk/data/areas/mospland/area.xml
===================================================================
--- trunk/data/areas/mospland/area.xml 2006-09-12 03:47:56 UTC (rev 459)
+++ trunk/data/areas/mospland/area.xml 2006-09-12 18:44:19 UTC (rev 460)
@@ -238,13 +238,13 @@
scale="2.000000 2.000000 2.000000"
/>
</parts>
- <vehicleLocation
+ </customData>
+ <location
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"
/>
- </customData>
<subobject name="camera.002"><camera>
<customData 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"/>
Deleted: trunk/data/areas/mospland/ground.material
===================================================================
--- trunk/data/areas/mospland/ground.material 2006-09-12 03:47:56 UTC (rev 459)
+++ trunk/data/areas/mospland/ground.material 2006-09-12 18:44:19 UTC (rev 460)
@@ -1,18 +0,0 @@
-material groundMaterial
-{
- receive_shadows on
- technique
- {
- pass
- {
- ambient 0.5 0.5 0.5
- 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 ground.png
- }
- }
- }
-}
Deleted: trunk/data/areas/mospland/ground.png
===================================================================
(Binary files differ)
Deleted: trunk/data/areas/mospland/skybox.material
===================================================================
--- trunk/data/areas/mospland/skybox.material 2006-09-12 03:47:56 UTC (rev 459)
+++ trunk/data/areas/mospland/skybox.material 2006-09-12 18:44:19 UTC (rev 460)
@@ -1,16 +0,0 @@
-material skyboxMaterial
-{
- technique
- {
- pass
- {
- lighting off
- depth_write off
- texture_unit
- {
- cubic_texture mospSky.jpg separateUV
- tex_address_mode clamp
- }
- }
- }
-}
Deleted: trunk/data/areas/mospland/skybox.zip
===================================================================
(Binary files differ)
Modified: trunk/data/areas/testingGround/area.xml
===================================================================
--- trunk/data/areas/testingGround/area.xml 2006-09-12 03:47:56 UTC (rev 459)
+++ trunk/data/areas/testingGround/area.xml 2006-09-12 18:44:19 UTC (rev 460)
@@ -1,89 +1,32 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<area xmlns:xi="http://www.w3.org/2001/XInclude">
<customData
- name = "Testing Ground"
- position="0.000000 0.000000 0.000000"
- rotation="1.000000 0.000000 0.000000 0.000000"
- description = "A simple area, featuring an infinite cement ground, and a clear sky. Located in the middle of a dry area surrounded by some small mountains."
- author = "STenyaK"
- contact = "stenyak AT gmx DOT net"
- license = "Creative Commons Attribution-NonCommercial-ShareAlike License"
- checkpointPosition = "0 0 10"
- checkpointRadius = "5"
- >
- <ground>
- </ground>
- <parts>
- <cone
- position = "15 5 2"
- rotation = "0 0 0"
- >
- </cone>
- <cube
- position = "15 15 4"
- rotation = "0 0 45"
- >
- </cube>
- <cube
- position = "0 15 4"
- rotation = "0 0 20"
- >
- </cube>
- <cube
- position = "15 0 4"
- rotation = "0 0 80"
- >
- </cube>
- </parts>
- <vehicleLocation
- name = "paceCar"
- position = "0 0 2"
- rotation = "10 5 15"
+ name = "Testing Ground"
+ position="0.000000 0.000000 0.000000"
+ rotation="1.000000 0.000000 0.000000 0.000000"
+ description = "A simple area, featuring an infinite cement ground, and a clear sky. Located in the middle of a dry area surrounded by some small mountains."
+ author = "STenyaK"
+ contact = "stenyak AT gmx DOT net"
+ license = "Creative Commons Attribution-NonCommercial-ShareAlike License"
+ checkpointPosition = "0 0 10"
+ checkpointRadius = "5"
>
- </vehicleLocation>
- <vehicleLocation
- name = "grid01"
- position = "15 15 2"
- rotation = "0 0 0"
- >
- </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>
+ <ground/>
+ <parts>
+ <cone position = "15 5 2" rotation = "0 0 0"/>
+ <cube position = "15 15 4" rotation = "0 0 45"/>
+ <cube position = "0 15 4" rotation = "0 0 20"/>
+ <cube position = "15 0 4" rotation = "0 0 80"/>
+ </parts>
</customData>
+ <location name = "paceCar" position = "0 0 2" rotation = "10 5 15"/>
+ <location name = "grid01" position = "15 15 2" rotation = "0 0 0"/>
+ <location name = "grid02" position = "10 10 2" rotation = "0 0 0"/>
+ <location name = "grid03" position = "5 15 2" rotation = "0 0 0"/>
+ <location name = "grid04" position = "0 10 2" rotation = "0 0 0"/>
+ <location name = "grid05" position = "-5 15 2" rotation = "0 0 0"/>
+ <location name = "grid06" position = "-10 10 2" rotation = "0 0 0"/>
+ <location name = "parking01" position = "-20 -10 2" rotation = "0 0 90"/>
<subobject name = "driver"><camera>
<customData position = "6 0 1.7" target = "0.1 0.5 0.4"/>
</camera></subobject>
Modified: trunk/data/worlds/default.xml
===================================================================
--- trunk/data/worlds/default.xml 2006-09-12 03:47:56 UTC (rev 459)
+++ trunk/data/worlds/default.xml 2006-09-12 18:44:19 UTC (rev 460)
@@ -7,29 +7,44 @@
skyMaterialName="skyboxMaterial"
skyDistance="5000.0"
skyDrawFirst="1"
- height="0.0"
+ height="-1.5"
>
</customData>
- <sharedobject name="main"><area
- model="testingGround"
- >
- </area></sharedobject>
<sharedobject name="main"><vehicle
model="mosp1"
_model="quattros1"
>
</vehicle></sharedobject>
- <!--<sharedobject name="secondary"><area
+ <sharedobject name="bg"><area
+ model="testingGround"
+ >
+ </area></sharedobject>
+ <sharedobject name="main"><area
+ model="mospland"
+ >
+ </area></sharedobject>
+ <!--<sharedobject name="main"><area
model="mosptracing"
- _model="mospland2006.r7"
>
</area></sharedobject>
+ <sharedobject name="tile1"><area
+ model="mospland2006.r7"
+ >
+ </area></sharedobject>
<sharedobject name="secondcar"><vehicle
model="mosp1"
_model="quattros1"
>
</vehicle></sharedobject>
<location-vehicle first="(area)main/grid01" second="(vehicle)secondcar" />-->
+
+<!--
+ <location name="la" position="0 0 5" rotation="0 0 0"/>
+ <location name="lb" position="0 0 0" rotation="0 35 0"/>
+ <location name="lc" position="0 0 0" rotation="15 15 0"/>
+ <location-area first="(location)la" second="(area)main"/>
+ <location-area first="(location)la" second="(area)main"/>
+-->
<location-vehicle first="(area)main/paceCar" second="(vehicle)main" />
<vehicle-driver first="(vehicle)main" second="user" />
</world>
Modified: trunk/src/common/camera.cpp
===================================================================
--- trunk/src/common/camera.cpp 2006-09-12 03:47:56 UTC (rev 459)
+++ trunk/src/common/camera.cpp 2006-09-12 18:44:19 UTC (rev 460)
@@ -68,23 +68,44 @@
void Camera::updateOgreRotation ()
{
- const dReal *temp = dBodyGetQuaternion (positionID);
- Ogre::Quaternion tempRot (temp[0], temp[1], temp[2], temp[3]);
+ Ogre::Quaternion tempRot;
+ if (positionID == 0)
+ {
+ //tempRot.w = 1;
+ //tempRot.x = tempRot.y = tempRot.z = 0;
+ tempRot.w = tempRot.z = 1;
+ tempRot.x = tempRot.y = 0;
+ } else {
+ const dReal *temp = dBodyGetQuaternion (positionID);
+ tempRot = Ogre::Quaternion(temp[0], temp[1], temp[2], temp[3]);
+ }
ogreCamera->setFixedYawAxis (true, tempRot.zAxis());
}
Vector3d Camera::updateOgrePosition ()
{
- const dReal *temp = dBodyGetQuaternion (positionID);
- Ogre::Quaternion tempRot(temp[0], temp[1], temp[2], temp[3]);
+ Ogre::Quaternion tempRot;
+ if (positionID == 0)
+ {
+ tempRot.w = tempRot.z = 1;
+ tempRot.x = tempRot.y = 0;
+ } else {
+ const dReal *temp = dBodyGetQuaternion (positionID);
+ tempRot = Ogre::Quaternion(temp[0], temp[1], temp[2], temp[3]);
+ }
Ogre::Matrix3 rot;
tempRot.ToRotationMatrix (rot);
Ogre::Vector3 tempPos(positionOffset->x, positionOffset->y, positionOffset->z);
Ogre::Vector3 pos = rot * tempPos;
- temp = dBodyGetPosition (positionID);
- pos += Ogre::Vector3 (temp[0], temp[1], temp[2]);
+ if (positionID == 0)
+ {
+ //empty
+ } else {
+ const dReal * temp = dBodyGetPosition (positionID);
+ pos += Ogre::Vector3 (temp[0], temp[1], temp[2]);
+ }
ogreCamera->setPosition (pos);
return Vector3d (pos.x, pos.y, pos.z);
Modified: trunk/src/common/location.cpp
===================================================================
--- trunk/src/common/location.cpp 2006-09-12 03:47:56 UTC (rev 459)
+++ trunk/src/common/location.cpp 2006-09-12 18:44:19 UTC (rev 460)
@@ -23,12 +23,9 @@
Location::Location (XmlTag * tag)
{
pLogEngine log (LogEngine::create (LOG_DEVELOPER, "Location"));
- // if (tag->getName() == "location")
- {
- name = tag->getAttribute("name");
- position = Vector3d(tag->getAttribute("position"));
- rotation = Quaternion(tag->getAttribute("rotation"));
- }
+ name = tag->getAttribute("name");
+ position = Vector3d(tag->getAttribute("position"));
+ rotation = Quaternion(tag->getAttribute("rotation"));
}
Location::Location (std::string name, Vector3d position, Quaternion rotation)
{
Modified: trunk/src/common/odeObject.cpp
===================================================================
--- trunk/src/common/odeObject.cpp 2006-09-12 03:47:56 UTC (rev 459)
+++ trunk/src/common/odeObject.cpp 2006-09-12 18:44:19 UTC (rev 460)
@@ -8,6 +8,8 @@
\*****************************************************************************/
#include "odeObject.hpp"
+#include "Ogre.h"
+#include "OgreNoMemoryMacros.h"
#include "system.hpp"
#include "vector3d.hpp"
#include "quaternion.hpp"
@@ -15,6 +17,13 @@
unsigned int OdeObject::instancesCount = 0;
+void getMeshInformation (Ogre::MeshPtr mesh, size_t & vertex_count, dVector3 * &vertices, size_t & index_count, unsigned *&indices, const Ogre::Vector3 & position = Ogre::Vector3::ZERO, const Ogre::Quaternion & orient = Ogre::Quaternion::IDENTITY, const Ogre::Vector3 & scale = Ogre::Vector3::UNIT_SCALE);
+
+std::string OdeObject::getId()
+{
+ return this->id;
+}
+
void OdeObject::updateId()
{
const int numberStringSize = 64;
@@ -23,6 +32,30 @@
this->id = std::string(numberString);
instancesCount++;
}
+OdeObject::OdeObject (WorldObject * worldObject, pMeshOdeData data, std::string name)
+{
+ updateId();
+ this->worldObject = worldObject;
+ this->name = name;
+ bodyID = 0; //dBodyCreate (worldID);
+
+ dTriMeshDataID ground = dGeomTriMeshDataCreate ();
+ dGeomID geom = dCreateTriMesh (World::get()->spaceID, ground, 0, 0, 0);
+ dGeomSetBody (geom, 0);
+ //geomIDs[name+id] = geom;
+ size_t vertex_count, index_count;
+ dVector3 * vertices;
+ unsigned int *indices;
+ getMeshInformation (data->ogreChild->getEntity()->getMesh (), vertex_count, vertices, index_count, indices, data->ogreChild->getNode()->getPosition(), data->ogreChild->getNode()->getOrientation(), data->ogreChild->getNode()->getScale());
+ Vector3d posi; Ogre::Vector3 oposi = data->ogreChild->getNode()->getPosition(); posi.x = oposi.x; posi.y = oposi.y; posi.z = oposi.z;
+ worldObject->getLog()->__format (LOG_DEVELOPER, "Building mesh; Adding at pos(%f,%f,%f)",posi.x,posi.y,posi.z);
+ //FIXME: keep the vertex data (ground pointer) somewhere; ODE doesn't keep a copy of the trimesh data!!
+#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
+}
OdeObject::OdeObject (WorldObject * worldObject, pPartOdeData data, std::string name)
{
updateId();
@@ -162,30 +195,78 @@
dGeomDestroy (i->second);
i->second = NULL;
}
- geomIDs.clear();
- dBodyDestroy (bodyID);
+ geomIDs.clear();
+ if (bodyID) dBodyDestroy (bodyID);
bodyID = NULL;
this->worldObject = NULL;
}
void OdeObject::setPosition (Vector3d position)
{
- dBodySetPosition (bodyID, position.x, position.y, position.z);
+ if (bodyID == 0)
+ {
+ GeomIDsIt i = geomIDs.begin();
+ for(;i != geomIDs.end(); i++)
+ {
+ dGeomSetPosition (i->second, position.x, position.y, position.z);
+ }
+ } else {
+ dBodySetPosition (bodyID, position.x, position.y, position.z);
+ }
}
void OdeObject::setRotation (Quaternion rotation)
{
dMatrix3 rot;
rotation.getOdeMatrix (rot);
- dBodySetRotation (bodyID, rot);
+ if (bodyID == 0)
+ {
+ GeomIDsIt i = geomIDs.begin();
+ for(;i != geomIDs.end(); i++)
+ {
+ dGeomSetRotation (i->second, rot);
+ }
+ } else {
+ dBodySetRotation (bodyID, rot);
+ }
}
Vector3d OdeObject::getPosition()
{
- const dReal * tmp = dBodyGetPosition (bodyID);
- return Vector3d(tmp[0], tmp[1], tmp[2]);
+ const dReal * tmp;
+ Vector3d result(0,0,0);
+ if (bodyID == 0)
+ {
+ if (geomIDs.begin() == geomIDs.end())
+ {
+ //empty
+ } else {
+ tmp = dGeomGetPosition (geomIDs.begin()->second);
+ result = Vector3d(tmp[0], tmp[1], tmp[2]);
+ }
+ } else {
+ tmp = dBodyGetPosition (bodyID);
+ result = Vector3d(tmp[0], tmp[1], tmp[2]);
+ }
+ //const dReal * tmp = dBodyGetPosition (bodyID);
+ return result;
}
Quaternion OdeObject::getRotation()
{
- const dReal * tmp = dBodyGetQuaternion (bodyID);
+ dReal * tmp = NULL;
+ if (bodyID == 0)
+ {
+ if (geomIDs.begin() == geomIDs.end())
+ {
+ //empty
+ } else {
+ dQuaternion q;
+ dGeomGetQuaternion (geomIDs.begin()->second, q);
+ tmp = &(q[0]);
+ }
+ } else {
+ tmp = (dReal*)dBodyGetQuaternion (bodyID);
+ }
+ if (tmp == NULL) return Quaternion(0,0,0);
+ //const dReal * tmp = dBodyGetQuaternion (bodyID);
return Quaternion(tmp);
}
dBodyID OdeObject::getBodyID()
@@ -196,3 +277,112 @@
{
return geomIDs[name];
}
+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)
+{
+ vertex_count = index_count = 0;
+ bool added_shared = false;
+ size_t current_offset = vertex_count;
+ size_t shared_offset = vertex_count;
+ size_t next_offset = vertex_count;
+ size_t index_offset = index_count;
+
+ // Calculate how many vertices and indices we're going to need
+ for (int i = 0; i < mesh->getNumSubMeshes (); i++)
+ {
+ Ogre::SubMesh * submesh = mesh->getSubMesh (i);
+
+ // We only need to add the shared vertices once
+ if (submesh->useSharedVertices)
+ {
+ if (!added_shared)
+ {
+ Ogre::VertexData * vertex_data = mesh->sharedVertexData;
+ vertex_count += vertex_data->vertexCount;
+ added_shared = true;
+ }
+ } else
+ {
+ Ogre::VertexData * vertex_data = submesh->vertexData;
+ vertex_count += vertex_data->vertexCount;
+ }
+
+ // Add the indices
+ Ogre::IndexData * index_data = submesh->indexData;
+ index_count += index_data->indexCount;
+ }
+
+ // Allocate space for the vertices and indices
+ vertices = new dVector3[vertex_count];
+ indices = new unsigned[index_count];
+
+ added_shared = false;
+
+ // Run through the submeshes again, adding the data into the arrays
+ for (int i = 0; i < mesh->getNumSubMeshes (); i++)
+ {
+ Ogre::SubMesh * submesh = mesh->getSubMesh (i);
+
+ Ogre::VertexData * vertex_data = submesh->useSharedVertices ? mesh->sharedVertexData : submesh->vertexData;
+ if ((!submesh->useSharedVertices) || (submesh->useSharedVertices && !added_shared))
+ {
+ if (submesh->useSharedVertices)
+ {
+ added_shared = true;
+ shared_offset = current_offset;
+ }
+
+ const Ogre::VertexElement * posElem = vertex_data->vertexDeclaration->findElementBySemantic (Ogre::VES_POSITION);
+ Ogre::HardwareVertexBufferSharedPtr vbuf = vertex_data->vertexBufferBinding->getBuffer (posElem->getSource ());
+ unsigned char *vertex = static_cast < unsigned char *>(vbuf->lock (Ogre::HardwareBuffer::HBL_READ_ONLY));
+ Ogre::Real * pReal;
+
+ for (size_t j = 0; j < vertex_data->vertexCount; ++j, vertex += vbuf->getVertexSize ())
+ {
+ posElem->baseVertexPointerToElement (vertex, &pReal);
+
+ Ogre::Vector3 pt;
+
+ pt.x = (*pReal++);
+ pt.y = (*pReal++);
+ pt.z = (*pReal++);
+
+ pt = (orient * (pt * scale)) + position;
+
+ vertices[current_offset + j][0] = pt.x;
+ vertices[current_offset + j][1] = pt.y;
+ vertices[current_offset + j][2] = pt.z;
+ }
+ vbuf->unlock ();
+ next_offset += vertex_data->vertexCount;
+ }
+
+ Ogre::IndexData * index_data = submesh->indexData;
+
+ size_t numTris = index_data->indexCount / 3;
+ unsigned short *pShort;
+ unsigned int *pInt;
+ Ogre::HardwareIndexBufferSharedPtr ibuf = index_data->indexBuffer;
+ bool use32bitindexes = (ibuf->getType () == Ogre::HardwareIndexBuffer::IT_32BIT);
+ if (use32bitindexes)
+ pInt = static_cast < unsigned int *>(ibuf->lock (Ogre::HardwareBuffer::HBL_READ_ONLY));
+ else
+ pShort = static_cast < unsigned short *>(ibuf->lock (Ogre::HardwareBuffer::HBL_READ_ONLY));
+
+ for (size_t k = 0; k < numTris; ++k)
+ {
+ size_t offset = (submesh->useSharedVertices) ? shared_offset : current_offset;
+
+ unsigned int vindex = use32bitindexes ? *pInt++ : *pShort++;
+ indices[index_offset + 0] = vindex + offset;
+ vindex = use32bitindexes ? *pInt++ : *pShort++;
+ indices[index_offset + 1] = vindex + offset;
+ vindex = use32bitindexes ? *pInt++ : *pShort++;
+ indices[index_offset + 2] = vindex + offset;
+
+ index_offset += 3;
+ }
+ ibuf->unlock ();
+ current_offset = next_offset;
+ }
+}
+
Modified: trunk/src/common/odeObject.hpp
===================================================================
--- trunk/src/common/odeObject.hpp 2006-09-12 03:47:56 UTC (rev 459)
+++ trunk/src/common/odeObject.hpp 2006-09-12 18:44:19 UTC (rev 460)
@@ -19,11 +19,13 @@
class WorldObject;
SHARED_PTR_MAP(OdeObject, pOdeObject, OdeObjects, OdeObjectsIt, wOdeObject);
+SHARED_PTR(MeshOdeData, pMeshOdeData, wMeshOdeData);
SHARED_PTR(PartOdeData, pPartOdeData, wPartOdeData);
SHARED_PTR(BodyOdeData, pBodyOdeData, wBodyOdeData);
SHARED_PTR(WheelOdeData, pWheelOdeData, wWheelOdeData);
SHARED_PTR(BoneOdeData, pBoneOdeData, wBoneOdeData);
+SHARED_PTR_MAP(OgreObject, pOgreObject, OgreObjects, OgreObjectsIt, wOgreObject);
SHARED_MAP(dGeomID, GeomIDs, GeomIDsIt);
class OdeObject
@@ -38,6 +40,7 @@
std::string id;
public:
+ OdeObject (WorldObject * worldObject, pMeshOdeData data, std::string name);
OdeObject (WorldObject * worldObject, pPartOdeData data, std::string name);
OdeObject (WorldObject * worldObject, pBodyOdeData data, std::string name);
OdeObject (WorldObject * worldObject, pWheelOdeData data, std::string name);
@@ -49,7 +52,19 @@
void setRotation (Quaternion rotation);
dBodyID getBodyID();
dGeomID getGeomID(std::string name);
+ std::string getId();
};
+class MeshOdeData
+{
+ public:
+ std::string shape;
+ pOgreObject ogreChild;
+ MeshOdeData()
+ {
+ shape = "none";
+ }
+ ~MeshOdeData() {};
+};
class PartOdeData
{
public:
Modified: trunk/src/common/worldObject.cpp
===================================================================
--- trunk/src/common/worldObject.cpp 2006-09-12 03:47:56 UTC (rev 459)
+++ trunk/src/common/worldObject.cpp 2006-09-12 18:44:19 UTC (rev 460)
@@ -63,7 +63,12 @@
OdeObjectsIt j = odeObjects.begin();
for(;j != odeObjects.end(); j++)
{
- dBodySetData (j->second->getBodyID(), (void*) container.get());
+ if (j->second->getBodyID() == 0)
+ {
+ //empty
+ } else {
+ dBodySetData (j->second->getBodyID(), (void*) container.get());
+ }
}
pWorldObject t = shared_from_this();
for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++)
@@ -166,6 +171,7 @@
pOdeObject WorldObject::getMainOdeObject()
{
pOdeObject tmp;
+ log->__format(LOG_CCREATOR, "Getting main ode object. Id #%s.", id.c_str());
if (odeObjects.empty()) return tmp;
return odeObjects.begin()->second;
}
@@ -206,6 +212,7 @@
}
Vector3d WorldObject::getPosition ()
{
+ if (odeObjects.begin() == odeObjects.end()) log->__format(LOG_ERROR, "No ode objects here!");
return odeObjects.begin()->second->getPosition();
}
Quaternion WorldObject::getRotation ()
@@ -565,6 +572,14 @@
}
t = tag->getTag(0); for (int i = 0; i < tag->nTags(); t = tag->getTag(++i))
{
+ if (t->getName() == "location")
+ {
+ pLocation tmp = Location::create (t);
+ locations[tmp->getName()] = tmp;
+ }
+ }
+ t = tag->getTag(0); for (int i = 0; i < tag->nTags(); t = tag->getTag(++i))
+ {
if (t->getName() == "location-vehicle")
{
log->__format (LOG_CCREATOR, "Setting vehicle location");
@@ -580,6 +595,22 @@
}
t = tag->getTag(0); for (int i = 0; i < tag->nTags(); t = tag->getTag(++i))
{
+ if (t->getName() == "location-area")
+ {
+ log->__format (LOG_CCREATOR, "Setting area location");
+ std::string f= t->getAttribute("first");
+ std::string s= t->getAttribute("second");
+ pLocation first = getLocationObject(f);
+ pArea second = getAreaObject(s);
+
+ //FIXME: might have to also relocate locations!
+ //second->setPosition(Vector3d(0, 0, 0));
+ //second->applyRotation(first->getRotation());
+ //second->setPosition(first->getPosition());
+ }
+ }
+ t = tag->getTag(0); for (int i = 0; i < tag->nTags(); t = tag->getTag(++i))
+ {
if (t->getName() == "vehicle-driver")
{
log->__format (LOG_CCREATOR, "Setting vehicle driver");
@@ -674,6 +705,11 @@
log->__format(LOG_DEVELOPER, "Area name=%s", a->getName().c_str());
tmp = a->getLocation(MospPath::getName(MospPath::getSubFullname(fullname)));
}
+ if (MospPath::getType(fullname) == "location")
+ {
+ if ( (tmp = getLocation(MospPath::getName(fullname))) == NULL)
+ log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", fullname.c_str(), "Vehicle");
+ }
log->__format(LOG_DEVELOPER, "Location name=%s", tmp->getName().c_str());
return tmp;
}
@@ -685,6 +721,14 @@
log->__format(LOG_DEVELOPER, "Vehicle name=%s", tmp->getName().c_str());
return tmp;
}
+pArea WorldObject::getAreaObject(std::string fullname)
+{
+ pArea tmp;
+ if ((tmp = boost::dynamic_pointer_cast<Area>(getFirstObject(fullname))) == NULL)
+ log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", fullname.c_str(), "Vehicle");
+ log->__format(LOG_DEVELOPER, "Area name=%s", tmp->getName().c_str());
+ return tmp;
+}
pWorldObject WorldObject::getFirstObject(std::string fullname)
{
std::string type = MospPath::getType(fullname);
Modified: trunk/src/common/worldObject.hpp
===================================================================
--- trunk/src/common/worldObject.hpp 2006-09-12 03:47:56 UTC (rev 459)
+++ trunk/src/common/worldObject.hpp 2006-09-12 18:44:19 UTC (rev 460)
@@ -99,6 +99,7 @@
pLocation getLocationObject(std::string fullname);
pVehicle getVehicleObject(std::string fullname);
+ pArea getAreaObject(std::string fullname);
pWorldObject getFirstObject(std::string fullname);
pLocation getLocation (std::string name);
Modified: trunk/src/makefile
===================================================================
--- trunk/src/makefile 2006-09-12 03:47:56 UTC (rev 459)
+++ trunk/src/makefile 2006-09-12 18:44:19 UTC (rev 460)
@@ -48,10 +48,10 @@
ifeq ("$(PLATFORM)", "LINUX")
TYPE :=
EXE_EXT :=
-#BASE_INCLUDE_DIR := /usr/include
-#BASE_LIBRARY_DIR := /usr/lib
-BASE_INCLUDE_DIR := $(PWD)/../3pl/linux/include
-BASE_LIBRARY_DIR := $(PWD)/../3pl/linux/lib
+BASE_INCLUDE_DIR := /usr/include
+BASE_LIBRARY_DIR := /usr/lib
+#BASE_INCLUDE_DIR := $(PWD)/../3pl/linux/include
+#BASE_LIBRARY_DIR := $(PWD)/../3pl/linux/lib
PLATFORM_CFLAGS :=
LD_FLAGS:=
endif
Modified: trunk/src/physics.cpp
===================================================================
--- trunk/src/physics.cpp 2006-09-12 03:47:56 UTC (rev 459)
+++ trunk/src/physics.cpp 2006-09-12 18:44:19 UTC (rev 460)
@@ -80,18 +80,9 @@
// 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;
- }
- if (b1 && b2 && dBodyGetData (b1) == dBodyGetData (b2))
- {
- return;
- }
+ if (b1 == 0 && b2 == 0) return;
+ if (b1 && b2 && dAreConnected (b1, b2)) return;
+ if (b1 && b2 && dBodyGetData (b1) == dBodyGetData (b2)) return;
const int N = 10;
dContact contact[N];
Modified: trunk/src/world/area.cpp
===================================================================
--- trunk/src/world/area.cpp 2006-09-12 03:47:56 UTC (rev 459)
+++ trunk/src/world/area.cpp 2006-09-12 18:44:19 UTC (rev 460)
@@ -20,8 +20,6 @@
#include "world.hpp"
#include "SDL.h"
-void getMeshInformation (Ogre::MeshPtr mesh, size_t & vertex_count, dVector3 * &vertices, size_t & index_count, unsigned *&indices, const Ogre::Vector3 & position = Ogre::Vector3::ZERO, const Ogre::Quaternion & orient = Ogre::Quaternion::IDENTITY, const Ogre::Vector3 & scale = Ogre::Vector3::UNIT_SCALE);
-
pArea Area::create (std::string areaName)
{
pArea area(new Area(areaName));
@@ -72,6 +70,7 @@
{
if (u->getName() == "mesh")
{
+ //creating graphics mesh
log->__format (LOG_CCREATOR, "Creating an ogre mesh for the ground");
pOgreObjectData childData (new OgreObjectData);
childData->meshPath = getPath() + u->getAttribute("file");
@@ -81,22 +80,13 @@
pOgreObject ogreChild (new OgreObject(this, childData, getId()));
ogreObjects[ogreChild->getId()] = ogreChild;
ogreChild->setOgreReference(ogreObjects[ogreObject->getId()], rotDiff, posDiff, scale);
- // declare ode mesh
- dTriMeshDataID ground = dGeomTriMeshDataCreate ();
- dGeomSetBody (dCreateTriMesh (World::get()->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");
- //FIXME: keep the vertex data somewhere; ODE doesn't keep a copy of the trimesh data!!
-#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
System::get()->ogreWindow->update ();
+
+ //create physics mesh
+ pMeshOdeData odeData (new MeshOdeData());
+ odeData->ogreChild = ogreChild;
+ pOdeObject tmp (new OdeObject(this, odeData , getId()));
+ odeObjects[name+tmp->getId()] = tmp;
}
}
}
@@ -116,11 +106,6 @@
System::get()->ogreWindow->update ();
}
}
- if (t->getName() == "vehicleLocation")
- {
- pLocation tmp = Location::create (t);
- locations[tmp->getName()] = tmp;
- }
if (t->getName() == "camera")
{
pCamera tmp = Camera::create (t);
@@ -129,8 +114,13 @@
}
log->loadscreen (LOG_CCREATOR, "Creating the area ground");
- areaBodyID = dBodyCreate (World::get()->ghostWorldID);
- positionCameras(areaBodyID);
+ if (odeObjects.begin() == odeObjects.end())
+ {
+ positionCameras(dBodyCreate (World::get()->ghostWorldID));
+ } else {
+ positionCameras(odeObjects.begin()->second->getBodyID());
+ }
+
System::get()->ogreWindow->update ();
// create the checkpoint sphere
@@ -174,115 +164,6 @@
}
}
-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)
-{
- vertex_count = index_count = 0;
- bool added_shared = false;
- size_t current_offset = vertex_count;
- size_t shared_offset = vertex_count;
- size_t next_offset = vertex_count;
- size_t index_offset = index_count;
-
- // Calculate how many vertices and indices we're going to need
- for (int i = 0; i < mesh->getNumSubMeshes (); i++)
- {
- Ogre::SubMesh * submesh = mesh->getSubMesh (i);
-
- // We only need to add the shared vertices once
- if (submesh->useSharedVertices)
- {
- if (!added_shared)
- {
- Ogre::VertexData * vertex_data = mesh->sharedVertexData;
- vertex_count += vertex_data->vertexCount;
- added_shared = true;
- }
- } else
- {
- Ogre::VertexData * vertex_data = submesh->vertexData;
- vertex_count += vertex_data->vertexCount;
- }
-
- // Add the indices
- Ogre::IndexData * index_data = submesh->indexData;
- index_count += index_data->indexCount;
- }
-
- // Allocate space for the vertices and indices
- vertices = new dVector3[vertex_count];
- indices = new unsigned[index_count];
-
- added_shared = false;
-
- // Run through the submeshes again, adding the data into the arrays
- for (int i = 0; i < mesh->getNumSubMeshes (); i++)
- {
- Ogre::SubMesh * submesh = mesh->getSubMesh (i);
-
- Ogre::VertexData * vertex_data = submesh->useSharedVertices ? mesh->sharedVertexData : submesh->vertexData;
- if ((!submesh->useSharedVertices) || (submesh->useSharedVertices && !added_shared))
- {
- if (submesh->useSharedVertices)
- {
- added_shared = true;
- shared_offset = current_offset;
- }
-
- const Ogre::VertexElement * posElem = vertex_data->vertexDeclaration->findElementBySemantic (Ogre::VES_POSITION);
- Ogre::HardwareVertexBufferSharedPtr vbuf = vertex_data->vertexBufferBinding->getBuffer (posElem->getSource ());
- unsigned char *vertex = static_cast < unsigned char *>(vbuf->lock (Ogre::HardwareBuffer::HBL_READ_ONLY));
- Ogre::Real * pReal;
-
- for (size_t j = 0; j < vertex_data->vertexCount; ++j, vertex += vbuf->getVertexSize ())
- {
- posElem->baseVertexPointerToElement (vertex, &pReal);
-
- Ogre::Vector3 pt;
-
- pt.x = (*pReal++);
- pt.y = (*pReal++);
- pt.z = (*pReal++);
-
- pt = (orient * (pt * scale)) + position;
-
- vertices[current_offset + j][0] = pt.x;
- vertices[current_offset + j][1] = pt.y;
- vertices[current_offset + j][2] = pt.z;
- }
- vbuf->unlock ();
- next_offset += vertex_data->vertexCount;
- }
-
- Ogre::IndexData * index_data = submesh->indexData;
-
- size_t numTris = index_data->indexCount / 3;
- unsigned short *pShort;
- unsigned int *pInt;
- Ogre::HardwareIndexBufferSharedPtr ibuf = index_data->indexBuffer;
- bool use32bitindexes = (ibuf->getType () == Ogre::HardwareIndexBuffer::IT_32BIT);
- if (use32bitindexes)
- pInt = static_cast < unsigned int *>(ibuf->lock (Ogre::HardwareBuffer::HBL_READ_ONLY));
- else
- pShort = static_cast < unsigned short *>(ibuf->lock (Ogre::HardwareBuffer::HBL_READ_ONLY));
-
- for (size_t k = 0; k < numTris; ++k)
- {
- size_t offset = (submesh->useSharedVertices) ? shared_offset : current_offset;
-
- unsigned int vindex = use32bitindexes ? *pInt++ : *pShort++;
- indices[index_offset + 0] = vindex + offset;
- vindex = use32bitindexes ? *pInt++ : *pShort++;
- indices[index_offset + 1] = vindex + offset;
- vindex = use32bitindexes ? *pInt++ : *pShort++;
- indices[index_offset + 2] = vindex + offset;
-
- index_offset += 3;
- }
- ibuf->unlock ();
- current_offset = next_offset;
- }
-}
-
pCamera Area::getClosestCamera(Vector3d location)
{
log->__format(LOG_DEVELOPER, "Finding closest camera");
Modified: trunk/src/world/area.hpp
===================================================================
--- trunk/src/world/area.hpp 2006-09-12 03:47:56 UTC (rev 459)
+++ trunk/src/world/area.hpp 2006-09-12 18:44:19 UTC (rev 460)
@@ -39,7 +39,6 @@
static pArea create(std::string areaName);
~Area ();
- dBodyID areaBodyID;
pCamera getClosestCamera(Vector3d location);
void setCastShadows(bool castShadows);
Modified: trunk/src/world/world.cpp
===================================================================
--- trunk/src/world/world.cpp 2006-09-12 03:47:56 UTC (rev 459)
+++ trunk/src/world/world.cpp 2006-09-12 18:44:19 UTC (rev 460)
@@ -82,8 +82,7 @@
//shouldn't be necessary, but vehicle and area geoms can't be deleted after ode world so we must make sure!
objects.clear();
- objects.clear();
-
+
log->__format (LOG_DEVELOPER, "Destroying ODE world");
dSpaceDestroy (spaceID);
log->__format (LOG_DEVELOPER, "Destroying ODE main collision space");
Modified: trunk/src/world/world.hpp
===================================================================
--- trunk/src/world/world.hpp 2006-09-12 03:47:56 UTC (rev 459)
+++ trunk/src/world/world.hpp 2006-09-12 18:44:19 UTC (rev 460)
@@ -28,7 +28,6 @@
Ogre::SceneNode * planeNode;
Ogre::Entity * planeEntity;
std::string description;
- pCamera activeCamera;
bool cameraDirector;
void setActiveCamera(pCamera camera);
void processXmlRootNode (XmlTag * tag);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st...@us...> - 2006-09-12 03:48:06
|
Revision: 459
http://svn.sourceforge.net/motorsport/?rev=459&view=rev
Author: stenyak
Date: 2006-09-11 20:47:56 -0700 (Mon, 11 Sep 2006)
Log Message:
-----------
Bugfix: now all areas receive render settings (used to be just "main" area).
Modified Paths:
--------------
trunk/src/graphics.cpp
trunk/src/world/world.cpp
trunk/src/world/world.hpp
Modified: trunk/src/graphics.cpp
===================================================================
--- trunk/src/graphics.cpp 2006-09-12 03:28:36 UTC (rev 458)
+++ trunk/src/graphics.cpp 2006-09-12 03:47:56 UTC (rev 459)
@@ -164,12 +164,10 @@
World::get()->stepGraphics();
- // Update area shadows state
- World::get()->getArea("main")->setCastShadows(castAreaShadows);
-
- // Update area render mode
- World::get()->getArea("main")->setRenderDetail(areaRenderMode);
-
+ // Update area shadows state and area render mode
+ World::get()->setCastShadows(castAreaShadows);
+ World::get()->setRenderDetail(areaRenderMode);
+
// Let the listener frames be started and ended: they are needed for particle System::get()s.
ogreRoot->_fireFrameStarted ();
System::get()->ogreWindow->update ();
Modified: trunk/src/world/world.cpp
===================================================================
--- trunk/src/world/world.cpp 2006-09-12 03:28:36 UTC (rev 458)
+++ trunk/src/world/world.cpp 2006-09-12 03:47:56 UTC (rev 459)
@@ -255,3 +255,28 @@
{
return activeCamera == camera;
}
+
+void World::setCastShadows(bool castAreaShadows)
+{
+ WorldObjectsIt i = objects.begin();
+ for(;i != objects.end(); i++)
+ {
+ if (pArea tmp = boost::dynamic_pointer_cast<Area>(i->second))
+ {
+ tmp->setCastShadows(castAreaShadows);
+ }
+ }
+}
+
+void World::setRenderDetail(bool areaRenderDetail)
+{
+ WorldObjectsIt i = objects.begin();
+ for(;i != objects.end(); i++)
+ {
+ if (pArea tmp = boost::dynamic_pointer_cast<Area>(i->second))
+ {
+ tmp->setRenderDetail(areaRenderDetail);
+ }
+ }
+}
+
Modified: trunk/src/world/world.hpp
===================================================================
--- trunk/src/world/world.hpp 2006-09-12 03:28:36 UTC (rev 458)
+++ trunk/src/world/world.hpp 2006-09-12 03:47:56 UTC (rev 459)
@@ -51,6 +51,8 @@
bool isActiveCamera(pCamera camera);
void stepGraphics();
+ void setRenderDetail(bool areaRenderDetail);
+ void setCastShadows(bool castAreaShadows);
};
#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st...@us...> - 2006-09-12 03:29:55
|
Revision: 458
http://svn.sourceforge.net/motorsport/?rev=458&view=rev
Author: stenyak
Date: 2006-09-11 20:28:36 -0700 (Mon, 11 Sep 2006)
Log Message:
-----------
Updated copyright headers URL.
Modified Paths:
--------------
trunk/src/common/axis.cpp
trunk/src/common/axis.hpp
trunk/src/common/camera.cpp
trunk/src/common/camera.hpp
trunk/src/common/location.cpp
trunk/src/common/location.hpp
trunk/src/common/odeObject.cpp
trunk/src/common/odeObject.hpp
trunk/src/common/ogreObject.cpp
trunk/src/common/ogreObject.hpp
trunk/src/common/quaternion.cpp
trunk/src/common/quaternion.hpp
trunk/src/common/shared.hpp
trunk/src/common/vector3d.cpp
trunk/src/common/vector3d.hpp
trunk/src/common/worldObject.cpp
trunk/src/common/worldObject.hpp
trunk/src/graphics.cpp
trunk/src/graphics.hpp
trunk/src/gui.cpp
trunk/src/gui.hpp
trunk/src/input.cpp
trunk/src/input.hpp
trunk/src/log/logEngine.cpp
trunk/src/log/logEngine.hpp
trunk/src/log/testLogEngine.cpp
trunk/src/main.cpp
trunk/src/main.hpp
trunk/src/physics.cpp
trunk/src/physics.hpp
trunk/src/system.cpp
trunk/src/system.hpp
trunk/src/todo
trunk/src/tools/mospPath.cpp
trunk/src/tools/mospPath.hpp
trunk/src/tools/paths.cpp
trunk/src/tools/paths.hpp
trunk/src/tools/testAxis.cpp
trunk/src/tools/testVector3d.cpp
trunk/src/tools/xercesc_fwd.hpp
trunk/src/tools/xmlParser.cpp
trunk/src/tools/xmlParser.hpp
trunk/src/tools/xmlTag.cpp
trunk/src/tools/xmlTag.hpp
trunk/src/vehicle/body.cpp
trunk/src/vehicle/body.hpp
trunk/src/vehicle/driveJoint.cpp
trunk/src/vehicle/driveJoint.hpp
trunk/src/vehicle/driveMass.cpp
trunk/src/vehicle/driveMass.hpp
trunk/src/vehicle/engine.cpp
trunk/src/vehicle/engine.hpp
trunk/src/vehicle/finalDrive.cpp
trunk/src/vehicle/finalDrive.hpp
trunk/src/vehicle/gearbox.cpp
trunk/src/vehicle/gearbox.hpp
trunk/src/vehicle/pedal.cpp
trunk/src/vehicle/pedal.hpp
trunk/src/vehicle/suspension.cpp
trunk/src/vehicle/suspension.hpp
trunk/src/vehicle/vehicle.cpp
trunk/src/vehicle/vehicle.hpp
trunk/src/vehicle/wheel.cpp
trunk/src/vehicle/wheel.hpp
trunk/src/world/area.cpp
trunk/src/world/area.hpp
trunk/src/world/part.cpp
trunk/src/world/part.hpp
trunk/src/world/world.cpp
trunk/src/world/world.hpp
Modified: trunk/src/common/axis.cpp
===================================================================
--- trunk/src/common/axis.cpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/common/axis.cpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#include "axis.hpp"
Modified: trunk/src/common/axis.hpp
===================================================================
--- trunk/src/common/axis.hpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/common/axis.hpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#ifndef AXIS_HPP
Modified: trunk/src/common/camera.cpp
===================================================================
--- trunk/src/common/camera.cpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/common/camera.cpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#include "camera.hpp"
Modified: trunk/src/common/camera.hpp
===================================================================
--- trunk/src/common/camera.hpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/common/camera.hpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#ifndef CAMERA_HPP
Modified: trunk/src/common/location.cpp
===================================================================
--- trunk/src/common/location.cpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/common/location.cpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#include "location.hpp"
Modified: trunk/src/common/location.hpp
===================================================================
--- trunk/src/common/location.hpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/common/location.hpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#ifndef LOCATION_HPP
Modified: trunk/src/common/odeObject.cpp
===================================================================
--- trunk/src/common/odeObject.cpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/common/odeObject.cpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#include "odeObject.hpp"
Modified: trunk/src/common/odeObject.hpp
===================================================================
--- trunk/src/common/odeObject.hpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/common/odeObject.hpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#ifndef ODEOBJECT_HPP
Modified: trunk/src/common/ogreObject.cpp
===================================================================
--- trunk/src/common/ogreObject.cpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/common/ogreObject.cpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#include "ogreObject.hpp"
Modified: trunk/src/common/ogreObject.hpp
===================================================================
--- trunk/src/common/ogreObject.hpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/common/ogreObject.hpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#ifndef OGREOBJECT_HPP
Modified: trunk/src/common/quaternion.cpp
===================================================================
--- trunk/src/common/quaternion.cpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/common/quaternion.cpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#include "quaternion.hpp"
Modified: trunk/src/common/quaternion.hpp
===================================================================
--- trunk/src/common/quaternion.hpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/common/quaternion.hpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#ifndef QUATERNION_HPP
Modified: trunk/src/common/shared.hpp
===================================================================
--- trunk/src/common/shared.hpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/common/shared.hpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#ifndef SHARED_HPP
Modified: trunk/src/common/vector3d.cpp
===================================================================
--- trunk/src/common/vector3d.cpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/common/vector3d.cpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#include "vector3d.hpp"
Modified: trunk/src/common/vector3d.hpp
===================================================================
--- trunk/src/common/vector3d.hpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/common/vector3d.hpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#ifndef VECTOR3D_HPP
Modified: trunk/src/common/worldObject.cpp
===================================================================
--- trunk/src/common/worldObject.cpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/common/worldObject.cpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#include "worldObject.hpp"
Modified: trunk/src/common/worldObject.hpp
===================================================================
--- trunk/src/common/worldObject.hpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/common/worldObject.hpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#ifndef WORLDOBJECT_HPP
Modified: trunk/src/graphics.cpp
===================================================================
--- trunk/src/graphics.cpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/graphics.cpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#ifdef WIN32
Modified: trunk/src/graphics.hpp
===================================================================
--- trunk/src/graphics.hpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/graphics.hpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#include <common/shared.hpp>
Modified: trunk/src/gui.cpp
===================================================================
--- trunk/src/gui.cpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/gui.cpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#include "gui.hpp"
Modified: trunk/src/gui.hpp
===================================================================
--- trunk/src/gui.hpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/gui.hpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#include "SDL/SDL.h"
Modified: trunk/src/input.cpp
===================================================================
--- trunk/src/input.cpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/input.cpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#include "input.hpp"
Modified: trunk/src/input.hpp
===================================================================
--- trunk/src/input.hpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/input.hpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#include <common/shared.hpp>
Modified: trunk/src/log/logEngine.cpp
===================================================================
--- trunk/src/log/logEngine.cpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/log/logEngine.cpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#include "logEngine.hpp"
Modified: trunk/src/log/logEngine.hpp
===================================================================
--- trunk/src/log/logEngine.hpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/log/logEngine.hpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#ifndef LOG_ENGINE_HPP
Modified: trunk/src/log/testLogEngine.cpp
===================================================================
--- trunk/src/log/testLogEngine.cpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/log/testLogEngine.cpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#include "MTest.h"
Modified: trunk/src/main.cpp
===================================================================
--- trunk/src/main.cpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/main.cpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#include "main.hpp"
Modified: trunk/src/main.hpp
===================================================================
--- trunk/src/main.hpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/main.hpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#ifndef MAIN_HPP
Modified: trunk/src/physics.cpp
===================================================================
--- trunk/src/physics.cpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/physics.cpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#include "physics.hpp"
Modified: trunk/src/physics.hpp
===================================================================
--- trunk/src/physics.hpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/physics.hpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#include <common/shared.hpp>
Modified: trunk/src/system.cpp
===================================================================
--- trunk/src/system.cpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/system.cpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#include "system.hpp"
Modified: trunk/src/system.hpp
===================================================================
--- trunk/src/system.hpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/system.hpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#ifndef SYSTEM_HPP
Modified: trunk/src/todo
===================================================================
--- trunk/src/todo 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/todo 2006-09-12 03:28:36 UTC (rev 458)
@@ -1,4 +1,4 @@
-update copyright headers url!!!!!!!!
+add support for rotation and traslation of areas
autosleep using averaged positions/velocities
new suspension spring+damper can't rotate properly yet, lacks a joint or 2 at the ends.
add support for suspension arm meshes in the car exporter
Modified: trunk/src/tools/mospPath.cpp
===================================================================
--- trunk/src/tools/mospPath.cpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/tools/mospPath.cpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#include <iostream>
Modified: trunk/src/tools/mospPath.hpp
===================================================================
--- trunk/src/tools/mospPath.hpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/tools/mospPath.hpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#ifndef MOSPPATH_HPP
Modified: trunk/src/tools/paths.cpp
===================================================================
--- trunk/src/tools/paths.cpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/tools/paths.cpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#include "paths.hpp"
Modified: trunk/src/tools/paths.hpp
===================================================================
--- trunk/src/tools/paths.hpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/tools/paths.hpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#ifndef PATHS_HPP
Modified: trunk/src/tools/testAxis.cpp
===================================================================
--- trunk/src/tools/testAxis.cpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/tools/testAxis.cpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#include "MTest.h"
Modified: trunk/src/tools/testVector3d.cpp
===================================================================
--- trunk/src/tools/testVector3d.cpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/tools/testVector3d.cpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#include "vector3d.hpp"
Modified: trunk/src/tools/xercesc_fwd.hpp
===================================================================
--- trunk/src/tools/xercesc_fwd.hpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/tools/xercesc_fwd.hpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
/*** Hack to permit forward declaration of DOMNode
Modified: trunk/src/tools/xmlParser.cpp
===================================================================
--- trunk/src/tools/xmlParser.cpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/tools/xmlParser.cpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#include "xmlParser.hpp"
Modified: trunk/src/tools/xmlParser.hpp
===================================================================
--- trunk/src/tools/xmlParser.hpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/tools/xmlParser.hpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#ifndef XML_PARSER_HPP
Modified: trunk/src/tools/xmlTag.cpp
===================================================================
--- trunk/src/tools/xmlTag.cpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/tools/xmlTag.cpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#include "xmlTag.hpp"
Modified: trunk/src/tools/xmlTag.hpp
===================================================================
--- trunk/src/tools/xmlTag.hpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/tools/xmlTag.hpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#ifndef XMLTAG_HPP
Modified: trunk/src/vehicle/body.cpp
===================================================================
--- trunk/src/vehicle/body.cpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/vehicle/body.cpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#include "body.hpp"
Modified: trunk/src/vehicle/body.hpp
===================================================================
--- trunk/src/vehicle/body.hpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/vehicle/body.hpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#ifndef BODY_HPP
Modified: trunk/src/vehicle/driveJoint.cpp
===================================================================
--- trunk/src/vehicle/driveJoint.cpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/vehicle/driveJoint.cpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#include "driveJoint.hpp"
Modified: trunk/src/vehicle/driveJoint.hpp
===================================================================
--- trunk/src/vehicle/driveJoint.hpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/vehicle/driveJoint.hpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#ifndef DRIVEJOINT_HPP
Modified: trunk/src/vehicle/driveMass.cpp
===================================================================
--- trunk/src/vehicle/driveMass.cpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/vehicle/driveMass.cpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#include "driveMass.hpp"
Modified: trunk/src/vehicle/driveMass.hpp
===================================================================
--- trunk/src/vehicle/driveMass.hpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/vehicle/driveMass.hpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#ifndef DRIVE_HPP
Modified: trunk/src/vehicle/engine.cpp
===================================================================
--- trunk/src/vehicle/engine.cpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/vehicle/engine.cpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#include "engine.hpp"
Modified: trunk/src/vehicle/engine.hpp
===================================================================
--- trunk/src/vehicle/engine.hpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/vehicle/engine.hpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#ifndef ENGINE_HPP
Modified: trunk/src/vehicle/finalDrive.cpp
===================================================================
--- trunk/src/vehicle/finalDrive.cpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/vehicle/finalDrive.cpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#include "finalDrive.hpp"
Modified: trunk/src/vehicle/finalDrive.hpp
===================================================================
--- trunk/src/vehicle/finalDrive.hpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/vehicle/finalDrive.hpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#ifndef FINALDRIVE_HPP
Modified: trunk/src/vehicle/gearbox.cpp
===================================================================
--- trunk/src/vehicle/gearbox.cpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/vehicle/gearbox.cpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#include "gearbox.hpp"
Modified: trunk/src/vehicle/gearbox.hpp
===================================================================
--- trunk/src/vehicle/gearbox.hpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/vehicle/gearbox.hpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#ifndef GEARBOX_HPP
Modified: trunk/src/vehicle/pedal.cpp
===================================================================
--- trunk/src/vehicle/pedal.cpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/vehicle/pedal.cpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#include "pedal.hpp"
Modified: trunk/src/vehicle/pedal.hpp
===================================================================
--- trunk/src/vehicle/pedal.hpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/vehicle/pedal.hpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#ifndef PEDAL_HPP
Modified: trunk/src/vehicle/suspension.cpp
===================================================================
--- trunk/src/vehicle/suspension.cpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/vehicle/suspension.cpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#include "suspension.hpp"
Modified: trunk/src/vehicle/suspension.hpp
===================================================================
--- trunk/src/vehicle/suspension.hpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/vehicle/suspension.hpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#ifndef SUSPENSION_HPP
Modified: trunk/src/vehicle/vehicle.cpp
===================================================================
--- trunk/src/vehicle/vehicle.cpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/vehicle/vehicle.cpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#include "world.hpp"
Modified: trunk/src/vehicle/vehicle.hpp
===================================================================
--- trunk/src/vehicle/vehicle.hpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/vehicle/vehicle.hpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#ifndef VEHICLE_HPP
Modified: trunk/src/vehicle/wheel.cpp
===================================================================
--- trunk/src/vehicle/wheel.cpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/vehicle/wheel.cpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#include "wheel.hpp"
Modified: trunk/src/vehicle/wheel.hpp
===================================================================
--- trunk/src/vehicle/wheel.hpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/vehicle/wheel.hpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#ifndef WHEEL_HPP
Modified: trunk/src/world/area.cpp
===================================================================
--- trunk/src/world/area.cpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/world/area.cpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#include "area.hpp"
Modified: trunk/src/world/area.hpp
===================================================================
--- trunk/src/world/area.hpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/world/area.hpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#ifndef AREA_HPP
Modified: trunk/src/world/part.cpp
===================================================================
--- trunk/src/world/part.cpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/world/part.cpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#include "part.hpp"
Modified: trunk/src/world/part.hpp
===================================================================
--- trunk/src/world/part.hpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/world/part.hpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#ifndef PART_HPP
Modified: trunk/src/world/world.cpp
===================================================================
--- trunk/src/world/world.cpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/world/world.cpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#include "world.hpp"
Modified: trunk/src/world/world.hpp
===================================================================
--- trunk/src/world/world.hpp 2006-09-12 03:22:37 UTC (rev 457)
+++ trunk/src/world/world.hpp 2006-09-12 03:28:36 UTC (rev 458)
@@ -4,7 +4,7 @@
|* Licensed under the GNU General Public License (*) *|
|* *|
|* (*) Complete information is provided at the following URL: *|
-|* [ http://motorsport-sim.org/svn/trunk/doc/LICENSE ] *|
+|* [ https://svn.sourceforge.net/svnroot/motorsport/trunk/doc/LICENSE ] *|
\*****************************************************************************/
#ifndef WORLD_HPP
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st...@us...> - 2006-09-12 03:22:49
|
Revision: 457
http://svn.sourceforge.net/motorsport/?rev=457&view=rev
Author: stenyak
Date: 2006-09-11 20:22:37 -0700 (Mon, 11 Sep 2006)
Log Message:
-----------
Added some concepts and sketches to developers documentation directory.
Added Paths:
-----------
trunk/doc/developer/concepts/
trunk/doc/developer/concepts/editor
trunk/doc/developer/concepts/input
trunk/doc/developer/concepts/params
trunk/doc/developer/concepts/structure
Added: trunk/doc/developer/concepts/editor
===================================================================
--- trunk/doc/developer/concepts/editor (rev 0)
+++ trunk/doc/developer/concepts/editor 2006-09-12 03:22:37 UTC (rev 457)
@@ -0,0 +1,33 @@
+requisitos:
+ poder modificar graficos on the fly y recargar sin perder datos
+ frame de nodos jerarquico:
+ -objetos hijo (shared, sub, include, normal). cada uno con un icono diferenciador. cada tipo de objeto con un icono tb (wheel, body, etc).
+ -links
+ -propiedades de cosa seleccionada: baseobjects? (o meterlo en nodos?), path origen (xml, include, etc.), etc...
+ -preview 3d en tiempo real.
+ -importador de dotscene o blender o algo asi.
+ mostrar nodos deprecaos, nuevos, cambiados, permitir elegir (a\xF1adir, quitar, reemplazar, omitir)
+ -guardar/abrir mosp xml
+ -mostrar/ocultar elementos shared/include, links, etc.
+ -metadata generico: descripcion, autor(es)
+
+ -preview
+ -tree view
+ -properties
+ toolbar
+ -links
+
+
+ _________________________________
+ / toolbar \
+ |--------------------|------------|
+ | preview | links/tree |
+ | | |
+ | | |
+ | | |
+ | | |
+ | |------------|
+ | | properties |
+ | | |
+ | | |
+ \____________________|____________/
Added: trunk/doc/developer/concepts/input
===================================================================
--- trunk/doc/developer/concepts/input (rev 0)
+++ trunk/doc/developer/concepts/input 2006-09-12 03:22:37 UTC (rev 457)
@@ -0,0 +1,37 @@
+-------------------------------------------------------------------------
+driver 0: none | driver 1: computer 01 | driver 2: stenyak |
+item value | item value | item value |
+gas pedal 0 | gas pedal 0 | gas pedal 0 |
+brake pedal 0 | brake pedal 0 | brake pedal 0 |
+clutch pedal 0 | clutch pedal 0 | clutch pedal 0 |
+steering wheel 0.5 | steering wheel 0.5 | steering wheel 0.5 |
+gearUp 0 | gearUp 1 | gearUp 1 |
+gearDown 0 | gearDown 0 | gearDown 0 |
+handbrake 1 | handbrake 0 | handbrake 0 |
+----------------------------------------------------------------------------------------------------------------------------------------------
+binding 0: keyboard | binding 1: saitek r440 ffb | binding 2: stenyak |
+item bindings | item bindings | item bindings |
+gas pedal key(num1)*0.33,key(num4)*0.66,key(num7),key(up) | gas pedal (joyaxis(1)-0.5)*2 | gas pedal saitek r440 ffb |
+brake pedal key(num2)*0.33,key(num5)*0.66,key(num8),key(down) | brake pedal (0.5-joyaxis(1))*2 | brake pedal saitek r440 ffb |
+clutch pedal key(num3)*0.33,key(num6)*0.66,key(num9),key(q) | clutch pedal joybutton(0) | clutch pedal ai(generic) |
+steering wheel 0.5+(key(right)*0.5)-(key(left)*0.5) | steering wheel joyaxis(2) | steering wheel saitek r440 ffb |
+gearUp key(a),key(t) | gearUp joybutton(1) | gearUp saitek r440 ffb |
+gearDown key(z),key(b) | gearDown joybutton(3) | gearDown saitek r440 ffb |
+handbrake key(space) | handbrake joybutton(2) | handbrake joybutton(1) |
+----------------------------------------------------------------------------------------------------------------------------------------------
+vehicle 01 driver:binding(user)
+vehicle 02 driver:ai(default) (random generic?, drag, rally, oval, ...)
+maybe choose the correct one according to area where the vehicle is put?
+
+tokens:
+key(identifier)
+joyaxis(number)
+joybutton(number)
+* + / - ,
+()
+
+[------------------] [ ][ ]
+ left x right y brake gas brake gas
+[########][--------] 0.0 0.5+(y*0.5)-(x*0.5) [###---------------] (0.5-x)*2 0
+[--------][--------] 0.5 0.5+(y*0.5)-(x*0.5) [#########---------] (0.5-x)*2 (x-0.5)*2
+[--------][########] 0.0 0.5+(y*0.5)-(x*0.5) [#############-----] 0 (x-0.5)*2
Added: trunk/doc/developer/concepts/params
===================================================================
--- trunk/doc/developer/concepts/params (rev 0)
+++ trunk/doc/developer/concepts/params 2006-09-12 03:22:37 UTC (rev 457)
@@ -0,0 +1,22 @@
+param steering rod distance in
+
+param steering rod distance in
+
+param gas cable distance
+drivemass out
+
+drivemass in
+drivemass out left
+drivemass out right
+(hub)>
+drivemass in
+drivemass out
+
+param brake pressure
+drivemass in
+drivemass out
+
+param gear up
+param gear down
+
+param clutch distance
Added: trunk/doc/developer/concepts/structure
===================================================================
--- trunk/doc/developer/concepts/structure (rev 0)
+++ trunk/doc/developer/concepts/structure 2006-09-12 03:22:37 UTC (rev 457)
@@ -0,0 +1,26 @@
+<object>
+ <sharedobject>
+ <object/>
+ </sharedobject>
+
+ <subobject>
+ <object/>
+ </subobject>
+
+ <baseobject>
+ <mesh scale/> <box/> <capsule/> <sphere/>
+ <mass/> <density/>
+ <scale/>
+ <collision/>
+ <visible/>
+ <rendermode????/>
+ <location/>
+ </baseobject>
+
+ <location/>
+
+ <link>
+ <hinge1/> <fixed/> <proportional/>
+ </link>
+
+</object>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st...@us...> - 2006-09-12 02:46:20
|
Revision: 456
http://svn.sourceforge.net/motorsport/?rev=456&view=rev
Author: stenyak
Date: 2006-09-11 19:45:51 -0700 (Mon, 11 Sep 2006)
Log Message:
-----------
Moved ground plane and skybox to World class. This means there's only one of each per world now: one skybox and one ground plane.
Ability to load several areas per world. All of them are loaded at position 0,0,0 though. Camera director uses the last area in the objects container when choosing cameras.
Removed the need to have one area named 'main'; any names can now be used for each area.
Moved sky and ground data files from each area dir to to data/areas.
Added commented example on how to use several areas and several vehicles. It also shows how to position a vehicle on any grid of any area.
Updated area.xml and world xml files to the new format.
Modified Paths:
--------------
trunk/data/areas/mospland/area.xml
trunk/data/areas/testingGround/area.xml
trunk/data/worlds/default.xml
trunk/src/graphics.cpp
trunk/src/todo
trunk/src/world/area.cpp
trunk/src/world/area.hpp
trunk/src/world/world.cpp
trunk/src/world/world.hpp
Added Paths:
-----------
trunk/data/areas/ground.material
trunk/data/areas/ground.png
trunk/data/areas/skybox.material
Removed Paths:
-------------
trunk/data/areas/testingGround/ground.material
trunk/data/areas/testingGround/ground.png
trunk/data/areas/testingGround/skybox.material
Copied: trunk/data/areas/ground.material (from rev 450, trunk/data/areas/testingGround/ground.material)
===================================================================
--- trunk/data/areas/ground.material (rev 0)
+++ trunk/data/areas/ground.material 2006-09-12 02:45:51 UTC (rev 456)
@@ -0,0 +1,18 @@
+material groundMaterial
+{
+ receive_shadows on
+ technique
+ {
+ pass
+ {
+ ambient 0.5 0.5 0.5
+ 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 ground.png
+ }
+ }
+ }
+}
Copied: trunk/data/areas/ground.png (from rev 450, trunk/data/areas/testingGround/ground.png)
===================================================================
(Binary files differ)
Modified: trunk/data/areas/mospland/area.xml
===================================================================
--- trunk/data/areas/mospland/area.xml 2006-09-12 00:52:02 UTC (rev 455)
+++ trunk/data/areas/mospland/area.xml 2006-09-12 02:45:51 UTC (rev 456)
@@ -12,12 +12,7 @@
checkpointPosition="-166 -152 5"
checkpointRadius="10.0"
>
- <ground
- name="ground"
- position="3.000000 0.000000 0.000000"
- rotation="1.000000 0.000000 0.000000 0.000000"
- height="-10.0"
- >
+ <ground>
<mesh
name="Curve.031"
position="0.000000 0.000000 0.000000"
@@ -194,16 +189,6 @@
file="Plane.009.mesh"
/>
</ground>
- <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"
- />
<parts
name="parts"
position="3.000000 -2.000000 0.000000"
Copied: trunk/data/areas/skybox.material (from rev 450, trunk/data/areas/testingGround/skybox.material)
===================================================================
--- trunk/data/areas/skybox.material (rev 0)
+++ trunk/data/areas/skybox.material 2006-09-12 02:45:51 UTC (rev 456)
@@ -0,0 +1,16 @@
+material skyboxMaterial
+{
+ technique
+ {
+ pass
+ {
+ lighting off
+ depth_write off
+ texture_unit
+ {
+ cubic_texture mospSky.jpg separateUV
+ tex_address_mode clamp
+ }
+ }
+ }
+}
Modified: trunk/data/areas/testingGround/area.xml
===================================================================
--- trunk/data/areas/testingGround/area.xml 2006-09-12 00:52:02 UTC (rev 455)
+++ trunk/data/areas/testingGround/area.xml 2006-09-12 02:45:51 UTC (rev 456)
@@ -11,17 +11,8 @@
checkpointPosition = "0 0 10"
checkpointRadius = "5"
>
- <ground
- name="ground"
- height = "0.0"
- >
+ <ground>
</ground>
- <sky
- materialName = "skyboxMaterial"
- distance = "5000"
- drawFirst = "true"
- >
- </sky>
<parts>
<cone
position = "15 5 2"
Deleted: trunk/data/areas/testingGround/ground.material
===================================================================
--- trunk/data/areas/testingGround/ground.material 2006-09-12 00:52:02 UTC (rev 455)
+++ trunk/data/areas/testingGround/ground.material 2006-09-12 02:45:51 UTC (rev 456)
@@ -1,18 +0,0 @@
-material groundMaterial
-{
- receive_shadows on
- technique
- {
- pass
- {
- ambient 0.5 0.5 0.5
- 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 ground.png
- }
- }
- }
-}
Deleted: trunk/data/areas/testingGround/ground.png
===================================================================
(Binary files differ)
Deleted: trunk/data/areas/testingGround/skybox.material
===================================================================
--- trunk/data/areas/testingGround/skybox.material 2006-09-12 00:52:02 UTC (rev 455)
+++ trunk/data/areas/testingGround/skybox.material 2006-09-12 02:45:51 UTC (rev 456)
@@ -1,16 +0,0 @@
-material skyboxMaterial
-{
- technique
- {
- pass
- {
- lighting off
- depth_write off
- texture_unit
- {
- cubic_texture mospSky.jpg separateUV
- tex_address_mode clamp
- }
- }
- }
-}
Modified: trunk/data/worlds/default.xml
===================================================================
--- trunk/data/worlds/default.xml 2006-09-12 00:52:02 UTC (rev 455)
+++ trunk/data/worlds/default.xml 2006-09-12 02:45:51 UTC (rev 456)
@@ -4,12 +4,14 @@
description = "Drive the Mosp1 car in the testing grounds!"
useAreaCamera ="false"
gravityX = "0.0" gravityY = "0.0" gravityZ = "-9.8"
+ skyMaterialName="skyboxMaterial"
+ skyDistance="5000.0"
+ skyDrawFirst="1"
+ height="0.0"
>
</customData>
<sharedobject name="main"><area
- __model="mosptracing"
model="testingGround"
- _model="mospland2006.r7"
>
</area></sharedobject>
<sharedobject name="main"><vehicle
@@ -17,6 +19,17 @@
_model="quattros1"
>
</vehicle></sharedobject>
+ <!--<sharedobject name="secondary"><area
+ model="mosptracing"
+ _model="mospland2006.r7"
+ >
+ </area></sharedobject>
+ <sharedobject name="secondcar"><vehicle
+ model="mosp1"
+ _model="quattros1"
+ >
+ </vehicle></sharedobject>
+ <location-vehicle first="(area)main/grid01" second="(vehicle)secondcar" />-->
<location-vehicle first="(area)main/paceCar" second="(vehicle)main" />
<vehicle-driver first="(vehicle)main" second="user" />
</world>
Modified: trunk/src/graphics.cpp
===================================================================
--- trunk/src/graphics.cpp 2006-09-12 00:52:02 UTC (rev 455)
+++ trunk/src/graphics.cpp 2006-09-12 02:45:51 UTC (rev 456)
@@ -164,15 +164,6 @@
World::get()->stepGraphics();
- // Update infinite plane position according to vehicle position
- Ogre::Vector3 areaPos (World::get()->getArea("main")->planeNode->getPosition());
- Vector3d vehiclePos (World::get()->getVehicle("main")->getPosition());
- Vector3d diff (areaPos.x - vehiclePos.x, areaPos.y - vehiclePos.y, areaPos.z - vehiclePos.z);
- const double tile = 1000.0 / 20.0;
- if (diff.x > tile || diff.x < -tile) areaPos.x -= int ((diff.x) / (tile)) * (tile);
- if (diff.y > tile || diff.y < -tile) areaPos.y -= int ((diff.y) / (tile)) * (tile);
- World::get()->getArea("main")->planeNode->setPosition(areaPos);
-
// Update area shadows state
World::get()->getArea("main")->setCastShadows(castAreaShadows);
Modified: trunk/src/todo
===================================================================
--- trunk/src/todo 2006-09-12 00:52:02 UTC (rev 455)
+++ trunk/src/todo 2006-09-12 02:45:51 UTC (rev 456)
@@ -1,5 +1,6 @@
update copyright headers url!!!!!!!!
autosleep using averaged positions/velocities
+new suspension spring+damper can't rotate properly yet, lacks a joint or 2 at the ends.
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
Modified: trunk/src/world/area.cpp
===================================================================
--- trunk/src/world/area.cpp 2006-09-12 00:52:02 UTC (rev 455)
+++ trunk/src/world/area.cpp 2006-09-12 02:45:51 UTC (rev 456)
@@ -33,7 +33,7 @@
setPath(Paths::area(areaName));
setXmlPath(Paths::areaXml(areaName));
Ogre::ResourceGroupManager::getSingleton().addResourceLocation(getPath(), "FileSystem", "areas." + areaName);
- Ogre::ResourceGroupManager::getSingleton().addResourceLocation(getPath() + "skybox.zip", "Zip", "areas."+areaName);
+ //Ogre::ResourceGroupManager::getSingleton().addResourceLocation(getPath() + "skybox.zip", "Zip", "areas."+areaName);
Ogre::ResourceGroupManager::getSingleton().initialiseResourceGroup("areas." + areaName);
XmlTag * tag = new XmlTag (getXmlPath());
construct (tag);
@@ -48,12 +48,7 @@
{
Vector3d checkpointPosition (0, 0, 0);
double checkpointRadius = 5;
- double groundHeight = 0.0;
std::string mesh = "none";
- std::string groundMaterialName = "groundMaterial";
- std::string skyMaterialName = "skyboxMaterial";
- double skyDistance = 5000.0;
- bool skyDrawFirst = true;
setName ( tag->getAttribute("name"));
description = tag->getAttribute("description");
@@ -66,7 +61,6 @@
{
if (t->getName() == "ground")
{
- groundHeight = stod (t->getAttribute("height"));
pOgreObjectData ogreData(new OgreObjectData);
ogreData->meshPath = "";
//create main mesh
@@ -106,12 +100,6 @@
}
}
}
- if (t->getName() == "sky")
- {
- skyMaterialName = t->getAttribute("materialName");
- skyDistance = stod(t->getAttribute("distance"));
- skyDrawFirst = stob (t->getAttribute("drawFirst"));
- }
if (t->getName() == "parts")
{
Vector3d position(0,0,0);
@@ -140,30 +128,11 @@
}
}
log->loadscreen (LOG_CCREATOR, "Creating the area ground");
- log->__format (LOG_DEVELOPER, "Creating the ode plane");
- dCreatePlane (World::get()->spaceID, 0, 0, 1, groundHeight);
- log->__format (LOG_DEVELOPER, "Creating the ogre plane");
- Ogre::Plane plane;
- plane.normal = Ogre::Vector3(0,0,1);
- plane.d = -groundHeight;
- Ogre::SceneManager* pOgreSceneManager = System::get()->ogreSceneManager;
- Ogre::MeshManager::getSingleton().createPlane("Ground plane", "general", plane, 1000,1000,1,1,true,1,20,20,Ogre::Vector3::UNIT_Y);
- planeEntity = pOgreSceneManager->createEntity("plane", "Ground plane");
- planeEntity->setMaterialName(groundMaterialName.c_str());
- planeNode = pOgreSceneManager->getRootSceneNode()->createChildSceneNode();
- planeNode->attachObject(planeEntity);
areaBodyID = dBodyCreate (World::get()->ghostWorldID);
positionCameras(areaBodyID);
System::get()->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));
- System::get()->ogreSceneManager->setSkyBox (true, skyMaterialName.c_str(), skyDistance, skyDrawFirst, rotationToZAxis);
- System::get()->ogreWindow->update ();
-
// create the checkpoint sphere
dGeomID checkpointID = dCreateSphere (World::get()->spaceID, checkpointRadius);
dGeomSetBody (checkpointID, 0);
@@ -176,7 +145,6 @@
void Area::setCastShadows(bool castShadows)
{
- planeEntity->setCastShadows(castShadows);
//UNCOMMENT ME
//if (areaEntity != 0) areaEntity->setCastShadows(castShadows);
}
Modified: trunk/src/world/area.hpp
===================================================================
--- trunk/src/world/area.hpp 2006-09-12 00:52:02 UTC (rev 455)
+++ trunk/src/world/area.hpp 2006-09-12 02:45:51 UTC (rev 456)
@@ -42,8 +42,6 @@
dBodyID areaBodyID;
pCamera getClosestCamera(Vector3d location);
- Ogre::SceneNode * planeNode;
- Ogre::Entity * planeEntity;
void setCastShadows(bool castShadows);
void setRenderDetail(int renderMode);
};
Modified: trunk/src/world/world.cpp
===================================================================
--- trunk/src/world/world.cpp 2006-09-12 00:52:02 UTC (rev 455)
+++ trunk/src/world/world.cpp 2006-09-12 02:45:51 UTC (rev 456)
@@ -96,6 +96,7 @@
{
description = tag->getAttribute("description");
+ //create ode world
log->__format ( LOG_DEVELOPER, "Setting ODE world gravity");
double gravityX = stod(tag->getAttribute("gravityX"));
double gravityY = stod(tag->getAttribute("gravityY"));
@@ -103,12 +104,54 @@
dWorldSetGravity (worldID, gravityX, gravityY, gravityZ);
dWorldSetGravity (ghostWorldID, 0, 0, 0);
+ //create sky box
+ std::string skyMaterialName = tag->getAttribute("skyMaterialName");
+ double skyDistance = stod(tag->getAttribute("skyDistance"));
+ bool skyDrawFirst = stob (tag->getAttribute("skyDrawFirst"));
+ log->loadscreen (LOG_CCREATOR, "Creating the area sky");
+ Ogre::Quaternion rotationToZAxis;
+ rotationToZAxis.FromRotationMatrix (Ogre::Matrix3 (1, 0, 0, 0, 0, -1, 0, 1, 0));
+ System::get()->ogreSceneManager->setSkyBox (true, skyMaterialName.c_str(), skyDistance, skyDrawFirst, rotationToZAxis);
+ System::get()->ogreWindow->update ();
+
+ //create ground plane
+ double groundHeight = 0.0;
+ std::string groundMaterialName = "groundMaterial";
+ groundHeight = stod (tag->getAttribute("height"));
+
+ log->__format (LOG_DEVELOPER, "Creating the ode plane");
+ dCreatePlane (World::get()->spaceID, 0, 0, 1, groundHeight);
+
+ log->__format (LOG_DEVELOPER, "Creating the ogre plane");
+ Ogre::Plane plane;
+ plane.normal = Ogre::Vector3(0,0,1);
+ plane.d = -groundHeight;
+ Ogre::SceneManager* pOgreSceneManager = System::get()->ogreSceneManager;
+ Ogre::MeshManager::getSingleton().createPlane("Ground plane", "general", plane, 1000,1000,1,1,true,1,20,20,Ogre::Vector3::UNIT_Y);
+ planeEntity = pOgreSceneManager->createEntity("plane", "Ground plane");
+ planeEntity->setMaterialName(groundMaterialName.c_str());
+ planeNode = pOgreSceneManager->getRootSceneNode()->createChildSceneNode();
+ planeNode->attachObject(planeEntity);
+ System::get()->ogreWindow->update ();
+
+ //set cameras
bool useAreaCamera = true; //if false, use vehicle camera
useAreaCamera = stob(tag->getAttribute("useAreaCamera"));
// set active camera
log->loadscreen (LOG_DEVELOPER, "Setting camera viewport");
- if (useAreaCamera) setActiveCamera (getArea("main")->getCamera("main"));
- else setActiveCamera (getVehicle("main")->getCamera("main"));
+ if (useAreaCamera)
+ {
+ WorldObjectsIt i = objects.begin();
+ for(;i != objects.end(); i++)
+ {
+ if (pArea tmp = boost::dynamic_pointer_cast<Area>(i->second))
+ {
+ setActiveCamera (tmp->getCamera("main"));
+ }
+ }
+ } else {
+ setActiveCamera (getVehicle("main")->getCamera("main"));
+ }
}
void World::processXmlRootNode (XmlTag * tag)
@@ -140,7 +183,14 @@
}
constructFromTag(tag);
// initialize cameras (pointing to car 0 by default)
- getArea("main")->pointCameras(getVehicle("main"));
+ WorldObjectsIt i = objects.begin();
+ for(;i != objects.end(); i++)
+ {
+ if (pArea tmp = boost::dynamic_pointer_cast<Area>(i->second))
+ {
+ tmp->pointCameras(getVehicle("main"));
+ }
+ }
}
void World::setActiveCamera (pCamera camera)
{
@@ -158,14 +208,38 @@
void World::stepGraphics()
{
WorldObject::stepGraphics();
+
+ // Update infinite plane position according to vehicle position
+ Ogre::Vector3 areaPos (planeNode->getPosition());
+ Vector3d vehiclePos (World::get()->getVehicle("main")->getPosition());
+ Vector3d diff (areaPos.x - vehiclePos.x, areaPos.y - vehiclePos.y, areaPos.z - vehiclePos.z);
+ const double tile = 1000.0 / 20.0;
+ if (diff.x > tile || diff.x < -tile) areaPos.x -= int ((diff.x) / (tile)) * (tile);
+ if (diff.y > tile || diff.y < -tile) areaPos.y -= int ((diff.y) / (tile)) * (tile);
+ planeNode->setPosition(areaPos);
+
if (cameraDirector == true)
{
- setActiveCamera( getArea("main")->getClosestCamera(getVehicle("main")->getPosition()));
+ WorldObjectsIt i = objects.begin();
+ for(;i != objects.end(); i++)
+ {
+ if (pArea tmp = boost::dynamic_pointer_cast<Area>(i->second))
+ {
+ setActiveCamera( tmp->getClosestCamera(getVehicle("main")->getPosition()));
+ }
+ }
}
}
void World::switchNextAreaCamera()
{
- setActiveCamera (getArea("main")->switchNextCamera());
+ WorldObjectsIt i = objects.begin();
+ for(;i != objects.end(); i++)
+ {
+ if (pArea tmp = boost::dynamic_pointer_cast<Area>(i->second))
+ {
+ setActiveCamera (tmp->switchNextCamera());
+ }
+ }
cameraDirector = false;
}
void World::switchNextVehicleCamera()
Modified: trunk/src/world/world.hpp
===================================================================
--- trunk/src/world/world.hpp 2006-09-12 00:52:02 UTC (rev 455)
+++ trunk/src/world/world.hpp 2006-09-12 02:45:51 UTC (rev 456)
@@ -25,6 +25,8 @@
private:
static pWorld world;
static std::string newWorld;
+ Ogre::SceneNode * planeNode;
+ Ogre::Entity * planeEntity;
std::string description;
pCamera activeCamera;
bool cameraDirector;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st...@us...> - 2006-09-12 00:52:23
|
Revision: 455
http://svn.sourceforge.net/motorsport/?rev=455&view=rev
Author: stenyak
Date: 2006-09-11 17:52:02 -0700 (Mon, 11 Sep 2006)
Log Message:
-----------
Added option to use new spring-damper code in double wishbone suspension using the USE_PRISMATIC constant. Old code used by default, till new one is stable.
Body class ported to the new xml format.
Added some comments.
Modified Paths:
--------------
trunk/data/vehicles/mosp1/vehicle.xml
trunk/data/worlds/default.xml
trunk/src/common/worldObject.cpp
trunk/src/todo
trunk/src/vehicle/body.cpp
trunk/src/vehicle/engine.cpp
trunk/src/vehicle/suspension.cpp
trunk/src/vehicle/suspension.hpp
trunk/src/world/area.cpp
Modified: trunk/data/vehicles/mosp1/vehicle.xml
===================================================================
--- trunk/data/vehicles/mosp1/vehicle.xml 2006-08-07 01:03:16 UTC (rev 454)
+++ trunk/data/vehicles/mosp1/vehicle.xml 2006-09-12 00:52:02 UTC (rev 455)
@@ -3,7 +3,11 @@
<customData name="Mosp1" description="The first official Motorsport vehicle. Made by Habalux, it started its life as a quick draft made in just a couple of hours. It was then remade and improved in a period of several days, to end up as what it is now: a RWD, possibly V8, possibly race-tuned car." author="Habalux, STenyaK" contact="habalux AT gmail DOT com, stenyak AT gmx DOT net" license="Creative Commons Attribution-NonCommercial-ShareAlike License">
</customData>
<subobject name="main"><body>
- <customData length="4.66" width="2.08" height="1.2" mass="1224.0" dragCoefficient="0.3" frontalArea="1.5"/>
+ <customData dragCoefficient="0.3" frontalArea="1.5"/>
+ <rigidBody name="main body">
+ <totalMass value="1224.0"/>
+ <body size = "4.66 2.08 1.2"/>
+ </rigidBody>
<graphicsMesh name="main body" file="body.mesh" scale="1 1 1" position="0 0 0" rotation="0 0 0"/>
</body></subobject>
<subobject name="clutch"><pedal>
Modified: trunk/data/worlds/default.xml
===================================================================
--- trunk/data/worlds/default.xml 2006-08-07 01:03:16 UTC (rev 454)
+++ trunk/data/worlds/default.xml 2006-09-12 00:52:02 UTC (rev 455)
@@ -7,8 +7,8 @@
>
</customData>
<sharedobject name="main"><area
- model="mosptracing"
- __model="testingGround"
+ __model="mosptracing"
+ model="testingGround"
_model="mospland2006.r7"
>
</area></sharedobject>
Modified: trunk/src/common/worldObject.cpp
===================================================================
--- trunk/src/common/worldObject.cpp 2006-08-07 01:03:16 UTC (rev 454)
+++ trunk/src/common/worldObject.cpp 2006-09-12 00:52:02 UTC (rev 455)
@@ -610,11 +610,12 @@
if (t->getName() == "rigidBody")
{
pPartOdeData data(new PartOdeData);
+ pBodyOdeData bdata(new BodyOdeData);
XmlTag * u = t->getTag(0); for (int j = 0; j < t->nTags(); u = t->getTag(++j))
{
if (u->getName() == "totalMass")
{
- data->mass = stod(u->getAttribute("value"));
+ bdata->mass = data->mass = stod(u->getAttribute("value"));
}
if (u->getName() == "box")
{
@@ -635,9 +636,24 @@
if (u->getAttribute("directionAxis") == "y") data->directionAxis = 2;
if (u->getAttribute("directionAxis") == "z") data->directionAxis = 3;
}
+ if (u->getName() == "body")
+ {
+ data->shape = u->getName();
+ Vector3d size (u->getAttribute("size"));
+ bdata->length = size.x;
+ bdata->width = size.y;
+ bdata->height = size.z;
+ }
}
if (data->shape == "none") log->__format(LOG_ERROR, "No physics shape specified for this part.");
- odeObjects[getId()] = pOdeObject(new OdeObject(this, data, getId()));
+ if (data->shape == "body")
+ {
+ odeObjects[getId()] = pOdeObject(new OdeObject(this, bdata, getId()));
+ }
+ else
+ {
+ odeObjects[getId()] = pOdeObject(new OdeObject(this, data, getId()));
+ }
}
}
t = tag->getTag(0); for (int i = 0; i < tag->nTags(); t = tag->getTag(++i))
Modified: trunk/src/todo
===================================================================
--- trunk/src/todo 2006-08-07 01:03:16 UTC (rev 454)
+++ trunk/src/todo 2006-09-12 00:52:02 UTC (rev 455)
@@ -1,3 +1,5 @@
+update copyright headers url!!!!!!!!
+autosleep using averaged positions/velocities
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
Modified: trunk/src/vehicle/body.cpp
===================================================================
--- trunk/src/vehicle/body.cpp 2006-08-07 01:03:16 UTC (rev 454)
+++ trunk/src/vehicle/body.cpp 2006-09-12 00:52:02 UTC (rev 455)
@@ -25,15 +25,8 @@
}
void Body::readCustomDataTag(XmlTag * tag)
{
- pBodyOdeData data(new BodyOdeData);
- data->length = stod (tag->getAttribute("length"));
- data->width = stod (tag->getAttribute("width"));
- data->height = stod (tag->getAttribute("height"));
- data->mass = stod (tag->getAttribute("mass"));
frontalArea = stod (tag->getAttribute("frontalArea"));
- if (frontalArea == 0) frontalArea = data->width * data->height * 0.6;
dragCoefficient = stod (tag->getAttribute("dragCoefficient"));
- odeObjects[getName()] = pOdeObject(new OdeObject(this, data, getName()));
}
Body::Body (XmlTag * tag)
:WorldObject("body")
Modified: trunk/src/vehicle/engine.cpp
===================================================================
--- trunk/src/vehicle/engine.cpp 2006-08-07 01:03:16 UTC (rev 454)
+++ trunk/src/vehicle/engine.cpp 2006-09-12 00:52:02 UTC (rev 455)
@@ -79,6 +79,7 @@
angularAcc = (inputAngularVel-prevAngularVel)/ dt;
outputAngularVel = inputAngularVel; */
//log->__format(LOG_DEVELOPER, "engineTorque=%f(Nm) angAcc=%f engspeed=%f(rad/s)", engineTorque, angularAcc, inputAngularVel);
+ log->__format(LOG_WARNING, "EngineTorque: %f Gas: %f", engineTorque, gas);
telemetryTorque = engineTorque;
inputTorqueTransfer = 0;
outputTorqueTransfer = 0;
Modified: trunk/src/vehicle/suspension.cpp
===================================================================
--- trunk/src/vehicle/suspension.cpp 2006-08-07 01:03:16 UTC (rev 454)
+++ trunk/src/vehicle/suspension.cpp 2006-09-12 00:52:02 UTC (rev 455)
@@ -21,6 +21,8 @@
#include "SDL/SDL_keysym.h"
#include <cmath>
+#define USE_PRISMATIC false
+
Suspension::Suspension (std::string name)
: WorldObject(name)
{
@@ -409,11 +411,14 @@
dJointSetHinge2Axis2 (axisJoint, rAxis2.x, rAxis2.y, rAxis2.z);
log->__format (LOG_DEVELOPER, "Axis2 = %f, %f, %f.", rAxis2.x, rAxis2.y, rAxis2.z);
- //create spring-damper joint
- // sdamper = dJointCreateSlider(World::get()->worldID, 0);
- //dJointAttach( sdamper, base->getMainOdeObject()->getBodyID(), odeObjects["uprightBone"]->getBodyID() );
- //dJointSetSliderAxis (sdamper, 0,dirMult*0.66,0.66);
- //dJointSetSliderAxis (sdamper, forceDirection[0], forceDirection[1], forceDirection[2]);
+ //create spring-damper joint ------------------------------------------
+ if (USE_PRISMATIC)
+ {
+ sdamper = dJointCreateSlider(World::get()->worldID, 0);
+ dJointAttach( sdamper, base->getMainOdeObject()->getBodyID(), odeObjects["uprightBone"]->getBodyID() );
+ dJointSetSliderAxis (sdamper, 0,dirMult*0.66,0.66);
+ //dJointSetSliderAxis (sdamper, forceDirection[0], forceDirection[1], forceDirection[2]);
+ }
}
void DoubleWishbone::stepPhysics()
{
@@ -440,18 +445,19 @@
f -= v*damperFastRebound;
dVector3 forceDirection;
- int i;
- for (i=0;i<3;++i)
- forceDirection[i] = f*(chassisHingePos[i]-boneHingePos[i])/x;
+ for (int i=0;i<3;++i) forceDirection[i] = f*(chassisHingePos[i]-boneHingePos[i])/x;
+ if (USE_PRISMATIC)
+ {
+ dJointSetSliderAxis (sdamper, forceDirection[0], forceDirection[1], forceDirection[2]);
+ dJointAddSliderForce (sdamper, f/100.0);
+ double h = System::get()->getDesiredPhysicsTimestep();
+ dJointSetSliderParam (sdamper, dParamSuspensionERP, h * springStiffness / (h * springStiffness + damperFastBump));
+ dJointSetSliderParam (sdamper, dParamSuspensionCFM, 1 / (h * springStiffness + damperFastBump));
+ } else {
+ dBodyAddForceAtPos(odeObjects["upperBone"]->getBodyID(), forceDirection[0], forceDirection[1], forceDirection[2], chassisHingePos[0], chassisHingePos[1], chassisHingePos[2]);
+ dBodyAddForceAtPos(odeObjects["lowerBone"]->getBodyID(), -forceDirection[0], -forceDirection[1], -forceDirection[2], boneHingePos[0], boneHingePos[1], boneHingePos[2]);
+ }
- //double h = System::get()->getDesiredPhysicsTimestep();
- //dJointSetSliderParam (sdamper, dParamSuspensionERP, h * springStiffness / (h * springStiffness + damperFastBump));
- //dJointSetSliderParam (sdamper, dParamSuspensionCFM, 1 / (h * springStiffness + damperFastBump));
- dBodyAddForceAtPos(odeObjects["upperBone"]->getBodyID(), forceDirection[0], forceDirection[1], forceDirection[2],
- chassisHingePos[0], chassisHingePos[1], chassisHingePos[2]);
- dBodyAddForceAtPos(odeObjects["lowerBone"]->getBodyID(), -forceDirection[0], -forceDirection[1], -forceDirection[2],
- boneHingePos[0], boneHingePos[1], boneHingePos[2]);
-
springOldx = x;
}
double DoubleWishbone::getRate()
Modified: trunk/src/vehicle/suspension.hpp
===================================================================
--- trunk/src/vehicle/suspension.hpp 2006-08-07 01:03:16 UTC (rev 454)
+++ trunk/src/vehicle/suspension.hpp 2006-09-12 00:52:02 UTC (rev 455)
@@ -92,7 +92,7 @@
double getSteeringAngle();
bool right;
- //dJointID sdamper;
+ dJointID sdamper;
dJointID upperJoint;
dJointID lowerJoint;
dJointID axisJoint;
Modified: trunk/src/world/area.cpp
===================================================================
--- trunk/src/world/area.cpp 2006-08-07 01:03:16 UTC (rev 454)
+++ trunk/src/world/area.cpp 2006-09-12 00:52:02 UTC (rev 455)
@@ -96,6 +96,7 @@
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");
+ //FIXME: keep the vertex data somewhere; ODE doesn't keep a copy of the trimesh data!!
#if defined(dSINGLE)
dGeomTriMeshDataBuildSingle (ground, vertices, sizeof (dVector3), vertex_count, indices, index_count, 3 * sizeof (unsigned int));
#else
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st...@us...> - 2006-08-07 01:03:46
|
Revision: 454 Author: stenyak Date: 2006-08-06 18:03:16 -0700 (Sun, 06 Aug 2006) ViewCVS: http://svn.sourceforge.net/motorsport/?rev=454&view=rev Log Message: ----------- Added a seventh gear to Mosp1 vehicle. Refactored "Part" class physics into generic tag <rigidBody> that can now be used by any World Object instance. It currently has support for a total mass value, and a collision shape (box, sphere or capsule). Upgraded all 3 existing parts xml files to the new format. Modified Paths: -------------- trunk/cfg/graphicsConfig.xml trunk/data/parts/cone/part.xml trunk/data/parts/cube/part.xml trunk/data/parts/metalStand/part.xml trunk/data/vehicles/mosp1/vehicle.xml trunk/data/worlds/default.xml trunk/src/common/worldObject.cpp trunk/src/world/part.cpp Modified: trunk/cfg/graphicsConfig.xml =================================================================== --- trunk/cfg/graphicsConfig.xml 2006-07-27 18:37:03 UTC (rev 453) +++ trunk/cfg/graphicsConfig.xml 2006-08-07 01:03:16 UTC (rev 454) @@ -17,11 +17,11 @@ anisotropy = "1" filtering = "TFO_BILINEAR" _shadowTechnique = "SHADOWTYPE_NONE" - shadowTechnique = "SHADOWTYPE_STENCIL_MODULATIVE" + ___shadowTechnique = "SHADOWTYPE_STENCIL_MODULATIVE" __shadowTechnique = "SHADOWTYPE_STENCIL_ADDITIVE" - ___shadowTechnique = "SHADOWTYPE_TEXTURE_MODULATIVE" - width = "800" - height = "600" + shadowTechnique = "SHADOWTYPE_TEXTURE_MODULATIVE" + width = "1024" + height = "768" bpp = "0" renderer = "OpenGL" defaultNumMipmaps = "5" Modified: trunk/data/parts/cone/part.xml =================================================================== --- trunk/data/parts/cone/part.xml 2006-07-27 18:37:03 UTC (rev 453) +++ trunk/data/parts/cone/part.xml 2006-08-07 01:03:16 UTC (rev 454) @@ -1,22 +1,14 @@ <?xml version="1.0" encoding="ISO-8859-1"?> <part xmlns:xi="http://www.w3.org/2001/XInclude"> - <customData 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." mass = "3"> - <box - size = "0.5 0.5 0.8" - > - </box> -<!-- - <sphere - radius = "2" - > - </sphere> - <cappedCylinder - length = "2" - radius = "1" - directionAxis = "z" - > - </cappedCylinder> ---> + <customData 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."> </customData> + <rigidBody name="cone"> + <totalMass value="3"/> + <box size = "0.5 0.5 0.8"/> + <!-- + <sphere radius = "2"/> + <cappedCylinder length = "2" radius = "1" directionAxis = "z"/> + --> + </rigidBody> <graphicsMesh name="cone" file = "cone.mesh" scale = "1 1 1" position = "0 0 0" rotation = "0 0 0"/> </part> Modified: trunk/data/parts/cube/part.xml =================================================================== --- trunk/data/parts/cube/part.xml 2006-07-27 18:37:03 UTC (rev 453) +++ trunk/data/parts/cube/part.xml 2006-08-07 01:03:16 UTC (rev 454) @@ -1,22 +1,14 @@ <?xml version="1.0" encoding="ISO-8859-1"?> <part xmlns:xi="http://www.w3.org/2001/XInclude"> - <customData name = "Cube" description = "A strange wooden cube" author = "Bruno Gonzalez Campo (STenyaK)" contact = "stenyak AT gmx DOT net" license = "Creative Commons Attribution-NonCommercial-ShareAlike License" mass = "2000"> - <box - size = "2 2 2" - > - </box> + <customData name = "Cube" description = "A strange wooden cube" author = "Bruno Gonzalez Campo (STenyaK)" contact = "stenyak AT gmx DOT net" license = "Creative Commons Attribution-NonCommercial-ShareAlike License"> + </customData> + <rigidBody name="cube"> + <totalMass value="2000"/> + <box size = "2 2 2"/> <!-- - <sphere - radius = "2" - > - </sphere> - <cappedCylinder - length = "2" - radius = "1" - directionAxis = "z" - > - </cappedCylinder> + <sphere radius = "2"/> + <cappedCylinder length = "2" radius = "1" directionAxis = "z"/> --> - </customData> + </rigidBody> <graphicsMesh name="cube" file = "cube.mesh" scale = "1 1 1" position = "0 0 0" rotation = "0 0 0"/> </part> Modified: trunk/data/parts/metalStand/part.xml =================================================================== --- trunk/data/parts/metalStand/part.xml 2006-07-27 18:37:03 UTC (rev 453) +++ trunk/data/parts/metalStand/part.xml 2006-08-07 01:03:16 UTC (rev 454) @@ -1,22 +1,14 @@ <?xml version="1.0" encoding="ISO-8859-1"?> <part xmlns:xi="http://www.w3.org/2001/XInclude"> - <customData 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. Read Max-Realms_License.htm for more info." mass = "5000"> - <box - size = "20 8 8" - > - </box> -<!-- - <sphere - radius = "2" - > - </sphere> - <cappedCylinder - length = "2" - radius = "1" - directionAxis = "z" - > - </cappedCylinder> ---> + <customData 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. Read Max-Realms_License.htm for more info."> </customData> + <rigidBody name="cube"> + <totalMass value="5000"/> + <box size = "20 8 8"/> + <!-- + <sphere radius = "2"/> + <cappedCylinder length = "2" radius = "1" directionAxis = "z"/> + --> + </rigidBody> <graphicsMesh name="stand" file = "metalstand.mesh" scale = "1 1 1" position = "0 0 0" rotation = "0 0 0"/> </part> Modified: trunk/data/vehicles/mosp1/vehicle.xml =================================================================== --- trunk/data/vehicles/mosp1/vehicle.xml 2006-07-27 18:37:03 UTC (rev 453) +++ trunk/data/vehicles/mosp1/vehicle.xml 2006-08-07 01:03:16 UTC (rev 454) @@ -44,6 +44,9 @@ <subobject name="6"><gearboxgear> <customData description="5th" ratio="0.94"/> </gearboxgear></subobject> + <subobject name="7"><gearboxgear> + <customData description="6th" ratio="0.84"/> + </gearboxgear></subobject> </gearbox></subobject> <subobject name="main"><finaldrive> <customData diffInertia="0.1" diffFriction="0.001" ratio="3.6"/> @@ -55,6 +58,12 @@ <subobject name="fl"><suspension.unidimensional> <customData springConstant = "80500" dampingConstant = "2000" position = "+1.44 -0.857 -0.45" rotation = "+92.5 0 0" steeringAngle = "-80"/> </suspension.unidimensional></subobject> + <subobject name="rr"><suspension.unidimensional> + <customData springConstant = "80900" dampingConstant = "2000" position = "-1.35 +0.88 -0.45" rotation = "-91 0 0" steeringAngle = "0"/> + </suspension.unidimensional></subobject> + <subobject name="rl"><suspension.unidimensional> + <customData springConstant = "80900" dampingConstant = "2000" position = "-1.35 -0.88 -0.45" rotation = "+91 0 0" steeringAngle = "0"/> + </suspension.unidimensional></subobject> --> <subobject name="fl"><suspension.doublewishbone> <customData springStiffness="80500" springLengthAtEase="0.5" damperFastBump="2000" damperFastRebound="2100" firstPosition="+1.44 -0.557 -0.45" firstRotation="0 0 0" position="+1.44 -0.857 -0.45" rotation="+90 0 0" steeringAngle="-80" upperBoneMesh="susp/Cube.mesh" lowerBoneMesh="susp/Cube.mesh" uprightBoneMesh="susp/Cube.001.mesh"/> @@ -69,12 +78,6 @@ <customData springStiffness="80900" springLengthAtEase="0.5" damperFastBump="2000" damperFastRebound="2100" firstPosition="-1.35 +0.58 -0.45" firstRotation="0 0 0" position="-1.35 +0.88 -0.45" rotation="-90 0 0" steeringAngle="-0" upperBoneMesh="susp/Cube.mesh" lowerBoneMesh="susp/Cube.mesh" uprightBoneMesh="susp/Cube.001.mesh"/> </suspension.doublewishbone></subobject> <!-- - <subobject name="rr"><suspension.unidimensional> - <customData springConstant = "80900" dampingConstant = "2000" position = "-1.35 +0.88 -0.45" rotation = "-91 0 0" steeringAngle = "0"/> - </suspension.unidimensional></subobject> - <subobject name="rl"><suspension.unidimensional> - <customData springConstant = "80900" dampingConstant = "2000" position = "-1.35 -0.88 -0.45" rotation = "+91 0 0" steeringAngle = "0"/> - </suspension.unidimensional></subobject> <subobject name="rr"><suspension.fixed> <customData position = "-1.35 +0.88 -0.45" rotation = "-90 0 0"/> </suspension.fixed></subobject> Modified: trunk/data/worlds/default.xml =================================================================== --- trunk/data/worlds/default.xml 2006-07-27 18:37:03 UTC (rev 453) +++ trunk/data/worlds/default.xml 2006-08-07 01:03:16 UTC (rev 454) @@ -7,7 +7,8 @@ > </customData> <sharedobject name="main"><area - model="mospland" + model="mosptracing" + __model="testingGround" _model="mospland2006.r7" > </area></sharedobject> Modified: trunk/src/common/worldObject.cpp =================================================================== --- trunk/src/common/worldObject.cpp 2006-07-27 18:37:03 UTC (rev 453) +++ trunk/src/common/worldObject.cpp 2006-08-07 01:03:16 UTC (rev 454) @@ -607,6 +607,38 @@ ogreChild->setOgreReference(ogreObjects[ogreObject->getId()], rotDiff, posDiff, scale); System::get()->ogreWindow->update (); } + if (t->getName() == "rigidBody") + { + pPartOdeData data(new PartOdeData); + XmlTag * u = t->getTag(0); for (int j = 0; j < t->nTags(); u = t->getTag(++j)) + { + if (u->getName() == "totalMass") + { + data->mass = stod(u->getAttribute("value")); + } + if (u->getName() == "box") + { + data->shape = u->getName(); + data->size = Vector3d(u->getAttribute("size")); + } + if (u->getName() == "sphere") + { + data->shape = u->getName(); + data->radius = stod(u->getAttribute("radius")); + } + if (u->getName() == "cappedCylinder") + { + data->shape = u->getName(); + data->radius = stod(u->getAttribute("radius")); + data->length = stod(u->getAttribute("length")); + if (u->getAttribute("directionAxis") == "x") data->directionAxis = 1; + if (u->getAttribute("directionAxis") == "y") data->directionAxis = 2; + if (u->getAttribute("directionAxis") == "z") data->directionAxis = 3; + } + } + if (data->shape == "none") log->__format(LOG_ERROR, "No physics shape specified for this part."); + odeObjects[getId()] = pOdeObject(new OdeObject(this, data, getId())); + } } t = tag->getTag(0); for (int i = 0; i < tag->nTags(); t = tag->getTag(++i)) { Modified: trunk/src/world/part.cpp =================================================================== --- trunk/src/world/part.cpp 2006-07-27 18:37:03 UTC (rev 453) +++ trunk/src/world/part.cpp 2006-08-07 01:03:16 UTC (rev 454) @@ -28,30 +28,6 @@ void Part::readCustomDataTag(XmlTag * tag) { setName(tag->getAttribute("name")); - pPartOdeData data(new PartOdeData); - data->mass = stod(tag->getAttribute("mass")); - XmlTag * t = tag->getTag(0); for (int i = 0; i < tag->nTags(); t = tag->getTag(++i)) - { - data->shape = t->getName(); - if (data->shape == "box") - { - data->size = Vector3d(t->getAttribute("size")); - } - if (data->shape == "sphere") - { - data->radius = stod(t->getAttribute("radius")); - } - if (data->shape == "cappedCylinder") - { - data->radius = stod(t->getAttribute("radius")); - data->length = stod(t->getAttribute("length")); - if (t->getAttribute("directionAxis") == "x") data->directionAxis = 1; - if (t->getAttribute("directionAxis") == "y") data->directionAxis = 2; - if (t->getAttribute("directionAxis") == "z") data->directionAxis = 3; - } - } - if (data->shape == "none") log->__format(LOG_ERROR, "No physics shape specified for this part."); - odeObjects[getId()] = pOdeObject(new OdeObject(this, data, getId())); } Part::Part (const std::string & name) :WorldObject("part") @@ -73,10 +49,13 @@ void Part::stepPhysics () { WorldObject::stepPhysics(); - dBodyID partID = odeObjects.begin()->second->getBodyID(); - // //////////////simplified air friction (test)(should be forces!) - dBodySetAngularVel (partID, (*(dReal *) (dBodyGetAngularVel (partID) + 0)) * (dReal) (0.999), (*(dReal *) (dBodyGetAngularVel (partID) + 1)) * (dReal) (0.999), (*(dReal *) (dBodyGetAngularVel (partID) + 2)) * (dReal) (0.999)); - // ////////////////////////////////////simplified air friction - const dReal * pos; - pos = dBodyGetPosition(partID); + if (odeObjects.size() > 0) + { + dBodyID partID = odeObjects.begin()->second->getBodyID(); + // //////////////simplified air friction (test)(should be forces!) + dBodySetAngularVel (partID, (*(dReal *) (dBodyGetAngularVel (partID) + 0)) * (dReal) (0.999), (*(dReal *) (dBodyGetAngularVel (partID) + 1)) * (dReal) (0.999), (*(dReal *) (dBodyGetAngularVel (partID) + 2)) * (dReal) (0.999)); + // ////////////////////////////////////simplified air friction + const dReal * pos; + pos = dBodyGetPosition(partID); + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <st...@us...> - 2006-07-28 05:34:54
|
Revision: 452 Author: stenyak Date: 2006-07-27 11:29:17 -0700 (Thu, 27 Jul 2006) ViewCVS: http://svn.sourceforge.net/motorsport/?rev=452&view=rev Log Message: ----------- Modified world camera switching routines, so that it spits a warning when no proper cameras are found (instead of crashing). Modified Paths: -------------- trunk/src/world/world.cpp Modified: trunk/src/world/world.cpp =================================================================== --- trunk/src/world/world.cpp 2006-07-27 17:43:36 UTC (rev 451) +++ trunk/src/world/world.cpp 2006-07-27 18:29:17 UTC (rev 452) @@ -144,10 +144,15 @@ } void World::setActiveCamera (pCamera camera) { - activeCamera = camera; - System::get()->ogreWindow->removeAllViewports (); - System::get()->ogreWindow->addViewport (activeCamera->ogreCamera); - log->__format (LOG_ENDUSER, "Changed camera..."); + if (camera) + { + activeCamera = camera; + System::get()->ogreWindow->removeAllViewports (); + System::get()->ogreWindow->addViewport (activeCamera->ogreCamera); + log->__format (LOG_ENDUSER, "Changed camera..."); + } else { + log->__format (LOG_WARNING, "Unable to change camera! No such camera found."); + } } void World::stepGraphics() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <st...@us...> - 2006-07-27 18:37:15
|
Revision: 453 Author: stenyak Date: 2006-07-27 11:37:03 -0700 (Thu, 27 Jul 2006) ViewCVS: http://svn.sourceforge.net/motorsport/?rev=453&view=rev Log Message: ----------- Updated Testing Ground area.xml cameras. Modified Paths: -------------- trunk/data/areas/testingGround/area.xml Modified: trunk/data/areas/testingGround/area.xml =================================================================== --- trunk/data/areas/testingGround/area.xml 2006-07-27 18:29:17 UTC (rev 452) +++ trunk/data/areas/testingGround/area.xml 2006-07-27 18:37:03 UTC (rev 453) @@ -93,34 +93,19 @@ > </vehicleLocation> </customData> - <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> + <subobject name = "driver"><camera> + <customData position = "6 0 1.7" target = "0.1 0.5 0.4"/> + </camera></subobject> + <subobject name = "wheel"><camera> + <customData position = "20 -15 0.2" target = "1.44 -0.86 -0.4"/> + </camera></subobject> + <subobject name = "bodyCenter"><camera> + <customData position = "-10 -5 2" target = "0 0 0"/> + </camera></subobject> + <subobject name = "helicopter"><camera> + <customData position = "0 0 70" target = "0 0 0"/> + </camera></subobject> + <subobject name = "frontGrill"><camera> + <customData position = "20 0 0.1" target = "2.23 0 -0.1"/> + </camera></subobject> </area> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <st...@us...> - 2006-07-27 17:43:42
|
Revision: 451 Author: stenyak Date: 2006-07-27 10:43:36 -0700 (Thu, 27 Jul 2006) ViewCVS: http://svn.sourceforge.net/motorsport/?rev=451&view=rev Log Message: ----------- Updated "Testing Ground" area.xml file. Modified Paths: -------------- trunk/data/areas/testingGround/area.xml Modified: trunk/data/areas/testingGround/area.xml =================================================================== --- trunk/data/areas/testingGround/area.xml 2006-07-21 10:34:17 UTC (rev 450) +++ trunk/data/areas/testingGround/area.xml 2006-07-27 17:43:36 UTC (rev 451) @@ -1,6 +1,9 @@ <?xml version="1.0" encoding="ISO-8859-1"?> -<area +<area xmlns:xi="http://www.w3.org/2001/XInclude"> + <customData name = "Testing Ground" + position="0.000000 0.000000 0.000000" + rotation="1.000000 0.000000 0.000000 0.000000" description = "A simple area, featuring an infinite cement ground, and a clear sky. Located in the middle of a dry area surrounded by some small mountains." author = "STenyaK" contact = "stenyak AT gmx DOT net" @@ -89,6 +92,7 @@ rotation = "0 0 90" > </vehicleLocation> + </customData> <camera name = "driver" position = "6 0 1.7" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <st...@us...> - 2006-07-21 10:34:25
|
Revision: 450 Author: stenyak Date: 2006-07-21 03:34:17 -0700 (Fri, 21 Jul 2006) ViewCVS: http://svn.sourceforge.net/motorsport/?rev=450&view=rev Log Message: ----------- Vehicle speed is now shown in km/h instead of m/s. Fixed low framerates in multimesh areas. Modified Paths: -------------- trunk/src/vehicle/vehicle.cpp trunk/src/world/world.cpp Modified: trunk/src/vehicle/vehicle.cpp =================================================================== --- trunk/src/vehicle/vehicle.cpp 2006-07-20 18:27:25 UTC (rev 449) +++ trunk/src/vehicle/vehicle.cpp 2006-07-21 10:34:17 UTC (rev 450) @@ -219,7 +219,7 @@ if ( userDriver ) { const dReal * tmp = dBodyGetLinearVel(getBody("main")->getMainOdeObject()->getBodyID()); - double velocity = sqrt(tmp[0]*tmp[0]+tmp[1]*tmp[1]+tmp[2]*tmp[2]); + double velocity = sqrt(tmp[0]*tmp[0]+tmp[1]*tmp[1]+tmp[2]*tmp[2]) * 3.6; tmp = dBodyGetPosition(getBody("main")->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, getEngine("main")->getOutputAngularVel(), getFinalDrive("main")->getInputAngularVel(), getWheel("rr")->getInputAngularVel(), getWheel("rl")->getInputAngularVel(), getGearbox("main")->getCurrentGear()->getDescription().c_str(), distance); Modified: trunk/src/world/world.cpp =================================================================== --- trunk/src/world/world.cpp 2006-07-20 18:27:25 UTC (rev 449) +++ trunk/src/world/world.cpp 2006-07-21 10:34:17 UTC (rev 450) @@ -118,7 +118,14 @@ dRandSetSeed(0); worldID = dWorldCreate (); ghostWorldID = dWorldCreate (); - spaceID = dHashSpaceCreate (0); + //spaceID = dHashSpaceCreate (0); + //spaceID = dSimpleSpaceCreate (0); + dVector3 center; + center[0]=center[1]=center[2]=0; + dVector3 ext; + ext[0]=ext[1]=1000; + ext[2]=100; + spaceID = dQuadTreeSpaceCreate (0, center, ext, 10); jointGroupID = dJointGroupCreate (0); if (System::get()->getCfmValue() != -1) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <st...@us...> - 2006-07-20 18:27:37
|
Revision: 449 Author: stenyak Date: 2006-07-20 11:27:25 -0700 (Thu, 20 Jul 2006) ViewCVS: http://svn.sourceforge.net/motorsport/?rev=449&view=rev Log Message: ----------- Added logger of cpu-time usage (sorted by engines). Modified Paths: -------------- trunk/src/gui.cpp trunk/src/main.cpp Modified: trunk/src/gui.cpp =================================================================== --- trunk/src/gui.cpp 2006-07-20 17:50:32 UTC (rev 448) +++ trunk/src/gui.cpp 2006-07-20 18:27:25 UTC (rev 449) @@ -72,7 +72,6 @@ int Gui::computeStep (void) //makes the graphics engine draw one frame { - log->__format (LOG_DEVELOPER, "Doing an step..."); //update all statistics every second static double lastRefreshTime = 0; if (SDL_GetTicks ()/1000.0 - lastRefreshTime >= 1) Modified: trunk/src/main.cpp =================================================================== --- trunk/src/main.cpp 2006-07-20 17:50:32 UTC (rev 448) +++ trunk/src/main.cpp 2006-07-20 18:27:25 UTC (rev 449) @@ -86,10 +86,23 @@ log->loadscreen (LOG_ENDUSER, "Hiding load screen"); gui->hideLoadscreen(); log->__format (LOG_DEVELOPER, "Starting main loop"); + + double gfxTime = 0.0; + double guiTime = 0.0; + double fsxTime = 0.0; + double inpTime = 0.0; + double startTime = 0.0; while (system->isMainLoopEnabled ()) { // Update current real loop time. system->realTime = SDL_GetTicks () / 1000.0; + // Log engine stats every few tenths of second. + if (system->simulationTime - system->statisticsTime >= 0.2) + { + double totalTime = gfxTime + guiTime + fsxTime + inpTime; + log->__format (LOG_DEVELOPER, "Total[%5.3f]\t= GFX %5.2f+ GUI %5.2f + FSX %5.2f + INP %5.2f", totalTime, gfxTime*100.0/totalTime, guiTime*100.0/totalTime, fsxTime*100.0/totalTime, inpTime*100.0/totalTime); + gfxTime = guiTime = fsxTime = inpTime = 0.0; + } // Update statistics data every second. if (system->simulationTime - system->statisticsTime >= 1) { @@ -97,16 +110,23 @@ system->setCurrentPhysicsFrequency (system->physicsSteps); system->graphicsSteps = system->physicsSteps = 0; system->statisticsTime += 1; - log->__format (LOG_DEVELOPER, "Main Loop Stats: graphicsFps=%i - physicsFps=%i", system->graphicsFrequency, system->getCurrentPhysicsFrequency()); } + startTime = SDL_GetTicks()/1000.0; input->computeStep (); + inpTime += (SDL_GetTicks()/1000.0)-startTime; // Run the gui engine. + startTime = SDL_GetTicks()/1000.0; gui->computeStep (); + guiTime += (SDL_GetTicks()/1000.0)-startTime; // Run the graphics engine. + startTime = SDL_GetTicks()/1000.0; graphics->computeStep (); system->graphicsSteps++; + gfxTime += (SDL_GetTicks()/1000.0)-startTime; // Clear all event-like behaving axis. This must be moved to the input engine as axis filters asap. TODO + startTime = SDL_GetTicks()/1000.0; input->clearGraphicsEventAxis (); + inpTime += (SDL_GetTicks()/1000.0)-startTime; // Run the physics engine until the game time is in sync with the real loop time. while (((system->realTime - system->simulationTime) >= system->getDesiredPhysicsTimestep()) && (system->isMainLoopEnabled ())) { @@ -119,16 +139,22 @@ static int steps = 1; if ((system->pauseStep != 0 && steps < system->pauseStep) || (system->pauseStep == 0)) { + startTime = SDL_GetTicks()/1000.0; computeLogic (log); input->clearLogicEventAxis (); input->computeStep (); + inpTime += (SDL_GetTicks()/1000.0)-startTime; + startTime = SDL_GetTicks()/1000.0; physics->computeStep (); steps++; + fsxTime += (SDL_GetTicks()/1000.0)-startTime; + startTime = SDL_GetTicks()/1000.0; if (System::get()->videoRecordTimestep > 0) { recordVideoFrames (); } } + guiTime += (SDL_GetTicks()/1000.0)-startTime; step = system->timeScale; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <st...@us...> - 2006-07-20 17:51:31
|
Revision: 448 Author: stenyak Date: 2006-07-20 10:50:32 -0700 (Thu, 20 Jul 2006) ViewCVS: http://svn.sourceforge.net/motorsport/?rev=448&view=rev Log Message: ----------- Refactored most World Objects (and their parsers) so that they can recursively store other World Objects of any type. Removed some redundant log lines. Modified all the World Objects XML format: now using Mosp Unified XML Format everywhere, with a few exceptions (area ground, suspension arms, etc..). Modified Paths: -------------- trunk/data/areas/mospland/area.xml trunk/data/parts/cone/part.xml trunk/data/parts/cube/part.xml trunk/data/parts/metalStand/part.xml trunk/data/vehicles/mosp1/vehicle.xml trunk/src/common/camera.cpp trunk/src/common/camera.hpp trunk/src/common/ogreObject.cpp trunk/src/common/worldObject.cpp trunk/src/common/worldObject.hpp trunk/src/vehicle/body.cpp trunk/src/vehicle/body.hpp trunk/src/vehicle/driveJoint.cpp trunk/src/vehicle/driveJoint.hpp trunk/src/vehicle/engine.cpp trunk/src/vehicle/engine.hpp trunk/src/vehicle/finalDrive.cpp trunk/src/vehicle/finalDrive.hpp trunk/src/vehicle/gearbox.cpp trunk/src/vehicle/gearbox.hpp trunk/src/vehicle/pedal.cpp trunk/src/vehicle/pedal.hpp trunk/src/vehicle/suspension.cpp trunk/src/vehicle/suspension.hpp trunk/src/vehicle/vehicle.cpp trunk/src/vehicle/vehicle.hpp trunk/src/vehicle/wheel.cpp trunk/src/vehicle/wheel.hpp trunk/src/world/area.cpp trunk/src/world/area.hpp trunk/src/world/part.cpp trunk/src/world/part.hpp trunk/src/world/world.cpp trunk/src/world/world.hpp Modified: trunk/data/areas/mospland/area.xml =================================================================== --- trunk/data/areas/mospland/area.xml 2006-07-20 11:03:45 UTC (rev 447) +++ trunk/data/areas/mospland/area.xml 2006-07-20 17:50:32 UTC (rev 448) @@ -1,5 +1,6 @@ <?xml version="1.0"?> -<area +<area xmlns:xi="http://www.w3.org/2001/XInclude"> + <customData name="MospLand" position="-3.000000 0.000000 0.000000" rotation="1.000000 0.000000 0.000000 0.000000" @@ -11,12 +12,6 @@ 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" @@ -199,17 +194,6 @@ 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" @@ -220,94 +204,6 @@ 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.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.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.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.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.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" @@ -357,4 +253,47 @@ scale="2.000000 2.000000 2.000000" /> </parts> - </area> + <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" + /> + </customData> + <subobject name="camera.002"><camera> + <customData 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"/> + </camera></subobject> + <subobject name="camera.001"><camera> + <customData 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></subobject> + <subobject name="camera.003"><camera> + <customData 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></subobject> + <subobject name="camera"><camera> + <customData 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></subobject> + <subobject name="camera.004"><camera> + <customData 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></subobject> + <subobject name="camera.006"><camera> + <customData 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></subobject> + <subobject name="camera.005"><camera> + <customData 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></subobject> + <subobject name="camera.007"><camera> + <customData 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></subobject> + <subobject name="camera.008"><camera> + <customData 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"/> + </camera></subobject> +</area> Modified: trunk/data/parts/cone/part.xml =================================================================== --- trunk/data/parts/cone/part.xml 2006-07-20 11:03:45 UTC (rev 447) +++ trunk/data/parts/cone/part.xml 2006-07-20 17:50:32 UTC (rev 448) @@ -1,19 +1,6 @@ <?xml version="1.0" encoding="ISO-8859-1"?> -<part - 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." - mass = "3" - > - <mesh - file = "cone.mesh" - scale = "1 1 1" - position = "0 0 0" - rotation = "0 0 0" - > - </mesh> +<part xmlns:xi="http://www.w3.org/2001/XInclude"> + <customData 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." mass = "3"> <box size = "0.5 0.5 0.8" > @@ -30,4 +17,6 @@ > </cappedCylinder> --> + </customData> + <graphicsMesh name="cone" file = "cone.mesh" scale = "1 1 1" position = "0 0 0" rotation = "0 0 0"/> </part> Modified: trunk/data/parts/cube/part.xml =================================================================== --- trunk/data/parts/cube/part.xml 2006-07-20 11:03:45 UTC (rev 447) +++ trunk/data/parts/cube/part.xml 2006-07-20 17:50:32 UTC (rev 448) @@ -1,33 +1,22 @@ <?xml version="1.0" encoding="ISO-8859-1"?> -<part - name = "Cube" - description = "A strange wooden cube" - author = "Bruno Gonzalez Campo (STenyaK)" - contact = "stenyak AT gmx DOT net" - license = "Creative Commons Attribution-NonCommercial-ShareAlike License" - mass = "2000" - > - <mesh - file = "cube.mesh" - scale = "1 1 1" - position = "0 0 0" - rotation = "0 0 0" - > - </mesh> - <box - size = "2 2 2" - > - </box> -<!-- - <sphere - radius = "2" - > - </sphere> - <cappedCylinder - length = "2" - radius = "1" - directionAxis = "z" - > - </cappedCylinder> ---> +<part xmlns:xi="http://www.w3.org/2001/XInclude"> + <customData name = "Cube" description = "A strange wooden cube" author = "Bruno Gonzalez Campo (STenyaK)" contact = "stenyak AT gmx DOT net" license = "Creative Commons Attribution-NonCommercial-ShareAlike License" mass = "2000"> + <box + size = "2 2 2" + > + </box> + <!-- + <sphere + radius = "2" + > + </sphere> + <cappedCylinder + length = "2" + radius = "1" + directionAxis = "z" + > + </cappedCylinder> + --> + </customData> + <graphicsMesh name="cube" file = "cube.mesh" scale = "1 1 1" position = "0 0 0" rotation = "0 0 0"/> </part> Modified: trunk/data/parts/metalStand/part.xml =================================================================== --- trunk/data/parts/metalStand/part.xml 2006-07-20 11:03:45 UTC (rev 447) +++ trunk/data/parts/metalStand/part.xml 2006-07-20 17:50:32 UTC (rev 448) @@ -1,19 +1,6 @@ <?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. Read Max-Realms_License.htm for more info." - mass = "5000" - > - <mesh - file = "metalstand.mesh" - scale = "1 1 1" - position = "0 0 0" - rotation = "0 0 0" - > - </mesh> +<part xmlns:xi="http://www.w3.org/2001/XInclude"> + <customData 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. Read Max-Realms_License.htm for more info." mass = "5000"> <box size = "20 8 8" > @@ -30,4 +17,6 @@ > </cappedCylinder> --> + </customData> + <graphicsMesh name="stand" file = "metalstand.mesh" scale = "1 1 1" position = "0 0 0" rotation = "0 0 0"/> </part> Modified: trunk/data/vehicles/mosp1/vehicle.xml =================================================================== --- trunk/data/vehicles/mosp1/vehicle.xml 2006-07-20 11:03:45 UTC (rev 447) +++ trunk/data/vehicles/mosp1/vehicle.xml 2006-07-20 17:50:32 UTC (rev 448) @@ -1,11 +1,124 @@ <?xml version="1.0" encoding="ISO-8859-1"?> -<vehicle - name = "Mosp1" - description = "The first official Motorsport vehicle. Made by Habalux, it started its life as a quick draft made in just a couple of hours. It was then remade and improved in a period of several days, to end up as what it is now: a RWD, possibly V8, possibly race-tuned car." - author = "Habalux, STenyaK" - contact = "habalux AT gmail DOT com, stenyak AT gmx DOT net" - license = "Creative Commons Attribution-NonCommercial-ShareAlike License" - > +<vehicle xmlns:xi="http://www.w3.org/2001/XInclude"> + <customData name="Mosp1" description="The first official Motorsport vehicle. Made by Habalux, it started its life as a quick draft made in just a couple of hours. It was then remade and improved in a period of several days, to end up as what it is now: a RWD, possibly V8, possibly race-tuned car." author="Habalux, STenyaK" contact="habalux AT gmail DOT com, stenyak AT gmx DOT net" license="Creative Commons Attribution-NonCommercial-ShareAlike License"> + </customData> + <subobject name="main"><body> + <customData length="4.66" width="2.08" height="1.2" mass="1224.0" dragCoefficient="0.3" frontalArea="1.5"/> + <graphicsMesh name="main body" file="body.mesh" scale="1 1 1" position="0 0 0" rotation="0 0 0"/> + </body></subobject> + <subobject name="clutch"><pedal> + <customData angleRange="1.047975" _angleRange="radians = degrees * 2 * PI / 360"/> + </pedal></subobject> + <subobject name="gas"><pedal> + <customData angleRange="0.6981317"/> + </pedal></subobject> + <subobject name="brake"><pedal> + <customData angleRange="0.6981317" _angleRange="radians = degrees * 2 * PI / 360"/> + </pedal></subobject> + <subobject name="main"><engine> + <customData torqueLinearMultiplier="246" engineInertia="0.4" engineFriction="0.1" angularVelLimit="733.0382858"/> + </engine></subobject> + <subobject name="main"><clutch> + <customData coeffStaticFriction="1" coeffDynamicFriction="0.8" maxTorqueTransfer="260"/> + </clutch></subobject> + <subobject name="main"><gearbox> + <customData gearboxFriction="0.01" gearboxInertia="0.2"/> + <subobject name="0"><gearboxgear> + <customData description="reverse" ratio="-4.0"/> + </gearboxgear></subobject> + <subobject name="1"><gearboxgear> + <customData description="neutral" ratio="0.0"/> + </gearboxgear></subobject> + <subobject name="2"><gearboxgear> + <customData description="1st" ratio="3.71"/> + </gearboxgear></subobject> + <subobject name="3"><gearboxgear> + <customData description="2nd" ratio="2.24"/> + </gearboxgear></subobject> + <subobject name="4"><gearboxgear> + <customData description="3rd" ratio="1.5"/> + </gearboxgear></subobject> + <subobject name="5"><gearboxgear> + <customData description="4th" ratio="1.145"/> + </gearboxgear></subobject> + <subobject name="6"><gearboxgear> + <customData description="5th" ratio="0.94"/> + </gearboxgear></subobject> + </gearbox></subobject> + <subobject name="main"><finaldrive> + <customData diffInertia="0.1" diffFriction="0.001" ratio="3.6"/> + </finaldrive></subobject> +<!-- + <subobject name="fr"><suspension.unidimensional> + <customData springConstant = "80500" dampingConstant = "2000" position = "+1.44 +0.857 -0.45" rotation = "-92.5 0 0" steeringAngle = "+80"/> + </suspension.unidimensional></subobject> + <subobject name="fl"><suspension.unidimensional> + <customData springConstant = "80500" dampingConstant = "2000" position = "+1.44 -0.857 -0.45" rotation = "+92.5 0 0" steeringAngle = "-80"/> + </suspension.unidimensional></subobject> +--> + <subobject name="fl"><suspension.doublewishbone> + <customData springStiffness="80500" springLengthAtEase="0.5" damperFastBump="2000" damperFastRebound="2100" firstPosition="+1.44 -0.557 -0.45" firstRotation="0 0 0" position="+1.44 -0.857 -0.45" rotation="+90 0 0" steeringAngle="-80" upperBoneMesh="susp/Cube.mesh" lowerBoneMesh="susp/Cube.mesh" uprightBoneMesh="susp/Cube.001.mesh"/> + </suspension.doublewishbone></subobject> + <subobject name="fr"><suspension.doublewishbone> + <customData springStiffness="80500" springLengthAtEase="0.5" damperFastBump="2000" damperFastRebound="2100" firstPosition="+1.44 +0.557 -0.45" firstRotation="0 0 0" position="+1.44 +0.857 -0.45" rotation="-90 0 0" steeringAngle="+50" upperBoneMesh="susp/Cube.mesh" lowerBoneMesh="susp/Cube.mesh" uprightBoneMesh="susp/Cube.001.mesh"/> + </suspension.doublewishbone></subobject> + <subobject name="rl"><suspension.doublewishbone> + <customData springStiffness="80900" springLengthAtEase="0.5" damperFastBump="2000" damperFastRebound="2100" firstPosition="-1.35 -0.58 -0.45" firstRotation="0 0 0" position="-1.35 -0.88 -0.45" rotation="+90 0 0" steeringAngle="+0" upperBoneMesh="susp/Cube.mesh" lowerBoneMesh="susp/Cube.mesh" uprightBoneMesh="susp/Cube.001.mesh"/> + </suspension.doublewishbone></subobject> + <subobject name="rr"><suspension.doublewishbone> + <customData springStiffness="80900" springLengthAtEase="0.5" damperFastBump="2000" damperFastRebound="2100" firstPosition="-1.35 +0.58 -0.45" firstRotation="0 0 0" position="-1.35 +0.88 -0.45" rotation="-90 0 0" steeringAngle="-0" upperBoneMesh="susp/Cube.mesh" lowerBoneMesh="susp/Cube.mesh" uprightBoneMesh="susp/Cube.001.mesh"/> + </suspension.doublewishbone></subobject> +<!-- + <subobject name="rr"><suspension.unidimensional> + <customData springConstant = "80900" dampingConstant = "2000" position = "-1.35 +0.88 -0.45" rotation = "-91 0 0" steeringAngle = "0"/> + </suspension.unidimensional></subobject> + <subobject name="rl"><suspension.unidimensional> + <customData springConstant = "80900" dampingConstant = "2000" position = "-1.35 -0.88 -0.45" rotation = "+91 0 0" steeringAngle = "0"/> + </suspension.unidimensional></subobject> + <subobject name="rr"><suspension.fixed> + <customData position = "-1.35 +0.88 -0.45" rotation = "-90 0 0"/> + </suspension.fixed></subobject> + <subobject name="rl"><suspension.fixed> + <customData position = "-1.35 -0.88 -0.45" rotation = "+90 0 0" steeringAngle = "0"/> + </suspension.fixed></subobject> +--> + <subobject name="fr"><wheel> + <customData mass="15.1" radius="0.34" width="0.125" powered="-1" renderMode="solid"/> + <graphicsMesh name="wheel" file="wheel_front.mesh" scale="1 1 1" position="0 0 0" rotation="0 0 0"/> + </wheel></subobject> + <subobject name="fl"><wheel> + <customData mass="15.1" radius="0.34" width="0.125" powered="+1" renderMode="solid"/> + <graphicsMesh name="wheel" file="wheel_front.mesh" scale="1 1 1" position="0 0 0" rotation="0 0 0"/> + </wheel></subobject> + <subobject name="rr"><wheel> + <customData mass="15.0" radius="0.34" width="0.125" powered="-1" renderMode="solid"/> + <graphicsMesh name="wheel" file="wheel_rear.mesh" scale="1 1 1" position="0 0 0" rotation="0 0 0"/> + </wheel></subobject> + <subobject name="rl"><wheel> + <customData mass="15.0" radius="0.34" width="0.125" powered="+1" renderMode="solid"/> + <graphicsMesh name="wheel" file="wheel_rear.mesh" scale="1 1 1" position="0 0 0" rotation="0 0 0"/> + </wheel></subobject> + <subobject name="hood"><camera> + <customData position="0.2 0 0.5" target="1 0 0.5"/> + </camera></subobject> + <subobject name="bumper"><camera> + <customData position="2.3 0 -0.2" target="3 0 -0.2"/> + </camera></subobject> + <subobject name="main"><camera> + <customData position="-10 0 2" target="2 0 0"/> + </camera></subobject> + <subobject name="frontRightWheel"><camera> + <customData position="0.2 -1.2 -0.25" target="0.4 -1.2 -0.25"/> + </camera></subobject> + <subobject name="rightSide"><camera> + <customData position="-3.0 -1.2 -0.25" target="-2.8 -1.2 -0.25"/> + </camera></subobject> + <subobject name="leftSide"><camera> + <customData position="0 6 0" target="0 0 0"/> + </camera></subobject> + <subobject name="backTv"><camera> + <customData position="4 1.3 -0.3" target="0 -0.4 0.7"/> + </camera></subobject> <links> drivejoint-drivemass clutch output = gearbox drivejoint-drivemass clutch input = engine @@ -23,345 +136,7 @@ engine-pedal engine pedal = gaspedal wheel-pedal wheel pedal = brakePedal </links> - <body - name = "main" - length = "4.66" - width = "2.08" - height = "1.2" - mass = "1224.0" - dragCoefficient = "0.3" - _frontalArea = "default" comment="default = width * height * 0.6" - frontalArea = "1.5" - > - <mesh - file= "body.mesh" - scale = "1 1 1" - position = "0 0 0" - rotation = "0 0 0" - > - </mesh> - </body> - <pedal - name = "clutch" - angleRange = "1.047975" - _angleRange = "radians = degrees * 2 * PI / 360" - > - </pedal> - <pedal - name = "gas" - angleRange = "0.6981317" - > - </pedal> - <pedal - name = "brake" - angleRange = "0.6981317" - > - </pedal> - <engine - name = "main" - torqueLinearMultiplier = "246" - engineInertia = "0.4" - engineFriction = "0.1" - angularVelLimit = "733.0382858" - _angularVelLimit = "radians per second = rpm * 2 * PI / 60" - > - </engine> - <clutch - name = "main" - coeffStaticFriction = "1" - coeffDynamicFriction = "0.8" - maxTorqueTransfer = "260" - > - </clutch> - <shiftUpPaddle - inputAxis = "normalizedRelativeRotation" - > - </shiftUpPaddle> - <shiftDownPaddle - inputAxis = "normalizedRelativeRotation" - > - </shiftDownPaddle> - <gearbox - name = "main" - gearboxFriction = "0.01" - gearboxInertia = "0.2" - > - <gear - number = "0" - ratio = "-4.0" - name = "reverse" - > - </gear> - <gear - number = "1" - ratio = "0.0" - name = "neutral" - > - </gear> - <gear - number = "2" - ratio = "3.71" - name = "1st" - > - </gear> - <gear - number = "3" - ratio = "2.24" - name = "2nd" - > - </gear> - <gear - number = "4" - ratio = "1.5" - name = "3rd" - > - </gear> - <gear - number = "5" - ratio = "1.145" - name = "4th" - > - </gear> - <gear - number = "6" - ratio = "0.94" - name = "5th" - > - </gear> - </gearbox> - <finalDrive - name = "main" - diffInertia = "0.1" - diffFriction = "0.001" - finalDriveRatio = "3.6" - > - </finalDrive> - <steeringWheel - inputAxis = "normalizedRelativeRotation" - maxAngle = "900" - > - </steeringWheel> -<!-- - <suspension.unidimensional - name = "fr" - springConstant = "80500" - dampingConstant = "2000" - position = "+1.44 +0.857 -0.45" - rotation = "-92.5 0 0" - steeringAngle = "+80" - > - </suspension.unidimensional> - <suspension.unidimensional - name = "fl" - springConstant = "80500" - dampingConstant = "2000" - position = "+1.44 -0.857 -0.45" - rotation = "+92.5 0 0" - steeringAngle = "-80" - > - </suspension.unidimensional> ---> - <suspension.doublewishbone - name = "fl" - springStiffness = "80500" - springLengthAtEase = "0.5" - damperFastBump = "2000" - damperFastRebound = "2100" - firstPosition = "+1.44 -0.557 -0.45" - firstRotation = "0 0 0" - position = "+1.44 -0.857 -0.45" - rotation = "+90 0 0" - steeringAngle = "-80" - upperBoneMesh = "susp/Cube.mesh" - lowerBoneMesh = "susp/Cube.mesh" - uprightBoneMesh = "susp/Cube.001.mesh" - > - </suspension.doublewishbone> - <suspension.doublewishbone - name = "fr" - springStiffness = "80500" - springLengthAtEase = "0.5" - damperFastBump = "2000" - damperFastRebound = "2100" - firstPosition = "+1.44 +0.557 -0.45" - firstRotation = "0 0 0" - position = "+1.44 +0.857 -0.45" - rotation = "-90 0 0" - steeringAngle = "+50" - upperBoneMesh = "susp/Cube.mesh" - lowerBoneMesh = "susp/Cube.mesh" - uprightBoneMesh = "susp/Cube.001.mesh" - > - </suspension.doublewishbone> - <suspension.doublewishbone - name = "rl" - springStiffness = "80900" - springLengthAtEase = "0.5" - damperFastBump = "2000" - damperFastRebound = "2100" - firstPosition = "-1.35 -0.58 -0.45" - firstRotation = "0 0 0" - position = "-1.35 -0.88 -0.45" - rotation = "+90 0 0" - steeringAngle = "+0" - upperBoneMesh = "susp/Cube.mesh" - lowerBoneMesh = "susp/Cube.mesh" - uprightBoneMesh = "susp/Cube.001.mesh" - > - </suspension.doublewishbone> - <suspension.doublewishbone - name = "rr" - springStiffness = "80900" - springLengthAtEase = "0.5" - damperFastBump = "2000" - damperFastRebound = "2100" - firstPosition = "-1.35 +0.58 -0.45" - firstRotation = "0 0 0" - position = "-1.35 +0.88 -0.45" - rotation = "-90 0 0" - steeringAngle = "-0" - upperBoneMesh = "susp/Cube.mesh" - lowerBoneMesh = "susp/Cube.mesh" - uprightBoneMesh = "susp/Cube.001.mesh" - > - </suspension.doublewishbone> -<!-- - <suspension.unidimensional - name = "rr" - springConstant = "80900" - dampingConstant = "2000" - position = "-1.35 +0.88 -0.45" - rotation = "-91 0 0" - steeringAngle = "0" - > - </suspension.unidimensional> - <suspension.unidimensional - name = "rl" - springConstant = "80900" - dampingConstant = "2000" - position = "-1.35 -0.88 -0.45" - rotation = "+91 0 0" - steeringAngle = "0" - > - </suspension.unidimensional> - <suspension.fixed - name = "rr" - position = "-1.35 +0.88 -0.45" - rotation = "-90 0 0" - > - </suspension.fixed> - <suspension.fixed - name = "rl" - position = "-1.35 -0.88 -0.45" - rotation = "+90 0 0" - steeringAngle = "0" - > - </suspension.fixed> ---> - <wheel - name = "fr" - mass = "15.1" - radius = "0.34" - width = "0.125" - powered = "-1" - renderMode="solid" - > - <mesh - file = "wheel_front.mesh" - scale = "1 1 1" - position = "0 0 0" - rotation = "0 0 0" - > - </mesh> - </wheel> - <wheel - name = "fl" - mass = "15.1" - radius = "0.34" - width = "0.125" - powered = "+1" - renderMode="solid" - > - <mesh - file = "wheel_front.mesh" - scale = "1 1 1" - position = "0 0 0" - rotation = "0 0 0" - > - </mesh> - </wheel> - <wheel - name = "rr" - mass = "15.0" - radius = "0.34" - width = "0.125" - powered = "-1" - renderMode="solid" - > - <mesh - file= "wheel_rear.mesh" - scale = "1 1 1" - position = "0 0 0" - rotation = "0 0 0" - > - </mesh> - </wheel> - <wheel - name = "rl" - mass = "15.0" - radius = "0.34" - width = "0.125" - powered = "+1" - renderMode="solid" - > - <mesh - file = "wheel_rear.mesh" - scale = "1 1 1" - position = "0 0 0" - rotation = "0 0 0" - > - </mesh> - </wheel> - <camera - name = "hood" - position = "0.2 0 0.5" - target = "1 0 0.5" - > - </camera> - <camera - name = "bumper" - position = "2.3 0 -0.2" - target = "3 0 -0.2" - > - </camera> - <camera - name = "main" - position = "-10 0 2" - target = "2 0 0" - > - </camera> - <camera - name = "frontRightWheel" - position = "0.2 -1.2 -0.25" - target = "0.4 -1.2 -0.25" - > - </camera> - <camera - name = "rightSide" - position = "-3.0 -1.2 -0.25" - target = "-2.8 -1.2 -0.25" - > - </camera> - <camera - name = "leftSide" - position = "0 6 0" - target = "0 0 0" - > - </camera> - <camera - name = "backTv" - position = "4 1.3 -0.3" - target = "0 -0.4 0.7" - > - </camera> + <shiftUpPaddle inputAxis="normalizedRelativeRotation"/> + <shiftDownPaddle inputAxis="normalizedRelativeRotation"/> + <steeringWheel inputAxis="normalizedRelativeRotation" maxAngle="900"/> </vehicle> Modified: trunk/src/common/camera.cpp =================================================================== --- trunk/src/common/camera.cpp 2006-07-20 11:03:45 UTC (rev 447) +++ trunk/src/common/camera.cpp 2006-07-20 17:50:32 UTC (rev 448) @@ -30,6 +30,10 @@ Camera::Camera (XmlTag * tag) :WorldObject("camera") { + constructFromTag(tag); +} +void Camera::readCustomDataTag(XmlTag * tag) +{ ogreCamera = System::get()->ogreSceneManager->createCamera (getId()); ogreCamera->setFixedYawAxis (true, Ogre::Vector3 (0, 0, 1)); ogreCamera->setNearClipDistance (0.100); @@ -40,25 +44,21 @@ positionID = 0; targetID = 0; isFree = false; - if (tag->getName() == "camera") + delete positionOffset; + positionOffset = new Vector3d (tag->getAttribute("position")); + std::string t = ""; + if ( (t = tag->getAttribute("target")) != "") { - setName ( tag->getAttribute("name")); - delete positionOffset; - positionOffset = new Vector3d (tag->getAttribute("position")); - std::string t = ""; - if ( (t = tag->getAttribute("target")) != "") - { - delete targetOffset; - targetOffset = new Vector3d (t); - } - /* - else - { - //TODO create a target based on "rotation" tag. - log->__format(LOG_ERROR, "Camera has no readable target!"); - } - */ + delete targetOffset; + targetOffset = new Vector3d (t); } + /* + else + { + //TODO create a target based on "rotation" tag. + log->__format(LOG_ERROR, "Camera has no readable target!"); + } + */ } Camera::~Camera () Modified: trunk/src/common/camera.hpp =================================================================== --- trunk/src/common/camera.hpp 2006-07-20 11:03:45 UTC (rev 447) +++ trunk/src/common/camera.hpp 2006-07-20 17:50:32 UTC (rev 448) @@ -31,6 +31,7 @@ Vector3d * targetOffset; void stopPhysics(); Camera (XmlTag * tag); + void readCustomDataTag(XmlTag * tag); public: static pCamera create(XmlTag * tag); ~Camera (); Modified: trunk/src/common/ogreObject.cpp =================================================================== --- trunk/src/common/ogreObject.cpp 2006-07-20 11:03:45 UTC (rev 447) +++ trunk/src/common/ogreObject.cpp 2006-07-20 17:50:32 UTC (rev 448) @@ -40,7 +40,7 @@ if (useMesh) { - entity = System::get()->ogreSceneManager->createEntity (id, meshPath); + entity = System::get()->ogreSceneManager->createEntity (id + name, meshPath); entity->setCastShadows(true); for(unsigned int i = 0; i < entity->getNumSubEntities(); i++) { Modified: trunk/src/common/worldObject.cpp =================================================================== --- trunk/src/common/worldObject.cpp 2006-07-20 11:03:45 UTC (rev 447) +++ trunk/src/common/worldObject.cpp 2006-07-20 17:50:32 UTC (rev 448) @@ -10,6 +10,7 @@ #include "worldObject.hpp" #include "quaternion.hpp" #include "vector3d.hpp" +#include "mospPath.hpp" #include "area.hpp" #include "part.hpp" @@ -35,6 +36,7 @@ this->name = name; this->path = "/unknownPath/"; this->xmlPath = path + "unknownFilepath"; + this->userDriver = false; const int numberStringSize = 64; char numberString[numberStringSize]; @@ -97,6 +99,7 @@ std::string WorldObject::getName() { + //TODO use a Class::mospInternalPath() std::string type; if (0) type.clear(); else if (dynamic_cast<DoubleWishbone *>(this)) type = "doublewishbone"; @@ -162,8 +165,8 @@ } pOdeObject WorldObject::getMainOdeObject() { - //TODO: check what is returned when odeObjects is empty. prolly a reset shared pointer, but i'm not sure - //if (odeObjects.empty()) return NULL; + pOdeObject tmp; + if (odeObjects.empty()) return tmp; return odeObjects.begin()->second; } void WorldObject::stepPhysics () @@ -172,34 +175,12 @@ //step torque transfer objects first for (i = objects.begin(); i != objects.end(); i++) { - if (0); - else if (pGear tmp = boost::dynamic_pointer_cast<Gear >(i->second)) tmp->stepPhysics(); - else if (pLSD tmp = boost::dynamic_pointer_cast<LSD >(i->second)) tmp->stepPhysics(); - else if (pClutch tmp = boost::dynamic_pointer_cast<Clutch >(i->second)) tmp->stepPhysics(); - else if (pDriveJoint tmp = boost::dynamic_pointer_cast<DriveJoint >(i->second)) tmp->stepPhysics(); + if (boost::dynamic_pointer_cast<DriveJoint>(i->second)) i->second->stepPhysics(); } //step the rest of objects for (i = objects.begin(); i != objects.end(); i++) { - if (0); - else if (pDoubleWishbone tmp = boost::dynamic_pointer_cast<DoubleWishbone>(i->second)) tmp->stepPhysics(); - else if (pFixed tmp = boost::dynamic_pointer_cast<Fixed >(i->second)) tmp->stepPhysics(); - else if (pUnidimensional tmp = boost::dynamic_pointer_cast<Unidimensional>(i->second)) tmp->stepPhysics(); - else if (pSuspension tmp = boost::dynamic_pointer_cast<Suspension >(i->second)) tmp->stepPhysics(); - else if (pEngine tmp = boost::dynamic_pointer_cast<Engine >(i->second)) tmp->stepPhysics(); - else if (pGearbox tmp = boost::dynamic_pointer_cast<Gearbox >(i->second)) tmp->stepPhysics(); - else if (pWheel tmp = boost::dynamic_pointer_cast<Wheel >(i->second)) tmp->stepPhysics(); - else if (pFinalDrive tmp = boost::dynamic_pointer_cast<FinalDrive >(i->second)) tmp->stepPhysics(); - else if (pDriveMass tmp = boost::dynamic_pointer_cast<DriveMass >(i->second)) tmp->stepPhysics(); - else if (pGearboxGear tmp = boost::dynamic_pointer_cast<GearboxGear >(i->second)) tmp->stepPhysics(); - else if (pBody tmp = boost::dynamic_pointer_cast<Body >(i->second)) tmp->stepPhysics(); - else if (pPedal tmp = boost::dynamic_pointer_cast<Pedal >(i->second)) tmp->stepPhysics(); - else if (pPart tmp = boost::dynamic_pointer_cast<Part >(i->second)) tmp->stepPhysics(); - else if (pVehicle tmp = boost::dynamic_pointer_cast<Vehicle >(i->second)) tmp->stepPhysics(); - else if (pArea tmp = boost::dynamic_pointer_cast<Area >(i->second)) tmp->stepPhysics(); - else if (pWorld tmp = boost::dynamic_pointer_cast<World >(i->second)) tmp->stepPhysics(); - else if (pCamera tmp = boost::dynamic_pointer_cast<Camera >(i->second)) tmp->stepPhysics(); - else if (pWorldObject tmp = boost::dynamic_pointer_cast<WorldObject >(i->second)) tmp->stepPhysics(); + if (!(boost::dynamic_pointer_cast<DriveJoint>(i->second))) i->second->stepPhysics(); } } void WorldObject::stepGraphics () @@ -212,29 +193,7 @@ WorldObjectsIt i = objects.begin(); for (; i != objects.end(); i++) { - if (0); - else if (pDoubleWishbone tmp = boost::dynamic_pointer_cast<DoubleWishbone>(i->second)) tmp->stepGraphics(); - else if (pFixed tmp = boost::dynamic_pointer_cast<Fixed >(i->second)) tmp->stepGraphics(); - else if (pUnidimensional tmp = boost::dynamic_pointer_cast<Unidimensional>(i->second)) tmp->stepGraphics(); - else if (pSuspension tmp = boost::dynamic_pointer_cast<Suspension >(i->second)) tmp->stepGraphics(); - else if (pEngine tmp = boost::dynamic_pointer_cast<Engine >(i->second)) tmp->stepGraphics(); - else if (pGearbox tmp = boost::dynamic_pointer_cast<Gearbox >(i->second)) tmp->stepGraphics(); - else if (pWheel tmp = boost::dynamic_pointer_cast<Wheel >(i->second)) tmp->stepGraphics(); - else if (pFinalDrive tmp = boost::dynamic_pointer_cast<FinalDrive >(i->second)) tmp->stepGraphics(); - else if (pDriveMass tmp = boost::dynamic_pointer_cast<DriveMass >(i->second)) tmp->stepGraphics(); - else if (pGear tmp = boost::dynamic_pointer_cast<Gear >(i->second)) tmp->stepGraphics(); - else if (pLSD tmp = boost::dynamic_pointer_cast<LSD >(i->second)) tmp->stepGraphics(); - else if (pClutch tmp = boost::dynamic_pointer_cast<Clutch >(i->second)) tmp->stepGraphics(); - else if (pDriveJoint tmp = boost::dynamic_pointer_cast<DriveJoint >(i->second)) tmp->stepGraphics(); - else if (pGearboxGear tmp = boost::dynamic_pointer_cast<GearboxGear >(i->second)) tmp->stepGraphics(); - else if (pBody tmp = boost::dynamic_pointer_cast<Body >(i->second)) tmp->stepGraphics(); - else if (pPedal tmp = boost::dynamic_pointer_cast<Pedal >(i->second)) tmp->stepGraphics(); - else if (pPart tmp = boost::dynamic_pointer_cast<Part >(i->second)) tmp->stepGraphics(); - else if (pVehicle tmp = boost::dynamic_pointer_cast<Vehicle >(i->second)) tmp->stepGraphics(); - else if (pArea tmp = boost::dynamic_pointer_cast<Area >(i->second)) tmp->stepGraphics(); - else if (pWorld tmp = boost::dynamic_pointer_cast<World >(i->second)) tmp->stepGraphics(); - else if (pCamera tmp = boost::dynamic_pointer_cast<Camera >(i->second)) tmp->stepGraphics(); - else if (pWorldObject tmp = boost::dynamic_pointer_cast<WorldObject >(i->second)) tmp->stepGraphics(); + i->second->stepGraphics(); } } void WorldObject::setPosition (Vector3d position) @@ -534,3 +493,155 @@ return tmp; } +void WorldObject::constructFromTag(XmlTag * tag) +{ + if (tag == NULL) return; + if (tag->getName() != name) log->__format(LOG_ERROR, "Expected a <%s> tag, got a <%s>", name.c_str(), tag->getName().c_str()); + XmlTag * t; + t = tag->getTag(0); for (int i = 0; i < tag->nTags(); t = tag->getTag(++i)) + { + if (t->getName() == "sharedobject") + { + std::string sobjname = t->getAttribute("name"); + if (t->nTags() == 1) + { + XmlTag * o = t->getTag(0); + if (o->getName() == "vehicle") + { + log->loadscreen (LOG_CCREATOR, "Creating a vehicle"); + std::string model = o->getAttribute("model"); + pVehicle tmp= Vehicle::create(model); + tmp->setName(sobjname); + objects[tmp->getName()] = tmp; + } + if (o->getName() == "area") + { + log->loadscreen (LOG_CCREATOR, "Creating an area"); + std::string model = o->getAttribute("model"); + pArea tmp = Area::create (model); + tmp->setName(sobjname); + objects[tmp->getName()] = tmp; + } + } + } + } + t = tag->getTag(0); for (int i = 0; i < tag->nTags(); t = tag->getTag(++i)) + { + if (t->getName() == "subobject") + { + std::string sobjname = t->getAttribute("name"); + if (t->nTags() == 1) + { + XmlTag * o = t->getTag(0); + if (o->getName() == "body") + { pBody tmp = Body::create(o); tmp->setName(sobjname); objects[tmp->getName()] = tmp; } + if (o->getName() == "engine") + { pEngine tmp = Engine::create(o); tmp->setName(sobjname); objects[tmp->getName()] = tmp; } + if (o->getName() == "clutch") + { pClutch tmp = Clutch::create(o); tmp->setName(sobjname); objects[tmp->getName()] = tmp; } + if (o->getName() == "gearbox") + { pGearbox tmp = Gearbox::create(o); tmp->setName(sobjname); objects[tmp->getName()] = tmp; } + if (o->getName() == "gearboxgear") + { pGearboxGear tmp = GearboxGear::create(o); tmp->setName(sobjname); objects[tmp->getName()] = tmp; } + if (o->getName() == "gear") + { pGear tmp = Gear::create(o); tmp->setName(sobjname); objects[tmp->getName()] = tmp; } + if (o->getName() == "finaldrive") + { pFinalDrive tmp = FinalDrive::create(o); tmp->setName(sobjname); objects[tmp->getName()] = tmp; } + if (o->getName() == "pedal") + { pPedal tmp = Pedal::create(o); tmp->setName(sobjname); objects[tmp->getName()] = tmp; } + if (o->getName() == "wheel") + { pWheel tmp = Wheel::create(o); tmp->setName(sobjname); objects[tmp->getName()] = tmp; } + if (o->getName() == "suspension.unidimensional") + { pUnidimensional tmp = Unidimensional::create(o); tmp->setName(sobjname); objects[tmp->getName()] = tmp; } + if (o->getName() == "suspension.fixed") + { pFixed tmp = Fixed::create(o); tmp->setName(sobjname); objects[tmp->getName()] = tmp; } + if (o->getName() == "suspension.doublewishbone") + { pDoubleWishbone tmp = DoubleWishbone::create(o); tmp->setName(sobjname); objects[tmp->getName()] = tmp; } + if (o->getName() == "camera") + { pCamera tmp = Camera::create(o); tmp->setName(sobjname); objects[tmp->getName()] = tmp; } + } + System::get()->ogreWindow->update (); + } + } + t = tag->getTag(0); for (int i = 0; i < tag->nTags(); t = tag->getTag(++i)) + { + if (t->getName() == "location-vehicle") + { + log->__format (LOG_CCREATOR, "Setting vehicle location"); + std::string f= t->getAttribute("first"); + std::string s= t->getAttribute("second"); + pLocation first = getLocationObject(f); + pVehicle second = getVehicleObject(s); + + second->setPosition(Vector3d(0, 0, 0)); + second->applyRotation(first->getRotation()); + second->setPosition(first->getPosition()); + } + } + t = tag->getTag(0); for (int i = 0; i < tag->nTags(); t = tag->getTag(++i)) + { + if (t->getName() == "vehicle-driver") + { + log->__format (LOG_CCREATOR, "Setting vehicle driver"); + std::string f= t->getAttribute("first"); + std::string s= t->getAttribute("second"); + pVehicle tmp = getVehicleObject(f); + if (s == "user" ) tmp->setUserDriver(); + } + } + pOgreObjectData ogreData(new OgreObjectData); + ogreData->meshPath = getPath() + ogreData->meshPath; + pOgreObject ogreObject (new OgreObject(this, ogreData, getId(), false)); + ogreObjects[ogreObject->getId()] = ogreObject; + t = tag->getTag(0); for (int i = 0; i < tag->nTags(); t = tag->getTag(++i)) + { + if (t->getName() == "graphicsMesh") + { + pOgreObjectData childData(new OgreObjectData); + childData->meshPath = getPath() + t->getAttribute("file"); + Vector3d posDiff (t->getAttribute("position")); + Vector3d scale (t->getAttribute("scale")); + Quaternion rotDiff (t->getAttribute("rotation")); + pOgreObject ogreChild (new OgreObject(this, childData, getId())); + ogreObjects[ogreChild->getId()] = ogreChild; + ogreChild->setOgreReference(ogreObjects[ogreObject->getId()], rotDiff, posDiff, scale); + System::get()->ogreWindow->update (); + } + } + t = tag->getTag(0); for (int i = 0; i < tag->nTags(); t = tag->getTag(++i)) + { + if (t->getName() == "customData") + { + readCustomDataTag(t); + } + } + ogreObjects[ogreObject->getId()]->setOdeReference(getMainOdeObject()); +} +pLocation WorldObject::getLocationObject(std::string fullname) +{ + pLocation tmp; + if (MospPath::getType(fullname) == "area") + { + pArea a = getArea(MospPath::getName(fullname)); + log->__format(LOG_DEVELOPER, "Area name=%s", a->getName().c_str()); + tmp = a->getLocation(MospPath::getName(MospPath::getSubFullname(fullname))); + } + log->__format(LOG_DEVELOPER, "Location name=%s", tmp->getName().c_str()); + return tmp; +} +pVehicle WorldObject::getVehicleObject(std::string fullname) +{ + pVehicle tmp; + if ((tmp = boost::dynamic_pointer_cast<Vehicle>(getFirstObject(fullname))) == NULL) + log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", fullname.c_str(), "Vehicle"); + log->__format(LOG_DEVELOPER, "Vehicle name=%s", tmp->getName().c_str()); + return tmp; +} +pWorldObject WorldObject::getFirstObject(std::string fullname) +{ + std::string type = MospPath::getType(fullname); + std::string name = MospPath::getName(fullname); + pWorldObject tmp = getObject("(" + type + ")" + name); + log->__format(LOG_DEVELOPER, "Object name=%s", tmp->getName().c_str()); + return tmp; +} Modified: trunk/src/common/worldObject.hpp =================================================================== --- trunk/src/common/worldObject.hpp 2006-07-20 11:03:45 UTC (rev 447) +++ trunk/src/common/worldObject.hpp 2006-07-20 17:50:32 UTC (rev 448) @@ -50,12 +50,13 @@ static unsigned int instancesCount; static WorldObjectsC worldObjects; std::string id; - std::string name; std::string path; std::string xmlPath; protected: + std::string name; pCamera activeCamera; pLogEngine log; + bool userDriver; WorldObject * base; wWorldObject container; OgreObjects ogreObjects; @@ -63,6 +64,8 @@ WorldObjects objects; Locations locations; WorldObject (const std::string & name); + void constructFromTag(XmlTag * tag); + virtual void readCustomDataTag(XmlTag * tag) = 0; public: virtual ~WorldObject (); void setContainer(pWorldObject container); @@ -79,8 +82,8 @@ static void logAll(); pLogEngine getLog(); - void stepGraphics (); - void stepPhysics (); + virtual void stepGraphics (); + virtual void stepPhysics (); pCamera switchNextCamera(); void pointCameras(pVehicle target); @@ -94,6 +97,10 @@ void setRotation (Quaternion rotation); void applyRotation (Quaternion rotation); + pLocation getLocationObject(std::string fullname); + pVehicle getVehicleObject(std::string fullname); + pWorldObject getFirstObject(std::string fullname); + pLocation getLocation (std::string name); pArea getArea(std::string name); Modified: trunk/src/vehicle/body.cpp =================================================================== --- trunk/src/vehicle/body.cpp 2006-07-20 11:03:45 UTC (rev 447) +++ trunk/src/vehicle/body.cpp 2006-07-20 17:50:32 UTC (rev 448) @@ -23,54 +23,22 @@ pBody tmp (new Body(tag)); return tmp; } +void Body::readCustomDataTag(XmlTag * tag) +{ + pBodyOdeData data(new BodyOdeData); + data->length = stod (tag->getAttribute("length")); + data->width = stod (tag->getAttribute("width")); + data->height = stod (tag->getAttribute("height")); + data->mass = stod (tag->getAttribute("mass")); + frontalArea = stod (tag->getAttribute("frontalArea")); + if (frontalArea == 0) frontalArea = data->width * data->height * 0.6; + dragCoefficient = stod (tag->getAttribute("dragCoefficient")); + odeObjects[getName()] = pOdeObject(new OdeObject(this, data, getName())); +} Body::Body (XmlTag * tag) :WorldObject("body") { - userDriver = false; - dragCoefficient = 0.3; - frontalArea = 0; - pBodyOdeData data(new BodyOdeData); - pOgreObjectData ogreData(new OgreObjectData); - - if (tag->getName() == "body") - { - setName ( tag->getAttribute("name")); - data->length = stod (tag->getAttribute("length")); - data->width = stod (tag->getAttribute("width")); - data->height = stod (tag->getAttribute("height")); - data->mass = stod (tag->getAttribute("mass")); - frontalArea = stod (tag->getAttribute("frontalArea")); - dragCoefficient = stod (tag->getAttribute("dragCoefficient")); - ogreData->meshPath = ""; - //create main mesh - ogreData->meshPath = getPath() + ogreData->meshPath; - pOgreObject ogreObject (new OgreObject(this, ogreData, getId(), false)); - ogreObjects[ogreObject->getId()] = ogreObject; - odeObjects[getName()] = pOdeObject(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() == "mesh") - { - pOgreObjectData childData(new OgreObjectData); - childData->meshPath = getPath() + t->getAttribute("file"); - Vector3d posDiff (t->getAttribute("position")); - Vector3d scale (t->getAttribute("scale")); - Quaternion rotDiff (t->getAttribute("rotation")); - pOgreObject ogreChild (new OgreObject(this, childData, getId())); - ogreObjects[ogreChild->getId()] = ogreChild; - ogreChild->setOgreReference(ogreObjects[ogreObject->getId()], rotDiff, posDiff, scale); - System::get()->ogreWindow->update (); - } - } - } - - // set the air drag variables correctly - if (frontalArea == 0) - { - frontalArea = data->width * data->height * 0.6; - } + constructFromTag(tag); } Body::~Body () Modified: trunk/src/vehicle/body.hpp =================================================================== --- trunk/src/vehicle/body.hpp 2006-07-20 11:03:45 UTC (rev 447) +++ trunk/src/vehicle/body.hpp 2006-07-20 17:50:32 UTC (rev 448) @@ -23,12 +23,12 @@ class Body : public WorldObject { private: - bool userDriver; double dragCoefficient; double frontalArea; void stopPhysics (); void stopGraphics (); Body (XmlTag * tag); + void readCustomDataTag(XmlTag * tag); public: static pBody create (XmlTag * tag); ~Body (); Modified: trunk/src/vehicle/driveJoint.cpp =================================================================== --- trunk/src/vehicle/driveJoint.cpp 2006-07-20 11:03:45 UTC (rev 447) +++ trunk/src/vehicle/driveJoint.cpp 2006-07-20 17:50:32 UTC (rev 448) @@ -32,20 +32,19 @@ return tmp; } +void Clutch::readCustomDataTag(XmlTag * tag) +{ + coeffStaticFriction = stod(tag->getAttribute("coeffStaticFriction")); + coeffDynamicFriction = stod(tag->getAttribute("coeffDynamicFriction")); + maxTorqueTransfer = stod(tag->getAttribute("maxTorqueTransfer")); +} Clutch::Clutch (XmlTag * tag) :DriveJoint("clutch") { outputTorqueTransfer = 0.0; inputTorqueTransfer = 0.0; lockedParam = 1; - - if (tag->getName() == "clutch") - { - setName ( tag->getAttribute("name")); - coeffStaticFriction = stod(tag->getAttribute("coeffStaticFriction")); - coeffDynamicFriction = stod(tag->getAttribute("coeffDynamicFriction")); - maxTorqueTransfer = stod(tag->getAttribute("maxTorqueTransfer")); - } + constructFromTag(tag); } Clutch::Clutch () @@ -74,31 +73,20 @@ } pGear Gear::create () { - pGear tmp (new Gear()); + pGear tmp (new Gear(NULL)); return tmp; } Gear::Gear (XmlTag * tag) :DriveJoint("gear") { +/*/ outputTorqueTransfer = 0.0; inputTorqueTransfer = 0.0; ratio = 1.0; springConstant = 1000; relAngle = 0.0; - - if (tag->getName() == "gear") - { - setName ( tag->getAttribute("name")); - //coeffStaticFriction = stod(tag->getAttribute("coeffStaticFriction")); - //coeffDynamicFriction = stod(tag->getAttribute("coeffDynamicFriction")); - //maxTorqueTransfer = stod(tag->getAttribute("maxTorqueTransfer")); - } -} - -Gear::Gear () - :DriveJoint("gear") -{ +//*/ ratio = 1.0; springConstant = 300.0; dampConstant = 8; @@ -108,7 +96,13 @@ prevRelAngularVel = 0.0; outputTorqueTransfer = 0.0; inputTorqueTransfer = 0.0; +//*/ + + constructFromTag(tag); } +void Gear::readCustomDataTag(XmlTag * tag) +{ +} Gear::~Gear () { @@ -127,24 +121,21 @@ LSD::LSD (XmlTag * tag) :DriveJoint("lsd") { + constructFromTag(tag); outputTorqueTransfer = 0.0; inputTorqueTransfer = 0.0; ratio = 1.0; springConstant = 1000; relAngle = 0.0; - - if (tag->getName() == "vehicle") - { - setName ( tag->getAttribute("name")); - //coeffStaticFriction = stod(tag->getAttribute("coeffStaticFriction")); - //coeffDynamicFriction = stod(tag->getAttribute("coeffDynamicFriction")); - //maxTorqueTransfer = stod(tag->getAttribute("maxTorqueTransfer")); - } } +void LSD::readCustomDataTag(XmlTag * tag) +{ +} LSD::LSD () :DriveJoint("lsd") { + constructFromTag(NULL); ratio = 1.0; springConstant = 300.0; dampConstant = 8; Modified: trunk/src/vehicle/driveJoint.hpp =================================================================== --- trunk/src/vehicle/driveJoint.hpp 2006-07-20 11:03:45 UTC (rev 447) +++ trunk/src/vehicle/driveJoint.hpp 2006-07-20 17:50:32 UTC (rev 448) @@ -57,6 +57,7 @@ bool locked; Clutch (XmlTag * tag); Clutch (); + void readCustomDataTag(XmlTag * tag); public: static pClutch create (XmlTag * tag); static pClutch create (); @@ -74,7 +75,7 @@ double dampConstant; void startPhysics (XmlTag * tag); Gear (XmlTag * tag); - Gear (); + void readCustomDataTag(XmlTag * tag); public: static pGear create (XmlTag * tag); static pGear create (); @@ -99,6 +100,7 @@ void startPhysics (XmlTag * tag); LSD (XmlTag * tag); LSD (); + void readCustomDataTag(XmlTag * tag); public: static pLSD create (XmlTag * tag); static pLSD create (); Modified: trunk/src/vehicle/engine.cpp =================================================================== --- trunk/src/vehicle/engine.cpp 2006-07-20 11:03:45 UTC (rev 447) +++ trunk/src/vehicle/engine.cpp 2006-07-20 17:50:32 UTC (rev 448) @@ -22,20 +22,19 @@ Engine::Engine (XmlTag * tag) :DriveMass("engine") { + constructFromTag(tag); +} +void Engine::readCustomDataTag(XmlTag * tag) +{ inputAngularVel = 0.0; prevAngularVel = 0.0; outputAngularVel = 0.0; angularAcc = 0.0; log->__format (LOG_CCREATOR, "Starting to parse an engine node"); - if (tag->getName() == "engine") - { - setName (tag->getAttribute("name")); - torqueLinearMultiplier = stod (tag->getAttribute("torqueLinearMultiplier")); - inertia = stod (tag->getAttribute("engineInertia")); - friction = stod (tag->getAttribute("engineFriction")); - angularVelLimit = stod (tag->getAttribute("angularVelLimit")); - - } + torqueLinearMultiplier = stod (tag->getAttribute("torqueLinearMultiplier")); + inertia = stod (tag->getAttribute("engineInertia")); + friction = stod (tag->getAttribute("engineFriction")); + angularVelLimit = stod (tag->getAttribute("angularVelLimit")); } Engine::~Engine () Modified: trunk/src/vehicle/engine.hpp =================================================================== --- trunk/src/vehicle/engine.hpp 2006-07-20 11:03:45 UTC (rev 447) +++ trunk/src/vehicle/engine.hpp 2006-07-20 17:50:32 UTC (rev 448) @@ -24,6 +24,7 @@ double angularVelLimit; pPedal gasPedal; Engine (XmlTag * tag); + void readCustomDataTag(XmlTag * tag); public: static pEngine create (XmlTag * tag); ~Engine (); Modified: trunk/src/vehicle/finalDrive.cpp =================================================================== --- trunk/src/vehicle/finalDrive.cpp 2006-07-20 11:03:45 UTC (rev 447) +++ trunk/src/vehicle/finalDrive.cpp 2006-07-20 17:50:32 UTC (rev 448) @@ -20,8 +20,12 @@ } FinalDrive::FinalD... [truncated message content] |
|
From: <st...@us...> - 2006-07-20 11:04:00
|
Revision: 447 Author: stenyak Date: 2006-07-20 04:03:45 -0700 (Thu, 20 Jul 2006) ViewCVS: http://svn.sourceforge.net/motorsport/?rev=447&view=rev Log Message: ----------- Refactored locations code from Area to WorldObject class. Modified Paths: -------------- trunk/src/common/worldObject.cpp trunk/src/common/worldObject.hpp trunk/src/vehicle/body.cpp trunk/src/world/area.cpp trunk/src/world/area.hpp Modified: trunk/src/common/worldObject.cpp =================================================================== --- trunk/src/common/worldObject.cpp 2006-07-20 02:47:04 UTC (rev 446) +++ trunk/src/common/worldObject.cpp 2006-07-20 11:03:45 UTC (rev 447) @@ -522,3 +522,15 @@ } } } + +pLocation WorldObject::getLocation (std::string name) +{ + pLocation tmp; + for (LocationsIt i = locations.begin(); i != locations.end(); i++) + { + if (i->first == name && i->second) if (tmp = boost::dynamic_pointer_cast<Location>(i->second)) break; + } + if (tmp == NULL) log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", name.c_str(), "Location"); + return tmp; +} + Modified: trunk/src/common/worldObject.hpp =================================================================== --- trunk/src/common/worldObject.hpp 2006-07-20 02:47:04 UTC (rev 446) +++ trunk/src/common/worldObject.hpp 2006-07-20 11:03:45 UTC (rev 447) @@ -61,6 +61,7 @@ OgreObjects ogreObjects; OdeObjects odeObjects; WorldObjects objects; + Locations locations; WorldObject (const std::string & name); public: virtual ~WorldObject (); @@ -93,6 +94,8 @@ void setRotation (Quaternion rotation); void applyRotation (Quaternion rotation); + pLocation getLocation (std::string name); + pArea getArea(std::string name); pVehicle getVehicle(std::string name); pCamera getCamera (std::string name); Modified: trunk/src/vehicle/body.cpp =================================================================== --- trunk/src/vehicle/body.cpp 2006-07-20 02:47:04 UTC (rev 446) +++ trunk/src/vehicle/body.cpp 2006-07-20 11:03:45 UTC (rev 447) @@ -84,7 +84,6 @@ if (userDriver) { double moveZ = System::get()->axisMap[getIDKeyboardKey(SDLK_BACKSPACE)]->getValue() * 50000; - log->__format(LOG_DEVELOPER,"Physics of body..............%f", moveZ); moveZ += System::get()->axisMap[getIDKeyboardKey(SDLK_RETURN)]->getValue() * 12200; moveZ -= System::get()->axisMap[getIDKeyboardKey(SDLK_RSHIFT)]->getValue() * 10000; dBodyAddForce (bodyID, 0, 0, moveZ); Modified: trunk/src/world/area.cpp =================================================================== --- trunk/src/world/area.cpp 2006-07-20 02:47:04 UTC (rev 446) +++ trunk/src/world/area.cpp 2006-07-20 11:03:45 UTC (rev 447) @@ -314,17 +314,6 @@ } } -pLocation Area::getLocation (std::string name) -{ - pLocation tmp; - for (LocationsIt i = locations.begin(); i != locations.end(); i++) - { - if (i->first == name && i->second) if (tmp = boost::dynamic_pointer_cast<Location>(i->second)) break; - } - if (tmp == NULL) log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", name.c_str(), "Location"); - return tmp; -} - pCamera Area::getClosestCamera(Vector3d location) { log->__format(LOG_DEVELOPER, "Finding closest camera"); Modified: trunk/src/world/area.hpp =================================================================== --- trunk/src/world/area.hpp 2006-07-20 02:47:04 UTC (rev 446) +++ trunk/src/world/area.hpp 2006-07-20 11:03:45 UTC (rev 447) @@ -32,15 +32,12 @@ std::string author; std::string contact; std::string license; - Locations locations; void construct (XmlTag * tag); Area (std::string areaName); public: static pArea create(std::string areaName); ~Area (); - pLocation getLocation (std::string name); - dBodyID areaBodyID; pCamera getClosestCamera(Vector3d location); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <st...@us...> - 2006-07-20 02:47:20
|
Revision: 446 Author: stenyak Date: 2006-07-19 19:47:04 -0700 (Wed, 19 Jul 2006) ViewCVS: http://svn.sourceforge.net/motorsport/?rev=446&view=rev Log Message: ----------- Refactored a lot of get* methods, moved to WorldObject. Refactored vehicle and area code, so that it uses WorldObject objects container. Refactored camera code, now WorldObject keeps track of current camera for each object. Modified Paths: -------------- trunk/src/common/worldObject.cpp trunk/src/common/worldObject.hpp trunk/src/vehicle/vehicle.cpp trunk/src/vehicle/vehicle.hpp trunk/src/world/area.cpp trunk/src/world/area.hpp trunk/src/world/part.cpp trunk/src/world/part.hpp Modified: trunk/src/common/worldObject.cpp =================================================================== --- trunk/src/common/worldObject.cpp 2006-07-20 00:57:58 UTC (rev 445) +++ trunk/src/common/worldObject.cpp 2006-07-20 02:47:04 UTC (rev 446) @@ -292,3 +292,233 @@ if (tmp == NULL) log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", name.c_str(), "Vehicle"); return tmp; } +pBody WorldObject::getBody (std::string name) +{ + pBody tmp; + for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++) + { + if (i->first == ("(body)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<Body>(i->second)) break; + } + if (tmp == NULL) log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", name.c_str(), "Body"); + return tmp; +} +pDriveMass WorldObject::getDriveMass (std::string name) +{ + pDriveMass tmp; + for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++) + { + if (i->first == ("(drivemass)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<DriveMass>(i->second)) break; + if (i->first == ("(engine)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<DriveMass>(i->second)) break; + if (i->first == ("(finaldrive)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<DriveMass>(i->second)) break; + if (i->first == ("(gearbox)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<DriveMass>(i->second)) break; + if (i->first == ("(wheel)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<DriveMass>(i->second)) break; + } + if (tmp == NULL) log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", name.c_str(), "DriveMass"); + return tmp; +} +pDriveJoint WorldObject::getDriveJoint (std::string name) +{ + pDriveJoint tmp; + for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++) + { + if (i->first == ("(drivejoint)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<DriveJoint>(i->second)) break; + if (i->first == ("(clutch)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<Clutch>(i->second)) break; + if (i->first == ("(gear)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<Gear>(i->second)) break; + if (i->first == ("(lsd)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<LSD>(i->second)) break; + } + if (tmp == NULL) log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", name.c_str(), "DriveJoint"); + return tmp; +} +pClutch WorldObject::getClutch (std::string name) +{ + pClutch tmp; + for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++) + { + if (i->first == ("(clutch)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<Clutch>(i->second)) break; + } + if (tmp == NULL) log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", name.c_str(), "Clutch"); + return tmp; +} +pGear WorldObject::getGear (std::string name) +{ + pGear tmp; + for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++) + { + if (i->first == ("(gear)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<Gear>(i->second)) break; + } + if (tmp == NULL) log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", name.c_str(), "Gear"); + return tmp; +} +pLSD WorldObject::getLSD (std::string name) +{ + pLSD tmp; + for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++) + { + if (i->first == ("(lsd)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<LSD>(i->second)) break; + } + if (tmp == NULL) log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", name.c_str(), "LSD"); + return tmp; +} +pEngine WorldObject::getEngine (std::string name) +{ + pEngine tmp; + for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++) + { + if (i->first == ("(engine)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<Engine>(i->second)) break; + } + if (tmp == NULL) log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", name.c_str(), "Engine"); + return tmp; +} +pFinalDrive WorldObject::getFinalDrive (std::string name) +{ + pFinalDrive tmp; + for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++) + { + if (i->first == ("(finaldrive)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<FinalDrive>(i->second)) break; + } + if (tmp == NULL) log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", name.c_str(), "FinalDrive"); + return tmp; +} +pGearbox WorldObject::getGearbox (std::string name) +{ + pGearbox tmp; + for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++) + { + if (i->first == ("(gearbox)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<Gearbox>(i->second)) break; + } + if (tmp == NULL) log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", name.c_str(), "Gearbox"); + return tmp; +} +pGearboxGear WorldObject::getGearboxGear (std::string name) +{ + pGearboxGear tmp; + for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++) + { + if (i->first == ("(gearboxgear)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<GearboxGear>(i->second)) break; + } + if (tmp == NULL) log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", name.c_str(), "GearboxGear"); + return tmp; +} +pPedal WorldObject::getPedal (std::string name) +{ + pPedal tmp; + for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++) + { + if (i->first == ("(pedal)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<Pedal>(i->second)) break; + } + if (tmp == NULL) log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", name.c_str(), "Pedal"); + return tmp; +} +pSuspension WorldObject::getSuspension (std::string name) +{ + pSuspension tmp; + for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++) + { + if (i->first == ("(suspension)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<Suspension>(i->second)) break; + if (i->first == ("(doublewishbone)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<DoubleWishbone>(i->second)) break; + if (i->first == ("(fixed)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<Fixed>(i->second)) break; + if (i->first == ("(unidimensional)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<Unidimensional>(i->second)) break; + } + if (tmp == NULL) log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", name.c_str(), "Suspension"); + return tmp; +} +pWheel WorldObject::getWheel (std::string name) +{ + pWheel tmp; + for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++) + { + if (i->first == ("(wheel)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<Wheel>(i->second)) break; + } + if (tmp == NULL) log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", name.c_str(), "Wheel"); + return tmp; +} +pWorldObject WorldObject::getObject (std::string name) +{ + if (objects.find(name) == objects.end()) + log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" from generic type \"%s\"", name.c_str(), "WorldObject"); + return objects[name]; +} +pWorldObject WorldObject::getWorldObject (std::string name) +{ + pWorldObject tmp; + for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++) + { + if (i->first == ("(worldobject)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<WorldObject>(i->second)) break; + } + if (tmp == NULL) log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", name.c_str(), "WorldObject"); + return tmp; +} +pCamera WorldObject::getCamera (std::string name) +{ + pCamera tmp; + for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++) + { + if (i->first == (name) && i->second) if (tmp = boost::dynamic_pointer_cast<Camera>(i->second)) break; + if (i->first == ("(camera)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<Camera>(i->second)) break; + } + if (tmp == NULL) log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", name.c_str(), "Camera"); + return tmp; +} + +pCamera WorldObject::switchNextCamera() +{ + WorldObjectsIt i = objects.begin(); + pCamera nextCam; + bool first = false; + bool found = false; + for (;i != objects.end(); i++) + { + if (pCamera tmp = boost::dynamic_pointer_cast<Camera>(i->second)) + { + if (first == false) + { + nextCam = tmp; + first = true; + } + if (found == true) + { + nextCam = tmp; + found = false; + } + if (activeCamera == tmp) + { + found = true; + } + } + } + activeCamera = nextCam; + return activeCamera; +} +void WorldObject::pointCameras(pVehicle target) +{ + WorldObjectsIt i = objects.begin(); + for(;i != objects.end(); i++) + { + if (pCamera tmp = boost::dynamic_pointer_cast<Camera>(i->second)) + { + tmp->setTarget(target->getMainOdeObject()); + } + } +} +void WorldObject::positionCameras(dBodyID baseID) +{ + WorldObjectsIt i = objects.begin(); + for(;i != objects.end(); i++) + { + if (pCamera tmp = boost::dynamic_pointer_cast<Camera>(i->second)) + { + tmp->setPositionID(baseID); + } + } +} +void WorldObject::positionCameras(pVehicle base) +{ + WorldObjectsIt i = objects.begin(); + for(;i != objects.end(); i++) + { + if (pCamera tmp = boost::dynamic_pointer_cast<Camera>(i->second)) + { + tmp->setPositionID(base->getMainOdeObject()->getBodyID()); + } + } +} Modified: trunk/src/common/worldObject.hpp =================================================================== --- trunk/src/common/worldObject.hpp 2006-07-20 00:57:58 UTC (rev 445) +++ trunk/src/common/worldObject.hpp 2006-07-20 02:47:04 UTC (rev 446) @@ -29,6 +29,19 @@ SHARED_PTR_MAP(Vehicle, pVehicle, Vehicles, VehiclesIt, wVehicle); SHARED_PTR_MAP(Area, pArea, Areas, AreasIt, wArea); SHARED_PTR_MAP(Location, pLocation, Locations, LocationsIt, wLocation); +SHARED_PTR(Body, pBody, wBody); +SHARED_PTR(Engine, pEngine, wEngine); +SHARED_PTR(Clutch, pClutch, wClutch); +SHARED_PTR(Gear, pGear, wGear); +SHARED_PTR(Gearbox, pGearbox, wGearbox); +SHARED_PTR(GearboxGear, pGearboxGear, wGearboxGear); +SHARED_PTR(FinalDrive, pFinalDrive, wFinalDrive); +SHARED_PTR(DriveJoint, pDriveJoint, wDriveJoint); +SHARED_PTR(DriveMass, pDriveMass, wDriveMass); +SHARED_PTR(LSD, pLSD, wLSD); +SHARED_PTR(Wheel, pWheel, wWheel); +SHARED_PTR(Pedal, pPedal, wPedal); +SHARED_PTR(Suspension, pSuspension, wSuspension); class WorldObject: public boost::enable_shared_from_this <WorldObject> { @@ -41,6 +54,7 @@ std::string path; std::string xmlPath; protected: + pCamera activeCamera; pLogEngine log; WorldObject * base; wWorldObject container; @@ -67,6 +81,10 @@ void stepGraphics (); void stepPhysics (); + pCamera switchNextCamera(); + void pointCameras(pVehicle target); + void positionCameras(dBodyID baseID); + void positionCameras(pVehicle base); pOdeObject getMainOdeObject(); Vector3d getPosition (); @@ -77,5 +95,21 @@ pArea getArea(std::string name); pVehicle getVehicle(std::string name); + pCamera getCamera (std::string name); + pBody getBody (std::string name); + pDriveJoint getDriveJoint (std::string name); + pDriveMass getDriveMass (std::string name); + pClutch getClutch (std::string name); + pGear getGear (std::string name); + pLSD getLSD (std::string name); + pEngine getEngine (std::string name); + pFinalDrive getFinalDrive (std::string name); + pGearbox getGearbox (std::string name); + pGearboxGear getGearboxGear (std::string name); + pPedal getPedal (std::string name); + pSuspension getSuspension (std::string name); + pWheel getWheel (std::string name); + pWorldObject getObject (std::string name); + pWorldObject getWorldObject (std::string name); }; #endif Modified: trunk/src/vehicle/vehicle.cpp =================================================================== --- trunk/src/vehicle/vehicle.cpp 2006-07-20 00:57:58 UTC (rev 445) +++ trunk/src/vehicle/vehicle.cpp 2006-07-20 02:47:04 UTC (rev 446) @@ -28,6 +28,10 @@ pVehicle Vehicle::create(std::string vehicleName) { pVehicle vehicle(new Vehicle(vehicleName)); + vehicle->pointCameras(vehicle); + vehicle->positionCameras(vehicle); + //update all objects positions + vehicle->stepGraphics(); return vehicle; } Vehicle::Vehicle (std::string vehicleName) @@ -120,8 +124,6 @@ if (u) System::get()->ogreWindow->update (); } } - //initialize objects... - pointCameras(); // spread the news to the necessary (input-able) vehicle parts log->__format(LOG_DEVELOPER, "Setting some drive joint pointers..."); getClutch("main")->setOutputPointer(getGearbox("main")); @@ -158,9 +160,6 @@ //start in 1st gear (hardcoded to 2) // this helps brake the vehicle (since it's not user-controlled by default and would roll around freely otherwise) getGearbox("main")->setGear(2); - - //update all objects positions - stepGraphics(); } pOdeObject Vehicle::getMainOdeObject() @@ -254,215 +253,3 @@ log->log (LOG_ENDUSER, LOG_TELEMETRY | LOG_FILE, "%9.5f %12.8f %12.8f %12.8f %12.8f %s %12.8f", velocity, getEngine("main")->getOutputAngularVel(), getFinalDrive("main")->getInputAngularVel(), getWheel("rr")->getInputAngularVel(), getWheel("rl")->getInputAngularVel(), getGearbox("main")->getCurrentGearName().c_str(), distance); } } - -pBody Vehicle::getBody (std::string name) -{ - pBody tmp; - for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++) - { - if (i->first == ("(body)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<Body>(i->second)) break; - } - if (tmp == NULL) log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", name.c_str(), "Body"); - return tmp; -} -pDriveMass Vehicle::getDriveMass (std::string name) -{ - pDriveMass tmp; - for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++) - { - if (i->first == ("(drivemass)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<DriveMass>(i->second)) break; - if (i->first == ("(engine)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<DriveMass>(i->second)) break; - if (i->first == ("(finaldrive)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<DriveMass>(i->second)) break; - if (i->first == ("(gearbox)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<DriveMass>(i->second)) break; - if (i->first == ("(wheel)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<DriveMass>(i->second)) break; - } - if (tmp == NULL) log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", name.c_str(), "DriveMass"); - return tmp; -} -pDriveJoint Vehicle::getDriveJoint (std::string name) -{ - pDriveJoint tmp; - for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++) - { - if (i->first == ("(drivejoint)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<DriveJoint>(i->second)) break; - if (i->first == ("(clutch)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<Clutch>(i->second)) break; - if (i->first == ("(gear)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<Gear>(i->second)) break; - if (i->first == ("(lsd)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<LSD>(i->second)) break; - } - if (tmp == NULL) log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", name.c_str(), "DriveJoint"); - return tmp; -} -pClutch Vehicle::getClutch (std::string name) -{ - pClutch tmp; - for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++) - { - if (i->first == ("(clutch)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<Clutch>(i->second)) break; - } - if (tmp == NULL) log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", name.c_str(), "Clutch"); - return tmp; -} -pGear Vehicle::getGear (std::string name) -{ - pGear tmp; - for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++) - { - if (i->first == ("(gear)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<Gear>(i->second)) break; - } - if (tmp == NULL) log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", name.c_str(), "Gear"); - return tmp; -} -pLSD Vehicle::getLSD (std::string name) -{ - pLSD tmp; - for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++) - { - if (i->first == ("(lsd)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<LSD>(i->second)) break; - } - if (tmp == NULL) log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", name.c_str(), "LSD"); - return tmp; -} -pEngine Vehicle::getEngine (std::string name) -{ - pEngine tmp; - for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++) - { - if (i->first == ("(engine)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<Engine>(i->second)) break; - } - if (tmp == NULL) log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", name.c_str(), "Engine"); - return tmp; -} -pFinalDrive Vehicle::getFinalDrive (std::string name) -{ - pFinalDrive tmp; - for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++) - { - if (i->first == ("(finaldrive)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<FinalDrive>(i->second)) break; - } - if (tmp == NULL) log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", name.c_str(), "FinalDrive"); - return tmp; -} -pGearbox Vehicle::getGearbox (std::string name) -{ - pGearbox tmp; - for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++) - { - if (i->first == ("(gearbox)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<Gearbox>(i->second)) break; - } - if (tmp == NULL) log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", name.c_str(), "Gearbox"); - return tmp; -} -pGearboxGear Vehicle::getGearboxGear (std::string name) -{ - pGearboxGear tmp; - for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++) - { - if (i->first == ("(gearboxgear)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<GearboxGear>(i->second)) break; - } - if (tmp == NULL) log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", name.c_str(), "GearboxGear"); - return tmp; -} -pPedal Vehicle::getPedal (std::string name) -{ - pPedal tmp; - for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++) - { - if (i->first == ("(pedal)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<Pedal>(i->second)) break; - } - if (tmp == NULL) log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", name.c_str(), "Pedal"); - return tmp; -} -pSuspension Vehicle::getSuspension (std::string name) -{ - pSuspension tmp; - for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++) - { - if (i->first == ("(suspension)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<Suspension>(i->second)) break; - if (i->first == ("(doublewishbone)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<DoubleWishbone>(i->second)) break; - if (i->first == ("(fixed)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<Fixed>(i->second)) break; - if (i->first == ("(unidimensional)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<Unidimensional>(i->second)) break; - } - if (tmp == NULL) log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", name.c_str(), "Suspension"); - return tmp; -} -pWheel Vehicle::getWheel (std::string name) -{ - pWheel tmp; - for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++) - { - if (i->first == ("(wheel)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<Wheel>(i->second)) break; - } - if (tmp == NULL) log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", name.c_str(), "Wheel"); - return tmp; -} -pWorldObject Vehicle::getObject (std::string name) -{ - if (objects.find(name) == objects.end()) - log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" from generic type \"%s\"", name.c_str(), "WorldObject"); - return objects[name]; -} -pWorldObject Vehicle::getWorldObject (std::string name) -{ - pWorldObject tmp; - for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++) - { - if (i->first == ("(worldobject)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<WorldObject>(i->second)) break; - } - if (tmp == NULL) log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", name.c_str(), "WorldObject"); - return tmp; -} -pCamera Vehicle::getCamera (std::string name) -{ - pCamera tmp; - for (WorldObjectsIt i = objects.begin(); i != objects.end(); i++) - { - if (i->first == (name) && i->second) if (tmp = boost::dynamic_pointer_cast<Camera>(i->second)) break; - if (i->first == ("(camera)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<Camera>(i->second)) break; - } - if (tmp == NULL) log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", name.c_str(), "Camera"); - return tmp; -} - -pCamera Vehicle::switchNextCamera() -{ - WorldObjectsIt i = objects.begin(); - pCamera tmp; - pCamera nextCam; - bool first = false; - bool found = false; - for (;i != objects.end(); i++) - { - if (tmp = boost::dynamic_pointer_cast<Camera>(i->second)) - { - if (first == false) - { - nextCam = tmp; - first = true; - } - if (found == true) - { - nextCam = tmp; - found = false; - } - if (activeCamera == tmp) - { - found = true; - } - } - } - activeCamera = nextCam; - return activeCamera; -} -void Vehicle::pointCameras() -{ - WorldObjectsIt i = objects.begin(); - pCamera tmp; - for(;i != objects.end(); i++) - { - if (tmp = boost::dynamic_pointer_cast<Camera>(i->second)) - { - tmp->setPositionID( getMainOdeObject()->getBodyID()); - tmp->setTarget( getMainOdeObject()); - } - } -} Modified: trunk/src/vehicle/vehicle.hpp =================================================================== --- trunk/src/vehicle/vehicle.hpp 2006-07-20 00:57:58 UTC (rev 445) +++ trunk/src/vehicle/vehicle.hpp 2006-07-20 02:47:04 UTC (rev 446) @@ -14,19 +14,6 @@ #include "xmlTag.hpp" // Forward declarations -SHARED_PTR(Body, pBody, wBody); -SHARED_PTR(Engine, pEngine, wEngine); -SHARED_PTR(Clutch, pClutch, wClutch); -SHARED_PTR(Gear, pGear, wGear); -SHARED_PTR(Gearbox, pGearbox, wGearbox); -SHARED_PTR(GearboxGear, pGearboxGear, wGearboxGear); -SHARED_PTR(FinalDrive, pFinalDrive, wFinalDrive); -SHARED_PTR(DriveJoint, pDriveJoint, wDriveJoint); -SHARED_PTR(DriveMass, pDriveMass, wDriveMass); -SHARED_PTR(LSD, pLSD, wLSD); -SHARED_PTR(Wheel, pWheel, wWheel); -SHARED_PTR(Pedal, pPedal, wPedal); -SHARED_PTR(Suspension, pSuspension, wSuspension); class Vector3d; class Quaternion; class CameraPosition; @@ -47,32 +34,12 @@ void placeWheelsOnSuspensions(); void boltWheelsToSuspensions(); void stopGraphics (); - pCamera activeCamera; - void pointCameras(); Vehicle (std::string vehicleName); public: static pVehicle create(std::string vehicleName); void setContainer (pWorldObject container); ~Vehicle (); - pCamera getCamera (std::string name); - pBody getBody (std::string name); - pDriveJoint getDriveJoint (std::string name); - pDriveMass getDriveMass (std::string name); - pClutch getClutch (std::string name); - pGear getGear (std::string name); - pLSD getLSD (std::string name); - pEngine getEngine (std::string name); - pFinalDrive getFinalDrive (std::string name); - pGearbox getGearbox (std::string name); - pGearboxGear getGearboxGear (std::string name); - pPedal getPedal (std::string name); - pSuspension getSuspension (std::string name); - pWheel getWheel (std::string name); - pWorldObject getObject (std::string name); - pWorldObject getWorldObject (std::string name); - - pCamera switchNextCamera(); void setUserDriver (); void stepPhysics (); void setPosition (Vector3d position); Modified: trunk/src/world/area.cpp =================================================================== --- trunk/src/world/area.cpp 2006-07-20 00:57:58 UTC (rev 445) +++ trunk/src/world/area.cpp 2006-07-20 02:47:04 UTC (rev 446) @@ -124,7 +124,7 @@ pPart tmp = Part::create (u->getName()); tmp->setPosition (position); tmp->setRotation (rotation); - parts[tmp->getName()] = tmp; + objects[tmp->getName()] = tmp; tmp->stepGraphics(); System::get()->ogreWindow->update (); } @@ -137,11 +137,10 @@ if (t->getName() == "camera") { pCamera tmp = Camera::create (t); - cameras[tmp->getName()] = tmp; + objects[tmp->getName()] = tmp; } } } - log->loadscreen (LOG_CCREATOR, "Creating the area ground"); log->__format (LOG_DEVELOPER, "Creating the ode plane"); @@ -158,6 +157,7 @@ planeNode = pOgreSceneManager->getRootSceneNode()->createChildSceneNode(); planeNode->attachObject(planeEntity); areaBodyID = dBodyCreate (World::get()->ghostWorldID); + positionCameras(areaBodyID); System::get()->ogreWindow->update (); // FIXME should be part of the world, not the area @@ -173,29 +173,6 @@ dGeomSetPosition (checkpointID, checkpointPosition.x, checkpointPosition.y, checkpointPosition.z); } -void Area::setContainer(pWorldObject container) -{ - WorldObject::setContainer(container); - PartsIt p = parts.begin(); - for(;p != parts.end(); p++) - { - p->second->setContainer(shared_from_this()); - } - CamerasIt i = cameras.begin(); - for(;i != cameras.end(); i++) - { - i->second->setContainer(shared_from_this()); - } -} -void Area::pointCameras(pVehicle target) -{ - CamerasIt i = cameras.begin(); - for(;i != cameras.end(); i++) - { - i->second->setPositionID(areaBodyID); - i->second->setTarget(target->getMainOdeObject()); - } -} void Area::setCastShadows(bool castShadows) { planeEntity->setCastShadows(castShadows); @@ -218,10 +195,13 @@ mode = Ogre::PM_SOLID; break; } - CamerasIt i = cameras.begin(); - for(;i != cameras.end(); i++) + WorldObjectsIt i = objects.begin(); + for(;i != objects.end(); i++) { - i->second->ogreCamera->setPolygonMode(mode); + if (pCamera tmp = boost::dynamic_pointer_cast<Camera>(i->second)) + { + tmp->ogreCamera->setPolygonMode(mode); + } } } @@ -345,83 +325,31 @@ return tmp; } -void Area::stepGraphics() -{ - base->stepGraphics(); - - PartsIt k = parts.begin(); - for (; k != parts.end(); k++) - { - k->second->stepGraphics(); - } - CamerasIt i = cameras.begin(); - for (;i != cameras.end(); i++) - { - i->second->stepGraphics(); - } -} - -void Area::stepPhysics() -{ - WorldObject::stepPhysics(); - PartsIt k = parts.begin(); - for (; k != parts.end(); k++) - { - k->second->stepPhysics(); - } - CamerasIt i = cameras.begin(); - for (;i != cameras.end(); i++) - { - i->second->stepPhysics(); - } -} -pCamera Area::getCamera (std::string name) -{ - pCamera tmp; - for (CamerasIt i = cameras.begin(); i != cameras.end(); i++) - { - if (i->first == ("(camera)" + name) && i->second) if (tmp = boost::dynamic_pointer_cast<Camera>(i->second)) break; - } - if (tmp == NULL) log->__format(LOG_ERROR, "Tried to access non-existent world object \"%s\" using type \"%s\"", name.c_str(), "Camera"); - return tmp; -} -pCamera Area::switchNextCamera() -{ - CamerasIt i = cameras.begin(); - pCamera nextCam = i->second; - bool found = false; - for (;i != cameras.end(); i++) - { - if (found == true) - { - nextCam = i->second; - found = false; - } - if (activeCamera == i->second) - { - found = true; - } - } - activeCamera = nextCam; - return activeCamera; -} - pCamera Area::getClosestCamera(Vector3d location) { log->__format(LOG_DEVELOPER, "Finding closest camera"); double closestDistance = 99999999999.0; - CamerasIt i = cameras.begin(); - pCamera closestCam = i->second; - for (;i != cameras.end(); i++) + WorldObjectsIt i = objects.begin(); + pCamera closestCam; + bool first = false; + for (;i != objects.end(); i++) { - log->__format(LOG_DEVELOPER, "Checking cam id: %s", i->second->getName().c_str()); - Ogre::Vector3 p = i->second->ogreCamera->getPosition(); - Vector3d cPos (p.x, p.y, p.z); - double distance = cPos.distance(location); - if (distance < closestDistance) + if (pCamera tmp = boost::dynamic_pointer_cast<Camera>(i->second)) { - closestDistance = distance; - closestCam = i->second; + if (first == false) + { + closestCam = tmp; + first = true; + } + log->__format(LOG_DEVELOPER, "Checking cam id: %s", tmp->getName().c_str()); + Ogre::Vector3 p = tmp->ogreCamera->getPosition(); + Vector3d cPos (p.x, p.y, p.z); + double distance = cPos.distance(location); + if (distance < closestDistance) + { + closestDistance = distance; + closestCam = tmp; + } } } activeCamera = closestCam; Modified: trunk/src/world/area.hpp =================================================================== --- trunk/src/world/area.hpp 2006-07-20 00:57:58 UTC (rev 445) +++ trunk/src/world/area.hpp 2006-07-20 02:47:04 UTC (rev 446) @@ -33,24 +33,15 @@ std::string contact; std::string license; Locations locations; - Cameras cameras; - pCamera activeCamera; void construct (XmlTag * tag); Area (std::string areaName); public: static pArea create(std::string areaName); - void setContainer(pWorldObject worldObject); ~Area (); pLocation getLocation (std::string name); - pCamera getCamera (std::string name); - void pointCameras(pVehicle target); - Parts parts; dBodyID areaBodyID; - void stepGraphics(); - void stepPhysics(); - pCamera switchNextCamera(); pCamera getClosestCamera(Vector3d location); Ogre::SceneNode * planeNode; Modified: trunk/src/world/part.cpp =================================================================== --- trunk/src/world/part.cpp 2006-07-20 00:57:58 UTC (rev 445) +++ trunk/src/world/part.cpp 2006-07-20 02:47:04 UTC (rev 446) @@ -28,6 +28,7 @@ Part::Part (const std::string & name) :WorldObject(name) { + log->__format(LOG_WARNING, "BP 1"); setPath(Paths::part(name)); setXmlPath(Paths::partXml(name)); Ogre::ResourceGroupManager::getSingleton().addResourceLocation(getPath(), "FileSystem", "parts." + name); @@ -36,12 +37,15 @@ pOgreObjectData ogreData(new OgreObjectData); pPartOdeData data(new PartOdeData); std::string shape = "none"; + log->__format(LOG_WARNING, "BP 2"); if (tag->getName() == "part") { + log->__format(LOG_WARNING, "BP 3"); setName(tag->getAttribute("name")); data->mass = stod(tag->getAttribute("mass")); XmlTag * t = tag->getTag(0); for (int i = 0; i < tag->nTags(); t = tag->getTag(++i)) { + log->__format(LOG_WARNING, "BP 4"); data->shape = t->getName(); if (data->shape == "box") { @@ -101,22 +105,6 @@ // //////////////simplified air friction (test)(should be forces!) dBodySetAngularVel (partID, (*(dReal *) (dBodyGetAngularVel (partID) + 0)) * (dReal) (0.999), (*(dReal *) (dBodyGetAngularVel (partID) + 1)) * (dReal) (0.999), (*(dReal *) (dBodyGetAngularVel (partID) + 2)) * (dReal) (0.999)); // ////////////////////////////////////simplified air friction - // applying user input [forces] - if (this == World::get()->getArea("main")->parts.begin()->second.get()) - { - float moveX = System::get()->axisMap[getIDKeyboardKey(SDLK_l)]->getValue(); - float moveY = System::get()->axisMap[getIDKeyboardKey(SDLK_i)]->getValue(); - moveX *= 100; - moveY *= 100; - dBodyAddForce (partID, moveX, moveY, 0.0f); - moveX = -System::get()->axisMap[getIDKeyboardKey(SDLK_j)]->getValue(); - moveY = -System::get()->axisMap[getIDKeyboardKey(SDLK_k)]->getValue(); - moveX *= 100; - moveY *= 100; - dBodyAddForce (partID, moveX, moveY, 0.0f); - float moveZ = System::get()->axisMap[getIDKeyboardKey(SDLK_SPACE)]->getValue() * 500; - dBodyAddForce (partID, 0, 0, moveZ); - } const dReal * pos; pos = dBodyGetPosition(partID); } Modified: trunk/src/world/part.hpp =================================================================== --- trunk/src/world/part.hpp 2006-07-20 00:57:58 UTC (rev 445) +++ trunk/src/world/part.hpp 2006-07-20 02:47:04 UTC (rev 446) @@ -28,8 +28,6 @@ { private: void processXmlRootNode (XERCES_CPP_NAMESPACE::DOMNode * n); - void startPhysics (XERCES_CPP_NAMESPACE::DOMNode * n); - void startGraphics (XERCES_CPP_NAMESPACE::DOMNode * n); Part (const std::string & name); public: static pPart create (const std::string & name); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |