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-01 12:45:10
|
Update of /cvsroot/simspark/simspark/spark/kerosin/inputserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv2855 Modified Files: Tag: projectx inputserver.cpp Log Message: whitespace changes Index: inputserver.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/inputserver/inputserver.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 *** inputserver.cpp 10 Feb 2007 16:14:50 -0000 1.2.2.1 --- inputserver.cpp 1 Jun 2007 12:45:06 -0000 1.2.2.1.2.1 *************** *** 263,283 **** } ! bool InputServer::GetInput(Input &input, bool raw) { shared_ptr<InputSystem> inputSystem = GetInputSystem(); if (inputSystem.get() == 0) ! { ! GetLog()->Error() ! << "(InputServer) ERROR: no InputSystem installed\n"; ! input.mId = -1; ! return false; ! } if (! inputSystem->GetInput(input)) ! { ! input.mId = -1; ! return false; ! } if ( --- 263,284 ---- } ! bool ! InputServer::GetInput(Input &input, bool raw) { shared_ptr<InputSystem> inputSystem = GetInputSystem(); if (inputSystem.get() == 0) ! { ! GetLog()->Error() ! << "(InputServer) ERROR: no InputSystem installed\n"; ! input.mId = -1; ! return false; ! } if (! inputSystem->GetInput(input)) ! { ! input.mId = -1; ! return false; ! } if ( *************** *** 285,300 **** (raw) ) ! { ! // return Input::eUser input ! return true; ! } ! // translate raw input to binding TBindMap::iterator bindListIter = mBindings.find(input.mCode); if (bindListIter == mBindings.end()) ! { ! input.mId = -1; ! return false; ! } // we have an entry for the scan code --- 286,300 ---- (raw) ) ! { ! // return Input::eUser input ! return true; ! } // translate raw input to binding TBindMap::iterator bindListIter = mBindings.find(input.mCode); if (bindListIter == mBindings.end()) ! { ! input.mId = -1; ! return false; ! } // we have an entry for the scan code *************** *** 306,333 **** ++bindIter ) ! { ! const Bind& bind = (*bindIter); ! //printf("Looking at: %d %d %d", (*bind).mCode, (*bind).cmd, (*bind).modifier); ! if (bind.modifier == mModifierState) { ! if (input.mType == Input::eButton) ! { ! if ((bind.event == eKeyUpDown) || ! (bind.event == eKeyUp && input.mData.l == 0) || ! (bind.event == eKeyDown && input.mData.l == 1) ! ) ! { ! input.mId = bind.cmd; ! return true; ! } ! } else if (input.mType == Input::eAxis) ! { ! input.mId = bind.cmd; ! return true; ! } } } ! input.mId = -1; --- 306,333 ---- ++bindIter ) ! { ! const Bind& bind = (*bindIter); ! //printf("Looking at: %d %d %d", (*bind).mCode, (*bind).cmd, (*bind).modifier); ! if (bind.modifier == mModifierState) ! { ! if (input.mType == Input::eButton) ! { ! if ((bind.event == eKeyUpDown) || ! (bind.event == eKeyUp && input.mData.l == 0) || ! (bind.event == eKeyDown && input.mData.l == 1) ! ) { ! input.mId = bind.cmd; ! return true; } + } + else if (input.mType == Input::eAxis) + { + input.mId = bind.cmd; + return true; + } } ! } input.mId = -1; |
From: Oliver O. <fr...@us...> - 2007-06-01 12:33:39
|
Update of /cvsroot/simspark/simspark/spark/kerosin/inputserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv30363 Modified Files: Tag: projectx inputcontrol.cpp Log Message: - stopping the FPSController handle to be reset during update Index: inputcontrol.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/inputserver/inputcontrol.cpp,v retrieving revision 1.2.2.2 retrieving revision 1.2.2.2.2.1 diff -C2 -d -r1.2.2.2 -r1.2.2.2.2.1 *** inputcontrol.cpp 15 Feb 2007 21:02:33 -0000 1.2.2.2 --- inputcontrol.cpp 1 Jun 2007 12:33:36 -0000 1.2.2.2.2.1 *************** *** 258,283 **** if (mAdvanceTime) ! { ! // pass the delta time on to the SimulationServer ! GetSimulationServer()->AdvanceTime(mDeltaTime); ! } } ! float InputControl::GetDeltaTime() { return mDeltaTime; } ! void InputControl::SetAdvanceTime(bool advance) { mAdvanceTime = advance; } ! bool InputControl::GetAdvanceTime() { return mAdvanceTime; } ! bool InputControl::RegisterInputItem(const string& inputItemName, const string& name) { // check if a input item of the requested type was already created --- 258,287 ---- if (mAdvanceTime) ! { ! // pass the delta time on to the SimulationServer ! GetSimulationServer()->AdvanceTime(mDeltaTime); ! } } ! float ! InputControl::GetDeltaTime() { return mDeltaTime; } ! void ! InputControl::SetAdvanceTime(bool advance) { mAdvanceTime = advance; } ! bool ! InputControl::GetAdvanceTime() { return mAdvanceTime; } ! bool ! InputControl::RegisterInputItem(const string& inputItemName, const string& name) { // check if a input item of the requested type was already created *************** *** 286,292 **** if (inputItem.get() != 0) ! { ! return true; ! } // create the input item --- 290,296 ---- if (inputItem.get() != 0) ! { ! return true; ! } // create the input item *************** *** 294,302 **** if (inputItem.get() == 0) ! { ! GetLog()->Error() << "ERROR: (InputControl) Cannot create input item '" ! << inputItemName << "'" << std::endl; ! return false; ! } // link the input item in the hierarchy --- 298,306 ---- if (inputItem.get() == 0) ! { ! GetLog()->Error() << "ERROR: (InputControl) Cannot create input item '" ! << inputItemName << "'" << std::endl; ! return false; ! } // link the input item in the hierarchy *************** *** 304,312 **** if (! AddChildReference(inputItem)) ! { ! GetLog()->Error() << "ERROR: (InputControl) Cannot link the input item '" ! << inputItemName << "' to the hierarchy\n"; ! return false; ! } GetLog()->Debug() << "(InputControl) Registered input item '" --- 308,316 ---- if (! AddChildReference(inputItem)) ! { ! GetLog()->Error() << "ERROR: (InputControl) Cannot link the input item '" ! << inputItemName << "' to the hierarchy\n"; ! return false; ! } GetLog()->Debug() << "(InputControl) Registered input item '" *************** *** 316,321 **** } ! void InputControl::UpdateCached() { ! mFPSController.reset(); } --- 320,326 ---- } ! void ! InputControl::UpdateCached() { ! // mFPSController.reset(); } |
From: Oliver O. <fr...@us...> - 2007-06-01 12:23:08
|
Update of /cvsroot/simspark/simspark/spark/oxygen/agentaspect In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv25851/agentaspect Modified Files: Tag: projectx effector.h Log Message: comment changes only Index: effector.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/agentaspect/effector.h,v retrieving revision 1.1.4.1 retrieving revision 1.1.4.2 diff -C2 -d -r1.1.4.1 -r1.1.4.2 *** effector.h 30 Mar 2007 03:17:40 -0000 1.1.4.1 --- effector.h 1 Jun 2007 12:23:01 -0000 1.1.4.2 *************** *** 1,5 **** /* -*- 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 --- 1,5 ---- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of simspark Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University |
From: Oliver O. <fr...@us...> - 2007-06-01 12:21:51
|
Update of /cvsroot/simspark/simspark/spark/oxygen/agentaspect In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv25394 Modified Files: Tag: projectx agentaspect.cpp Log Message: added agent ID to AgentAspect Index: agentaspect.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/agentaspect/agentaspect.cpp,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** agentaspect.cpp 5 Dec 2005 21:16:49 -0000 1.1 --- agentaspect.cpp 1 Jun 2007 12:21:29 -0000 1.1.4.1 *************** *** 1,5 **** /* -*- 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 --- 1,5 ---- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of simspark Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University *************** *** 31,34 **** --- 31,35 ---- { SetName("agentAspect"); + mID = -1; } *************** *** 130,135 **** bool ! AgentAspect::Init(const string& createEffector) { shared_ptr<Effector> create = shared_dynamic_cast<Effector> (GetCore()->New(createEffector)); --- 131,138 ---- bool ! AgentAspect::Init(const string& createEffector, int id) { + mID = id; + shared_ptr<Effector> create = shared_dynamic_cast<Effector> (GetCore()->New(createEffector)); |
From: Oliver O. <fr...@us...> - 2007-06-01 12:20:40
|
Update of /cvsroot/simspark/simspark/spark/oxygen/agentaspect In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv24942 Modified Files: Tag: projectx agentaspect.h Log Message: - added agent ID to agentaspect Index: agentaspect.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/agentaspect/agentaspect.h,v retrieving revision 1.1.4.1 retrieving revision 1.1.4.2 diff -C2 -d -r1.1.4.1 -r1.1.4.2 *** agentaspect.h 30 Mar 2007 03:17:10 -0000 1.1.4.1 --- agentaspect.h 1 Jun 2007 12:20:33 -0000 1.1.4.2 *************** *** 1,5 **** /* -*- 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 --- 1,5 ---- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of simspark Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University *************** *** 42,50 **** /** Initializes the AgentAspect. Called immediately after the ! AgentAspect is created by the GameControlServer. \param ! createEffector is the name of the initial effector class that ! the agent uses to construct all remaining parts */ ! virtual bool Init(const std::string& createEffector); /** RealizeActions realizes the actions described by \param --- 42,51 ---- /** Initializes the AgentAspect. Called immediately after the ! AgentAspect is created by the GameControlServer. ! \param createEffector is the name of the initial effector class that ! the agent uses to construct all remaining parts ! \param id a unique ID to set */ ! virtual bool Init(const std::string& createEffector, int id); /** RealizeActions realizes the actions described by \param *************** *** 64,67 **** --- 65,71 ---- virtual boost::shared_ptr<Effector> GetEffector(const std::string predicate) const; + //! @return the unique ID for the agent aspect + inline int ID() const { return mID; } + protected: typedef std::map<std::string, boost::shared_ptr<Effector> > TEffectorMap; *************** *** 71,74 **** --- 75,79 ---- private: + int mID; }; |
From: Oliver O. <fr...@us...> - 2007-06-01 12:18:05
|
Update of /cvsroot/simspark/simspark/spark/oxygen/gamecontrolserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv23766 Modified Files: Tag: projectx gamecontrolserver.cpp Log Message: - call AgentAspect::Init() using the agent id Index: gamecontrolserver.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/gamecontrolserver/gamecontrolserver.cpp,v retrieving revision 1.1.2.2.2.1 retrieving revision 1.1.2.2.2.2 diff -C2 -d -r1.1.2.2.2.1 -r1.1.2.2.2.2 *** gamecontrolserver.cpp 31 Mar 2007 13:55:39 -0000 1.1.2.2.2.1 --- gamecontrolserver.cpp 1 Jun 2007 12:17:58 -0000 1.1.2.2.2.2 *************** *** 1,5 **** /* -*- 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 --- 1,5 ---- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of simspark Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University *************** *** 161,165 **** scene->SetModified(true); ! return aspect->Init(mCreateEffector); } --- 161,165 ---- scene->SetModified(true); ! return aspect->Init(mCreateEffector,id); } *************** *** 206,210 **** // the real thing should query the AgentAspect corresponding to // the agent. ! return 0.2f; } --- 206,210 ---- // the real thing should query the AgentAspect corresponding to // the agent. ! return 0.2; } *************** *** 214,218 **** // the real thing should query the AgentAspect corresponding to // the agent ! return 0.1f; } --- 214,218 ---- // the real thing should query the AgentAspect corresponding to // the agent ! return 0.1; } *************** *** 222,226 **** // the real thing should query the AgentAspect corresponding to // the agent. ! return 0.1f; } --- 222,226 ---- // the real thing should query the AgentAspect corresponding to // the agent. ! return 0.1; } |
From: Oliver O. <fr...@us...> - 2007-06-01 07:01:09
|
Update of /cvsroot/simspark/simspark/spark/oxygen/simulationserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv31054 Modified Files: Tag: projectx simulationserver_c.cpp Log Message: returning success after calling quit (instead of returning an undefined value) Index: simulationserver_c.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/simulationserver/simulationserver_c.cpp,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** simulationserver_c.cpp 5 Dec 2005 21:21:18 -0000 1.1 --- simulationserver_c.cpp 1 Jun 2007 07:01:06 -0000 1.1.4.1 *************** *** 36,40 **** string inClassName; string inName; ! if ( (in.GetSize() != 2) || --- 36,40 ---- string inClassName; string inName; ! return true; if ( (in.GetSize() != 2) || |
From: Oliver O. <fr...@us...> - 2007-06-01 06:57:16
|
Update of /cvsroot/simspark/simspark/spark/oxygen/sceneserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv29762/sceneserver Modified Files: Tag: projectx fpscontroller.cpp Log Message: whitespace only Index: fpscontroller.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/sceneserver/fpscontroller.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 *** fpscontroller.cpp 25 Feb 2007 16:27:45 -0000 1.1.2.1 --- fpscontroller.cpp 1 Jun 2007 06:57:10 -0000 1.1.2.1.2.1 *************** *** 44,53 **** } ! void FPSController::PrePhysicsUpdateInternal(float /*deltaTime*/) { if (mBody.get() == 0) ! { ! return; ! } // determine force direction --- 44,54 ---- } ! void ! FPSController::PrePhysicsUpdateInternal(float /*deltaTime*/) { if (mBody.get() == 0) ! { ! return; ! } // determine force direction |
From: Oliver O. <fr...@us...> - 2007-06-01 06:54:10
|
Update of /cvsroot/simspark/simspark/spark/oxygen/sceneserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv28576 Modified Files: Tag: projectx camera.cpp Log Message: increased default zfar to 10000 Index: camera.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/sceneserver/camera.cpp,v retrieving revision 1.1.4.1 retrieving revision 1.1.4.2 diff -C2 -d -r1.1.4.1 -r1.1.4.2 *** camera.cpp 8 May 2007 03:06:03 -0000 1.1.4.1 --- camera.cpp 1 Jun 2007 06:54:07 -0000 1.1.4.2 *************** *** 32,36 **** mFOV = 60.0f; mZNear = 1.0f; ! mZFar = 2000.0f; mX = 0; mY = 0; --- 32,36 ---- mFOV = 60.0f; mZNear = 1.0f; ! mZFar = 100000.0f; mX = 0; mY = 0; |
From: Oliver O. <fr...@us...> - 2007-06-01 06:48:55
|
Update of /cvsroot/simspark/simspark/spark/oxygen/physicsserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv26254/physicsserver Modified Files: Tag: projectx odewrapper.h Log Message: changed / added undef's to fix compiler warnings Index: odewrapper.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/odewrapper.h,v retrieving revision 1.1.2.2.2.1 retrieving revision 1.1.2.2.2.2 diff -C2 -d -r1.1.2.2.2.1 -r1.1.2.2.2.2 *** odewrapper.h 30 Mar 2007 03:20:18 -0000 1.1.2.2.2.1 --- odewrapper.h 1 Jun 2007 06:48:52 -0000 1.1.2.2.2.2 *************** *** 1,5 **** /* -*- 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 --- 1,5 ---- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of simspark Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University *************** *** 23,33 **** #define OXYGEN_ODEWRAPPER_H #undef PACKAGE #undef PACKAGE_VERSION #undef VERSION - #undef PACKAGE_TARNAME - #undef PACKAGE_STRING - #undef PACKAGE_NAME - #undef PACKAGE_BUGREPORT #ifdef WIN32 --- 23,36 ---- #define OXYGEN_ODEWRAPPER_H + #undef EXTERN + #undef HAVE_VPRINTF #undef PACKAGE + #undef PACKAGE_BUGREPORT + #undef PACKAGE_NAME + #undef PACKAGE_STRING + #undef PACKAGE_TARNAME #undef PACKAGE_VERSION + #undef PREFIX #undef VERSION #ifdef WIN32 *************** *** 45,55 **** #include <ode/ode.h> #undef PACKAGE #undef PACKAGE_VERSION #undef VERSION - #undef PACKAGE_TARNAME - #undef PACKAGE_STRING - #undef PACKAGE_NAME - #undef PACKAGE_BUGREPORT #ifdef HAVE_CONFIG_H --- 48,61 ---- #include <ode/ode.h> + #undef EXTERN + #undef HAVE_VPRINTF #undef PACKAGE + #undef PACKAGE_BUGREPORT + #undef PACKAGE_NAME + #undef PACKAGE_STRING + #undef PACKAGE_TARNAME #undef PACKAGE_VERSION + #undef PREFIX #undef VERSION #ifdef HAVE_CONFIG_H |
From: Oliver O. <fr...@us...> - 2007-06-01 06:47:40
|
Update of /cvsroot/simspark/simspark/spark/oxygen/physicsserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv25858/physicsserver Modified Files: Tag: projectx dragcontroller.cpp Log Message: whitespace only Index: dragcontroller.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/dragcontroller.cpp,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -C2 -d -r1.2 -r1.2.4.1 *** dragcontroller.cpp 12 Feb 2006 11:36:52 -0000 1.2 --- dragcontroller.cpp 1 Jun 2007 06:47:38 -0000 1.2.4.1 *************** *** 40,44 **** return; } - if (mLinearDrag > 0) { --- 40,43 ---- |
From: Oliver O. <fr...@us...> - 2007-06-01 06:32:22
|
Update of /cvsroot/simspark/simspark/spark/salt In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv19729 Modified Files: Tag: projectx bounds.h defines.h fileclasses.cpp gmath.h matrix.h rect.h sharedlibrary.cpp sharedlibrary.h tvector.h vector.h Log Message: whitespace / comment changes only Index: defines.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/salt/defines.h,v retrieving revision 1.1.4.1 retrieving revision 1.1.4.2 diff -C2 -d -r1.1.4.1 -r1.1.4.2 *** defines.h 30 Mar 2007 03:26:35 -0000 1.1.4.1 --- defines.h 1 Jun 2007 06:32:19 -0000 1.1.4.2 *************** *** 1,5 **** /* -*- 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 --- 1,5 ---- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of simspark Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University Index: sharedlibrary.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/salt/sharedlibrary.h,v retrieving revision 1.2.4.1 retrieving revision 1.2.4.2 diff -C2 -d -r1.2.4.1 -r1.2.4.2 *** sharedlibrary.h 30 Mar 2007 03:34:53 -0000 1.2.4.1 --- sharedlibrary.h 1 Jun 2007 06:32:19 -0000 1.2.4.2 *************** *** 1,5 **** /* -*- 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 --- 1,5 ---- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of simspark Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University Index: gmath.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/salt/gmath.h,v retrieving revision 1.2.2.2.2.1 retrieving revision 1.2.2.2.2.2 diff -C2 -d -r1.2.2.2.2.1 -r1.2.2.2.2.2 *** gmath.h 30 Mar 2007 03:30:17 -0000 1.2.2.2.2.1 --- gmath.h 1 Jun 2007 06:32:19 -0000 1.2.2.2.2.2 *************** *** 1,5 **** /* -*- 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 --- 1,5 ---- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of simspark Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University *************** *** 176,187 **** { while (angle > 180) ! { ! angle -= 360; ! } while (angle < -180) ! { ! angle += 360; ! } return angle; --- 176,187 ---- { while (angle > 180) ! { ! angle -= 360; ! } while (angle < -180) ! { ! angle += 360; ! } return angle; Index: bounds.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/salt/bounds.h,v retrieving revision 1.1.4.1 retrieving revision 1.1.4.2 diff -C2 -d -r1.1.4.1 -r1.1.4.2 *** bounds.h 30 Mar 2007 03:26:01 -0000 1.1.4.1 --- bounds.h 1 Jun 2007 06:32:19 -0000 1.1.4.2 *************** *** 1,5 **** /* -*- 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 --- 1,5 ---- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of simspark Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University Index: rect.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/salt/rect.h,v retrieving revision 1.1.4.1 retrieving revision 1.1.4.2 diff -C2 -d -r1.1.4.1 -r1.1.4.2 *** rect.h 30 Mar 2007 03:34:18 -0000 1.1.4.1 --- rect.h 1 Jun 2007 06:32:19 -0000 1.1.4.2 *************** *** 1,5 **** /* -*- 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 --- 1,5 ---- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of simspark Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University Index: vector.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/salt/vector.h,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 *** vector.h 30 Mar 2007 03:37:02 -0000 1.1.2.1.2.1 --- vector.h 1 Jun 2007 06:32:19 -0000 1.1.2.1.2.2 *************** *** 1,5 **** /* -*- 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 --- 1,5 ---- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of simspark Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University Index: fileclasses.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/salt/fileclasses.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 *** fileclasses.cpp 30 Mar 2007 03:50:31 -0000 1.1.2.1.2.1 --- fileclasses.cpp 1 Jun 2007 06:32:19 -0000 1.1.2.1.2.2 *************** *** 340,344 **** long size = ftell((FILE*)mHandle); fseek((FILE*)mHandle,pos,SEEK_SET); ! return size; } --- 340,344 ---- long size = ftell((FILE*)mHandle); fseek((FILE*)mHandle,pos,SEEK_SET); ! return size; } Index: matrix.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/salt/matrix.h,v retrieving revision 1.1.4.1 retrieving revision 1.1.4.2 diff -C2 -d -r1.1.4.1 -r1.1.4.2 *** matrix.h 30 Mar 2007 03:32:16 -0000 1.1.4.1 --- matrix.h 1 Jun 2007 06:32:19 -0000 1.1.4.2 *************** *** 1,5 **** /* -*- 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 --- 1,5 ---- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of simspark Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University Index: sharedlibrary.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/salt/sharedlibrary.cpp,v retrieving revision 1.3.2.3.2.2 retrieving revision 1.3.2.3.2.3 diff -C2 -d -r1.3.2.3.2.2 -r1.3.2.3.2.3 *** sharedlibrary.cpp 30 Mar 2007 03:35:38 -0000 1.3.2.3.2.2 --- sharedlibrary.cpp 1 Jun 2007 06:32:19 -0000 1.3.2.3.2.3 *************** *** 1,5 **** /* -*- 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 --- 1,5 ---- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of simspark Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University Index: tvector.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/salt/tvector.h,v retrieving revision 1.1.4.1 retrieving revision 1.1.4.2 diff -C2 -d -r1.1.4.1 -r1.1.4.2 *** tvector.h 30 Mar 2007 03:36:14 -0000 1.1.4.1 --- tvector.h 1 Jun 2007 06:32:19 -0000 1.1.4.2 *************** *** 1,5 **** /* -*- 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 --- 1,5 ---- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of simspark Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University |
From: Oliver O. <fr...@us...> - 2007-06-01 06:31:08
|
Update of /cvsroot/simspark/simspark/spark/salt In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv18927 Modified Files: Tag: projectx path.h Log Message: added more undef's to fix preprocessor warnings Index: path.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/salt/path.h,v retrieving revision 1.1.4.1 retrieving revision 1.1.4.2 diff -C2 -d -r1.1.4.1 -r1.1.4.2 *** path.h 30 Mar 2007 03:33:35 -0000 1.1.4.1 --- path.h 1 Jun 2007 06:31:03 -0000 1.1.4.2 *************** *** 1,5 **** /* -*- 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 --- 1,5 ---- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of simspark Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University *************** *** 32,40 **** #ifdef HAVE_CONFIG_H ! # undef PACKAGE_BUGREPORT ! # undef PACKAGE_NAME ! # undef PACKAGE_STRING ! # undef PACKAGE_TARNAME ! # undef PACKAGE_VERSION #include <sparkconfig.h> #endif --- 32,45 ---- #ifdef HAVE_CONFIG_H ! # undef EXTERN ! # undef HAVE_VPRINTF ! # undef PACKAGE ! # undef PACKAGE_BUGREPORT ! # undef PACKAGE_NAME ! # undef PACKAGE_STRING ! # undef PACKAGE_TARNAME ! # undef PACKAGE_VERSION ! # undef PREFIX ! # undef VERSION #include <sparkconfig.h> #endif |
From: Markus R. <rol...@us...> - 2007-05-29 20:14:22
|
Update of /cvsroot/simspark/simspark/spark/oxygen/geometryserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv29276 Modified Files: Tag: ROSIMPORTER_XLAB geometryserver.cpp Log Message: - added a check whether the mesh returned by a mesh importer actually has any faces (sync with rcssserver3d cvs, thanks Joschka) Index: geometryserver.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/geometryserver/geometryserver.cpp,v retrieving revision 1.2 retrieving revision 1.2.8.1 diff -C2 -d -r1.2 -r1.2.8.1 *** geometryserver.cpp 23 Feb 2006 13:38:36 -0000 1.2 --- geometryserver.cpp 29 May 2007 20:14:12 -0000 1.2.8.1 *************** *** 125,129 **** shared_ptr<TriMesh> mesh = importer->ImportMesh(name,parameter); ! if (mesh.get() == 0) { continue; --- 125,129 ---- shared_ptr<TriMesh> mesh = importer->ImportMesh(name,parameter); ! if (mesh.get() == 0 || mesh->GetVertexCount() == 0) { continue; |
From: Markus R. <rol...@us...> - 2007-05-20 16:32:15
|
Update of /cvsroot/simspark/simspark/spark/oxygen/physicsserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv18827/oxygen/physicsserver Modified Files: Tag: ROSIMPORTER_XLAB body.cpp body.h collider.cpp collider.h Log Message: Index: body.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/body.h,v retrieving revision 1.4 retrieving revision 1.4.4.1 diff -C2 -d -r1.4 -r1.4.4.1 *** body.h 31 Mar 2007 13:19:56 -0000 1.4 --- body.h 20 May 2007 16:31:53 -0000 1.4.4.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); *************** *** 184,187 **** --- 231,241 ---- 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 *************** *** 193,196 **** --- 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, *************** *** 206,209 **** --- 314,319 ---- /** the managed ode body */ dBodyID mODEBody; + + dMass mMassCenter; }; Index: collider.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/collider.cpp,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** collider.cpp 1 May 2007 13:09:32 -0000 1.4 --- collider.cpp 20 May 2007 16:31:53 -0000 1.4.2.1 *************** *** 222,225 **** --- 222,231 ---- } + Vector3f Collider::GetPosition() const + { + const dReal* pos = dGeomGetPosition(mODEGeom); + return Vector3f(pos[0],pos[1],pos[2]); + } + dSpaceID Collider::GetParentSpaceID() { Index: collider.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/collider.h,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** collider.h 1 May 2007 13:09:32 -0000 1.4 --- collider.h 20 May 2007 16:31:53 -0000 1.4.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 Index: body.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/body.cpp,v retrieving revision 1.4 retrieving revision 1.4.4.1 diff -C2 -d -r1.4 -r1.4.4.1 *** body.cpp 31 Mar 2007 13:19:56 -0000 1.4 --- body.cpp 20 May 2007 16:31:53 -0000 1.4.4.1 *************** *** 31,34 **** --- 31,35 ---- Body::Body() : ODEObject(), mODEBody(0) { + dMassSetZero(&mMassCenter); } *************** *** 37,40 **** --- 38,46 ---- } + Vector3f Body::GetMassCenter() const + { + return Vector3f(mMassCenter.c[0], mMassCenter.c[1], mMassCenter.c[2]); + } + dBodyID Body::GetODEBody() const { *************** *** 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 { --- 165,353 ---- } + 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, track the center of mass in mMassCenter + */ + const Vector3f& trans(matrix.Pos()); + dMassTranslate(&transMass,trans[0],trans[1],trans[2]); + dMassAdd(&mMassCenter,(const dMass*)&transMass); + } + 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 { *************** *** 355,359 **** } ! void Body::TranslateMass(const salt::Vector3f& v) { dMass m; --- 473,477 ---- } ! void Body::TranslateMass(const Vector3f& v) { dMass m; |
From: Markus R. <rol...@us...> - 2007-05-20 16:32:15
|
Update of /cvsroot/simspark/simspark/spark In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv18827 Modified Files: Tag: ROSIMPORTER_XLAB simspark.sln Log Message: Index: simspark.sln =================================================================== RCS file: /cvsroot/simspark/simspark/spark/simspark.sln,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** simspark.sln 17 May 2007 17:49:23 -0000 1.3 --- simspark.sln 20 May 2007 16:31:54 -0000 1.3.2.1 *************** *** 115,118 **** --- 115,128 ---- EndProjectSection EndProject + Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rosimporter", "plugin\rosimporter\rosimporter.vcproj", "{B08F8842-DD81-4674-BCF8-B6188149CEFB}" + ProjectSection(ProjectDependencies) = postProject + {38291F56-23B6-4B5D-8810-D2AD2A379EE9} = {38291F56-23B6-4B5D-8810-D2AD2A379EE9} + {B3FAF507-1CEB-437C-8272-30C8DC236192} = {B3FAF507-1CEB-437C-8272-30C8DC236192} + {17DECC5C-BD53-4ECE-8E4F-707C52D4987C} = {17DECC5C-BD53-4ECE-8E4F-707C52D4987C} + {87C2BFBA-8299-432F-B2E6-08E650E74230} = {87C2BFBA-8299-432F-B2E6-08E650E74230} + {DAB59CC4-E184-40CC-A858-27C432A53AAB} = {DAB59CC4-E184-40CC-A858-27C432A53AAB} + {001EB793-1243-46C2-B693-B23BD1D3D1B5} = {001EB793-1243-46C2-B693-B23BD1D3D1B5} + EndProjectSection + EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution *************** *** 224,227 **** --- 234,243 ---- {AE03EAFA-DFD9-43B3-8777-13A27167A692}.VCRelease|Win32.ActiveCfg = VCRelease|Win32 {AE03EAFA-DFD9-43B3-8777-13A27167A692}.VCRelease|Win32.Build.0 = VCRelease|Win32 + {B08F8842-DD81-4674-BCF8-B6188149CEFB}.Debug|Win32.ActiveCfg = Debug|Win32 + {B08F8842-DD81-4674-BCF8-B6188149CEFB}.Debug|Win32.Build.0 = Debug|Win32 + {B08F8842-DD81-4674-BCF8-B6188149CEFB}.Release|Win32.ActiveCfg = VCRelease|Win32 + {B08F8842-DD81-4674-BCF8-B6188149CEFB}.Release|Win32.Build.0 = VCRelease|Win32 + {B08F8842-DD81-4674-BCF8-B6188149CEFB}.VCRelease|Win32.ActiveCfg = VCRelease|Win32 + {B08F8842-DD81-4674-BCF8-B6188149CEFB}.VCRelease|Win32.Build.0 = VCRelease|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution *************** *** 242,245 **** --- 258,262 ---- {9E5D17FC-5665-48A8-9298-747A3D690787} = {9FA74610-97C1-48A3-BD56-3C086F819A90} {AE03EAFA-DFD9-43B3-8777-13A27167A692} = {9FA74610-97C1-48A3-BD56-3C086F819A90} + {B08F8842-DD81-4674-BCF8-B6188149CEFB} = {9FA74610-97C1-48A3-BD56-3C086F819A90} {A1E81A09-EF57-41FE-AA50-05FF6B1597FC} = {29CFB1A3-30E1-4B18-8BB9-8E1DBAF69B1F} {38B680B0-B535-40F0-B5DB-FC307C40C7D6} = {29CFB1A3-30E1-4B18-8BB9-8E1DBAF69B1F} |
From: Markus R. <rol...@us...> - 2007-05-20 16:32:15
|
Update of /cvsroot/simspark/simspark/spark/plugin/rosimporter In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv18827/plugin/rosimporter Modified Files: Tag: ROSIMPORTER_XLAB roselements.cpp roselements.h rosimporter.cpp rosimporter.h Log Message: Index: roselements.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/plugin/rosimporter/roselements.h,v retrieving revision 1.5 retrieving revision 1.5.8.1 diff -C2 -d -r1.5 -r1.5.8.1 *** roselements.h 23 Feb 2006 13:40:23 -0000 1.5 --- roselements.h 20 May 2007 16:31:53 -0000 1.5.8.1 *************** *** 108,113 **** --- 108,116 ---- RE_HINGE, + RE_UNIVERSAL, RE_ANCHORPOINT, RE_AXIS, + RE_AXIS1, + RE_AXIS2, RE_GLOBALPHYSICALPARAMETERS, Index: roselements.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/plugin/rosimporter/roselements.cpp,v retrieving revision 1.5 retrieving revision 1.5.8.1 diff -C2 -d -r1.5 -r1.5.8.1 *** roselements.cpp 23 Feb 2006 13:40:23 -0000 1.5 --- roselements.cpp 20 May 2007 16:31:53 -0000 1.5.8.1 *************** *** 80,85 **** --- 80,88 ---- ROS_DEFINE_ELEMENT(RE_HINGE,"Hinge"); + ROS_DEFINE_ELEMENT(RE_UNIVERSAL,"UniversalJoint"); ROS_DEFINE_ELEMENT(RE_ANCHORPOINT,"AnchorPoint"); ROS_DEFINE_ELEMENT(RE_AXIS,"Axis"); + ROS_DEFINE_ELEMENT(RE_AXIS1,"Axis1"); + ROS_DEFINE_ELEMENT(RE_AXIS2,"Axis2"); ROS_DEFINE_ELEMENT(RE_GLOBALPHYSICALPARAMETERS,"GlobalPhysicalParameters"); Index: rosimporter.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/plugin/rosimporter/rosimporter.cpp,v retrieving revision 1.10 retrieving revision 1.10.4.1 diff -C2 -d -r1.10 -r1.10.4.1 *** rosimporter.cpp 15 Mar 2007 07:26:28 -0000 1.10 --- rosimporter.cpp 20 May 2007 16:31:53 -0000 1.10.4.1 *************** *** 26,29 **** --- 26,30 ---- #include <oxygen/sceneserver/basenode.h> #include <oxygen/sceneserver/transform.h> + #include <oxygen/physicsserver/transformcollider.h> #include <oxygen/physicsserver/boxcollider.h> #include <oxygen/physicsserver/spherecollider.h> *************** *** 32,35 **** --- 33,37 ---- #include <oxygen/physicsserver/body.h> #include <oxygen/physicsserver/hingejoint.h> + #include <oxygen/physicsserver/universaljoint.h> #include <oxygen/geometryserver/geometryserver.h> #include <oxygen/geometryserver/trimesh.h> *************** *** 53,56 **** --- 55,59 ---- static const string S_FROMSTRING("<from string>"); static const string S_BODY("body_"); + static const string S_GEOMTRANS("geomtrans__"); static const string S_GEOM("geometry_"); static const string S_VISUAL("visual_"); *************** *** 58,61 **** --- 61,66 ---- static const string S_UNNAMED("<unnamed>"); + #pragma warning(disable: 4244) + // ------------------- *************** *** 171,175 **** { mFileName = S_FROMSTRING; ! return ParseScene(scene.c_str(),scene.size(),parent,parameter); } --- 176,180 ---- { mFileName = S_FROMSTRING; ! return ParseScene(scene.c_str(),static_cast<int>(scene.size()),parent,parameter); } *************** *** 543,550 **** --- 548,558 ---- { default: + #if 0 // treat unknown tags like a <element> tag GetLog()->Error() << "(RosImporter::ReadElements) ERROR: skipping unknown element " << GetXMLPath(element) << "\n"; ok = ReadElements(parent, element, context); + #endif + ok = true; break; *************** *** 577,583 **** break; ! case RosElements::RE_HINGE: ! ok = ReadHinge(parent,element,context); ! break; case RosElements::RE_USE: --- 585,595 ---- break; ! case RosElements::RE_UNIVERSAL: ! ok = ReadUniversal(parent,element,context); ! break; ! ! case RosElements::RE_HINGE: ! ok = ReadHinge(parent,element,context); ! break; case RosElements::RE_USE: *************** *** 648,655 **** bool RosImporter::ReadTrans(TiXmlElement* element, Trans& trans) { TiXmlElement* transElem = GetFirstChild(element,RosElements::RE_TRANSLATION); if (transElem != 0) { ! if (! ReadVector(transElem, trans.translate)) { return false; --- 660,669 ---- bool RosImporter::ReadTrans(TiXmlElement* element, Trans& trans) { + trans.matrix.Identity(); + TiXmlElement* transElem = GetFirstChild(element,RosElements::RE_TRANSLATION); if (transElem != 0) { ! if (! ReadVector(transElem, trans.matrix.Pos())) { return false; *************** *** 660,667 **** if (rotElem != 0) { ! if (! ReadVector(rotElem, trans.rotate)) { return false; } } --- 674,686 ---- if (rotElem != 0) { ! Vector3f rot; ! if (! ReadVector(rotElem, rot)) { return false; } + + trans.matrix.RotateX(gDegToRad(rot[0])); + trans.matrix.RotateY(gDegToRad(rot[1])); + trans.matrix.RotateZ(gDegToRad(rot[2])); } *************** *** 671,676 **** void RosImporter::ApplyTransform(shared_ptr<Transform> transform, const Trans& trans) { ! transform->SetLocalRotationDeg(trans.rotate); ! transform->SetLocalPos(trans.translate); } --- 690,694 ---- void RosImporter::ApplyTransform(shared_ptr<Transform> transform, const Trans& trans) { ! transform->SetLocalTransform(trans.matrix); } *************** *** 686,691 **** --- 704,723 ---- } + shared_ptr<TransformCollider> RosImporter::CreateTransformCollider(shared_ptr<BaseNode> parent, const Trans& trans) + { + shared_ptr<TransformCollider> transCollider = shared_dynamic_cast<TransformCollider> + (GetCore()->New("/oxygen/TransformCollider")); + + parent->AddChildReference(transCollider); + + transCollider->SetRotation(trans.matrix); + transCollider->SetPosition(trans.matrix.Pos()); + + return transCollider; + } + shared_ptr<ContactJointHandler> RosImporter::CreateContactJointHandler() { + #if 0 shared_ptr<ContactJointHandler> handler = shared_dynamic_cast<ContactJointHandler> (GetCore()->New("/oxygen/ContactJointHandler")); *************** *** 697,700 **** --- 729,734 ---- return handler; + #endif + return shared_ptr<ContactJointHandler>(); } *************** *** 720,723 **** --- 754,759 ---- ReadAttribute(physElem, RA_ERP, mGlobalERP, true); ReadAttribute(physElem, RA_CFM, mGlobalCFM, true); + + return true; } *************** *** 998,1004 **** } ! bool RosImporter::ReadAxis(TiXmlElement* element, salt::Vector3f& axis) { ! TiXmlElement* axisElem = GetFirstChild(element,RosElements::RE_AXIS); if (axisElem == 0) { --- 1034,1040 ---- } ! bool RosImporter::ReadAxis(TiXmlElement* element, RosElements::ERosElement type, salt::Vector3f& axis) { ! TiXmlElement* axisElem = GetFirstChild(element,type); if (axisElem == 0) { *************** *** 1046,1050 **** { shared_ptr<Body> body = ! (*iter)->FindChildSupportingClass<Body>(false); if (body.get() != 0) --- 1082,1086 ---- { shared_ptr<Body> body = ! (*iter)->FindChildSupportingClass<Body>(true); if (body.get() != 0) *************** *** 1059,1072 **** } ! bool RosImporter::ReadHinge(shared_ptr<BaseNode> parent, TiXmlElement* element, ENodeContext context) { string name; Vector3f anchor; ! Vector3f axis; if ( (! ReadAttribute(element, RA_NAME, name, true)) || (! ReadAnchorPoint(element, anchor)) || ! (! ReadAxis(element, axis)) ) { --- 1095,1110 ---- } ! bool RosImporter::ReadUniversal(shared_ptr<BaseNode> parent, TiXmlElement* element, ENodeContext context) { string name; Vector3f anchor; ! Vector3f axis1; ! Vector3f axis2; if ( (! ReadAttribute(element, RA_NAME, name, true)) || (! ReadAnchorPoint(element, anchor)) || ! (! ReadAxis(element, RosElements::RE_AXIS1, axis1)) || ! (! ReadAxis(element, RosElements::RE_AXIS2, axis2)) ) { *************** *** 1076,1087 **** shared_ptr<Body> body1 = GetJointParentBody(parent); ! //! Todo: figure out if all objects below a joint node are ! //implicitly movable, i.e. are created with a Body node ! if (! ReadChildElements(parent, element, NC_MOVABLE)) { return false; } ! shared_ptr<Body> body2 = GetJointChildBody(parent); if ( --- 1114,1128 ---- shared_ptr<Body> body1 = GetJointParentBody(parent); ! shared_ptr<UniversalJoint> universal = shared_dynamic_cast<UniversalJoint> ! (GetCore()->New("/oxygen/UniversalJoint")); ! ! parent->AddChildReference(universal); ! ! if (! ReadChildElements(universal, element, NC_MOVABLE)) { return false; } ! shared_ptr<Body> body2 = GetJointChildBody(universal); if ( *************** *** 1090,1098 **** ) { ! GetLog()->Error() << "(RosImporter::ReadHinge) found no bodies to attach hinge to in " << GetXMLPath(element) << " named " << name << "\n"; return false; } shared_ptr<HingeJoint> hinge = shared_dynamic_cast<HingeJoint> (GetCore()->New("/oxygen/HingeJoint")); --- 1131,1165 ---- ) { ! GetLog()->Error() << "(RosImporter::ReadUniversal) found no bodies to attach hinge to in " << GetXMLPath(element) << " named " << name << "\n"; return false; } + universal->SetName(name); + universal->Attach(body1, body2); + universal->SetAnchor(anchor); + universal->SetAxis1(axis1); + universal->SetAxis2(axis2); + + return true; + } + + bool RosImporter::ReadHinge(shared_ptr<BaseNode> parent, TiXmlElement* element, ENodeContext context) + { + string name; + Vector3f anchor; + Vector3f axis; + + if ( + (! ReadAttribute(element, RA_NAME, name, true)) || + (! ReadAnchorPoint(element, anchor)) || + (! ReadAxis(element, RosElements::RE_AXIS, axis)) + ) + { + return false; + } + + shared_ptr<Body> body1 = GetJointParentBody(parent); + shared_ptr<HingeJoint> hinge = shared_dynamic_cast<HingeJoint> (GetCore()->New("/oxygen/HingeJoint")); *************** *** 1100,1103 **** --- 1167,1188 ---- parent->AddChildReference(hinge); + if (! ReadChildElements(hinge, element, NC_MOVABLE)) + { + return false; + } + + shared_ptr<Body> body2 = GetJointChildBody(hinge); + + if ( + (body1.get() == 0) && + (body2.get() == 0) + ) + { + GetLog()->Error() << "(RosImporter::ReadHinge) found no bodies to attach hinge to in " + << GetXMLPath(element) << " named " << name << "\n"; + return false; + } + + hinge->SetName(name); hinge->Attach(body1, body2); *************** *** 1106,1109 **** --- 1191,1195 ---- GetLog()->Debug() << "(RosImporter) created hinge joint " << name << "\n"; + return true; } *************** *** 1120,1123 **** --- 1206,1210 ---- GetLog()->Debug() << "(RosImporter) defined macro " << name << "\n"; + return true; } *************** *** 1266,1269 **** --- 1353,1357 ---- if (! ReadPhysicalRep(transform,element,context)) { + return false; } *************** *** 1417,1420 **** --- 1505,1509 ---- geom.vertices.push_back(ref); + break; } *************** *** 1422,1425 **** --- 1511,1515 ---- } + // std::reverse(geom.vertices.begin(), geom.vertices.end()); return true; } *************** *** 1472,1481 **** bool RosImporter::ReadPhysicalRep(shared_ptr<Transform> transform, TiXmlElement* element, ENodeContext context) { TiXmlElement* physicalRep = GetFirstChild(element, RosElements::RE_PHYSICALREPRESENTATION); if (physicalRep == 0) { - string name = S_UNNAMED; - ReadAttribute(element, RA_NAME, name, true); - GetLog()->Error() << "(RosImporter) ERROR: missing physical representation in " << GetXMLPath(element) << " name " << name << " \n"; --- 1562,1571 ---- bool RosImporter::ReadPhysicalRep(shared_ptr<Transform> transform, TiXmlElement* element, ENodeContext context) { + string name = S_UNNAMED; + ReadAttribute(element, RA_NAME, name, true); + TiXmlElement* physicalRep = GetFirstChild(element, RosElements::RE_PHYSICALREPRESENTATION); if (physicalRep == 0) { GetLog()->Error() << "(RosImporter) ERROR: missing physical representation in " << GetXMLPath(element) << " name " << name << " \n"; *************** *** 1484,1492 **** } ! // we currently read only the first physical representation of the ! // complex shape and use its translation to modify the parent ! // transform under which the static mesh is registered. TODO: ! // figure out how to align the graphical representation with the ! // physical representation if more than one geom is present for ( --- 1574,1581 ---- } ! shared_ptr<Body> body = shared_dynamic_cast<Body> ! (GetCore()->New("/oxygen/Body")); ! transform->AddChildReference(body); ! body->SetName(name); for ( *************** *** 1512,1538 **** case RosElements::RE_SIMPLEBOX: ! return ReadSimpleBox(transform, element, context); case RosElements::RE_SIMPLESPHERE: ! return ReadSimpleSphere(transform, element, context); case RosElements::RE_SIMPLECYLINDER: //! simulate cylinder with a capped cylinder case RosElements::RE_SIMPLECAPPEDCYLINDER: ! return ReadSimpleCappedCylinder(transform, element, context); ! ! ! // RE_SIMPLECYLINDER, ! // RE_SIMPLECAPPEDCYLINDER, ! } } ! GetLog()->Debug() << "(RosImporter) read physical representation\n"; return true; } ! bool RosImporter::ReadSimpleBox(shared_ptr<Transform> transform, TiXmlElement* element, ENodeContext context) { string name; --- 1601,1641 ---- case RosElements::RE_SIMPLEBOX: ! if (! ReadSimpleBox(transform, body, element, context)) ! { ! return false; ! } ! break; case RosElements::RE_SIMPLESPHERE: ! if (! ReadSimpleSphere(transform, body, element, context)) ! { ! return false; ! } ! break; case RosElements::RE_SIMPLECYLINDER: //! simulate cylinder with a capped cylinder case RosElements::RE_SIMPLECAPPEDCYLINDER: ! if (! ReadSimpleCappedCylinder(transform, body, element, context)) ! { ! return false; ! } ! break; } } ! // adjust for the mass center ! Leaf::TLeafList children; ! transform->ListChildrenSupportingClass<TransformCollider>(children,false); ! ! Vector3f offset(body->GetMassCenter()); ! transform->SetLocalPos(transform->GetLocalPos() + offset); + GetLog()->Debug() << "(RosImporter) read physical representation\n"; return true; } ! bool RosImporter::ReadSimpleBox(shared_ptr<Transform> transform, shared_ptr<Body> body, ! TiXmlElement* element, ENodeContext context) { string name; *************** *** 1559,1579 **** Vector3f boxDim = Vector3f(length, width, height); ! if (HasBody(physical, context)) { ! shared_ptr<Body> body = shared_dynamic_cast<Body> ! (GetCore()->New("/oxygen/Body")); ! ! transform->AddChildReference(body); ! ! body->SetName(S_BODY+name); ! body->SetBoxTotal(physical.mass, boxDim); ! //! TODO: set mass center } // geometry shared_ptr<BoxCollider> collider = shared_dynamic_cast<BoxCollider> (GetCore()->New("/oxygen/BoxCollider")); ! transform->AddChildReference(collider); collider->SetName(S_GEOM+name); collider->SetBoxLengths(boxDim); --- 1662,1682 ---- Vector3f boxDim = Vector3f(length, width, height); ! if ( ! (HasBody(physical, context)) && ! (body.get() != 0) ! ) { ! body->AddBoxTotal(physical.mass, boxDim, trans.matrix); } // geometry + shared_ptr<TransformCollider> transCollider + = CreateTransformCollider(transform,trans); + transCollider->SetName(S_GEOMTRANS+name); + shared_ptr<BoxCollider> collider = shared_dynamic_cast<BoxCollider> (GetCore()->New("/oxygen/BoxCollider")); ! transCollider->AddChildReference(collider); collider->SetName(S_GEOM+name); collider->SetBoxLengths(boxDim); *************** *** 1587,1591 **** } ! bool RosImporter::ReadSimpleSphere(shared_ptr<Transform> transform, TiXmlElement* element, ENodeContext context) { string name; --- 1690,1695 ---- } ! bool RosImporter::ReadSimpleSphere(shared_ptr<Transform> transform, shared_ptr<Body> body, ! TiXmlElement* element, ENodeContext context) { string name; *************** *** 1607,1627 **** ApplyTransform(transform, trans); ! if (HasBody(physical, context)) { ! shared_ptr<Body> body = shared_dynamic_cast<Body> ! (GetCore()->New("/oxygen/Body")); ! ! transform->AddChildReference(body); ! ! body->SetName(S_BODY+name); ! body->SetSphereTotal(physical.mass, radius); ! //! TODO: set mass center } // geometry shared_ptr<SphereCollider> collider = shared_dynamic_cast<SphereCollider> (GetCore()->New("/oxygen/SphereCollider")); ! transform->AddChildReference(collider); collider->SetRadius(radius); --- 1711,1731 ---- ApplyTransform(transform, trans); ! if ( ! (HasBody(physical, context)) && ! (body.get() != 0) ! ) { ! body->AddSphereTotal(physical.mass, radius, trans.matrix); } // geometry + shared_ptr<TransformCollider> transCollider + = CreateTransformCollider(transform,trans); + transCollider->SetName(S_GEOMTRANS+name); + shared_ptr<SphereCollider> collider = shared_dynamic_cast<SphereCollider> (GetCore()->New("/oxygen/SphereCollider")); ! transCollider->AddChildReference(collider); collider->SetRadius(radius); *************** *** 1634,1638 **** } ! bool RosImporter::ReadSimpleCappedCylinder(shared_ptr<Transform> transform, TiXmlElement* element, ENodeContext context) { string name; --- 1738,1743 ---- } ! bool RosImporter::ReadSimpleCappedCylinder(shared_ptr<Transform> transform, boost::shared_ptr<Body> body, ! TiXmlElement* element, ENodeContext context) { string name; *************** *** 1656,1677 **** ApplyTransform(transform, trans); ! if (HasBody(physical, context)) { ! shared_ptr<Body> body = shared_dynamic_cast<Body> ! (GetCore()->New("/oxygen/Body")); ! ! transform->AddChildReference(body); ! ! body->SetName(S_BODY+name); ! body->SetCappedCylinderTotal(physical.mass, radius, height); ! //! TODO: set mass center } // geometry shared_ptr<CCylinderCollider> collider = shared_dynamic_cast<CCylinderCollider> (GetCore()->New("/oxygen/CCylinderCollider")); - collider->SetName(S_GEOM+name); ! transform->AddChildReference(collider); collider->SetParams(radius, height); --- 1761,1782 ---- ApplyTransform(transform, trans); ! if ( ! (HasBody(physical, context)) && ! (body.get() != 0) ! ) { ! body->AddCappedCylinderTotal(physical.mass, radius, height, trans.matrix); } // geometry + shared_ptr<TransformCollider> transCollider + = CreateTransformCollider(transform,trans); + transCollider->SetName(S_GEOMTRANS+name); + shared_ptr<CCylinderCollider> collider = shared_dynamic_cast<CCylinderCollider> (GetCore()->New("/oxygen/CCylinderCollider")); ! transCollider->AddChildReference(collider); ! collider->SetName(S_GEOM+name); collider->SetParams(radius, height); Index: rosimporter.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/plugin/rosimporter/rosimporter.h,v retrieving revision 1.8 retrieving revision 1.8.8.1 diff -C2 -d -r1.8 -r1.8.8.1 *** rosimporter.h 23 Feb 2006 13:40:23 -0000 1.8 --- rosimporter.h 20 May 2007 16:31:53 -0000 1.8.8.1 *************** *** 25,28 **** --- 25,29 ---- #include <map> #include <boost/shared_array.hpp> + #include <salt/matrix.h> #include <oxygen/sceneserver/sceneimporter.h> #include <oxygen/geometryserver/trimesh.h> *************** *** 34,37 **** --- 35,39 ---- class BaseNode; class Transform; + class TransformCollider; class ContactJointHandler; class Body; *************** *** 63,73 **** { public: ! salt::Vector3f translate; ! salt::Vector3f rotate; public: Trans() ! : translate(0.0, 0.0, 0.0), rotate (0.0, 0.0, 0.0) {} ! }; --- 65,75 ---- { public: ! salt::Matrix matrix; public: Trans() ! { ! matrix.Identity(); ! } }; *************** *** 195,198 **** --- 197,203 ---- (boost::shared_ptr<oxygen::BaseNode> parent, const Trans& trans); + boost::shared_ptr<oxygen::TransformCollider> CreateTransformCollider + (boost::shared_ptr<oxygen::BaseNode> parent, const Trans& trans); + boost::shared_ptr<oxygen::ContactJointHandler> RosImporter::CreateContactJointHandler(); *************** *** 230,234 **** bool ReadAnchorPoint(TiXmlElement* element, salt::Vector3f& anchor); ! bool ReadAxis(TiXmlElement* element, salt::Vector3f& axis); boost::shared_ptr<oxygen::Body> RosImporter::GetJointParentBody(boost::shared_ptr<oxygen::BaseNode> parent); --- 235,239 ---- bool ReadAnchorPoint(TiXmlElement* element, salt::Vector3f& anchor); ! bool ReadAxis(TiXmlElement* element, RosElements::ERosElement type, salt::Vector3f& axis); boost::shared_ptr<oxygen::Body> RosImporter::GetJointParentBody(boost::shared_ptr<oxygen::BaseNode> parent); *************** *** 236,239 **** --- 241,245 ---- bool ReadHinge(boost::shared_ptr<oxygen::BaseNode> parent, TiXmlElement* element, ENodeContext context); + bool ReadUniversal(boost::shared_ptr<oxygen::BaseNode> parent, TiXmlElement* element, ENodeContext context); bool ReadVertexList(TiXmlElement* element); *************** *** 246,252 **** bool ReadPhysicalRep(boost::shared_ptr<oxygen::Transform> transform, TiXmlElement* element, ENodeContext context); ! bool ReadSimpleBox(boost::shared_ptr<oxygen::Transform> transform, TiXmlElement* element, ENodeContext context); ! bool ReadSimpleSphere(boost::shared_ptr<oxygen::Transform> transform, TiXmlElement* element, ENodeContext context); ! bool ReadSimpleCappedCylinder(boost::shared_ptr<oxygen::Transform> transform, TiXmlElement* element, ENodeContext context); protected: --- 252,261 ---- bool ReadPhysicalRep(boost::shared_ptr<oxygen::Transform> transform, TiXmlElement* element, ENodeContext context); ! bool ReadSimpleBox(boost::shared_ptr<oxygen::Transform> transform, boost::shared_ptr<oxygen::Body> body, ! TiXmlElement* element, ENodeContext context); ! bool ReadSimpleSphere(boost::shared_ptr<oxygen::Transform> transform, boost::shared_ptr<oxygen::Body> body, ! TiXmlElement* element, ENodeContext context); ! bool ReadSimpleCappedCylinder(boost::shared_ptr<oxygen::Transform> transform, boost::shared_ptr<oxygen::Body> body, ! TiXmlElement* element, ENodeContext context); protected: |
From: Markus R. <rol...@us...> - 2007-05-20 16:32:15
|
Update of /cvsroot/simspark/simspark/spark/oxygen/sceneserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv18827/oxygen/sceneserver Modified Files: Tag: ROSIMPORTER_XLAB transform.cpp transform.h Log Message: Index: transform.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/sceneserver/transform.cpp,v retrieving revision 1.2 retrieving revision 1.2.8.1 diff -C2 -d -r1.2 -r1.2.8.1 *** transform.cpp 18 Feb 2006 19:48:06 -0000 1.2 --- transform.cpp 20 May 2007 16:31:53 -0000 1.2.8.1 *************** *** 98,101 **** --- 98,106 ---- } + const salt::Vector3f& Transform::GetLocalPos() + { + return mLocalTransform.Pos(); + } + void Transform::SetLocalRotationRad(const salt::Vector3f &rot) { Index: transform.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/sceneserver/transform.h,v retrieving revision 1.2 retrieving revision 1.2.8.1 diff -C2 -d -r1.2 -r1.2.8.1 *** transform.h 18 Feb 2006 19:48:06 -0000 1.2 --- transform.h 20 May 2007 16:31:53 -0000 1.2.8.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: Markus R. <rol...@us...> - 2007-05-17 17:49:29
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv17034/contrib/rsgedit Modified Files: constants.h mainframe.cpp mainframe.h property.cpp propertyframe.cpp propertylist.cpp rsgedit.rb rsgedit.wxg sparkcontext.cpp sparkcontext.h sparktree.cpp sparktree.h Log Message: Index: constants.h =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/constants.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** constants.h 15 Apr 2007 12:18:20 -0000 1.5 --- constants.h 17 May 2007 17:49:23 -0000 1.6 *************** *** 48,52 **** ID_AGENT_KILL = (wxID_HIGHEST+28), ! ID_SPARK_CONTEXT = (wxID_HIGHEST+29) }; --- 48,57 ---- ID_AGENT_KILL = (wxID_HIGHEST+28), ! ID_SPARK_CONTEXT = (wxID_HIGHEST+29), ! ! ID_CONTEXT_PROPERTIES = (wxID_HIGHEST+30), ! ID_CONTEXT_EDIT_SOURCE = (wxID_HIGHEST+31), ! ID_CONTEXT_COPY_FILENAME = (wxID_HIGHEST+32), ! ID_CONTEXT_COPY_PATH = (wxID_HIGHEST+33) }; Index: mainframe.h =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/mainframe.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** mainframe.h 15 Apr 2007 11:16:11 -0000 1.12 --- mainframe.h 17 May 2007 17:49:23 -0000 1.13 *************** *** 28,31 **** --- 28,32 ---- #include "sparktree.h" #include "propertylist.h" + #include <oxygen/sceneserver/scenedict.h> #ifndef MAINFRAME_H *************** *** 101,104 **** --- 102,110 ---- void OnHelpAbout(wxCommandEvent& event); + void OnContextProperties(wxCommandEvent& event); + void OnContextEditSource(wxCommandEvent& event); + void OnContextCopyFileName(wxCommandEvent& event); + void OnContextCopyPath(wxCommandEvent& event); + void OnExit(wxCommandEvent& event); void OnClose( wxCloseEvent& event ); *************** *** 145,148 **** --- 151,162 ---- void UpdateCached(); + /** edit the given file starting at the given line */ + void EditFile(const wxString& fname, int line); + + /** lookup the FileRef for the context node */ + const oxygen::SceneDict::FileRef* GetContextFileRef(); + + /** copy the given string to the sytem clipboard */ + void CopyToClipboard(const wxString& str) const; protected: Index: propertyframe.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/propertyframe.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** propertyframe.cpp 15 Mar 2007 07:26:24 -0000 1.3 --- propertyframe.cpp 17 May 2007 17:49:23 -0000 1.4 *************** *** 48,52 **** // begin wxGlade: propertyframe::set_properties SetTitle(wxT("frame_1")); ! SetSize(wxSize(300, 150)); // end wxGlade } --- 48,52 ---- // begin wxGlade: propertyframe::set_properties SetTitle(wxT("frame_1")); ! SetSize(wxSize(400, 150)); // end wxGlade } Index: sparktree.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/sparktree.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** sparktree.cpp 25 Apr 2007 20:08:43 -0000 1.7 --- sparktree.cpp 17 May 2007 17:49:23 -0000 1.8 *************** *** 262,263 **** --- 262,287 ---- return true; } + + void SparkTree::MarkItemInternal(const wxTreeItemId id, bool mark) + { + if (! id.IsOk()) + { + return; + } + if (mark) + { + mTree->SetItemTextColour(id, wxColour(230, 26, 230)); + mTree->SetItemBold(id,true); + } else + { + mTree->SetItemTextColour(id, wxNullColour); + mTree->SetItemBold(id,false); + } + } + + void SparkTree::MarkItem(const wxTreeItemId id) + { + MarkItemInternal(mLastMarkedNode,false); + MarkItemInternal(id, true); + mLastMarkedNode = id; + } Index: rsgedit.wxg =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/rsgedit.wxg,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** rsgedit.wxg 15 Mar 2007 07:26:24 -0000 1.5 --- rsgedit.wxg 17 May 2007 17:49:23 -0000 1.6 *************** *** 1,4 **** <?xml version="1.0"?> ! <!-- generated by wxGlade 0.4.1 on Tue Mar 06 22:13:36 2007 --> <application path="." name="" class="" option="1" language="C++" top_window="MainFrame" encoding="UTF-8" use_gettext="0" overwrite="0" use_new_namespace="1" for_version="2.6"> --- 1,4 ---- <?xml version="1.0"?> ! <!-- generated by wxGlade 0.4.1 on Tue May 01 10:32:21 2007 --> <application path="." name="" class="" option="1" language="C++" top_window="MainFrame" encoding="UTF-8" use_gettext="0" overwrite="0" use_new_namespace="1" for_version="2.6"> *************** *** 180,184 **** <style>wxCAPTION|wxCLOSE_BOX|wxMINIMIZE_BOX|wxMAXIMIZE_BOX|wxSYSTEM_MENU|wxRESIZE_BORDER|wxFRAME_NO_TASKBAR|wxFRAME_FLOAT_ON_PARENT|wxCLIP_CHILDREN</style> <title>frame_1</title> ! <size>300, 150</size> <object class="wxBoxSizer" name="sizer_3" base="EditBoxSizer"> <orient>wxVERTICAL</orient> --- 180,184 ---- <style>wxCAPTION|wxCLOSE_BOX|wxMINIMIZE_BOX|wxMAXIMIZE_BOX|wxSYSTEM_MENU|wxRESIZE_BORDER|wxFRAME_NO_TASKBAR|wxFRAME_FLOAT_ON_PARENT|wxCLIP_CHILDREN</style> <title>frame_1</title> ! <size>400, 150</size> <object class="wxBoxSizer" name="sizer_3" base="EditBoxSizer"> <orient>wxVERTICAL</orient> Index: propertylist.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/propertylist.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** propertylist.cpp 22 Jan 2006 17:24:45 -0000 1.1 --- propertylist.cpp 17 May 2007 17:49:23 -0000 1.2 *************** *** 90,93 **** --- 90,94 ---- } + mCtrList->Freeze(); bool valRefresh = *************** *** 111,115 **** if (valRefresh) { ! // just refresh values to prevent flicker mCtrList->SetItem(line, 1, entry.value); } else --- 112,116 ---- if (valRefresh) { ! // just refresh values mCtrList->SetItem(line, 1, entry.value); } else *************** *** 122,124 **** --- 123,127 ---- ++line; } + + mCtrList->Thaw(); } Index: rsgedit.rb =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/rsgedit.rb,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** rsgedit.rb 26 Apr 2007 17:54:05 -0000 1.8 --- rsgedit.rb 17 May 2007 17:49:23 -0000 1.9 *************** *** 34,37 **** --- 34,41 ---- run "bindings.rb" + # register from which rsg file nodes were created + rubySceneImporter = get($serverPath+'scene/RubySceneImporter') + rubySceneImporter.enableSceneDictionary(true); + # create custom materials material = new('kerosin/MaterialSolid', $serverPath+'material/matYellow'); Index: sparkcontext.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/sparkcontext.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** sparkcontext.cpp 15 Apr 2007 11:17:08 -0000 1.3 --- sparkcontext.cpp 17 May 2007 17:49:23 -0000 1.4 *************** *** 20,25 **** --- 20,30 ---- #include "sparkcontext.h" #include "sparkcontextevent.h" + #include "constants.h" + #include <wx/menu.h> + #include <zeitgeist/leaf.h> + #include <oxygen/sceneserver/scenedict.h> using namespace zeitgeist; + using namespace oxygen; using namespace boost; *************** *** 77,78 **** --- 82,117 ---- return mEventId; } + + wxMenu* SparkContext::GetContextMenu(weak_ptr<Leaf> leaf) + { + if (leaf.expired()) + { + assert(false); + return 0; + } + + mContextNode = leaf; + + long style = 0; + wxMenu* menu(new wxMenu(leaf.lock()->GetFullPath(), 0)); + + menu->Append(ID_CONTEXT_COPY_PATH, wxT("&Copy node path")); + + const SceneDict::FileRef* ref = SceneDict::GetInstance().Lookup(leaf); + if (ref != 0) + { + menu->AppendSeparator(); + menu->Append(ID_CONTEXT_COPY_FILENAME, wxT("C&opy filename")); + menu->Append(ID_CONTEXT_EDIT_SOURCE, wxT("&Edit source file")); + } + + menu->AppendSeparator(); + menu->Append(ID_CONTEXT_PROPERTIES, wxT("&Properties")); + + return menu; + } + + weak_ptr<Leaf> SparkContext::GetContextNode() const + { + return mContextNode; + } Index: mainframe.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/mainframe.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** mainframe.cpp 15 Apr 2007 11:49:06 -0000 1.16 --- mainframe.cpp 17 May 2007 17:49:23 -0000 1.17 *************** *** 26,30 **** --- 26,32 ---- #include <wx/filename.h> + #include <wx/mimetype.h> #include <wx/filedlg.h> + #include <wx/clipbrd.h> #include <rsgedit/res/xpm_play.xpm> *************** *** 78,81 **** --- 80,88 ---- EVT_MENU(ID_HELP_ABOUT, mainframe::OnHelpAbout) + EVT_MENU(ID_CONTEXT_PROPERTIES, mainframe::OnContextProperties) + EVT_MENU(ID_CONTEXT_EDIT_SOURCE, mainframe::OnContextEditSource) + EVT_MENU(ID_CONTEXT_COPY_FILENAME, mainframe::OnContextCopyFileName) + EVT_MENU(ID_CONTEXT_COPY_PATH, mainframe::OnContextCopyPath) + EVT_TIMER(TI_LOG, mainframe::OnLogTimer) EVT_TIMER(TI_FPS, mainframe::OnFPSTimer) *************** *** 602,605 **** --- 609,625 ---- { shared_ptr<Leaf> leaf = mSparkTree.GetLeaf(event.GetItem()).lock(); + wxMenu* context = SparkContext::GetInstance().GetContextMenu(leaf); + + if (context == 0) + { + return; + } + + PopupMenu(context); + } + + void mainframe::OnTreeItemActivated(wxTreeEvent& event) + { + shared_ptr<Leaf> leaf = mSparkTree.GetLeaf(event.GetItem()).lock(); if (leaf.get() == 0) { *************** *** 607,611 **** } ! wxString location(leaf->GetFullPath().c_str(), wxConvUTF8); propertyframe* frame(new propertyframe(this, wxID_ANY, location)); --- 627,644 ---- } ! SparkContext::GetInstance().SetSelection(leaf); ! } ! ! ! void mainframe::OnContextProperties(wxCommandEvent& event) ! { ! weak_ptr<Leaf> leaf = SparkContext::GetInstance().GetContextNode(); ! if (leaf.expired()) ! { ! assert(false); ! return; ! } ! ! wxString location(leaf.lock()->GetFullPath().c_str(), wxConvUTF8); propertyframe* frame(new propertyframe(this, wxID_ANY, location)); *************** *** 615,627 **** } ! void mainframe::OnTreeItemActivated(wxTreeEvent& event) { ! shared_ptr<Leaf> leaf = mSparkTree.GetLeaf(event.GetItem()).lock(); ! if (leaf.get() == 0) { return; } ! SparkContext::GetInstance().SetSelection(leaf); } --- 648,726 ---- } ! void mainframe::OnContextEditSource(wxCommandEvent& event) { ! const SceneDict::FileRef* ref = GetContextFileRef(); ! if (ref == 0) ! { ! assert(false); ! return; ! } ! ! EditFile(ref->fname, ref->line); ! } ! ! void mainframe::OnContextCopyFileName(wxCommandEvent& event) ! { ! const SceneDict::FileRef* ref = GetContextFileRef(); ! if (ref == 0) ! { ! assert(false); ! return; ! } ! ! wxFileName fn(ref->fname.c_str()); ! fn.Normalize(); ! CopyToClipboard(fn.GetFullPath()); ! } ! ! void mainframe::OnContextCopyPath(wxCommandEvent& event) ! { ! weak_ptr<Leaf> leaf = SparkContext::GetInstance().GetContextNode(); ! if (leaf.expired()) { + assert(false); return; } ! CopyToClipboard(leaf.lock()->GetFullPath()); ! } ! ! const SceneDict::FileRef* mainframe::GetContextFileRef() ! { ! weak_ptr<Leaf> leaf = SparkContext::GetInstance().GetContextNode(); ! if (leaf.expired()) ! { ! assert(false); ! return 0; ! } ! ! return SceneDict::GetInstance().Lookup(leaf); ! } ! ! void mainframe::CopyToClipboard(const wxString& str) const ! { ! wxTheClipboard->Open(); ! wxTheClipboard->SetData(new wxTextDataObject(str)); ! wxTheClipboard->Close(); ! } ! ! void mainframe::EditFile(const wxString& fname, int line) ! { ! wxFileType *ft = wxTheMimeTypesManager->GetFileTypeFromMimeType("text/plain"); ! if (ft == 0) ! { ! return; ! } ! ! wxFileName fn(fname); ! fn.Normalize(); ! ! wxString cmd = ft->GetOpenCommand(fn.GetFullPath()); ! if (cmd.IsEmpty()) ! { ! return; ! } ! ! wxExecute(cmd); } *************** *** 859,868 **** case SparkContextEvent::T_SELECTION_CHANGED: ! // redraw gl canvas ! bool swapBuffers = true; ! wxClientDC dc(this); ! mCanvas->Render(dc, swapBuffers); ! mSparkTree.SelectLeaf(SparkContext::GetInstance().GetSelection()); ! break; } } --- 958,978 ---- case SparkContextEvent::T_SELECTION_CHANGED: ! { ! // redraw gl canvas ! bool swapBuffers = true; ! wxClientDC dc(this); ! mCanvas->Render(dc, swapBuffers); ! ! weak_ptr<Leaf> leaf = SparkContext::GetInstance().GetSelection(); ! if (mSparkTree.SelectLeaf(leaf)) ! { ! mSparkTree.MarkItem(mCtrTree->GetSelection()); ! } else ! { ! mSparkTree.MarkItem(wxTreeItemId()); ! } ! ! break; ! } } } Index: sparkcontext.h =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/sparkcontext.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** sparkcontext.h 15 Apr 2007 11:17:10 -0000 1.3 --- sparkcontext.h 17 May 2007 17:49:23 -0000 1.4 *************** *** 30,33 **** --- 30,34 ---- class wxEvtHandler; + class wxMenu; class SparkContext *************** *** 45,48 **** --- 46,52 ---- int GetEventId(); + wxMenu* GetContextMenu(boost::weak_ptr<zeitgeist::Leaf> leaf); + boost::weak_ptr<zeitgeist::Leaf> GetContextNode() const; + private: SparkContext(); *************** *** 52,55 **** --- 56,62 ---- boost::weak_ptr<zeitgeist::Leaf> mSelectedNode; + //! the node that context menu commands refer to + boost::weak_ptr<zeitgeist::Leaf> mContextNode; + //! assigned event notification target wxEvtHandler* mEventHandler; Index: sparktree.h =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/sparktree.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** sparktree.h 15 Apr 2007 11:48:42 -0000 1.4 --- sparktree.h 17 May 2007 17:49:23 -0000 1.5 *************** *** 54,60 **** --- 54,63 ---- bool SelectLeaf(boost::weak_ptr<zeitgeist::Leaf> leaf); + void MarkItem(const wxTreeItemId id); + protected: void SetItemData(wxTreeItemId id, boost::weak_ptr<zeitgeist::Leaf> leaf); ItemData* GetItemData(wxTreeItemId id); + void MarkItemInternal(const wxTreeItemId id, bool mark); protected: *************** *** 62,65 **** --- 65,69 ---- boost::shared_ptr<zeitgeist::Core> mCore; wxTreeItemId mRootId; + wxTreeItemId mLastMarkedNode; }; Index: property.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/property.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** property.cpp 19 Feb 2006 15:45:37 -0000 1.8 --- property.cpp 17 May 2007 17:49:23 -0000 1.9 *************** *** 33,36 **** --- 33,37 ---- #include <oxygen/sceneserver/basenode.h> #include <oxygen/sceneserver/transform.h> + #include <oxygen/sceneserver/scenedict.h> #include <oxygen/physicsserver/body.h> #include <oxygen/physicsserver/joint.h> *************** *** 117,120 **** --- 118,133 ---- { entries.push_back(Entry(_T("GetFullPath"), wxString(leaf->GetFullPath().c_str(), wxConvUTF8))); + + const SceneDict::FileRef* ref + = SceneDict::GetInstance().Lookup(leaf); + + if (ref == 0) + { + return; + } + + wxString strRef = wxString(ref->fname.c_str(), wxConvUTF8) + + wxString::Format(":%d",ref->line); + entries.push_back(Entry(_T("rsg file"), strRef)); } |
From: Markus R. <rol...@us...> - 2007-05-17 17:49:29
|
Update of /cvsroot/simspark/simspark/spark/plugin/rubysceneimporter In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv17034/spark/plugin/rubysceneimporter Modified Files: rubysceneimporter.cpp rubysceneimporter.h rubysceneimporter_c.cpp Log Message: Index: rubysceneimporter.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/plugin/rubysceneimporter/rubysceneimporter.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** rubysceneimporter.h 15 Mar 2007 07:26:28 -0000 1.3 --- rubysceneimporter.h 17 May 2007 17:49:23 -0000 1.4 *************** *** 76,79 **** --- 76,82 ---- void SetUnlinkOnCompleteScenes(bool unlink); + /** registers all created nodes in the RubySceneDict */ + void EnableSceneDictionary(bool enable); + protected: virtual bool ParseScene(const char* scene, int size, *************** *** 111,114 **** --- 114,120 ---- bool mDeltaScene; + /** true, if all created nodes are registered in the RubySceneDict */ + bool mUpdateSceneDict; + /** the major version of the scen graph file */ int mVersionMajor; Index: rubysceneimporter.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/plugin/rubysceneimporter/rubysceneimporter.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** rubysceneimporter.cpp 15 Mar 2007 07:26:28 -0000 1.3 --- rubysceneimporter.cpp 17 May 2007 17:49:23 -0000 1.4 *************** *** 25,28 **** --- 25,29 ---- #include <zeitgeist/scriptserver/scriptserver.h> #include <oxygen/sceneserver/transform.h> + #include <oxygen/sceneserver/scenedict.h> #include <boost/scoped_array.hpp> *************** *** 74,77 **** --- 75,79 ---- mDeltaScene = false; mAutoUnlink = false; + mUpdateSceneDict = false; } *************** *** 85,88 **** --- 87,95 ---- } + void RubySceneImporter::EnableSceneDictionary(bool enable) + { + mUpdateSceneDict = enable; + } + bool RubySceneImporter::ImportScene(const std::string& fileName, shared_ptr<BaseNode> root, *************** *** 99,102 **** --- 106,110 ---- } + std::string oldFileName = mFileName; mFileName = fileName; *************** *** 106,110 **** buffer[file->Size()] = 0; ! return ParseScene(buffer.get(), file->Size(), root, parameter); } --- 114,121 ---- buffer[file->Size()] = 0; ! bool ok = ParseScene(buffer.get(), file->Size(), root, parameter); ! mFileName = oldFileName; ! ! return ok; } *************** *** 144,147 **** --- 155,168 ---- sexp = iparse_sexp(const_cast<char*>(scene),size,pcont); + if (sexp == 0) + { + GetLog()->Error() + << "(RubySceneImporter) ERROR: failed to parse S-Expressions. " + << "Last read line was " << pcont->line << "\n"; + root->UnlinkChildren(); + return false; + + } + if ( (! mDeltaScene) && *************** *** 322,325 **** --- 343,355 ---- } + if ( + (mUpdateSceneDict) && + (mSceneDict != 0) + ) + { + mSceneDict->Insert + (node, SceneDict::FileRef(mFileName,sexp->line)); + } + return node; } Index: rubysceneimporter_c.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/plugin/rubysceneimporter/rubysceneimporter_c.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** rubysceneimporter_c.cpp 13 Dec 2005 21:48:50 -0000 1.1 --- rubysceneimporter_c.cpp 17 May 2007 17:49:23 -0000 1.2 *************** *** 23,26 **** --- 23,42 ---- #include "rubysceneimporter.h" + FUNCTION(RubySceneImporter,enableSceneDictionary) + { + bool enable; + + if ( + (in.GetSize() != 1) || + (! in.GetValue(in[0], enable)) + ) + { + return false; + } + + obj->EnableSceneDictionary(enable); + return true; + } + FUNCTION(RubySceneImporter,setUnlinkOnCompleteScenes) { *************** *** 43,46 **** --- 59,63 ---- DEFINE_BASECLASS(oxygen/SceneImporter); DEFINE_FUNCTION(setUnlinkOnCompleteScenes); + DEFINE_FUNCTION(enableSceneDictionary); } |
From: Markus R. <rol...@us...> - 2007-05-17 17:49:27
|
Update of /cvsroot/simspark/simspark/spark/oxygen/sceneserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv17034/spark/oxygen/sceneserver Modified Files: sceneimporter.h sceneserver.cpp Added Files: scenedict.cpp scenedict.h Log Message: --- 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 2007/05/17 17:49:23 rollmark 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 Index: sceneserver.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/sceneserver/sceneserver.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** sceneserver.cpp 15 Mar 2007 07:26:28 -0000 1.3 --- sceneserver.cpp 17 May 2007 17:49:23 -0000 1.4 *************** *** 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; --- 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 2007/05/17 17:49:23 rollmark 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(); } Index: sceneimporter.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/sceneserver/sceneimporter.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** sceneimporter.h 5 Dec 2005 21:21:17 -0000 1.1 --- sceneimporter.h 17 May 2007 17:49:23 -0000 1.2 *************** *** 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: Markus R. <rol...@us...> - 2007-05-17 17:49:27
|
Update of /cvsroot/simspark/simspark/spark In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv17034/spark Modified Files: simspark.sln Log Message: Index: simspark.sln =================================================================== RCS file: /cvsroot/simspark/simspark/spark/simspark.sln,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** simspark.sln 15 Mar 2007 07:26:25 -0000 1.2 --- simspark.sln 17 May 2007 17:49:23 -0000 1.3 *************** *** 10,19 **** Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "coretest", "test\coretest\coretest.vcproj", "{FC4C3571-034B-4CB5-9CF3-3411205C9433}" ProjectSection(ProjectDependencies) = postProject - {B3FAF507-1CEB-437C-8272-30C8DC236192} = {B3FAF507-1CEB-437C-8272-30C8DC236192} - {38291F56-23B6-4B5D-8810-D2AD2A379EE9} = {38291F56-23B6-4B5D-8810-D2AD2A379EE9} - {DAB59CC4-E184-40CC-A858-27C432A53AAB} = {DAB59CC4-E184-40CC-A858-27C432A53AAB} - {001EB793-1243-46C2-B693-B23BD1D3D1B5} = {001EB793-1243-46C2-B693-B23BD1D3D1B5} - {17DECC5C-BD53-4ECE-8E4F-707C52D4987C} = {17DECC5C-BD53-4ECE-8E4F-707C52D4987C} {ABCC65CE-0762-42F2-8459-41722DCF02D9} = {ABCC65CE-0762-42F2-8459-41722DCF02D9} EndProjectSection EndProject --- 10,19 ---- Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "coretest", "test\coretest\coretest.vcproj", "{FC4C3571-034B-4CB5-9CF3-3411205C9433}" ProjectSection(ProjectDependencies) = postProject {ABCC65CE-0762-42F2-8459-41722DCF02D9} = {ABCC65CE-0762-42F2-8459-41722DCF02D9} + {17DECC5C-BD53-4ECE-8E4F-707C52D4987C} = {17DECC5C-BD53-4ECE-8E4F-707C52D4987C} + {001EB793-1243-46C2-B693-B23BD1D3D1B5} = {001EB793-1243-46C2-B693-B23BD1D3D1B5} + {DAB59CC4-E184-40CC-A858-27C432A53AAB} = {DAB59CC4-E184-40CC-A858-27C432A53AAB} + {38291F56-23B6-4B5D-8810-D2AD2A379EE9} = {38291F56-23B6-4B5D-8810-D2AD2A379EE9} + {B3FAF507-1CEB-437C-8272-30C8DC236192} = {B3FAF507-1CEB-437C-8272-30C8DC236192} EndProjectSection EndProject *************** *** 35,48 **** Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "filesystemstd", "plugin\filesystemstd\filesystemstd.vcproj", "{4A4E1738-60BC-4BB4-AFC8-92320D769D90}" ProjectSection(ProjectDependencies) = postProject - {17DECC5C-BD53-4ECE-8E4F-707C52D4987C} = {17DECC5C-BD53-4ECE-8E4F-707C52D4987C} {B3FAF507-1CEB-437C-8272-30C8DC236192} = {B3FAF507-1CEB-437C-8272-30C8DC236192} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sexpparser", "plugin\sexpparser\sexpparser.vcproj", "{949142E4-5E9B-4C5F-9BD9-2EF9DA5CCCA6}" ProjectSection(ProjectDependencies) = postProject - {17DECC5C-BD53-4ECE-8E4F-707C52D4987C} = {17DECC5C-BD53-4ECE-8E4F-707C52D4987C} - {001EB793-1243-46C2-B693-B23BD1D3D1B5} = {001EB793-1243-46C2-B693-B23BD1D3D1B5} - {DAB59CC4-E184-40CC-A858-27C432A53AAB} = {DAB59CC4-E184-40CC-A858-27C432A53AAB} {B3FAF507-1CEB-437C-8272-30C8DC236192} = {B3FAF507-1CEB-437C-8272-30C8DC236192} EndProjectSection EndProject --- 35,48 ---- Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "filesystemstd", "plugin\filesystemstd\filesystemstd.vcproj", "{4A4E1738-60BC-4BB4-AFC8-92320D769D90}" ProjectSection(ProjectDependencies) = postProject {B3FAF507-1CEB-437C-8272-30C8DC236192} = {B3FAF507-1CEB-437C-8272-30C8DC236192} + {17DECC5C-BD53-4ECE-8E4F-707C52D4987C} = {17DECC5C-BD53-4ECE-8E4F-707C52D4987C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sexpparser", "plugin\sexpparser\sexpparser.vcproj", "{949142E4-5E9B-4C5F-9BD9-2EF9DA5CCCA6}" ProjectSection(ProjectDependencies) = postProject {B3FAF507-1CEB-437C-8272-30C8DC236192} = {B3FAF507-1CEB-437C-8272-30C8DC236192} + {DAB59CC4-E184-40CC-A858-27C432A53AAB} = {DAB59CC4-E184-40CC-A858-27C432A53AAB} + {001EB793-1243-46C2-B693-B23BD1D3D1B5} = {001EB793-1243-46C2-B693-B23BD1D3D1B5} + {17DECC5C-BD53-4ECE-8E4F-707C52D4987C} = {17DECC5C-BD53-4ECE-8E4F-707C52D4987C} EndProjectSection EndProject *************** *** 53,63 **** Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rsgedit", "..\contrib\rsgedit\rsgedit.vcproj", "{38B680B0-B535-40F0-B5DB-FC307C40C7D6}" ProjectSection(ProjectDependencies) = postProject - {38291F56-23B6-4B5D-8810-D2AD2A379EE9} = {38291F56-23B6-4B5D-8810-D2AD2A379EE9} - {17DECC5C-BD53-4ECE-8E4F-707C52D4987C} = {17DECC5C-BD53-4ECE-8E4F-707C52D4987C} - {001EB793-1243-46C2-B693-B23BD1D3D1B5} = {001EB793-1243-46C2-B693-B23BD1D3D1B5} - {DAB59CC4-E184-40CC-A858-27C432A53AAB} = {DAB59CC4-E184-40CC-A858-27C432A53AAB} - {ABCC65CE-0762-42F2-8459-41722DCF02D9} = {ABCC65CE-0762-42F2-8459-41722DCF02D9} - {87C2BFBA-8299-432F-B2E6-08E650E74230} = {87C2BFBA-8299-432F-B2E6-08E650E74230} {B3FAF507-1CEB-437C-8272-30C8DC236192} = {B3FAF507-1CEB-437C-8272-30C8DC236192} EndProjectSection EndProject --- 53,63 ---- Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rsgedit", "..\contrib\rsgedit\rsgedit.vcproj", "{38B680B0-B535-40F0-B5DB-FC307C40C7D6}" ProjectSection(ProjectDependencies) = postProject {B3FAF507-1CEB-437C-8272-30C8DC236192} = {B3FAF507-1CEB-437C-8272-30C8DC236192} + {87C2BFBA-8299-432F-B2E6-08E650E74230} = {87C2BFBA-8299-432F-B2E6-08E650E74230} + {ABCC65CE-0762-42F2-8459-41722DCF02D9} = {ABCC65CE-0762-42F2-8459-41722DCF02D9} + {DAB59CC4-E184-40CC-A858-27C432A53AAB} = {DAB59CC4-E184-40CC-A858-27C432A53AAB} + {001EB793-1243-46C2-B693-B23BD1D3D1B5} = {001EB793-1243-46C2-B693-B23BD1D3D1B5} + {17DECC5C-BD53-4ECE-8E4F-707C52D4987C} = {17DECC5C-BD53-4ECE-8E4F-707C52D4987C} + {38291F56-23B6-4B5D-8810-D2AD2A379EE9} = {38291F56-23B6-4B5D-8810-D2AD2A379EE9} EndProjectSection EndProject *************** *** 67,115 **** ProjectSection(ProjectDependencies) = postProject {B3FAF507-1CEB-437C-8272-30C8DC236192} = {B3FAF507-1CEB-437C-8272-30C8DC236192} ! {17DECC5C-BD53-4ECE-8E4F-707C52D4987C} = {17DECC5C-BD53-4ECE-8E4F-707C52D4987C} ! {001EB793-1243-46C2-B693-B23BD1D3D1B5} = {001EB793-1243-46C2-B693-B23BD1D3D1B5} {87C2BFBA-8299-432F-B2E6-08E650E74230} = {87C2BFBA-8299-432F-B2E6-08E650E74230} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "inputwx", "..\contrib\plugin\inputwx\inputwx.vcproj", "{038D947F-6223-4EA7-BE4E-A41984923336}" ProjectSection(ProjectDependencies) = postProject - {B3FAF507-1CEB-437C-8272-30C8DC236192} = {B3FAF507-1CEB-437C-8272-30C8DC236192} - {17DECC5C-BD53-4ECE-8E4F-707C52D4987C} = {17DECC5C-BD53-4ECE-8E4F-707C52D4987C} - {001EB793-1243-46C2-B693-B23BD1D3D1B5} = {001EB793-1243-46C2-B693-B23BD1D3D1B5} {38291F56-23B6-4B5D-8810-D2AD2A379EE9} = {38291F56-23B6-4B5D-8810-D2AD2A379EE9} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "soccer", "..\contrib\plugin\soccer\soccer.vcproj", "{D6BD532A-E11A-4391-A37C-2D55027EE219}" ProjectSection(ProjectDependencies) = postProject - {B3FAF507-1CEB-437C-8272-30C8DC236192} = {B3FAF507-1CEB-437C-8272-30C8DC236192} - {38291F56-23B6-4B5D-8810-D2AD2A379EE9} = {38291F56-23B6-4B5D-8810-D2AD2A379EE9} - {17DECC5C-BD53-4ECE-8E4F-707C52D4987C} = {17DECC5C-BD53-4ECE-8E4F-707C52D4987C} - {001EB793-1243-46C2-B693-B23BD1D3D1B5} = {001EB793-1243-46C2-B693-B23BD1D3D1B5} {DAB59CC4-E184-40CC-A858-27C432A53AAB} = {DAB59CC4-E184-40CC-A858-27C432A53AAB} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sparkagent", "plugin\sparkagent\sparkagent.vcproj", "{9E5D17FC-5665-48A8-9298-747A3D690787}" ProjectSection(ProjectDependencies) = postProject - {DAB59CC4-E184-40CC-A858-27C432A53AAB} = {DAB59CC4-E184-40CC-A858-27C432A53AAB} - {001EB793-1243-46C2-B693-B23BD1D3D1B5} = {001EB793-1243-46C2-B693-B23BD1D3D1B5} - {17DECC5C-BD53-4ECE-8E4F-707C52D4987C} = {17DECC5C-BD53-4ECE-8E4F-707C52D4987C} {B3FAF507-1CEB-437C-8272-30C8DC236192} = {B3FAF507-1CEB-437C-8272-30C8DC236192} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "agentspark", "..\contrib\agentspark\agentspark.vcproj", "{A544868D-F263-40AC-BEDF-FFF0660B3E32}" ProjectSection(ProjectDependencies) = postProject - {ABCC65CE-0762-42F2-8459-41722DCF02D9} = {ABCC65CE-0762-42F2-8459-41722DCF02D9} - {DAB59CC4-E184-40CC-A858-27C432A53AAB} = {DAB59CC4-E184-40CC-A858-27C432A53AAB} - {001EB793-1243-46C2-B693-B23BD1D3D1B5} = {001EB793-1243-46C2-B693-B23BD1D3D1B5} - {17DECC5C-BD53-4ECE-8E4F-707C52D4987C} = {17DECC5C-BD53-4ECE-8E4F-707C52D4987C} {B3FAF507-1CEB-437C-8272-30C8DC236192} = {B3FAF507-1CEB-437C-8272-30C8DC236192} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sceneeffector", "plugin\sceneeffector\sceneeffector.vcproj", "{AE03EAFA-DFD9-43B3-8777-13A27167A692}" ProjectSection(ProjectDependencies) = postProject - {B3FAF507-1CEB-437C-8272-30C8DC236192} = {B3FAF507-1CEB-437C-8272-30C8DC236192} - {17DECC5C-BD53-4ECE-8E4F-707C52D4987C} = {17DECC5C-BD53-4ECE-8E4F-707C52D4987C} - {001EB793-1243-46C2-B693-B23BD1D3D1B5} = {001EB793-1243-46C2-B693-B23BD1D3D1B5} {DAB59CC4-E184-40CC-A858-27C432A53AAB} = {DAB59CC4-E184-40CC-A858-27C432A53AAB} EndProjectSection EndProject --- 67,116 ---- ProjectSection(ProjectDependencies) = postProject {B3FAF507-1CEB-437C-8272-30C8DC236192} = {B3FAF507-1CEB-437C-8272-30C8DC236192} ! {DAB59CC4-E184-40CC-A858-27C432A53AAB} = {DAB59CC4-E184-40CC-A858-27C432A53AAB} {87C2BFBA-8299-432F-B2E6-08E650E74230} = {87C2BFBA-8299-432F-B2E6-08E650E74230} + {001EB793-1243-46C2-B693-B23BD1D3D1B5} = {001EB793-1243-46C2-B693-B23BD1D3D1B5} + {17DECC5C-BD53-4ECE-8E4F-707C52D4987C} = {17DECC5C-BD53-4ECE-8E4F-707C52D4987C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "inputwx", "..\contrib\plugin\inputwx\inputwx.vcproj", "{038D947F-6223-4EA7-BE4E-A41984923336}" ProjectSection(ProjectDependencies) = postProject {38291F56-23B6-4B5D-8810-D2AD2A379EE9} = {38291F56-23B6-4B5D-8810-D2AD2A379EE9} + {001EB793-1243-46C2-B693-B23BD1D3D1B5} = {001EB793-1243-46C2-B693-B23BD1D3D1B5} + {17DECC5C-BD53-4ECE-8E4F-707C52D4987C} = {17DECC5C-BD53-4ECE-8E4F-707C52D4987C} + {B3FAF507-1CEB-437C-8272-30C8DC236192} = {B3FAF507-1CEB-437C-8272-30C8DC236192} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "soccer", "..\contrib\plugin\soccer\soccer.vcproj", "{D6BD532A-E11A-4391-A37C-2D55027EE219}" ProjectSection(ProjectDependencies) = postProject {DAB59CC4-E184-40CC-A858-27C432A53AAB} = {DAB59CC4-E184-40CC-A858-27C432A53AAB} + {001EB793-1243-46C2-B693-B23BD1D3D1B5} = {001EB793-1243-46C2-B693-B23BD1D3D1B5} + {17DECC5C-BD53-4ECE-8E4F-707C52D4987C} = {17DECC5C-BD53-4ECE-8E4F-707C52D4987C} + {38291F56-23B6-4B5D-8810-D2AD2A379EE9} = {38291F56-23B6-4B5D-8810-D2AD2A379EE9} + {B3FAF507-1CEB-437C-8272-30C8DC236192} = {B3FAF507-1CEB-437C-8272-30C8DC236192} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sparkagent", "plugin\sparkagent\sparkagent.vcproj", "{9E5D17FC-5665-48A8-9298-747A3D690787}" ProjectSection(ProjectDependencies) = postProject {B3FAF507-1CEB-437C-8272-30C8DC236192} = {B3FAF507-1CEB-437C-8272-30C8DC236192} + {17DECC5C-BD53-4ECE-8E4F-707C52D4987C} = {17DECC5C-BD53-4ECE-8E4F-707C52D4987C} + {001EB793-1243-46C2-B693-B23BD1D3D1B5} = {001EB793-1243-46C2-B693-B23BD1D3D1B5} + {DAB59CC4-E184-40CC-A858-27C432A53AAB} = {DAB59CC4-E184-40CC-A858-27C432A53AAB} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "agentspark", "..\contrib\agentspark\agentspark.vcproj", "{A544868D-F263-40AC-BEDF-FFF0660B3E32}" ProjectSection(ProjectDependencies) = postProject {B3FAF507-1CEB-437C-8272-30C8DC236192} = {B3FAF507-1CEB-437C-8272-30C8DC236192} + {17DECC5C-BD53-4ECE-8E4F-707C52D4987C} = {17DECC5C-BD53-4ECE-8E4F-707C52D4987C} + {001EB793-1243-46C2-B693-B23BD1D3D1B5} = {001EB793-1243-46C2-B693-B23BD1D3D1B5} + {DAB59CC4-E184-40CC-A858-27C432A53AAB} = {DAB59CC4-E184-40CC-A858-27C432A53AAB} + {ABCC65CE-0762-42F2-8459-41722DCF02D9} = {ABCC65CE-0762-42F2-8459-41722DCF02D9} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sceneeffector", "plugin\sceneeffector\sceneeffector.vcproj", "{AE03EAFA-DFD9-43B3-8777-13A27167A692}" ProjectSection(ProjectDependencies) = postProject {DAB59CC4-E184-40CC-A858-27C432A53AAB} = {DAB59CC4-E184-40CC-A858-27C432A53AAB} + {001EB793-1243-46C2-B693-B23BD1D3D1B5} = {001EB793-1243-46C2-B693-B23BD1D3D1B5} + {17DECC5C-BD53-4ECE-8E4F-707C52D4987C} = {17DECC5C-BD53-4ECE-8E4F-707C52D4987C} + {B3FAF507-1CEB-437C-8272-30C8DC236192} = {B3FAF507-1CEB-437C-8272-30C8DC236192} EndProjectSection EndProject |
From: Markus R. <rol...@us...> - 2007-05-17 17:49:26
|
Update of /cvsroot/simspark/simspark/spark/oxygen In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv17034/spark/oxygen Modified Files: Makefile.am oxygen.vcproj Log Message: Index: Makefile.am =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/Makefile.am,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Makefile.am 15 Mar 2007 07:26:26 -0000 1.4 --- Makefile.am 17 May 2007 17:49:23 -0000 1.5 *************** *** 130,133 **** --- 130,134 ---- sceneserver/camera.cpp \ sceneserver/camera_c.cpp \ + sceneserver/scenedict.cpp \ simulationserver/simulationserver.h \ simulationserver/simulationserver.cpp \ Index: oxygen.vcproj =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/oxygen.vcproj,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** oxygen.vcproj 15 Mar 2007 07:26:26 -0000 1.2 --- oxygen.vcproj 17 May 2007 17:49:23 -0000 1.3 *************** *** 732,735 **** --- 732,743 ---- </File> <File + RelativePath=".\sceneserver\scenedict.cpp" + > + </File> + <File + RelativePath=".\sceneserver\scenedict.h" + > + </File> + <File RelativePath=".\sceneserver\sceneimporter.h" > |
From: Markus R. <rol...@us...> - 2007-05-17 17:46:50
|
Update of /cvsroot/simspark/simspark/spark/zeitgeist In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv15732 Modified Files: leaf.cpp leaf.h node.cpp node.h Log Message: (merged from RSGEDIT_FILEREF) Index: node.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/zeitgeist/node.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** node.h 5 Dec 2005 20:59:18 -0000 1.1 --- node.h 17 May 2007 17:46:45 -0000 1.2 *************** *** 83,86 **** --- 83,89 ---- virtual bool IsLeaf() const; + /** returns the total number of children */ + virtual int GetNumberOfChildren() const; + /** update variables from a script */ virtual void UpdateCached(); *************** *** 131,150 **** boost::shared_ptr<Node> node = boost::shared_static_cast<Node>(make_shared(GetParent())); ! while (node.get() != 0) { boost::shared_ptr<CLASS> test = boost::shared_dynamic_cast<CLASS>(node); ! if (test.get() != 0) { return test; } ! //node = boost::shared_static_cast<Node>(make_shared(node->GetParent())); node = boost::shared_static_cast<Node>(node->GetParent().lock()); ! } ! return boost::shared_ptr<CLASS>(); } --- 134,153 ---- boost::shared_ptr<Node> node = boost::shared_static_cast<Node>(make_shared(GetParent())); ! while (node.get() != 0) { boost::shared_ptr<CLASS> test = boost::shared_dynamic_cast<CLASS>(node); ! if (test.get() != 0) { return test; } ! //node = boost::shared_static_cast<Node>(make_shared(node->GetParent())); node = boost::shared_static_cast<Node>(node->GetParent().lock()); ! } ! return boost::shared_ptr<CLASS>(); } Index: leaf.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/zeitgeist/leaf.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** leaf.cpp 15 Mar 2007 07:26:31 -0000 1.2 --- leaf.cpp 17 May 2007 17:46:45 -0000 1.3 *************** *** 23,26 **** --- 23,27 ---- #include "node.h" #include <iostream> + #include <sstream> using namespace boost; *************** *** 112,115 **** --- 113,122 ---- } + int + Leaf::GetNumberOfChildren() const + { + return 0; + } + bool Leaf::IsLeaf() const { *************** *** 199,209 **** void Leaf::SetParent(const boost::shared_ptr<Node> &newParent) { ! shared_ptr<Node> oldParent = make_shared(GetParent()); if (oldParent.get() != 0) { // we have a parent, so update our state - shared_ptr<Leaf> self - = shared_static_cast<Leaf>(make_shared(GetSelf())); - // here reference count should be > 1 (at least one in the // parent, and one in this routine) --- 206,215 ---- void Leaf::SetParent(const boost::shared_ptr<Node> &newParent) { ! shared_ptr<Node> oldParent = GetParent().lock(); ! shared_ptr<Leaf> self = shared_static_cast<Leaf>(GetSelf().lock()); ! if (oldParent.get() != 0) { // we have a parent, so update our state // here reference count should be > 1 (at least one in the // parent, and one in this routine) *************** *** 229,237 **** mParent = newParent; ! if (! mParent.expired()) { ! // we have been linked, so now we can do something :) ! OnLink(); } } --- 235,255 ---- mParent = newParent; ! if (newParent.get() == 0) { ! return; ! } ! ! // assure a unique name among our siblings ! shared_ptr<Leaf> sibling = newParent->GetChild(mName); ! ! if (sibling != self) ! { ! stringstream ss; ! ss << mName << "_" << newParent->GetNumberOfChildren() << ">"; ! mName = ss.str().c_str(); } + + // we have been linked, so now we can do something :) + OnLink(); } Index: leaf.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/zeitgeist/leaf.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** leaf.h 15 Mar 2007 07:26:31 -0000 1.2 --- leaf.h 17 May 2007 17:46:45 -0000 1.3 *************** *** 220,223 **** --- 220,226 ---- virtual bool IsLeaf() const; + /** returns the total number of children */ + virtual int GetNumberOfChildren() const; + /** removes base from the set of children. */ virtual void RemoveChildReference(const boost::shared_ptr<Leaf> &base); Index: node.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/zeitgeist/node.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** node.cpp 15 Mar 2007 07:26:31 -0000 1.2 --- node.cpp 17 May 2007 17:46:45 -0000 1.3 *************** *** 184,187 **** --- 184,193 ---- } + int + Node::GetNumberOfChildren() const + { + return static_cast<int>(mChildren.size()); + } + bool Node::IsLeaf() const |
From: Markus R. <rol...@us...> - 2007-05-17 17:43:21
|
Update of /cvsroot/simspark/simspark/spark/utility/sfsexp In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv14475 Modified Files: parser.c Log Message: (merged from RSGEDIT_FILEREF) - maintain a line counter in the continuation struct that is incremented whenever a new line is parsed Index: parser.c =================================================================== RCS file: /cvsroot/simspark/simspark/spark/utility/sfsexp/parser.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** parser.c 19 Dec 2005 19:13:30 -0000 1.1 --- parser.c 17 May 2007 17:43:17 -0000 1.2 *************** *** 330,333 **** --- 330,334 ---- cc->qdepth = 0; cc->squoted = 0; + cc->line = 1; return cc; *************** *** 458,461 **** --- 459,464 ---- t = s; cc->sbuffer = str; + + cc->line = 1; } *************** *** 487,490 **** --- 490,497 ---- /* space,tab,CR,LF considered white space */ case '\n': + cc->line++; + t++; + break; + case ' ': case '\t': *************** *** 567,571 **** sx->next = NULL; sx->list = NULL; ! if (stack->height < 1) { --- 574,579 ---- sx->next = NULL; sx->list = NULL; ! sx->line = cc->line; ! if (stack->height < 1) { *************** *** 707,711 **** sx->val_allocated = val_allocated; sx->val_used = val_used; ! sx->next = NULL; if (squoted != 0) sx->aty = SEXP_SQUOTE; --- 715,721 ---- sx->val_allocated = val_allocated; sx->val_used = val_used; ! sx->next = NULL; ! sx->line = cc->line; ! if (squoted != 0) sx->aty = SEXP_SQUOTE; *************** *** 837,841 **** sx->val_used = val_used; sx->val_allocated = val_allocated; ! sx->next = NULL; if (squoted == 1) { --- 847,852 ---- sx->val_used = val_used; sx->val_allocated = val_allocated; ! sx->next = NULL; ! sx->line = cc->line; if (squoted == 1) { *************** *** 993,996 **** --- 1004,1008 ---- sx->next = NULL; sx->aty = SEXP_SQUOTE; + sx->line = cc->line; val = (char *)malloc(sizeof(char)*sexp_val_start_size); *************** *** 1060,1063 **** --- 1072,1076 ---- case 11: if (t[0] == '\n') { + cc->line++; state = 1; } *************** *** 1161,1164 **** --- 1174,1178 ---- sx->next = NULL; sx->aty = SEXP_BINARY; + sx->line = cc->line; bindata = NULL; |