You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(153) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(48) |
Feb
(46) |
Mar
(12) |
Apr
(4) |
May
(4) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
(263) |
Mar
(235) |
Apr
(66) |
May
(42) |
Jun
(270) |
Jul
(65) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Oliver O. <fr...@us...> - 2007-06-17 08:24:55
|
Update of /cvsroot/simspark/simspark/spark/oxygen In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv2954 Modified Files: Tag: projectx Makefile.am Log Message: merge from HEAD Index: Makefile.am =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/Makefile.am,v retrieving revision 1.3.2.2.2.1 retrieving revision 1.3.2.2.2.2 diff -C2 -d -r1.3.2.2.2.1 -r1.3.2.2.2.2 *** Makefile.am 5 Apr 2007 04:18:00 -0000 1.3.2.2.2.1 --- Makefile.am 17 Jun 2007 08:24:15 -0000 1.3.2.2.2.2 *************** *** 130,133 **** --- 130,134 ---- sceneserver/camera.cpp \ sceneserver/camera_c.cpp \ + sceneserver/scenedict.cpp \ simulationserver/simulationserver.h \ simulationserver/simulationserver.cpp \ |
From: Oliver O. <fr...@us...> - 2007-06-17 08:22:14
|
Update of /cvsroot/simspark/simspark/spark/oxygen/geometryserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv1716 Modified Files: Tag: projectx geometryserver.cpp Log Message: merge from HEAD Index: geometryserver.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/geometryserver/geometryserver.cpp,v retrieving revision 1.2.4.2 retrieving revision 1.2.4.3 diff -C2 -d -r1.2.4.2 -r1.2.4.3 *** geometryserver.cpp 5 Apr 2007 04:13:06 -0000 1.2.4.2 --- geometryserver.cpp 17 Jun 2007 08:21:59 -0000 1.2.4.3 *************** *** 143,146 **** --- 143,151 ---- << " with '" << importer->GetName() << "'\n"; + if (mesh.get() == 0 || mesh->GetVertexCount() == 0) + { + continue; + } + RegisterMesh(mesh); |
From: Oliver O. <fr...@us...> - 2007-06-17 08:16:13
|
Update of /cvsroot/simspark/simspark/spark/oxygen/physicsserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv32128 Modified Files: Tag: projectx body.cpp Log Message: merge from HEAD Index: body.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/body.cpp,v retrieving revision 1.2.2.1 retrieving revision 1.2.2.1.2.1 diff -C2 -d -r1.2.2.1 -r1.2.2.1.2.1 *** body.cpp 15 Feb 2007 21:00:18 -0000 1.2.2.1 --- body.cpp 17 Jun 2007 08:16:06 -0000 1.2.2.1.2.1 *************** *** 159,235 **** } void Body::SetSphere(float density, float radius) { dMass ODEMass; ! dMassSetSphere(&ODEMass, density, radius); dBodySetMass(mODEBody, &ODEMass); } void Body::SetSphereTotal(float total_mass, float radius) { dMass ODEMass; ! dMassSetSphereTotal(&ODEMass, total_mass, radius); dBodySetMass(mODEBody, &ODEMass); } void Body::SetBox(float density, const Vector3f& size) { dMass ODEMass; ! dMassSetBox(&ODEMass, density, size[0], size[1], size[2]); dBodySetMass(mODEBody, &ODEMass); } ! void Body::SetBoxTotal(float total_mass, const salt::Vector3f& size) { dMass ODEMass; ! dMassSetBoxTotal(&ODEMass, total_mass, size[0], size[1], size[2]); dBodySetMass(mODEBody, &ODEMass); } ! void Body::SetCylinder (float density, float radius, float length) { dMass ODEMass; // direction: (1=x, 2=y, 3=z) int direction = 3; ! dMassSetCylinder (&ODEMass, density, direction, radius, length); dBodySetMass(mODEBody, &ODEMass); } ! void Body::SetCylinderTotal(float total_mass, float radius, float length) { dMass ODEMass; // direction: (1=x, 2=y, 3=z) int direction = 3; ! dMassSetCylinderTotal(&ODEMass, total_mass, direction, radius, length); dBodySetMass(mODEBody, &ODEMass); } ! void Body::SetCappedCylinder (float density, float radius, float length) { dMass ODEMass; // direction: (1=x, 2=y, 3=z) int direction = 3; ! dMassSetCappedCylinder (&ODEMass, density, direction, radius, length); dBodySetMass(mODEBody, &ODEMass); } ! void Body::SetCappedCylinderTotal(float total_mass, float radius, float length) { dMass ODEMass; // direction: (1=x, 2=y, 3=z) int direction = 3; ! dMassSetCappedCylinderTotal(&ODEMass, total_mass, ! direction, radius, length); dBodySetMass(mODEBody, &ODEMass); } Vector3f Body::GetVelocity() const { --- 159,346 ---- } + void Body::PrepareSphere(dMass& mass, float density, float radius) const + { + dMassSetSphere(&mass, density, radius); + } + void Body::SetSphere(float density, float radius) { dMass ODEMass; ! PrepareSphere(ODEMass, density, radius); dBodySetMass(mODEBody, &ODEMass); } + void Body::Addphere(float density, float radius, const Matrix& matrix) + { + dMass ODEMass; + PrepareSphere(ODEMass, density, radius); + AddMass(ODEMass, matrix); + } + + void Body::PrepareSphereTotal(dMass& mass, float total_mass, float radius) const + { + dMassSetSphereTotal(&mass, total_mass, radius); + } + void Body::SetSphereTotal(float total_mass, float radius) { dMass ODEMass; ! PrepareSphereTotal(ODEMass, total_mass, radius); dBodySetMass(mODEBody, &ODEMass); } + void Body::AddSphereTotal(float total_mass, float radius, const Matrix& matrix) + { + dMass ODEMass; + PrepareSphereTotal(ODEMass, total_mass, radius); + AddMass(ODEMass, matrix); + } + + void Body::PrepareBox(dMass& mass, float density, const Vector3f& size) const + { + dMassSetBox(&mass, density, size[0], size[1], size[2]); + } + void Body::SetBox(float density, const Vector3f& size) { dMass ODEMass; ! PrepareBox(ODEMass, density, size); dBodySetMass(mODEBody, &ODEMass); } ! void Body::AddBox(float density, const Vector3f& size, const Matrix& matrix) { dMass ODEMass; ! PrepareBox(ODEMass, density, size); ! AddMass(ODEMass, matrix); ! } ! ! void Body::PrepareBoxTotal(dMass& mass, float total_mass, const Vector3f& size) const ! { ! dMassSetBoxTotal(&mass, total_mass, size[0], size[1], size[2]); ! } ! ! void Body::SetBoxTotal(float total_mass, const Vector3f& size) ! { ! dMass ODEMass; ! PrepareBoxTotal(ODEMass, total_mass, size); dBodySetMass(mODEBody, &ODEMass); } ! void Body::AddBoxTotal(float total_mass, const Vector3f& size, const Matrix& matrix) { dMass ODEMass; + PrepareBoxTotal(ODEMass, total_mass, size); + AddMass(ODEMass, matrix); + } + + void Body::AddMass(const dMass& mass, const Matrix& matrix) + { + dMass transMass(mass); + + dMatrix3 rot; + ConvertRotationMatrix(matrix, rot); + dMassRotate(&transMass,rot); + + dMass bodyMass; + dBodyGetMass(mODEBody, &bodyMass); + dMassAdd(&bodyMass, &transMass); + dBodySetMass(mODEBody, (const dMass*)&bodyMass); + + /** ODE currently requires that the center mass is always in the + origin of the body + */ + const Vector3f& trans(matrix.Pos()); + dMassTranslate(&transMass,trans[0],trans[1],trans[2]); + } + void Body::PrepareCylinder (dMass& mass, float density, float radius, float length) const + { // direction: (1=x, 2=y, 3=z) int direction = 3; ! dMassSetCylinder (&mass, density, direction, radius, length); ! } ! ! void Body::SetCylinder (float density, float radius, float length) ! { ! dMass ODEMass; ! PrepareCylinder(ODEMass, density, radius, length); dBodySetMass(mODEBody, &ODEMass); } ! void Body::AddCylinder (float density, float radius, float length, const Matrix& matrix) { dMass ODEMass; + PrepareCylinder(ODEMass, density, radius, length); + AddMass(ODEMass, matrix); + } + void Body::PrepareCylinderTotal(dMass& mass, float total_mass, float radius, float length) const + { // direction: (1=x, 2=y, 3=z) int direction = 3; ! dMassSetCylinderTotal(&mass, total_mass, direction, radius, length); ! } ! ! void Body::SetCylinderTotal(float total_mass, float radius, float length) ! { ! dMass ODEMass; ! PrepareCylinderTotal(ODEMass, total_mass, radius, length); dBodySetMass(mODEBody, &ODEMass); } ! void Body::AddCylinderTotal(float total_mass, float radius, float length, const Matrix& matrix) { dMass ODEMass; + PrepareCylinderTotal(ODEMass, total_mass, radius, length); + AddMass(ODEMass, matrix); + } + void Body::PrepareCappedCylinder (dMass& mass, float density, float radius, float length) const + { // direction: (1=x, 2=y, 3=z) int direction = 3; ! dMassSetCappedCylinder (&mass, density, direction, radius, length); ! } ! ! void Body::SetCappedCylinder (float density, float radius, float length) ! { ! dMass ODEMass; ! PrepareCappedCylinder(ODEMass, density, radius, length); dBodySetMass(mODEBody, &ODEMass); } ! void Body::AddCappedCylinder (float density, float radius, float length, const Matrix& matrix) { dMass ODEMass; + PrepareCappedCylinder(ODEMass, density, radius, length); + AddMass(ODEMass, matrix); + } + void Body::PrepareCappedCylinderTotal(dMass& mass, float total_mass, float radius, float length) const + { // direction: (1=x, 2=y, 3=z) int direction = 3; ! dMassSetCappedCylinderTotal(&mass, total_mass, direction, radius, length); ! } ! ! void Body::SetCappedCylinderTotal(float total_mass, float radius, float length) ! { ! dMass ODEMass; ! PrepareCappedCylinderTotal(ODEMass, total_mass, radius, length); dBodySetMass(mODEBody, &ODEMass); } + void Body::AddCappedCylinderTotal(float total_mass, float radius, float length, const salt::Matrix& matrix) + { + dMass ODEMass; + PrepareCappedCylinderTotal(ODEMass, total_mass, radius, length); + AddMass(ODEMass, matrix); + } + Vector3f Body::GetVelocity() const { *************** *** 264,271 **** } ! void Body::PostPhysicsUpdateInternal() { - // synchronize parent node with the bodies position and - // orientation const dReal* pos = dBodyGetPosition(mODEBody); const dReal* rot = dBodyGetRotation(mODEBody); --- 375,380 ---- } ! void Body::SynchronizeParent() const { const dReal* pos = dBodyGetPosition(mODEBody); const dReal* rot = dBodyGetRotation(mODEBody); *************** *** 295,298 **** --- 404,412 ---- } + void Body::PostPhysicsUpdateInternal() + { + SynchronizeParent(); + } + shared_ptr<Body> Body::GetBody(dBodyID id) { *************** *** 352,356 **** } ! void Body::TranslateMass(const salt::Vector3f& v) { dMass m; --- 466,470 ---- } ! void Body::TranslateMass(const Vector3f& v) { dMass m; |
From: Oliver O. <fr...@us...> - 2007-06-17 08:15:43
|
Update of /cvsroot/simspark/simspark/spark/oxygen/physicsserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv31819 Modified Files: Tag: projectx body.h Log Message: merge from HEAD Index: body.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/body.h,v retrieving revision 1.2.2.1 retrieving revision 1.2.2.1.2.1 diff -C2 -d -r1.2.2.1 -r1.2.2.1.2.1 *** body.h 15 Feb 2007 21:00:18 -0000 1.2.2.1 --- body.h 17 Jun 2007 08:15:36 -0000 1.2.2.1.2.1 *************** *** 91,94 **** --- 91,100 ---- void SetSphere(float density, float radius); + /** adds a mass representing a sphere of the given radius and + density, with the matrix determining its center and + orientation + */ + void Addphere(float density, float radius, const salt::Matrix& matrix); + /** sets the mass parameters to represent a sphere of the given radius and total mass, with the center of mass at (0,0,0) *************** *** 97,100 **** --- 103,111 ---- void SetSphereTotal(float total_mass, float radius); + /** add a mass representing a sphere of the given radius and total + mass, with the matrix determining its center and orientation + */ + void AddSphereTotal(float total_mass, float radius, const salt::Matrix& matrix); + /** Set the mass parameters to represent a box of the given dimensions and density, with the center of mass at (0,0,0) *************** *** 103,106 **** --- 114,123 ---- void SetBox(float density, const salt::Vector3f& size); + /** Add a mass representing a box of the given dimensions and + density, with the matrix determining its center and + orientation + */ + void AddBox(float density, const salt::Vector3f& size, const salt::Matrix& matrix); + /** Set the mass parameters to represent a box of the given dimensions and total mass, with the center of mass at (0,0,0) *************** *** 109,112 **** --- 126,135 ---- void SetBoxTotal(float total_mass, const salt::Vector3f& size); + /** Add a mass representing a box of the given dimensions and + total mass, with the matrix determining its center and + orientation + */ + void AddBoxTotal(float total_mass, const salt::Vector3f& size, const salt::Matrix& matrix); + /** Set the mass parameters to represent a flat-ended cylinder of the given parameters and density, with the center of mass at *************** *** 115,119 **** long axis is oriented along the body's z axis. */ ! void SetCylinder (float density, float radius, float length); /** Set the mass parameters to represent a flat-ended cylinder of --- 138,148 ---- long axis is oriented along the body's z axis. */ ! void SetCylinder(float density, float radius, float length); ! ! /** Add a mass representing a flat-ended cylinder of the given ! parameters and density, with the matrix determining its center ! and orientation ! */ ! void AddCylinder(float density, float radius, float length, const salt::Matrix& matrix); /** Set the mass parameters to represent a flat-ended cylinder of *************** *** 125,128 **** --- 154,163 ---- void SetCylinderTotal(float total_mass, float radius, float length); + /** Add a mass representing a flat-ended cylinder of the given + parameters and total mass, with the matrix determining its + center and orientation + */ + void AddCylinderTotal(float total_mass, float radius, float length, const salt::Matrix& matrix); + /* Set the mass parameters to represent a capped cylinder of the given parameters and density, with the center of mass at *************** *** 134,137 **** --- 169,178 ---- void SetCappedCylinder (float density, float radius, float length); + /* Add a mass representing a capped cylinder of the given + parameters and density, with the matrix determining its center + and orientation + */ + void AddCappedCylinder (float density, float radius, float length, const salt::Matrix& matrix); + /* Set the mass parameters to represent a capped cylinder of the given parameters and total mass, with the center of mass at *************** *** 143,146 **** --- 184,193 ---- void SetCappedCylinderTotal(float total_mass, float radius, float length); + /* Add a mass representing a capped cylinder of the given + parameters and total mass, with the matrix determining its + center and orientation + */ + void AddCappedCylinderTotal(float total_mass, float radius, float length, const salt::Matrix& matrix); + /** displace the mass center relative to the body frame */ void TranslateMass(const salt::Vector3f& v); *************** *** 179,182 **** --- 226,241 ---- virtual void DestroyODEObject(); + /** synchronize parent node with the bodies position and + orientation + */ + void SynchronizeParent() const; + + /** adds the given ode mass to this body. The given matrix is + applied to the mass center + */ + void AddMass(const dMass& mass, const salt::Matrix& matrix); + + salt::Vector3f GetMassCenter() const; + protected: /** creates the managed ODE body and moves it to the position of *************** *** 188,191 **** --- 247,304 ---- bool CreateBody(); + /** sets up an ode mass struct representing a box of the given + size and total_mass + */ + void PrepareBoxTotal(dMass& mass, float total_mass, const salt::Vector3f& size) const; + + /** sets up an ode mass struct representing a box of the given + density and size + */ + void PrepareBox(dMass& mass, float density, const salt::Vector3f& size) const; + + /** sets up an ode mass struct representing a sphere of the given + density and radius + */ + void PrepareSphere(dMass& mass, float density, float radius) const; + + /** sets up an ode mass struct representing a sphere of the given + radius and total_mass + */ + void PrepareSphereTotal(dMass& mass, float total_mass, float radius) const; + + /** sets up an ode mass struct representing a flat-ended cylinder + of the given parameters and density, with the center of mass + at (0,0,0) relative to the body. The radius of the cylinder is + radius. The length of the cylinder is length. The cylinder's + long axis is oriented along the body's z axis. + */ + void PrepareCylinder (dMass& mass, float density, float radius, float length) const; + + /** sets up an ode mass struct representing a flat-ended cylinder + of the given parameters and total mass, with the center of + mass at (0,0,0) relative to the body. The radius of the + cylinder is radius. The length of the cylinder is length. The + cylinder's long axis is oriented along the body's z axis. + */ + void PrepareCylinderTotal(dMass& mass, float total_mass, float radius, float length) const; + + /* sets up an ode mass struct representing a capped cylinder of + the given parameters and density, with the center of mass at + (0,0,0) relative to the body. The radius of the cylinder (and + the spherical cap) is radius. The length of the cylinder (not + counting the spherical cap) is length. The cylinder's long axis + is oriented along the body's z axis. + */ + void PrepareCappedCylinder (dMass& mass, float density, float radius, float length) const; + + /* sets up an ode mass struct representing a capped cylinder of + the given parameters and total mass, with the center of mass at + (0,0,0) relative to the body. The radius of the cylinder (and + the spherical cap) is radius. The length of the cylinder (not + counting the spherical cap) is length. The cylinder's long axis + is oriented along the body's z axis. + */ + void PrepareCappedCylinderTotal(dMass& mass, float total_mass, float radius, float length) const; + private: /** updates the the internal state after physics calculation, |
From: Oliver O. <fr...@us...> - 2007-06-17 08:14:47
|
Update of /cvsroot/simspark/simspark/spark/oxygen/physicsserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv31418 Modified Files: Tag: projectx collider.cpp Log Message: merge from HEAD Index: collider.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/collider.cpp,v retrieving revision 1.2.2.1 retrieving revision 1.2.2.1.2.1 diff -C2 -d -r1.2.2.1 -r1.2.2.1.2.1 *** collider.cpp 15 Feb 2007 21:00:18 -0000 1.2.2.1 --- collider.cpp 17 Jun 2007 08:14:43 -0000 1.2.2.1.2.1 *************** *** 68,72 **** // if we have a space add the geom to it ! dSpaceID space = GetSpaceID(); if ( (space) && --- 68,72 ---- // if we have a space add the geom to it ! dSpaceID space = FindSpaceID(); if ( (space) && *************** *** 99,103 **** // remove collision geometry from space ! dSpaceID space = GetSpaceID(); if ( --- 99,103 ---- // remove collision geometry from space ! dSpaceID space = GetParentSpaceID(); if ( *************** *** 109,119 **** } ! if ( ! (space) && ! (dSpaceQuery(space, mODEGeom)) ! ) ! { ! dSpaceRemove(space, mODEGeom); ! } } --- 109,116 ---- } ! if (space) ! { ! dSpaceRemove(space, mODEGeom); ! } } *************** *** 225,228 **** --- 222,241 ---- } + Vector3f Collider::GetPosition() const + { + const dReal* pos = dGeomGetPosition(mODEGeom); + return Vector3f(pos[0],pos[1],pos[2]); + } + + dSpaceID Collider::GetParentSpaceID() + { + if (mODEGeom == 0) + { + return 0; + } + + return dGeomGetSpace(mODEGeom); + } + bool Collider::Intersects(boost::shared_ptr<Collider> collider) { |
From: Oliver O. <fr...@us...> - 2007-06-17 08:14:09
|
Update of /cvsroot/simspark/simspark/spark/oxygen/physicsserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv31042 Modified Files: Tag: projectx collider.h Log Message: merge from HEAD Index: collider.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/collider.h,v retrieving revision 1.2.2.1 retrieving revision 1.2.2.1.2.1 diff -C2 -d -r1.2.2.1 -r1.2.2.1.2.1 *** collider.h 15 Feb 2007 21:00:18 -0000 1.2.2.1 --- collider.h 17 Jun 2007 08:14:03 -0000 1.2.2.1.2.1 *************** *** 101,104 **** --- 101,107 ---- virtual void SetPosition(const salt::Vector3f& pos); + /** returns the absolute position of the managed geom */ + salt::Vector3f GetPosition() const; + /** sets the relative orientation of the managed geom directly. If the geom is connected to a body, the orientation of the body *************** *** 112,115 **** --- 115,121 ---- bool Intersects(boost::shared_ptr<Collider> collider); + /** returns the ODE handle ID of the containing parent space */ + virtual dSpaceID GetParentSpaceID(); + protected: /** registers the managed geom to the Space of the Scene and to |
From: Oliver O. <fr...@us...> - 2007-06-17 08:13:12
|
Update of /cvsroot/simspark/simspark/spark/oxygen/physicsserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv30964 Modified Files: Tag: projectx hingejoint.cpp Log Message: merge from HEAD Index: hingejoint.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/hingejoint.cpp,v retrieving revision 1.5 retrieving revision 1.5.4.1 diff -C2 -d -r1.5 -r1.5.4.1 *** hingejoint.cpp 19 Feb 2006 13:15:26 -0000 1.5 --- hingejoint.cpp 17 Jun 2007 08:13:09 -0000 1.5.4.1 *************** *** 118,127 **** } ! float HingeJoint::GetAngle() { return gRadToDeg(dJointGetHingeAngle(mODEJoint)); } ! float HingeJoint::GetAngleRate() { return gRadToDeg(dJointGetHingeAngleRate(mODEJoint)); --- 118,127 ---- } ! float HingeJoint::GetAngle() const { return gRadToDeg(dJointGetHingeAngle(mODEJoint)); } ! float HingeJoint::GetAngleRate() const { return gRadToDeg(dJointGetHingeAngleRate(mODEJoint)); |
From: Oliver O. <fr...@us...> - 2007-06-17 08:12:25
|
Update of /cvsroot/simspark/simspark/spark/oxygen/physicsserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv30551 Modified Files: Tag: projectx hingejoint.h Log Message: merge from HEAD Index: hingejoint.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/hingejoint.h,v retrieving revision 1.5 retrieving revision 1.5.4.1 diff -C2 -d -r1.5 -r1.5.4.1 *** hingejoint.h 19 Feb 2006 13:15:26 -0000 1.5 --- hingejoint.h 17 Jun 2007 08:12:20 -0000 1.5.4.1 *************** *** 63,70 **** bodies, or between the body and the static environment. */ ! float GetAngle(); /** returns the time derivate of the hinge angle */ ! float GetAngleRate(); /** sets a joint parameter value */ --- 63,70 ---- bodies, or between the body and the static environment. */ ! float GetAngle() const; /** returns the time derivate of the hinge angle */ ! float GetAngleRate() const; /** sets a joint parameter value */ |
From: Oliver O. <fr...@us...> - 2007-06-17 08:11:03
|
Update of /cvsroot/simspark/simspark/spark/oxygen/physicsserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv30145 Modified Files: Tag: projectx odeobject.cpp Log Message: merge from HEAD Index: odeobject.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/odeobject.cpp,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.1.2.1 diff -C2 -d -r1.1.2.1 -r1.1.2.1.2.1 *** odeobject.cpp 15 Feb 2007 20:59:41 -0000 1.1.2.1 --- odeobject.cpp 17 Jun 2007 08:11:00 -0000 1.1.2.1.2.1 *************** *** 63,66 **** --- 63,74 ---- shared_ptr<Space> ODEObject::GetSpace() { + // try to find the nearest parent space object + weak_ptr<Space> parentSpace = FindParentSupportingClass<Space>(); + if (! parentSpace.expired()) + { + return parentSpace.lock(); + } + + // return the global space instance shared_ptr<Scene> scene = GetScene(); if (scene.get() == 0) *************** *** 98,102 **** } ! dSpaceID ODEObject::GetSpaceID() { shared_ptr<Space> space = GetSpace(); --- 106,110 ---- } ! dSpaceID ODEObject::FindSpaceID() { shared_ptr<Space> space = GetSpace(); *************** *** 117,120 **** --- 125,133 ---- } + dSpaceID ODEObject::GetParentSpaceID() + { + return 0; + } + void ODEObject::ConvertRotationMatrix(const salt::Matrix& rot, dMatrix3& matrix) { |
From: Oliver O. <fr...@us...> - 2007-06-17 08:10:32
|
Update of /cvsroot/simspark/simspark/spark/oxygen/physicsserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv30108 Modified Files: Tag: projectx odeobject.h Log Message: merge from HEAD Index: odeobject.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/odeobject.h,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.2.2.1 diff -C2 -d -r1.1.2.2 -r1.1.2.2.2.1 *** odeobject.h 15 Feb 2007 20:59:41 -0000 1.1.2.2 --- odeobject.h 17 Jun 2007 08:10:15 -0000 1.1.2.2.2.1 *************** *** 51,56 **** dWorldID GetWorldID(); ! /** returns the ODE space handle */ ! dSpaceID GetSpaceID(); /** destroy the managed ODE object */ --- 51,59 ---- dWorldID GetWorldID(); ! /** returns the nearest parent space ODE handle */ ! dSpaceID FindSpaceID(); ! ! /** returns the ODE handle ID of the containing parent space */ ! virtual dSpaceID GetParentSpaceID(); /** destroy the managed ODE object */ *************** *** 61,65 **** boost::shared_ptr<World> GetWorld(); ! /** returns the space node */ boost::shared_ptr<Space> GetSpace(); --- 64,68 ---- boost::shared_ptr<World> GetWorld(); ! /** finds the nearest parent space node */ boost::shared_ptr<Space> GetSpace(); |
From: Oliver O. <fr...@us...> - 2007-06-17 08:09:32
|
Update of /cvsroot/simspark/simspark/spark/oxygen/physicsserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv29704 Modified Files: Tag: projectx space.cpp Log Message: merge from HEAD Index: space.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/space.cpp,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.2.2.1 diff -C2 -d -r1.1.2.2 -r1.1.2.2.2.1 *** space.cpp 15 Feb 2007 21:00:19 -0000 1.1.2.2 --- space.cpp 17 Jun 2007 08:09:25 -0000 1.1.2.2.2.1 *************** *** 29,33 **** using namespace oxygen; ! static void collisionNearCallback (void *data, dGeomID obj1, dGeomID obj2) { Space *space = (Space*)data; --- 29,33 ---- using namespace oxygen; ! void Space::collisionNearCallback (void *data, dGeomID obj1, dGeomID obj2) { Space *space = (Space*)data; *************** *** 64,70 **** } void Space::HandleCollide(dGeomID obj1, dGeomID obj2) { ! // reject collisions between bodies that are connected with joints const dBodyID b1 = dGeomGetBody(obj1); const dBodyID b2 = dGeomGetBody(obj2); --- 64,97 ---- } + void Space::HandleSpaceCollide(dGeomID obj1, dGeomID obj2) + { + // collide all geoms internal to the space(s) + dSpaceCollide2 (obj1,obj2,this,&collisionNearCallback); + + if (dGeomIsSpace (obj1)) + { + dSpaceCollide ((dSpaceID)(obj1),this,&collisionNearCallback); + } + + if (dGeomIsSpace (obj2)) + { + dSpaceCollide ((dSpaceID)(obj2),this,&collisionNearCallback); + } + } + void Space::HandleCollide(dGeomID obj1, dGeomID obj2) { ! if ( ! (dGeomIsSpace (obj1)) || ! (dGeomIsSpace (obj2)) ! ) ! { ! // colliding a space with something ! HandleSpaceCollide(obj1, obj2); ! return; ! } ! ! // colliding two non-space geoms; reject collisions ! // between bodies that are connected with joints const dBodyID b1 = dGeomGetBody(obj1); const dBodyID b2 = dGeomGetBody(obj2); *************** *** 112,129 **** } bool Space::ConstructInternal() { ! // create the ode space, 0 indicates that this space should ! // not be inserted into another space, i.e. we always create a ! // toplevel space object ! mODESpace = dHashSpaceCreate(0); ! // create a joint group for the contacts ! mODEContactGroup = dJointGroupCreate(0); ! return ( ! (mODESpace != 0) && ! (mODEContactGroup != 0) ! ); } --- 139,190 ---- } + void Space::OnLink() + { + ODEObject::OnLink(); + + dSpaceID space = FindSpaceID(); + if ( + (space) && + (space != mODESpace) && + (! dSpaceQuery(space, (dGeomID)mODESpace)) + ) + { + dSpaceAdd(space, (dGeomID)mODESpace); + } + } + + dSpaceID Space::GetParentSpaceID() + { + if (mODESpace == 0) + { + return 0; + } + + return dGeomGetSpace((dGeomID)mODESpace); + } + + bool Space::IsGlobalSpace() + { + return + ( + (mODESpace != 0) && + (GetParentSpaceID() == 0) + ); + } + bool Space::ConstructInternal() { ! // create the ode space, 0 indicates that this space should ! // not be inserted into another space, i.e. we always create a ! // toplevel space object ! mODESpace = dHashSpaceCreate(0); ! // create a joint group for the contacts ! mODEContactGroup = dJointGroupCreate(0); ! return ( ! (mODESpace != 0) && ! (mODEContactGroup != 0) ! ); } *************** *** 134,188 **** } ! void Space::DestroySpaceObjects() { ! shared_ptr<Scene> scene = GetScene(); ! if (scene.get() == 0) ! { ! return; ! } ! TLeafList objects; ! const bool recursive = true; ! scene->ListChildrenSupportingClass<ODEObject>(objects, recursive); ! for ( ! TLeafList::iterator iter = objects.begin(); ! iter != objects.end(); ! ++iter ! ) ! { ! shared_ptr<ODEObject> object = shared_static_cast<ODEObject>(*iter); ! if (object->GetSpaceID() != mODESpace) { ! continue; ! } ! object->DestroyODEObject(); ! } } ! void Space::DestroyODEObject() { ! static bool recurseLock = false; ! ! if ( ! (recurseLock) || ! (! mODESpace) ! ) ! { ! return; ! } ! ! recurseLock = true; ! ! // make sure that all objects registered to this space are destroyed ! // before this space. Any other order provokes a segfault in ODE. ! DestroySpaceObjects(); ! // release the ODE space ! dSpaceDestroy(mODESpace); ! mODESpace = 0; ! recurseLock = false; } --- 195,256 ---- } ! void ! Space::DestroySpaceObjects() { ! shared_ptr<Scene> scene = GetScene(); ! if (scene.get() == 0) ! { ! return; ! } ! TLeafList objects; ! const bool recursive = true; ! scene->ListChildrenSupportingClass<ODEObject>(objects, recursive); ! bool globalSpace = IsGlobalSpace(); ! shared_ptr<Space> self = shared_static_cast<Space>(GetSelf().lock()); ! for ( ! TLeafList::iterator iter = objects.begin(); ! iter != objects.end(); ! ++iter ! ) { ! shared_ptr<ODEObject> object = shared_static_cast<ODEObject>(*iter); ! if (object == self) ! { ! continue; ! } ! // destroy objects registered to this space; the top level ! // space object also destroy any other ODE object ! const dSpaceID parentSpace = object->GetParentSpaceID(); ! if ( ! ( ! (globalSpace) && ! (parentSpace == 0) ! ) || ! (parentSpace == mODESpace) ! ) ! { ! object->DestroyODEObject(); ! } ! } } ! void ! Space::DestroyODEObject() { ! if (! mODESpace) ! { ! return; ! } ! // make sure that all objects registered to this space are destroyed ! // before this space. Any other order provokes a segfault in ODE. ! DestroySpaceObjects(); ! // release the ODE space ! dSpaceDestroy(mODESpace); ! mODESpace = 0; } |
From: Oliver O. <fr...@us...> - 2007-06-17 08:08:25
|
Update of /cvsroot/simspark/simspark/spark/oxygen/physicsserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv29666 Modified Files: Tag: projectx space.h Log Message: merge from HEAD Index: space.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/space.h,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.1.2.1 diff -C2 -d -r1.1.2.1 -r1.1.2.1.2.1 *** space.h 15 Feb 2007 21:00:19 -0000 1.1.2.1 --- space.h 17 Jun 2007 08:08:21 -0000 1.1.2.1.2.1 *************** *** 59,72 **** void Collide(); /** callback to handle a potential collision between two contained geoms. It will look up and notify the corresponding colliders for a potential collision. */ ! virtual void HandleCollide(dGeomID obj1, dGeomID obj2); ! /** destroy the managed ODE object */ ! virtual void DestroyODEObject(); - protected: /** creates them managed ODE space and a contact joint group */ virtual bool ConstructInternal(); --- 59,88 ---- void Collide(); + /** destroy the managed ODE object */ + virtual void DestroyODEObject(); + + /** returns the ODE handle ID of the containing parent space */ + virtual dSpaceID GetParentSpaceID(); + + /** returns true if this is the top global, i.e. top level space object */ + bool IsGlobalSpace(); + + protected: + static void collisionNearCallback (void *data, dGeomID obj1, dGeomID obj2); + + /** registers the managed space to the containing parent space */ + virtual void OnLink(); + /** callback to handle a potential collision between two contained geoms. It will look up and notify the corresponding colliders for a potential collision. */ ! void HandleCollide(dGeomID obj1, dGeomID obj2); ! /** handle the collision between two geoms from which at least one ! is a space geom ! */ ! void HandleSpaceCollide(dGeomID obj1, dGeomID obj2); /** creates them managed ODE space and a contact joint group */ virtual bool ConstructInternal(); |
From: Oliver O. <fr...@us...> - 2007-06-17 08:07:42
|
Update of /cvsroot/simspark/simspark/spark/oxygen/physicsserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv29286 Modified Files: Tag: projectx universaljoint.cpp Log Message: merge from HEAD Index: universaljoint.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/universaljoint.cpp,v retrieving revision 1.3 retrieving revision 1.3.4.1 diff -C2 -d -r1.3 -r1.3.4.1 *** universaljoint.cpp 12 Feb 2006 11:36:52 -0000 1.3 --- universaljoint.cpp 17 Jun 2007 08:07:32 -0000 1.3.4.1 *************** *** 79,83 **** } ! void UniversalJoint::SetAxis1(Vector3f & axis) { Vector3f first(GetWorldTransform().Rotate(axis)); --- 79,83 ---- } ! void UniversalJoint::SetAxis1(const Vector3f & axis) { Vector3f first(GetWorldTransform().Rotate(axis)); *************** *** 85,89 **** } ! void UniversalJoint::SetAxis2(Vector3f & axis) { Vector3f second(GetWorldTransform().Rotate(axis)); --- 85,89 ---- } ! void UniversalJoint::SetAxis2(const Vector3f & axis) { Vector3f second(GetWorldTransform().Rotate(axis)); *************** *** 91,95 **** } ! Vector3f UniversalJoint::GetAxis(EAxisIndex idx) { Vector3f vec(0,0,0); --- 91,95 ---- } ! Vector3f UniversalJoint::GetAxis(EAxisIndex idx) const { Vector3f vec(0,0,0); *************** *** 118,122 **** } ! float UniversalJoint::GetAngle(EAxisIndex idx) { switch (idx) --- 118,122 ---- } ! float UniversalJoint::GetAngle(EAxisIndex idx) const { switch (idx) *************** *** 133,137 **** } ! float UniversalJoint::GetAngleRate(EAxisIndex idx) { switch (idx) --- 133,137 ---- } ! float UniversalJoint::GetAngleRate(EAxisIndex idx) const { switch (idx) |
From: Oliver O. <fr...@us...> - 2007-06-17 08:07:36
|
Update of /cvsroot/simspark/simspark/spark/oxygen/physicsserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv29250 Modified Files: Tag: projectx universaljoint.h Log Message: merge from HEAD Index: universaljoint.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/universaljoint.h,v retrieving revision 1.3 retrieving revision 1.3.4.1 diff -C2 -d -r1.3 -r1.3.4.1 *** universaljoint.h 12 Feb 2006 11:36:52 -0000 1.3 --- universaljoint.h 17 Jun 2007 08:06:53 -0000 1.3.4.1 *************** *** 48,57 **** \param axis a vector describing the axis in relative coordinates */ ! void SetAxis1(salt::Vector3f & axis); /** This function sets up the second axis of the joint \param axis a vector describing the axis in local coordinates */ ! void SetAxis2(salt::Vector3f & axis); /** returns the vector describing one of the two axis --- 48,57 ---- \param axis a vector describing the axis in relative coordinates */ ! void SetAxis1(const salt::Vector3f & axis); /** This function sets up the second axis of the joint \param axis a vector describing the axis in local coordinates */ ! void SetAxis2(const salt::Vector3f & axis); /** returns the vector describing one of the two axis *************** *** 59,63 **** \param idx index of the desired axis */ ! salt::Vector3f GetAxis(EAxisIndex idx); /** returns one of the axis angles in degrees, measured between --- 59,63 ---- \param idx index of the desired axis */ ! salt::Vector3f GetAxis(EAxisIndex idx) const; /** returns one of the axis angles in degrees, measured between *************** *** 65,72 **** environment. */ ! float GetAngle(EAxisIndex idx); /** returns the time derivate of one of the hinge angles */ ! float GetAngleRate(EAxisIndex idx); /** sets a joint parameter value */ --- 65,72 ---- environment. */ ! float GetAngle(EAxisIndex idx) const; /** returns the time derivate of one of the hinge angles */ ! float GetAngleRate(EAxisIndex idx) const; /** sets a joint parameter value */ |
From: Oliver O. <fr...@us...> - 2007-06-17 08:05:35
|
Update of /cvsroot/simspark/simspark/spark/oxygen/sceneserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv28839 Modified Files: Tag: projectx basenode.cpp Log Message: merge from HEAD Index: basenode.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/sceneserver/basenode.cpp,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -C2 -d -r1.2 -r1.2.4.1 *** basenode.cpp 15 Feb 2006 01:00:19 -0000 1.2 --- basenode.cpp 17 Jun 2007 08:05:16 -0000 1.2.4.1 *************** *** 201,205 **** } ! salt::Vector3f BaseNode::GetLocalPos(const salt::Vector3f& worldPos) { Matrix invWorld = GetWorldTransform(); --- 201,205 ---- } ! salt::Vector3f BaseNode::GetLocalPos(const salt::Vector3f& worldPos) const { Matrix invWorld = GetWorldTransform(); |
From: Oliver O. <fr...@us...> - 2007-06-17 08:04:52
|
Update of /cvsroot/simspark/simspark/spark/oxygen/sceneserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv28789 Modified Files: Tag: projectx basenode.h Log Message: merge from HEAD Index: basenode.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/sceneserver/basenode.h,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** basenode.h 5 Dec 2005 21:21:17 -0000 1.1 --- basenode.h 17 Jun 2007 08:04:32 -0000 1.1.4.1 *************** *** 111,115 **** /** returns the corresponding local coordinates to the given world coordinates */ ! salt::Vector3f GetLocalPos(const salt::Vector3f& worldPos); /** updates internal state before physics calculation */ --- 111,115 ---- /** returns the corresponding local coordinates to the given world coordinates */ ! salt::Vector3f GetLocalPos(const salt::Vector3f& worldPos) const; /** updates internal state before physics calculation */ |
From: Oliver O. <fr...@us...> - 2007-06-17 08:03:40
|
Update of /cvsroot/simspark/simspark/spark/oxygen/sceneserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv28400 Modified Files: Tag: projectx fpscontroller.cpp Log Message: merge from HEAD Index: fpscontroller.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/sceneserver/fpscontroller.cpp,v retrieving revision 1.1.2.1.2.1 retrieving revision 1.1.2.1.2.2 diff -C2 -d -r1.1.2.1.2.1 -r1.1.2.1.2.2 *** fpscontroller.cpp 1 Jun 2007 06:57:10 -0000 1.1.2.1.2.1 --- fpscontroller.cpp 17 Jun 2007 08:03:26 -0000 1.1.2.1.2.2 *************** *** 27,34 **** --- 27,44 ---- using namespace salt; + // define some magic number here for the static fps controller update + // (while the simulation is paused). These should be made + // configurable.n + static const float STATIC_MIN_ANGLE_DELTA = 0.1f; + static const float STATIC_MIN_VELOCITY = 1e-3; + static const float STATIC_VELOCITY_DECAY = 0.8f; + static const float STATIC_ACCELERATION = 0.01f; + FPSController::FPSController() : BodyController() { mHAngle = 0.0f; + mHAngleDelta = 0.0f; mVAngle = 0.0f; + mVAngleDelta = 0.0f; mForward = false; mBackward = false; *************** *** 45,57 **** void ! FPSController::PrePhysicsUpdateInternal(float /*deltaTime*/) { - if (mBody.get() == 0) - { - return; - } - // determine force direction ! Vector3f vec(0.0f,0.0f,0.0f); if (mForward) vec.y() += 1.0f; --- 55,62 ---- void ! FPSController::PrepareUpdate(Matrix& matrix, Matrix& fwd, Vector3f& vec) { // determine force direction ! vec = Vector3f(0.0f,0.0f,0.0f); if (mForward) vec.y() += 1.0f; *************** *** 71,79 **** } ! Matrix matrix; float hAngle = gDegToRad(-mHAngle); float vAngle = gDegToRad(-mVAngle); matrix.RotationZ(hAngle); matrix.RotateX(vAngle); mBody->SetRotation(matrix); --- 76,101 ---- } ! matrix.Identity(); float hAngle = gDegToRad(-mHAngle); float vAngle = gDegToRad(-mVAngle); matrix.RotationZ(hAngle); matrix.RotateX(vAngle); + + fwd.Identity(); + fwd.RotationZ(hAngle); + } + + void FPSController::PrePhysicsUpdateInternal(float /*deltaTime*/) + { + if (mBody.get() == 0) + { + return; + } + + Matrix matrix; + Matrix fwd; + Vector3f vec; + PrepareUpdate(matrix, fwd, vec); + mBody->SetRotation(matrix); *************** *** 83,96 **** vec *= force; - Matrix fwd; - fwd.RotationZ(hAngle); mBody->AddForce(vec.y() * fwd.Up()); - - Matrix side; - side.RotationX(vAngle); mBody->AddForce(vec.x() * fwd.Right()); - mBody->AddForce(vec.z() * Vector3f(0,0,1)); } } --- 105,175 ---- vec *= force; mBody->AddForce(vec.y() * fwd.Up()); mBody->AddForce(vec.x() * fwd.Right()); mBody->AddForce(vec.z() * Vector3f(0,0,1)); } + + mHAngleDelta = 0.0; + mVAngleDelta = 0.0; + } + + bool FPSController::NeedStaticUpdate() const + { + if (mBody.get() == 0) + { + return false; + } + + return ( + (mForward) || + (mBackward) || + (mRight) || + (mLeft) || + (mUp) || + (mDown) || + (gAbs(mHAngleDelta) >= STATIC_MIN_ANGLE_DELTA) || + (gAbs(mVAngleDelta) >= STATIC_MIN_ANGLE_DELTA) || + (mBody->GetVelocity().Length() > STATIC_MIN_VELOCITY) + ); + } + + void FPSController::UpdateStatic(float deltaTime) + { + if (mBody.get() == 0) + { + return; + } + + Matrix matrix; + Matrix fwd; + Vector3f vec; + PrepareUpdate(matrix, fwd, vec); + + mBody->SetRotation(matrix); + + Vector3f bodyVel = mBody->GetVelocity() + (deltaTime * vec * STATIC_ACCELERATION); + bodyVel *= STATIC_VELOCITY_DECAY; + + Vector3f velocity = + vec.y() * fwd.Up() + + vec.x() * fwd.Right() + + vec.z() * Vector3f(0,0,1); + + matrix.Pos() = mBody->GetPosition() + velocity * bodyVel.Length(); + + mBody->SetPosition(matrix.Pos()); + mBody->SetVelocity(velocity); + + shared_ptr<BaseNode> bodyParent = shared_static_cast<BaseNode> + (make_shared(mBody->GetParent())); + + if (bodyParent.get() != 0) + { + mBody->SynchronizeParent(); + bodyParent->UpdateHierarchy(); + } + + mHAngleDelta = 0.0; + mVAngleDelta = 0.0; } *************** *** 98,101 **** --- 177,181 ---- { mHAngle += delta; + mHAngleDelta += delta; } *************** *** 103,106 **** --- 183,187 ---- { mVAngle += delta; + mVAngleDelta += delta; } *************** *** 108,111 **** --- 189,193 ---- { mHAngle = angleDeg; + mHAngleDelta = 0.0; } *************** *** 113,116 **** --- 195,199 ---- { mVAngle = angleDeg; + mVAngleDelta = 0.0; } |
From: Oliver O. <fr...@us...> - 2007-06-17 08:02:50
|
Update of /cvsroot/simspark/simspark/spark/oxygen/sceneserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv28347 Modified Files: Tag: projectx fpscontroller.h Log Message: merge from HEAD Index: fpscontroller.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/sceneserver/fpscontroller.h,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.1.2.1 diff -C2 -d -r1.1.2.1 -r1.1.2.1.2.1 *** fpscontroller.h 25 Feb 2007 16:27:45 -0000 1.1.2.1 --- fpscontroller.h 17 Jun 2007 08:02:47 -0000 1.1.2.1.2.1 *************** *** 80,84 **** --- 80,100 ---- float GetAcceleration() const; + /** updates the managed body statically, i.e. without using the + dynamics engine; this is useful to move an associated camera + when the simulation is paused + */ + void UpdateStatic(float deltaTime); + + /** returns true if a call to UpdateStatic will alter the state of + the managed body + */ + bool NeedStaticUpdate() const; + protected: + /** sets up the rotation matrix and directio vector used to update + the managed body + */ + void PrepareUpdate(salt::Matrix& matrix, salt::Matrix& fwd, salt::Vector3f& vec); + /** calculates and applies the force needed to perfom the * activated movements */ *************** *** 95,101 **** --- 111,123 ---- float mHAngle; + /** applied horizontal delta since last update */ + float mHAngleDelta; + /** the current vertical angle in degrees */ float mVAngle; + /** applied horizontal delta since last update */ + float mVAngleDelta; + // event states |
From: Oliver O. <fr...@us...> - 2007-06-17 08:01:49
|
Update of /cvsroot/simspark/simspark/spark/oxygen/sceneserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv27947 Added Files: Tag: projectx scenedict.cpp Log Message: merge from HEAD --- NEW FILE: scenedict.cpp --- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group $Id: scenedict.cpp,v 1.2.4.2 2007/06/17 08:01:45 fruit Exp $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <oxygen/sceneserver/scenedict.h> using namespace boost; using namespace oxygen; using namespace zeitgeist; SceneDict::SceneDict() { } SceneDict& SceneDict::GetInstance() { static SceneDict theInstance; return theInstance; } const SceneDict::FileRef* SceneDict::Lookup(boost::weak_ptr<zeitgeist::Leaf> leaf) { if (leaf.expired()) { return 0; } TDictionary::const_iterator iter = mDictionary.find(leaf); if (iter == mDictionary.end()) { return 0; } return &((*iter).second); } void SceneDict::Insert(boost::weak_ptr<zeitgeist::Leaf> leaf, const FileRef& ref) { if (leaf.expired()) { return; } mDictionary[leaf] = ref; } void SceneDict::Clear() { mDictionary.clear(); } |
From: Oliver O. <fr...@us...> - 2007-06-17 08:01:25
|
Update of /cvsroot/simspark/simspark/spark/oxygen/sceneserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv27919 Added Files: Tag: projectx scenedict.h Log Message: merge from HEAD --- NEW FILE: scenedict.h --- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group $Id: scenedict.h,v 1.2.4.2 2007/06/17 08:01:21 fruit Exp $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef OXYGEN_SCENEDICT_H #define OXYGEN_SCENEDICT_H #include <zeitgeist/leaf.h> #include <map> namespace oxygen { class SceneDict { public: struct FileRef { public: std::string fname; unsigned int line; public: FileRef(const std::string& f = std::string(), unsigned int l = 0) : fname(f), line(l) { } }; typedef std::map<boost::weak_ptr<zeitgeist::Leaf>, FileRef> TDictionary; public: static SceneDict& GetInstance(); const FileRef* Lookup(boost::weak_ptr<zeitgeist::Leaf> leaf); void Insert(boost::weak_ptr<zeitgeist::Leaf> leaf, const FileRef& ref); void Clear(); private: SceneDict(); protected: TDictionary mDictionary; }; } // namespace oxygen #endif // OXYGEN_SCENEDICT_H |
From: Oliver O. <fr...@us...> - 2007-06-17 08:00:32
|
Update of /cvsroot/simspark/simspark/spark/oxygen/sceneserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv27863 Modified Files: Tag: projectx sceneimporter.h Log Message: merge from HEAD Index: sceneimporter.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/sceneserver/sceneimporter.h,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** sceneimporter.h 5 Dec 2005 21:21:17 -0000 1.1 --- sceneimporter.h 17 Jun 2007 08:00:26 -0000 1.1.4.1 *************** *** 30,38 **** { class BaseNode; class SceneImporter : public zeitgeist::Leaf { public: ! SceneImporter() : zeitgeist::Leaf() {} virtual ~SceneImporter() {}; --- 30,39 ---- { class BaseNode; + class SceneDict; class SceneImporter : public zeitgeist::Leaf { public: ! SceneImporter() : zeitgeist::Leaf(), mSceneDict(0) {} virtual ~SceneImporter() {}; *************** *** 46,49 **** --- 47,57 ---- boost::shared_ptr<BaseNode> root, boost::shared_ptr<zeitgeist::ParameterList> parameter) = 0; + + + /** sets up the reference to the SceneDict instance */ + void SetSceneDict(SceneDict* dict) { mSceneDict = dict; } + + protected: + SceneDict* mSceneDict; }; |
From: Oliver O. <fr...@us...> - 2007-06-17 07:58:42
|
Update of /cvsroot/simspark/simspark/spark/oxygen/sceneserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv27061 Modified Files: Tag: projectx sceneserver.cpp Log Message: merge from HEAD Index: sceneserver.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/sceneserver/sceneserver.cpp,v retrieving revision 1.2.2.1 retrieving revision 1.2.2.1.2.1 diff -C2 -d -r1.2.2.1 -r1.2.2.1.2.1 *** sceneserver.cpp 16 Feb 2007 15:42:53 -0000 1.2.2.1 --- sceneserver.cpp 17 Jun 2007 07:58:25 -0000 1.2.2.1.2.1 *************** *** 30,33 **** --- 30,34 ---- #include "scene.h" #include "sceneimporter.h" + #include "scenedict.h" #include <oxygen/physicsserver/world.h> #include <oxygen/physicsserver/space.h> *************** *** 215,218 **** --- 216,221 ---- shared_static_cast<SceneImporter>(*iter); + importer->SetSceneDict(&SceneDict::GetInstance()); + GetLog()->Debug() << "(SceneServer) trying importer " << importer->GetName() << std::endl; |
From: Oliver O. <fr...@us...> - 2007-06-17 07:57:29
|
Update of /cvsroot/simspark/simspark/spark/oxygen/sceneserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv26653 Modified Files: Tag: projectx transform.cpp Log Message: merge from HEAD Index: transform.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/sceneserver/transform.cpp,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -C2 -d -r1.2 -r1.2.4.1 *** transform.cpp 18 Feb 2006 19:48:06 -0000 1.2 --- transform.cpp 17 Jun 2007 07:57:25 -0000 1.2.4.1 *************** *** 85,90 **** mOldLocalTransform = mLocalTransform; ! mLocalTransform = transform; ! parent->SetWorldTransform(mIdentityMatrix); } --- 85,91 ---- mOldLocalTransform = mLocalTransform; ! mLocalTransform = (parent->GetWorldTransform()); ! mLocalTransform.InvertMatrix(); ! mLocalTransform = mLocalTransform * transform; } *************** *** 98,101 **** --- 99,107 ---- } + const salt::Vector3f& Transform::GetLocalPos() + { + return mLocalTransform.Pos(); + } + void Transform::SetLocalRotationRad(const salt::Vector3f &rot) { |
From: Oliver O. <fr...@us...> - 2007-06-17 07:56:45
|
Update of /cvsroot/simspark/simspark/spark/oxygen/sceneserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv26261 Modified Files: Tag: projectx transform.h Log Message: merge from HEAD Index: transform.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/sceneserver/transform.h,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -C2 -d -r1.2 -r1.2.4.1 *** transform.h 18 Feb 2006 19:48:06 -0000 1.2 --- transform.h 17 Jun 2007 07:56:40 -0000 1.2.4.1 *************** *** 71,74 **** --- 71,77 ---- void SetLocalPos(const salt::Vector3f &pos); + /** returns the local position of this node */ + const salt::Vector3f& GetLocalPos(); + /** sets the local rotation of this node in rad */ void SetLocalRotationRad(const salt::Vector3f &rot); |
From: Oliver O. <fr...@us...> - 2007-06-17 07:54:30
|
Update of /cvsroot/simspark/simspark/spark/oxygen/simulationserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv25480 Modified Files: Tag: projectx simulationserver_c.cpp Log Message: merge from HEAD Index: simulationserver_c.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/simulationserver/simulationserver_c.cpp,v retrieving revision 1.1.4.2 retrieving revision 1.1.4.3 diff -C2 -d -r1.1.4.2 -r1.1.4.3 *** simulationserver_c.cpp 1 Jun 2007 15:20:23 -0000 1.1.4.2 --- simulationserver_c.cpp 17 Jun 2007 07:54:26 -0000 1.1.4.3 *************** *** 55,58 **** --- 55,64 ---- } + FUNCTION(SimulationServer, resetTime) + { + obj->ResetTime(); + return true; + } + FUNCTION(SimulationServer, setSimStep) { *************** *** 104,107 **** --- 110,114 ---- DEFINE_FUNCTION(initControlNode); DEFINE_FUNCTION(getTime); + DEFINE_FUNCTION(resetTime); DEFINE_FUNCTION(setSimStep); DEFINE_FUNCTION(getSimStep); |