From: <a-...@us...> - 2009-11-25 06:09:24
|
Revision: 107 http://simspark.svn.sourceforge.net/simspark/?rev=107&view=rev Author: a-held Date: 2009-11-25 06:09:10 +0000 (Wed, 25 Nov 2009) Log Message: ----------- Created abstract body class and moved functionality to new RigidBody class changed everything in simspark to use the new class instead of the abstract one Modified Paths: -------------- branches/multiphys/rcssserver3d/data/rsg/agent/ball.rsg branches/multiphys/rcssserver3d/data/rsg/agent/nao/box_physics.rsg branches/multiphys/rcssserver3d/data/rsg/agent/nao/box_physics_nocollider.rsg branches/multiphys/rcssserver3d/data/rsg/agent/nao/box_physics_with_handler.rsg branches/multiphys/rcssserver3d/data/rsg/agent/nao/ccylinder_physics.rsg branches/multiphys/rcssserver3d/data/rsg/agent/nao/ccylinder_physics_nocollider.rsg branches/multiphys/rcssserver3d/data/rsg/agent/nao/sphere_physics.rsg branches/multiphys/rcssserver3d/data/rsg/agent/nao/sphere_physics_nocollider.rsg branches/multiphys/rcssserver3d/data/rsg/agent/soccerbot058/box.rsg branches/multiphys/rcssserver3d/data/rsg/agent/soccerbot058/box_with_handler.rsg branches/multiphys/rcssserver3d/data/rsg/agent/soccerbot058/head.rsg branches/multiphys/rcssserver3d/data/rsg/agent/soccerbot058/lowerarm_body.rsg branches/multiphys/rcssserver3d/data/rsg/agent/soccerbot058/soccerbottorso.rsg branches/multiphys/rcssserver3d/data/rsg/agent/soccerbotleftlowerarmcomp.rsg branches/multiphys/rcssserver3d/data/rsg/agent/soccerbotrightlowerarmcomp.rsg branches/multiphys/rcssserver3d/data/rsg/agent/soccerbottorso.rsg branches/multiphys/rcssserver3d/data/rsg/agent/soccerbottorsocomp.rsg branches/multiphys/rcssserver3d/plugin/soccer/agentstate/agentstate.h branches/multiphys/rcssserver3d/plugin/soccer/ball/ball.cpp branches/multiphys/rcssserver3d/plugin/soccer/ball/ball.h branches/multiphys/rcssserver3d/plugin/soccer/beameffector/beameffector.h branches/multiphys/rcssserver3d/plugin/soccer/catcheffector/catcheffector.h branches/multiphys/rcssserver3d/plugin/soccer/driveeffector/driveeffector.h branches/multiphys/rcssserver3d/plugin/soccer/hmdp_effector/hmdpeffector.cpp branches/multiphys/rcssserver3d/plugin/soccer/hmdp_effector/hmdpeffector.h branches/multiphys/rcssserver3d/plugin/soccer/hmdp_effector/hmdpperceptor.cpp branches/multiphys/rcssserver3d/plugin/soccer/hmdp_effector/hmdpperceptor.h branches/multiphys/rcssserver3d/plugin/soccer/initeffector/initeffector.cpp branches/multiphys/rcssserver3d/plugin/soccer/internalsoccermonitor/internalsoccerinput.cpp branches/multiphys/rcssserver3d/plugin/soccer/internalsoccermonitor/internalsoccerinput.h branches/multiphys/rcssserver3d/plugin/soccer/kickeffector/kickeffector.h branches/multiphys/rcssserver3d/plugin/soccer/pantilteffector/pantilteffector.h branches/multiphys/rcssserver3d/plugin/soccer/soccerbase/soccerbase.cpp branches/multiphys/rcssserver3d/plugin/soccer/soccerbase/soccerbase.h branches/multiphys/rcssserver3d/plugin/soccer/soccercontrolaspect/soccercontrolaspect.h branches/multiphys/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp branches/multiphys/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.h branches/multiphys/rcssserver3d/plugin/soccer/trainercommandparser/trainercommandparser.cpp branches/multiphys/rcssserver3d/plugin/soccermonitor/soccerinput.cpp branches/multiphys/rcssserver3d/plugin/soccermonitor/soccerinput.h branches/multiphys/rcssserver3d/plugin/soccermonitor/soccerinputlogplayer.cpp branches/multiphys/rcssserver3d/plugin/soccermonitor/soccerinputlogplayer.h branches/multiphys/rsgedit/src/property.cpp branches/multiphys/rsgedit/src/sparkglrender.cpp branches/multiphys/simspark-utilities/data/rsg/agent/ball.rsg branches/multiphys/spark/data/rsg/boxspheres/box.rsg branches/multiphys/spark/data/rsg/boxspheres/box_with_handler.rsg branches/multiphys/spark/data/rsg/boxspheres/box_with_handler055.rsg branches/multiphys/spark/data/rsg/boxspheres/box_with_handler056.rsg branches/multiphys/spark/data/rsg/boxspheres/ccylinder.rsg branches/multiphys/spark/data/rsg/boxspheres/sphere.rsg branches/multiphys/spark/lib/oxygen/CMakeLists.txt branches/multiphys/spark/lib/oxygen/oxygen.cpp branches/multiphys/spark/lib/oxygen/oxygen.h branches/multiphys/spark/lib/oxygen/physicsserver/angularmotor.h branches/multiphys/spark/lib/oxygen/physicsserver/balljoint.h branches/multiphys/spark/lib/oxygen/physicsserver/body.h branches/multiphys/spark/lib/oxygen/physicsserver/body_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/bodycontroller.cpp branches/multiphys/spark/lib/oxygen/physicsserver/bodycontroller.h branches/multiphys/spark/lib/oxygen/physicsserver/collider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/dragcontroller.cpp branches/multiphys/spark/lib/oxygen/physicsserver/hinge2joint.h branches/multiphys/spark/lib/oxygen/physicsserver/hingejoint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/spaceint.h branches/multiphys/spark/lib/oxygen/physicsserver/joint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/joint.h branches/multiphys/spark/lib/oxygen/physicsserver/physicsserver.h branches/multiphys/spark/lib/oxygen/physicsserver/sliderjoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/sliderjoint.h branches/multiphys/spark/lib/oxygen/physicsserver/space.h branches/multiphys/spark/lib/oxygen/physicsserver/universaljoint.h branches/multiphys/spark/lib/oxygen/physicsserver/velocitycontroller.cpp branches/multiphys/spark/lib/oxygen/sceneserver/fpscontroller.cpp branches/multiphys/spark/plugin/forceeffector/forceeffector.cpp branches/multiphys/spark/plugin/forceeffector/forceeffector.h branches/multiphys/spark/plugin/gyrorateperceptor/gyrorateperceptor.cpp branches/multiphys/spark/plugin/gyrorateperceptor/gyrorateperceptor.h branches/multiphys/spark/plugin/rosimporter/rosimporter.cpp branches/multiphys/spark/plugin/rosimporter/rosimporter.h branches/multiphys/spark/plugin/sparkagent/hinge2effector.cpp branches/multiphys/spark/plugin/sparkagent/hingeeffector.cpp branches/multiphys/spark/plugin/sparkagent/universaljointeffector.cpp branches/multiphys/spark/plugin/sparkmonitor/sparkmonitorclient.cpp branches/multiphys/spark/plugin/sparkmonitor/sparkmonitorlogfileserver.cpp branches/multiphys/spark/spark/spark.rb branches/multiphys/spark/test/scenetest/script/scenetest.rb Added Paths: ----------- branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.cpp branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.h branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody_c.cpp Removed Paths: ------------- branches/multiphys/spark/lib/oxygen/physicsserver/body.cpp Modified: branches/multiphys/rcssserver3d/data/rsg/agent/ball.rsg =================================================================== --- branches/multiphys/rcssserver3d/data/rsg/agent/ball.rsg 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/rcssserver3d/data/rsg/agent/ball.rsg 2009-11-25 06:09:10 UTC (rev 107) @@ -15,7 +15,7 @@ (setScale $Radius $Radius $Radius) ) - (nd Body + (nd RigidBody (setName physics) (setSphereTotal $Mass $Radius) Modified: branches/multiphys/rcssserver3d/data/rsg/agent/nao/box_physics.rsg =================================================================== --- branches/multiphys/rcssserver3d/data/rsg/agent/nao/box_physics.rsg 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/rcssserver3d/data/rsg/agent/nao/box_physics.rsg 2009-11-25 06:09:10 UTC (rev 107) @@ -4,7 +4,7 @@ ( (templ $lenX $lenY $lenZ $totalMass) - (nd Body + (nd RigidBody (setName boxBody) (setBoxTotal $totalMass $lenX $lenY $lenZ) @@ -16,4 +16,4 @@ (importScene rsg/agent/nao/contactjointhandler.rsg) ) -) \ No newline at end of file +) Modified: branches/multiphys/rcssserver3d/data/rsg/agent/nao/box_physics_nocollider.rsg =================================================================== --- branches/multiphys/rcssserver3d/data/rsg/agent/nao/box_physics_nocollider.rsg 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/rcssserver3d/data/rsg/agent/nao/box_physics_nocollider.rsg 2009-11-25 06:09:10 UTC (rev 107) @@ -4,7 +4,7 @@ ( (templ $lenX $lenY $lenZ $totalMass) - (nd Body + (nd RigidBody (setName boxBody) (setBoxTotal $totalMass $lenX $lenY $lenZ) Modified: branches/multiphys/rcssserver3d/data/rsg/agent/nao/box_physics_with_handler.rsg =================================================================== --- branches/multiphys/rcssserver3d/data/rsg/agent/nao/box_physics_with_handler.rsg 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/rcssserver3d/data/rsg/agent/nao/box_physics_with_handler.rsg 2009-11-25 06:09:10 UTC (rev 107) @@ -4,7 +4,7 @@ ( (templ $lenX $lenY $lenZ $totalMass) - (nd Body + (nd RigidBody (setName boxBody) (setBoxTotal $totalMass $lenX $lenY $lenZ) Modified: branches/multiphys/rcssserver3d/data/rsg/agent/nao/ccylinder_physics.rsg =================================================================== --- branches/multiphys/rcssserver3d/data/rsg/agent/nao/ccylinder_physics.rsg 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/rcssserver3d/data/rsg/agent/nao/ccylinder_physics.rsg 2009-11-25 06:09:10 UTC (rev 107) @@ -4,7 +4,7 @@ ( (templ $radius $length $totalMass) - (nd Body + (nd RigidBody (setName ccylinderBody) (setCappedCylinderTotal $totalMass $radius $length) Modified: branches/multiphys/rcssserver3d/data/rsg/agent/nao/ccylinder_physics_nocollider.rsg =================================================================== --- branches/multiphys/rcssserver3d/data/rsg/agent/nao/ccylinder_physics_nocollider.rsg 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/rcssserver3d/data/rsg/agent/nao/ccylinder_physics_nocollider.rsg 2009-11-25 06:09:10 UTC (rev 107) @@ -4,7 +4,7 @@ ( (templ $radius $length $totalMass) - (nd Body + (nd RigidBody (setName ccylinderBody) (setCappedCylinderTotal $totalMass $radius) Modified: branches/multiphys/rcssserver3d/data/rsg/agent/nao/sphere_physics.rsg =================================================================== --- branches/multiphys/rcssserver3d/data/rsg/agent/nao/sphere_physics.rsg 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/rcssserver3d/data/rsg/agent/nao/sphere_physics.rsg 2009-11-25 06:09:10 UTC (rev 107) @@ -4,7 +4,7 @@ ( (templ $radius $totalMass) - (nd Body + (nd RigidBody (setName sphereBody) (setSphereTotal $totalMass $radius) Modified: branches/multiphys/rcssserver3d/data/rsg/agent/nao/sphere_physics_nocollider.rsg =================================================================== --- branches/multiphys/rcssserver3d/data/rsg/agent/nao/sphere_physics_nocollider.rsg 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/rcssserver3d/data/rsg/agent/nao/sphere_physics_nocollider.rsg 2009-11-25 06:09:10 UTC (rev 107) @@ -4,7 +4,7 @@ ( (templ $radius $totalMass) - (nd Body + (nd RigidBody (setName sphereBody) (setSphereTotal $totalMass $radius) Modified: branches/multiphys/rcssserver3d/data/rsg/agent/soccerbot058/box.rsg =================================================================== --- branches/multiphys/rcssserver3d/data/rsg/agent/soccerbot058/box.rsg 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/rcssserver3d/data/rsg/agent/soccerbot058/box.rsg 2009-11-25 06:09:10 UTC (rev 107) @@ -8,17 +8,17 @@ (setMaterial $material) ) - (nd Body + (nd RigidBody (setName boxBody) (setBoxTotal $totalMass $lenX $lenY $lenZ) - (nd DragController - (setAngularDrag 0.01) - (setLinearDrag 0.01) - ) + (nd DragController + (setAngularDrag 0.01) + (setLinearDrag 0.01) + ) ) (nd BoxCollider (setBoxLengths $lenX $lenY $lenZ) (importScene rsg/agent/nao/contactjointhandler.rsg) ) - ) \ No newline at end of file + ) Modified: branches/multiphys/rcssserver3d/data/rsg/agent/soccerbot058/box_with_handler.rsg =================================================================== --- branches/multiphys/rcssserver3d/data/rsg/agent/soccerbot058/box_with_handler.rsg 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/rcssserver3d/data/rsg/agent/soccerbot058/box_with_handler.rsg 2009-11-25 06:09:10 UTC (rev 107) @@ -8,7 +8,7 @@ (setMaterial $material) ) - (nd Body + (nd RigidBody (setName boxBody) (setBoxTotal $totalMass $lenX $lenY $lenZ) (nd DragController @@ -21,4 +21,4 @@ (setBoxLengths $lenX $lenY $lenZ) (importScene rsg/agent/nao/touchperceptorhandler.rsg) ) - ) \ No newline at end of file + ) Modified: branches/multiphys/rcssserver3d/data/rsg/agent/soccerbot058/head.rsg =================================================================== --- branches/multiphys/rcssserver3d/data/rsg/agent/soccerbot058/head.rsg 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/rcssserver3d/data/rsg/agent/soccerbot058/head.rsg 2009-11-25 06:09:10 UTC (rev 107) @@ -9,7 +9,7 @@ (setName head) (setLocalPos $HeadPosX $HeadPosY $HeadPosZ) - (nd Body + (nd RigidBody (setName sphereBody) (setSphereTotal $headMass $headRadius $HeadPosX $HeadPosY $HeadPosZ Modified: branches/multiphys/rcssserver3d/data/rsg/agent/soccerbot058/lowerarm_body.rsg =================================================================== --- branches/multiphys/rcssserver3d/data/rsg/agent/soccerbot058/lowerarm_body.rsg 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/rcssserver3d/data/rsg/agent/soccerbot058/lowerarm_body.rsg 2009-11-25 06:09:10 UTC (rev 107) @@ -32,7 +32,7 @@ - (eval 0.04 * $scale))) - (nd Body + (nd RigidBody (setName boxBody) ;; Lower arm (setBox $LowerarmMass $LowerarmLength $LowerarmWidth $LowerarmHeight) Modified: branches/multiphys/rcssserver3d/data/rsg/agent/soccerbot058/soccerbottorso.rsg =================================================================== --- branches/multiphys/rcssserver3d/data/rsg/agent/soccerbot058/soccerbottorso.rsg 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/rcssserver3d/data/rsg/agent/soccerbot058/soccerbottorso.rsg 2009-11-25 06:09:10 UTC (rev 107) @@ -16,7 +16,7 @@ ; + (eval 0.1 * $scale)) ; + (eval $headRadius / 2.0))) - (nd Body + (nd RigidBody (setName boxBody) ; Upper torso mass (setBoxTotal $upperMass $upperLenX $upperLenY $upperLenZ) Modified: branches/multiphys/rcssserver3d/data/rsg/agent/soccerbotleftlowerarmcomp.rsg =================================================================== --- branches/multiphys/rcssserver3d/data/rsg/agent/soccerbotleftlowerarmcomp.rsg 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/rcssserver3d/data/rsg/agent/soccerbotleftlowerarmcomp.rsg 2009-11-25 06:09:10 UTC (rev 107) @@ -44,7 +44,7 @@ - (eval $HandBox3Height / 2.0) ) - 0.04 ) ) - (nd Body + (nd RigidBody (setName boxBody) ; Lower arm mass (setBox $LowerarmMass $LowerarmLength $LowerarmWidth $LowerarmHeight) Modified: branches/multiphys/rcssserver3d/data/rsg/agent/soccerbotrightlowerarmcomp.rsg =================================================================== --- branches/multiphys/rcssserver3d/data/rsg/agent/soccerbotrightlowerarmcomp.rsg 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/rcssserver3d/data/rsg/agent/soccerbotrightlowerarmcomp.rsg 2009-11-25 06:09:10 UTC (rev 107) @@ -44,7 +44,7 @@ - (eval $HandBox3Height / 2.0) ) - 0.04 ) ) - (nd Body + (nd RigidBody (setName boxBody) ; Lower arm mass (setBox $LowerarmMass $LowerarmLength $LowerarmWidth $LowerarmHeight) Modified: branches/multiphys/rcssserver3d/data/rsg/agent/soccerbottorso.rsg =================================================================== --- branches/multiphys/rcssserver3d/data/rsg/agent/soccerbottorso.rsg 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/rcssserver3d/data/rsg/agent/soccerbottorso.rsg 2009-11-25 06:09:10 UTC (rev 107) @@ -10,7 +10,7 @@ ;(setScale 1.0 1.0 1.0) ) - (nd Body + (nd RigidBody (setName boxBody) ;(setBoxTotal $totalMass $lenX $lenY $lenZ) (setBox $totalMass $lenX $lenY $lenZ) @@ -36,4 +36,4 @@ ) ) -) \ No newline at end of file +) Modified: branches/multiphys/rcssserver3d/data/rsg/agent/soccerbottorsocomp.rsg =================================================================== --- branches/multiphys/rcssserver3d/data/rsg/agent/soccerbottorsocomp.rsg 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/rcssserver3d/data/rsg/agent/soccerbottorsocomp.rsg 2009-11-25 06:09:10 UTC (rev 107) @@ -14,7 +14,7 @@ (def $HeadPosY 0.05) (def $HeadPosZ (eval (eval (eval 0.5 * $upperLenZ) + 0.1) + (eval $headRadius / 2.0))) - (nd Body + (nd RigidBody (setName boxBody) ; Upper torso mass (setBox $upperMass $upperLenX $upperLenY $upperLenZ) Modified: branches/multiphys/rcssserver3d/plugin/soccer/agentstate/agentstate.h =================================================================== --- branches/multiphys/rcssserver3d/plugin/soccer/agentstate/agentstate.h 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/rcssserver3d/plugin/soccer/agentstate/agentstate.h 2009-11-25 06:09:10 UTC (rev 107) @@ -27,7 +27,7 @@ namespace oxygen { - class Body; + class RigidBody; } class AgentState : public ObjectState Modified: branches/multiphys/rcssserver3d/plugin/soccer/ball/ball.cpp =================================================================== --- branches/multiphys/rcssserver3d/plugin/soccer/ball/ball.cpp 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/rcssserver3d/plugin/soccer/ball/ball.cpp 2009-11-25 06:09:10 UTC (rev 107) @@ -46,7 +46,7 @@ if (mBody.get() == 0) { - mBody = shared_dynamic_cast<Body>(GetChildOfClass("Body")); + mBody = shared_dynamic_cast<RigidBody>(GetChildOfClass("RigidBody")); } } Modified: branches/multiphys/rcssserver3d/plugin/soccer/ball/ball.h =================================================================== --- branches/multiphys/rcssserver3d/plugin/soccer/ball/ball.h 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/rcssserver3d/plugin/soccer/ball/ball.h 2009-11-25 06:09:10 UTC (rev 107) @@ -23,7 +23,7 @@ #define BALL_H #include <oxygen/sceneserver/transform.h> -#include <oxygen/physicsserver/body.h> +#include <oxygen/physicsserver/rigidbody.h> #include <salt/vector.h> class BallStateAspect; @@ -65,7 +65,7 @@ salt::Vector3f mForce; salt::Vector3f mTorque; - boost::shared_ptr<oxygen::Body> mBody; + boost::shared_ptr<oxygen::RigidBody> mBody; boost::shared_ptr<oxygen::AgentAspect> mKickedLast; boost::shared_ptr<BallStateAspect> mBallStateAspect; }; Modified: branches/multiphys/rcssserver3d/plugin/soccer/beameffector/beameffector.h =================================================================== --- branches/multiphys/rcssserver3d/plugin/soccer/beameffector/beameffector.h 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/rcssserver3d/plugin/soccer/beameffector/beameffector.h 2009-11-25 06:09:10 UTC (rev 107) @@ -23,7 +23,7 @@ #define BEAMEFFECTOR_H #include <oxygen/agentaspect/effector.h> -#include <oxygen/physicsserver/body.h> +#include <oxygen/physicsserver/rigidbody.h> #include <gamestateaspect/gamestateaspect.h> class BeamEffector : public oxygen::Effector @@ -51,7 +51,7 @@ protected: /** the reference to the parents body node */ - boost::shared_ptr<oxygen::Body> mBody; + boost::shared_ptr<oxygen::RigidBody> mBody; /** the reference to the GameState */ boost::shared_ptr<GameStateAspect> mGameState; Modified: branches/multiphys/rcssserver3d/plugin/soccer/catcheffector/catcheffector.h =================================================================== --- branches/multiphys/rcssserver3d/plugin/soccer/catcheffector/catcheffector.h 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/rcssserver3d/plugin/soccer/catcheffector/catcheffector.h 2009-11-25 06:09:10 UTC (rev 107) @@ -22,7 +22,7 @@ #define CATCHEFFECTOR_H #include <oxygen/agentaspect/effector.h> -#include <oxygen/physicsserver/body.h> +#include <oxygen/physicsserver/rigidbody.h> #include <ball/ball.h> #include <ballstateaspect/ballstateaspect.h> @@ -33,7 +33,7 @@ namespace oxygen { - class Body; + class RigidBody; class AgentAspect; } @@ -74,7 +74,7 @@ protected: /** reference to the body node of the ball */ - boost::shared_ptr<oxygen::Body> mBallBody; + boost::shared_ptr<oxygen::RigidBody> mBallBody; /** reference to the agent aspect */ boost::shared_ptr<oxygen::AgentAspect> mAgent; /** reference to the agentstate */ Modified: branches/multiphys/rcssserver3d/plugin/soccer/driveeffector/driveeffector.h =================================================================== --- branches/multiphys/rcssserver3d/plugin/soccer/driveeffector/driveeffector.h 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/rcssserver3d/plugin/soccer/driveeffector/driveeffector.h 2009-11-25 06:09:10 UTC (rev 107) @@ -24,7 +24,7 @@ #include <salt/random.h> #include <oxygen/agentaspect/effector.h> -#include <oxygen/physicsserver/body.h> +#include <oxygen/physicsserver/rigidbody.h> #include <agentstate/agentstate.h> class DriveEffector : public oxygen::Effector @@ -84,7 +84,7 @@ /** the reference to the parent transform node */ boost::shared_ptr<oxygen::Transform> mTransformParent; /** the reference to the parents body node */ - boost::shared_ptr<oxygen::Body> mBody; + boost::shared_ptr<oxygen::RigidBody> mBody; //! a reference to the agent state boost::shared_ptr<AgentState> mAgentState; Modified: branches/multiphys/rcssserver3d/plugin/soccer/hmdp_effector/hmdpeffector.cpp =================================================================== --- branches/multiphys/rcssserver3d/plugin/soccer/hmdp_effector/hmdpeffector.cpp 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/rcssserver3d/plugin/soccer/hmdp_effector/hmdpeffector.cpp 2009-11-25 06:09:10 UTC (rev 107) @@ -141,7 +141,7 @@ // parent should be a transform, or some other node, which has a // Body-child - mBody = shared_dynamic_cast<Body>(parent->GetChildOfClass("Body")); + mBody = shared_dynamic_cast<RigidBody>(parent->GetChildOfClass("RigidBody")); if (mBody.get() == 0) { @@ -268,7 +268,7 @@ if (abs(err) > 0.00001) { - shared_ptr<Body> body = joint->GetBody(Joint::BI_FIRST); + shared_ptr<RigidBody> body = joint->GetBody(Joint::BI_FIRST); if (body && !body->IsEnabled()) { body->Enable(); Modified: branches/multiphys/rcssserver3d/plugin/soccer/hmdp_effector/hmdpeffector.h =================================================================== --- branches/multiphys/rcssserver3d/plugin/soccer/hmdp_effector/hmdpeffector.h 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/rcssserver3d/plugin/soccer/hmdp_effector/hmdpeffector.h 2009-11-25 06:09:10 UTC (rev 107) @@ -23,7 +23,7 @@ #define HMDPEFFECTOR_H #include <oxygen/agentaspect/effector.h> -#include <oxygen/physicsserver/body.h> +#include <oxygen/physicsserver/rigidbody.h> #include "naospecific.h" //! make it possible to have a pointer to the perceptor @@ -112,7 +112,7 @@ protected: /** the reference to the parents body node */ - boost::shared_ptr<oxygen::Body> mBody; + boost::shared_ptr<oxygen::RigidBody> mBody; }; DECLARE_CLASS(HMDPEffector) Modified: branches/multiphys/rcssserver3d/plugin/soccer/hmdp_effector/hmdpperceptor.cpp =================================================================== --- branches/multiphys/rcssserver3d/plugin/soccer/hmdp_effector/hmdpperceptor.cpp 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/rcssserver3d/plugin/soccer/hmdp_effector/hmdpperceptor.cpp 2009-11-25 06:09:10 UTC (rev 107) @@ -23,7 +23,7 @@ #include "hmdpperceptor.h" #include <zeitgeist/logserver/logserver.h> #include <oxygen/sceneserver/transform.h> -#include <oxygen/physicsserver/body.h> +#include <oxygen/physicsserver/rigidbody.h> #include <salt/vector.h> using namespace oxygen; @@ -51,7 +51,7 @@ shared_ptr<Transform> transformParent = shared_static_cast<Transform> ( FindParentSupportingClass<Transform> ().lock()); - mBody = shared_static_cast<Body> (transformParent->GetChildOfClass("Body")); + mBody = shared_static_cast<RigidBody> (transformParent->GetChildOfClass("RigidBody")); } void HMDPPerceptor::OnUnlink() Modified: branches/multiphys/rcssserver3d/plugin/soccer/hmdp_effector/hmdpperceptor.h =================================================================== --- branches/multiphys/rcssserver3d/plugin/soccer/hmdp_effector/hmdpperceptor.h 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/rcssserver3d/plugin/soccer/hmdp_effector/hmdpperceptor.h 2009-11-25 06:09:10 UTC (rev 107) @@ -24,7 +24,7 @@ #define HMDPPERCEPTOR_H #include <oxygen/agentaspect/perceptor.h> -#include <oxygen/physicsserver/body.h> +#include <oxygen/physicsserver/rigidbody.h> class HMDPPerceptor: public oxygen::Perceptor { @@ -45,7 +45,7 @@ private: //! reference to the body of which the perceptor is measuring the angle change rate - boost::shared_ptr<oxygen::Body> mBody; + boost::shared_ptr<oxygen::RigidBody> mBody; }; DECLARE_CLASS(HMDPPerceptor) Modified: branches/multiphys/rcssserver3d/plugin/soccer/initeffector/initeffector.cpp =================================================================== --- branches/multiphys/rcssserver3d/plugin/soccer/initeffector/initeffector.cpp 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/rcssserver3d/plugin/soccer/initeffector/initeffector.cpp 2009-11-25 06:09:10 UTC (rev 107) @@ -24,7 +24,7 @@ #include <zeitgeist/logserver/logserver.h> #include <oxygen/agentaspect/agentaspect.h> #include <oxygen/gamecontrolserver/predicate.h> -#include <oxygen/physicsserver/body.h> +#include <oxygen/physicsserver/rigidbody.h> #include <oxygen/physicsserver/space.h> #include <soccerbase/soccerbase.h> #include <agentstate/agentstate.h> Modified: branches/multiphys/rcssserver3d/plugin/soccer/internalsoccermonitor/internalsoccerinput.cpp =================================================================== --- branches/multiphys/rcssserver3d/plugin/soccer/internalsoccermonitor/internalsoccerinput.cpp 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/rcssserver3d/plugin/soccer/internalsoccermonitor/internalsoccerinput.cpp 2009-11-25 06:09:10 UTC (rev 107) @@ -22,7 +22,7 @@ #include <zeitgeist/logserver/logserver.h> #include <gamestateaspect/gamestateaspect.h> #include <soccerruleaspect/soccerruleaspect.h> -#include <oxygen/physicsserver/body.h> +#include <oxygen/physicsserver/rigidbody.h> #include <oxygen/sceneserver/fpscontroller.h> #include <oxygen/gamecontrolserver/gamecontrolserver.h> #include <oxygen/agentaspect/agentaspect.h> @@ -93,7 +93,7 @@ } // get camera body - mCameraBody = shared_dynamic_cast<Body> + mCameraBody = shared_dynamic_cast<RigidBody> (GetCore()->Get("/usr/scene/camera/physics")); if (mCameraBody.get() == 0) Modified: branches/multiphys/rcssserver3d/plugin/soccer/internalsoccermonitor/internalsoccerinput.h =================================================================== --- branches/multiphys/rcssserver3d/plugin/soccer/internalsoccermonitor/internalsoccerinput.h 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/rcssserver3d/plugin/soccer/internalsoccermonitor/internalsoccerinput.h 2009-11-25 06:09:10 UTC (rev 107) @@ -28,7 +28,7 @@ namespace oxygen { class FPSController; - class Body; + class RigidBody; class GameControlServer; } @@ -88,7 +88,7 @@ boost::shared_ptr<SoccerRuleAspect> mSoccerRule; /** cached reference to the camera body */ - boost::shared_ptr<oxygen::Body> mCameraBody; + boost::shared_ptr<oxygen::RigidBody> mCameraBody; /** cached reference to the camera body */ boost::shared_ptr<oxygen::FPSController> mFPS; Modified: branches/multiphys/rcssserver3d/plugin/soccer/kickeffector/kickeffector.h =================================================================== --- branches/multiphys/rcssserver3d/plugin/soccer/kickeffector/kickeffector.h 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/rcssserver3d/plugin/soccer/kickeffector/kickeffector.h 2009-11-25 06:09:10 UTC (rev 107) @@ -25,7 +25,7 @@ #include <salt/random.h> #include <oxygen/agentaspect/agentaspect.h> #include <oxygen/agentaspect/effector.h> -#include <oxygen/physicsserver/body.h> +#include <oxygen/physicsserver/rigidbody.h> #include <ball/ball.h> #include <ballstateaspect/ballstateaspect.h> @@ -104,7 +104,7 @@ typedef boost::shared_ptr<salt::NormalRNG<> > NormalRngPtr; /** reference to the body node of the ball */ - boost::shared_ptr<oxygen::Body> mBallBody; + boost::shared_ptr<oxygen::RigidBody> mBallBody; /** reference to the body node of the ball */ boost::shared_ptr<Ball> mBall; /** reference to the agent aspect */ Modified: branches/multiphys/rcssserver3d/plugin/soccer/pantilteffector/pantilteffector.h =================================================================== --- branches/multiphys/rcssserver3d/plugin/soccer/pantilteffector/pantilteffector.h 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/rcssserver3d/plugin/soccer/pantilteffector/pantilteffector.h 2009-11-25 06:09:10 UTC (rev 107) @@ -24,7 +24,7 @@ #include <salt/random.h> #include <oxygen/agentaspect/effector.h> -#include <oxygen/physicsserver/body.h> +#include <oxygen/physicsserver/rigidbody.h> #include <agentstate/agentstate.h> class PanTiltEffector : public oxygen::Effector @@ -77,7 +77,7 @@ /** the reference to the parent transform node */ boost::shared_ptr<oxygen::Transform> mTransformParent; /** the reference to the parents body node */ - boost::shared_ptr<oxygen::Body> mBody; + boost::shared_ptr<oxygen::RigidBody> mBody; //! a reference to the agent state boost::shared_ptr<AgentState> mAgentState; Modified: branches/multiphys/rcssserver3d/plugin/soccer/soccerbase/soccerbase.cpp =================================================================== --- branches/multiphys/rcssserver3d/plugin/soccer/soccerbase/soccerbase.cpp 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/rcssserver3d/plugin/soccer/soccerbase/soccerbase.cpp 2009-11-25 06:09:10 UTC (rev 107) @@ -20,7 +20,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "soccerbase.h" -#include <oxygen/physicsserver/body.h> +#include <oxygen/physicsserver/rigidbody.h> #include <oxygen/physicsserver/spherecollider.h> #include <oxygen/agentaspect/perceptor.h> #include <oxygen/agentaspect/agentaspect.h> @@ -94,10 +94,10 @@ bool SoccerBase::GetAgentBody(const shared_ptr<Transform> transform, - shared_ptr<Body>& agent_body) + shared_ptr<RigidBody>& agent_body) { - agent_body = transform->FindChildSupportingClass<Body>(true); + agent_body = transform->FindChildSupportingClass<RigidBody>(true); if (agent_body.get() == 0) { @@ -112,7 +112,7 @@ bool SoccerBase::GetAgentBody(const Leaf& base, TTeamIndex idx, - int unum, shared_ptr<Body>& agent_body) + int unum, shared_ptr<RigidBody>& agent_body) { shared_ptr<AgentState> agentState; shared_ptr<Transform> parent; @@ -380,7 +380,7 @@ } bool -SoccerBase::GetBody(const Leaf& base, shared_ptr<Body>& body) +SoccerBase::GetBody(const Leaf& base, shared_ptr<RigidBody>& body) { shared_ptr<Transform> parent; if (! GetTransformParent(base,parent)) @@ -390,7 +390,7 @@ return false; } - body = shared_dynamic_cast<Body>(parent->FindChildSupportingClass<Body>()); + body = shared_dynamic_cast<RigidBody>(parent->FindChildSupportingClass<RigidBody>()); if (body.get() == 0) { @@ -443,10 +443,10 @@ } bool -SoccerBase::GetBallBody(const Leaf& base, shared_ptr<Body>& body) +SoccerBase::GetBallBody(const Leaf& base, shared_ptr<RigidBody>& body) { static shared_ptr<Scene> scene; - static shared_ptr<Body> bodyRef; + static shared_ptr<RigidBody> bodyRef; if (scene.get() == 0) { @@ -462,7 +462,7 @@ if (bodyRef.get() == 0) { - bodyRef = shared_dynamic_cast<Body> + bodyRef = shared_dynamic_cast<RigidBody> (base.GetCore()->Get(scene->GetFullPath() + "Ball/physics")); if (bodyRef.get() == 0) @@ -647,7 +647,7 @@ Leaf::TLeafList leafList; - parent->ListChildrenSupportingClass<Body>(leafList, true); + parent->ListChildrenSupportingClass<RigidBody>(leafList, true); if (leafList.size() == 0) { @@ -663,8 +663,8 @@ // move all child bodies for (; iter != leafList.end(); ++iter) { - shared_ptr<Body> childBody = - shared_dynamic_cast<Body>(*iter); + shared_ptr<RigidBody> childBody = + shared_dynamic_cast<RigidBody>(*iter); Vector3f childPos = childBody->GetPosition(); @@ -692,7 +692,7 @@ Leaf::TLeafList leafList; - parent->ListChildrenSupportingClass<Body>(leafList, true); + parent->ListChildrenSupportingClass<RigidBody>(leafList, true); if (leafList.size() == 0) { @@ -703,7 +703,7 @@ return false; } - shared_ptr<Body> body; + shared_ptr<RigidBody> body; GetAgentBody(agent_aspect, body); Matrix bodyR = body->GetRotation(); @@ -720,8 +720,8 @@ ++iter ) { - shared_ptr<Body> childBody = - shared_dynamic_cast<Body>(*iter); + shared_ptr<RigidBody> childBody = + shared_dynamic_cast<RigidBody>(*iter); Vector3f childPos = childBody->GetPosition(); Matrix childR = childBody->GetRotation(); Modified: branches/multiphys/rcssserver3d/plugin/soccer/soccerbase/soccerbase.h =================================================================== --- branches/multiphys/rcssserver3d/plugin/soccer/soccerbase/soccerbase.h 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/rcssserver3d/plugin/soccer/soccerbase/soccerbase.h 2009-11-25 06:09:10 UTC (rev 107) @@ -40,7 +40,7 @@ class Scene; class Transform; class Perceptor; - class Body; + class RigidBody; class SphereCollider; class ControlAspect; class AgentAspect; @@ -84,19 +84,19 @@ /** returns a reference to the Body node below the closest transform parent */ static bool - GetBody(const zeitgeist::Leaf& base, boost::shared_ptr<oxygen::Body>& body); + GetBody(const zeitgeist::Leaf& base, boost::shared_ptr<oxygen::RigidBody>& body); /** returns a reference to the Body node below the given Transform node */ static bool GetAgentBody(const boost::shared_ptr<oxygen::Transform> transform, - boost::shared_ptr<oxygen::Body>& agent_body); + boost::shared_ptr<oxygen::RigidBody>& agent_body); /** returns a reference to the Body node below the given Transform node based on parameters team index and uniform number */ static bool GetAgentBody(const zeitgeist::Leaf& base, TTeamIndex idx, - int unum, boost::shared_ptr<oxygen::Body>& agent_body); + int unum, boost::shared_ptr<oxygen::RigidBody>& agent_body); /** returns a reference to the AgentState node below the closest Transform parent */ @@ -148,7 +148,7 @@ /** returns a reference to the Body node below the Ball */ static bool GetBallBody(const zeitgeist::Leaf& base, - boost::shared_ptr<oxygen::Body>& body); + boost::shared_ptr<oxygen::RigidBody>& body); /** returns a reference to the Body SphereCollider node below the Ball */ static bool Modified: branches/multiphys/rcssserver3d/plugin/soccer/soccercontrolaspect/soccercontrolaspect.h =================================================================== --- branches/multiphys/rcssserver3d/plugin/soccer/soccercontrolaspect/soccercontrolaspect.h 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/rcssserver3d/plugin/soccer/soccercontrolaspect/soccercontrolaspect.h 2009-11-25 06:09:10 UTC (rev 107) @@ -32,7 +32,7 @@ namespace oxygen { class RecorderHandler; - class Body; + class RigidBody; } /** \class SoccerControlAspect is the base class for all Modified: branches/multiphys/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp =================================================================== --- branches/multiphys/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp 2009-11-25 06:09:10 UTC (rev 107) @@ -23,7 +23,7 @@ #include <salt/random.h> #include <zeitgeist/logserver/logserver.h> #include <oxygen/agentaspect/agentaspect.h> -#include <oxygen/physicsserver/body.h> +#include <oxygen/physicsserver/rigidbody.h> #include <oxygen/sceneserver/scene.h> #include <oxygen/gamecontrolserver/gamecontrolserver.h> #include <soccerbase/soccerbase.h> @@ -958,7 +958,7 @@ salt::BoundingSphere sphere(pos, mAudioCutDist); shared_ptr<Transform> transform_parent; - shared_ptr<Body> agent_body; + shared_ptr<RigidBody> agent_body; for ( TAgentStateList::const_iterator it = agent_states.begin(); @@ -1104,7 +1104,7 @@ opp_defender_pos = 0.0; shared_ptr<Transform> transform_parent; - shared_ptr<Body> agent_body; + shared_ptr<RigidBody> agent_body; list<shared_ptr<AgentState> >::const_iterator it; for (it = opp_agent_states.begin(); it != opp_agent_states.end(); it++) Modified: branches/multiphys/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.h =================================================================== --- branches/multiphys/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.h 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.h 2009-11-25 06:09:10 UTC (rev 107) @@ -36,7 +36,7 @@ namespace oxygen { - class Body; + class RigidBody; class AgentAspect; class Transform; } @@ -193,7 +193,7 @@ protected: /** reference to the body node of the Ball */ - boost::shared_ptr<oxygen::Body> mBallBody; + boost::shared_ptr<oxygen::RigidBody> mBallBody; /** reference to the GameStateAspect */ CachedPath<GameStateAspect> mGameState; Modified: branches/multiphys/rcssserver3d/plugin/soccer/trainercommandparser/trainercommandparser.cpp =================================================================== --- branches/multiphys/rcssserver3d/plugin/soccer/trainercommandparser/trainercommandparser.cpp 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/rcssserver3d/plugin/soccer/trainercommandparser/trainercommandparser.cpp 2009-11-25 06:09:10 UTC (rev 107) @@ -23,7 +23,7 @@ */ -#include <oxygen/physicsserver/body.h> +#include <oxygen/physicsserver/rigidbody.h> #include <oxygen/gamecontrolserver/gamecontrolserver.h> #include <soccerbase/soccerbase.h> #include <agentstate/agentstate.h> @@ -365,7 +365,7 @@ return; } - shared_ptr<Body> body; + shared_ptr<RigidBody> body; if (SoccerBase::GetBallBody(*this, body)) { @@ -394,7 +394,7 @@ return; } - shared_ptr<Body> body; + shared_ptr<RigidBody> body; if (SoccerBase::GetBallBody(*this, body)) { Modified: branches/multiphys/rcssserver3d/plugin/soccermonitor/soccerinput.cpp =================================================================== --- branches/multiphys/rcssserver3d/plugin/soccermonitor/soccerinput.cpp 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/rcssserver3d/plugin/soccermonitor/soccerinput.cpp 2009-11-25 06:09:10 UTC (rev 107) @@ -21,7 +21,7 @@ #include <zeitgeist/scriptserver/scriptserver.h> #include <zeitgeist/logserver/logserver.h> #include "soccermonitor.h" -#include <oxygen/physicsserver/body.h> +#include <oxygen/physicsserver/rigidbody.h> #include <oxygen/sceneserver/fpscontroller.h> using namespace boost; @@ -68,7 +68,7 @@ } // get camera body - mCameraBody = shared_dynamic_cast<Body> + mCameraBody = shared_dynamic_cast<RigidBody> (GetCore()->Get("/usr/scene/camera/physics")); if (mCameraBody.get() == 0) Modified: branches/multiphys/rcssserver3d/plugin/soccermonitor/soccerinput.h =================================================================== --- branches/multiphys/rcssserver3d/plugin/soccermonitor/soccerinput.h 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/rcssserver3d/plugin/soccermonitor/soccerinput.h 2009-11-25 06:09:10 UTC (rev 107) @@ -27,7 +27,7 @@ namespace oxygen { class FPSController; - class Body; + class RigidBody; } class SoccerInput : public kerosin::InputItem @@ -79,7 +79,7 @@ boost::shared_ptr<oxygen::NetClient> mMonitorClient; /** cached reference to the camera body */ - boost::shared_ptr<oxygen::Body> mCameraBody; + boost::shared_ptr<oxygen::RigidBody> mCameraBody; boost::shared_ptr<oxygen::FPSController> mFPS; }; Modified: branches/multiphys/rcssserver3d/plugin/soccermonitor/soccerinputlogplayer.cpp =================================================================== --- branches/multiphys/rcssserver3d/plugin/soccermonitor/soccerinputlogplayer.cpp 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/rcssserver3d/plugin/soccermonitor/soccerinputlogplayer.cpp 2009-11-25 06:09:10 UTC (rev 107) @@ -20,7 +20,7 @@ #include "soccerinputlogplayer.h" #include <zeitgeist/scriptserver/scriptserver.h> #include <zeitgeist/logserver/logserver.h> -#include <oxygen/physicsserver/body.h> +#include <oxygen/physicsserver/rigidbody.h> using namespace boost; using namespace zeitgeist; @@ -71,7 +71,7 @@ } // get camera body - mCameraBody = shared_dynamic_cast<Body> + mCameraBody = shared_dynamic_cast<RigidBody> (GetCore()->Get("/usr/scene/camera/physics")); if (mCameraBody.get() == 0) Modified: branches/multiphys/rcssserver3d/plugin/soccermonitor/soccerinputlogplayer.h =================================================================== --- branches/multiphys/rcssserver3d/plugin/soccermonitor/soccerinputlogplayer.h 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/rcssserver3d/plugin/soccermonitor/soccerinputlogplayer.h 2009-11-25 06:09:10 UTC (rev 107) @@ -72,7 +72,7 @@ boost::shared_ptr<zeitgeist::ScriptServer> mScriptServer; /** cached reference to the camera body */ - boost::shared_ptr<oxygen::Body> mCameraBody; + boost::shared_ptr<oxygen::RigidBody> mCameraBody; /** cached reference to the camera body */ boost::shared_ptr<oxygen::FPSController> mFPS; Modified: branches/multiphys/rsgedit/src/property.cpp =================================================================== --- branches/multiphys/rsgedit/src/property.cpp 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/rsgedit/src/property.cpp 2009-11-25 06:09:10 UTC (rev 107) @@ -33,7 +33,7 @@ #include <oxygen/sceneserver/basenode.h> #include <oxygen/sceneserver/transform.h> #include <oxygen/sceneserver/scenedict.h> -#include <oxygen/physicsserver/body.h> +#include <oxygen/physicsserver/rigidbody.h> #include <oxygen/physicsserver/joint.h> #include <oxygen/physicsserver/hingejoint.h> #include <oxygen/physicsserver/universaljoint.h> @@ -107,7 +107,7 @@ mClassMap[wxT("ClassClass")] = CL_CLASS; mClassMap[wxT("/classes/oxygen/BaseNode")] = CL_BASENODE; mClassMap[wxT("/classes/oxygen/Transform")] = CL_TRANSFORM; - mClassMap[wxT("/classes/oxygen/Body")] = CL_BODY; + mClassMap[wxT("/classes/oxygen/RigidBody")] = CL_RIGIDBODY; mClassMap[wxT("/classes/oxygen/Joint")] = CL_JOINT; mClassMap[wxT("/classes/oxygen/HingeJoint")] = CL_HINGEJOINT; mClassMap[wxT("/classes/oxygen/UniversalJoint")] = CL_UNIVERSALJOINT; @@ -189,7 +189,7 @@ void Property::GenBodyEntries(shared_ptr<Leaf> leaf, TEntryList& entries) const { - const Body& body = *shared_static_cast<Body>(leaf); + const RigidBody& body = *shared_static_cast<RigidBody>(leaf); entries.push_back(Entry(wxT("GetMass"),FormatFloat(body.GetMass()))); entries.push_back(Entry(wxT("GetVelocity"),FormatVector3(body.GetVelocity()))); entries.push_back(Entry(wxT("GetAngularVelocity"),FormatVector3(body.GetAngularVelocity()))); @@ -398,7 +398,7 @@ GenTransformEntries(leaf, entries); break; - case CL_BODY: + case CL_RIGIDBODY: GenBodyEntries(leaf, entries); break; Modified: branches/multiphys/rsgedit/src/sparkglrender.cpp =================================================================== --- branches/multiphys/rsgedit/src/sparkglrender.cpp 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/rsgedit/src/sparkglrender.cpp 2009-11-25 06:09:10 UTC (rev 107) @@ -19,7 +19,7 @@ */ #include "sparkglrender.h" #include <zeitgeist/logserver/logserver.h> -#include <oxygen/physicsserver/body.h> +#include <oxygen/physicsserver/rigidbody.h> #include <oxygen/physicsserver/joint.h> #include <oxygen/sceneserver/camera.h> #include <oxygen/sceneserver/sceneserver.h> @@ -163,7 +163,7 @@ ++i ) { - shared_ptr<Body> body = + shared_ptr<RigidBody> body = jointNode->GetBody(static_cast<Joint::EBodyIndex>(i)); if (body.get() == 0) Modified: branches/multiphys/simspark-utilities/data/rsg/agent/ball.rsg =================================================================== --- branches/multiphys/simspark-utilities/data/rsg/agent/ball.rsg 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/simspark-utilities/data/rsg/agent/ball.rsg 2009-11-25 06:09:10 UTC (rev 107) @@ -15,7 +15,7 @@ (setScale $Radius $Radius $Radius) ) - (nd Body + (nd RigidBody (setName physics) (setSphereTotal $Mass $Radius) Modified: branches/multiphys/spark/data/rsg/boxspheres/box.rsg =================================================================== --- branches/multiphys/spark/data/rsg/boxspheres/box.rsg 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/spark/data/rsg/boxspheres/box.rsg 2009-11-25 06:09:10 UTC (rev 107) @@ -8,7 +8,7 @@ (setMaterial $material) ) - (nd Body + (nd RigidBody (setName boxBody) ;(setBoxTotal $totalMass $lenX $lenY $lenZ) (setBox $totalMass $lenX $lenY $lenZ) @@ -34,4 +34,4 @@ ) ) -) \ No newline at end of file +) Modified: branches/multiphys/spark/data/rsg/boxspheres/box_with_handler.rsg =================================================================== --- branches/multiphys/spark/data/rsg/boxspheres/box_with_handler.rsg 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/spark/data/rsg/boxspheres/box_with_handler.rsg 2009-11-25 06:09:10 UTC (rev 107) @@ -8,7 +8,7 @@ (setMaterial $material) ) - (nd Body + (nd RigidBody (setName boxBody) ;(setBoxTotal $totalMass $lenX $lenY $lenZ) (setBox $totalMass $lenX $lenY $lenZ) @@ -36,4 +36,4 @@ ;(nd PerceptorHandler) ) -) \ No newline at end of file +) Modified: branches/multiphys/spark/data/rsg/boxspheres/box_with_handler055.rsg =================================================================== --- branches/multiphys/spark/data/rsg/boxspheres/box_with_handler055.rsg 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/spark/data/rsg/boxspheres/box_with_handler055.rsg 2009-11-25 06:09:10 UTC (rev 107) @@ -8,7 +8,7 @@ (setMaterial $material) ) - (nd Body + (nd RigidBody (setName boxBody) ;(setBoxTotal $totalMass $lenX $lenY $lenZ) (setBox $totalMass $lenX $lenY $lenZ) Modified: branches/multiphys/spark/data/rsg/boxspheres/box_with_handler056.rsg =================================================================== --- branches/multiphys/spark/data/rsg/boxspheres/box_with_handler056.rsg 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/spark/data/rsg/boxspheres/box_with_handler056.rsg 2009-11-25 06:09:10 UTC (rev 107) @@ -8,7 +8,7 @@ (setMaterial $material) ) - (nd Body + (nd RigidBody (setName boxBody) ;(setBoxTotal $totalMass $lenX $lenY $lenZ) (setBox $totalMass $lenX $lenY $lenZ) @@ -36,4 +36,4 @@ ;(nd PerceptorHandler) ) -) \ No newline at end of file +) Modified: branches/multiphys/spark/data/rsg/boxspheres/ccylinder.rsg =================================================================== --- branches/multiphys/spark/data/rsg/boxspheres/ccylinder.rsg 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/spark/data/rsg/boxspheres/ccylinder.rsg 2009-11-25 06:09:10 UTC (rev 107) @@ -9,7 +9,7 @@ (setMaterial $material) ) - (nd Body + (nd RigidBody (setName ccylinderBody) ;(setCappedCylinderTotal $totalMass $radius $length) (setCappedCylinder $totalMass $radius $length) Modified: branches/multiphys/spark/data/rsg/boxspheres/sphere.rsg =================================================================== --- branches/multiphys/spark/data/rsg/boxspheres/sphere.rsg 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/spark/data/rsg/boxspheres/sphere.rsg 2009-11-25 06:09:10 UTC (rev 107) @@ -9,7 +9,7 @@ (setMaterial $material) ) - (nd Body + (nd RigidBody (setName sphereBody) ;(setSphereTotal $totalMass $radius) (setSphere $totalMass $radius) Modified: branches/multiphys/spark/lib/oxygen/CMakeLists.txt =================================================================== --- branches/multiphys/spark/lib/oxygen/CMakeLists.txt 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/spark/lib/oxygen/CMakeLists.txt 2009-11-25 06:09:10 UTC (rev 107) @@ -16,6 +16,7 @@ oxygen_defines.h physicsserver/physicsobject.h physicsserver/body.h + physicsserver/rigidbody.h physicsserver/bodycontroller.h physicsserver/boxcollider.h physicsserver/ccylindercollider.h @@ -109,8 +110,9 @@ oxygen.cpp physicsserver/physicsobject.cpp physicsserver/physicsobject_c.cpp - physicsserver/body.cpp physicsserver/body_c.cpp + physicsserver/rigidbody.cpp + physicsserver/rigidbody_c.cpp physicsserver/bodycontroller.cpp physicsserver/bodycontroller_c.cpp physicsserver/transformcollider.cpp Modified: branches/multiphys/spark/lib/oxygen/oxygen.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/oxygen.cpp 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/spark/lib/oxygen/oxygen.cpp 2009-11-25 06:09:10 UTC (rev 107) @@ -55,6 +55,7 @@ zg.GetCore()->RegisterClassObject(new CLASS(PhysicsServer), "oxygen/"); zg.GetCore()->RegisterClassObject(new CLASS(PhysicsObject), "oxygen/"); zg.GetCore()->RegisterClassObject(new CLASS(Body), "oxygen/"); + zg.GetCore()->RegisterClassObject(new CLASS(RigidBody), "oxygen/"); zg.GetCore()->RegisterClassObject(new CLASS(BodyController), "oxygen/"); zg.GetCore()->RegisterClassObject(new CLASS(DragController), "oxygen/"); zg.GetCore()->RegisterClassObject(new CLASS(VelocityController), "oxygen/"); Modified: branches/multiphys/spark/lib/oxygen/oxygen.h =================================================================== --- branches/multiphys/spark/lib/oxygen/oxygen.h 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/spark/lib/oxygen/oxygen.h 2009-11-25 06:09:10 UTC (rev 107) @@ -37,6 +37,7 @@ //abstract physics classes #include <oxygen/physicsserver/physicsobject.h> #include "physicsserver/body.h" +#include "physicsserver/rigidbody.h" #include "physicsserver/bodycontroller.h" #include "physicsserver/dragcontroller.h" #include "physicsserver/velocitycontroller.h" Modified: branches/multiphys/spark/lib/oxygen/physicsserver/angularmotor.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/angularmotor.h 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/spark/lib/oxygen/physicsserver/angularmotor.h 2009-11-25 06:09:10 UTC (rev 107) @@ -25,7 +25,7 @@ namespace oxygen { -class Body; +class RigidBody; /** An angular motor allows the relative angular velocities of two bodies to be controlled. The angular velocity can be controlled on Modified: branches/multiphys/spark/lib/oxygen/physicsserver/balljoint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/balljoint.h 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/spark/lib/oxygen/physicsserver/balljoint.h 2009-11-25 06:09:10 UTC (rev 107) @@ -25,7 +25,7 @@ namespace oxygen { -class Body; +class RigidBody; class OXYGEN_API BallJoint : public Joint { Deleted: branches/multiphys/spark/lib/oxygen/physicsserver/body.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/body.cpp 2009-11-19 10:10:50 UTC (rev 106) +++ branches/multiphys/spark/lib/oxygen/physicsserver/body.cpp 2009-11-25 06:09:10 UTC (rev 107) @@ -1,559 +0,0 @@ -/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- - this file is part of rcssserver3D - Fri May 9 2003 - Copyright (C) 2003 Koblenz University - $Id$ - - 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 "body.h" -#include "world.h" -#include "../sceneserver/scene.h" -#include "zeitgeist/logserver/logserver.h" -#include "../sceneserver/transform.h" -#include "transformcollider.h" - -using namespace boost; -using namespace oxygen; -using namespace salt; -using namespace std; - -Body::Body() : PhysicsObject(), mODEBody(0), mMassTrans(0,0,0), mMassTransformed(false) -{ -} - -Body::~Body() -{ -} - -dBodyID Body::GetODEBody() const -{ - return mODEBody; -} - -void Body::Enable() -{ - dBodyEnable(mODEBody); -} - -void Body::Disable() -{ - dBodyDisable(mODEBody); -} - -bool Body::IsEnabled() const -{ - return (dBodyIsEnabled(mODEBody) != 0); -} - -void Body::UseGravity(bool f) -{ - if (f == true) - { - // body is affected by gravity - dBodySetGravityMode(mODEBody, 1); - } - else - { - // body is not affected by gravity - dBodySetGravityMode(mODEBody, 0); - } -} - -bool Body::UsesGravity() const -{ - return (dBodyGetGravityMode(mODEBody) != 0); -} - -bool Body::CreateBody() -{ - if (mODEBody != 0) - { - return true; - } - - dWorldID world = GetWorldID(); - if (world == 0) - { - return false; - } - - // create the managed body - mODEBody = dBodyCreate(world); - if (mODEBody == 0) - { - GetLog()->Error() - << "(Body) ERROR: could not create new ODE body\n"; - return false; - } - - return true; -} - -void Body::DestroyODEObject() -{ - if (mODEBody == 0) - { - return; - } - - dBodyDestroy(mODEBody); - mODEBody = 0; -} - -void Body::OnLink() -{ - PhysicsObject::OnLink(); - - if (! CreateBody()) - { - return; - } - - // let the body, take on the world space position of the parent - dBodySetData(mODEBody, this); - - shared_ptr<BaseNode> baseNode = shared_static_cast<BaseNode> - (GetParent().lock()); - - const Matrix& mat = baseNode->GetWorldTransform(); - SetRotation(mat); - SetPosition(mat.Pos()); -} - -void -Body::SetMass(float mass) -{ - dMass ODEMass; - dBodyGetMass(mODEBody, &ODEMass); - dMassAdjust(&ODEMass, mass); - dBodySetMass(mODEBody, &ODEMass); -} - -float -Body::GetMass() const -{ - dMass m; - dBodyGetMass(mODEBody, &m); - return m.mass; -} - -void Body::GetMassParameters(dMass& mass) const -{ - dBodyGetMass(mODEBody, &mass); -} - -void Body::SetMassParameters(const dMass& mass) -{ - dBodySetMass(mODEBody, &mass); -} - -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::AddSphere(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); -} -/* - dMass ODEMass; - dBodyGetMass(mODEBody, &ODEMass); - Vector3f trans(ODEMass.c[0], ODEMass.c[1], ODEMass.c[2]); - - if (trans.SquareLength() > 0) - { - mOrigin = mOrigin - trans; - GetLog()->Warning() << "(Body::CenterMass) New origin: " << mOrigin << "\n"; - - dMassTranslate(&ODEMass, -trans[0], -trans[1], -trans[2]); - dBodySetMass(mODEBody, &ODEMass); - - Vector3f position = GetPosition(); - position = position + trans; - SetPosition(position); - - mCOMShifted = true; - } -*/ -void Body::AddMass(const dMass& mass, const Matrix& matrix) -{ - dMass transMass(mass); - - dMatrix3 rot; - ConvertRotationMatrix(matrix, rot); - dMassRotate(&transMass,rot); - - const Vector3f& trans(matrix.Pos()); - dMassTranslate(&transMass,trans[0],trans[1],trans[2]); - - dMassTranslate(&transMass,mMa... [truncated message content] |