Update of /cvsroot/simspark/simspark/spark/plugin/sparkagent In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv7790/spark/plugin/sparkagent Modified Files: hinge2effector.cpp hinge2effector.h hinge2perceptor.cpp hinge2perceptor.h hingeeffector.cpp hingeeffector.h hingeperceptor.cpp hingeperceptor.h timeperceptor.cpp universaljointeffector.cpp universaljointeffector.h universaljointperceptor.cpp universaljointperceptor.h Added Files: sparkagent.vcproj Log Message: Merged WIN32 branch back to main trunk (access previous version with tag pre_merge_WIN32) Index: hinge2effector.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/plugin/sparkagent/hinge2effector.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** hinge2effector.h 2 Jan 2006 18:11:33 -0000 1.2 --- hinge2effector.h 15 Mar 2007 07:26:29 -0000 1.3 *************** *** 23,30 **** #define HINGE2EFFECTOR_H ! #include <oxygen/agentaspect/effector.h> #include <oxygen/physicsserver/hinge2joint.h> ! class Hinge2Effector : public oxygen::Effector { public: --- 23,30 ---- #define HINGE2EFFECTOR_H ! #include <oxygen/agentaspect/jointeffector.h> #include <oxygen/physicsserver/hinge2joint.h> ! class Hinge2Effector : public oxygen::JointEffector<oxygen::Hinge2Joint> { public: *************** *** 41,56 **** virtual boost::shared_ptr<oxygen::ActionObject> GetActionObject(const oxygen::Predicate& predicate); - - protected: - /** setup the reference to the Hinge2Joint parent node */ - virtual void OnLink(); - - /** remove the reference to the Hinge2Joint parent node */ - virtual void OnUnlink(); - - protected: - /** cached reference to the monitor joint */ - boost::shared_ptr<oxygen::Hinge2Joint> mJoint; - }; --- 41,44 ---- Index: hinge2perceptor.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/plugin/sparkagent/hinge2perceptor.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** hinge2perceptor.cpp 2 Jan 2006 18:11:33 -0000 1.2 --- hinge2perceptor.cpp 15 Mar 2007 07:26:29 -0000 1.3 *************** *** 28,32 **** using namespace std; ! Hinge2Perceptor::Hinge2Perceptor() : Perceptor() { } --- 28,33 ---- using namespace std; ! Hinge2Perceptor::Hinge2Perceptor() ! : JointPerceptor<Hinge2Joint>::JointPerceptor() { } *************** *** 36,60 **** } - void Hinge2Perceptor::OnLink() - { - mJoint = make_shared(FindParentSupportingClass<Hinge2Joint>()); - - if (mJoint.get() == 0) - { - GetLog()->Error() - << "(Hinge2Perceptor) ERROR: found no Hinge2Joint parent\n"; - } - - } - - void Hinge2Perceptor::OnUnlink() - { - mJoint.reset(); - } - void Hinge2Perceptor::InsertAxisAngle(Predicate& predicate, Joint::EAxisIndex idx) { ParameterList& axisElement = predicate.parameter.AddList(); ! axisElement.AddValue(string("axis")); axisElement.AddValue(static_cast<int>(idx)); axisElement.AddValue(mJoint->GetAngle(idx)); --- 37,44 ---- } void Hinge2Perceptor::InsertAxisAngle(Predicate& predicate, Joint::EAxisIndex idx) { ParameterList& axisElement = predicate.parameter.AddList(); ! axisElement.AddValue(string("ax")); axisElement.AddValue(static_cast<int>(idx)); axisElement.AddValue(mJoint->GetAngle(idx)); *************** *** 64,68 **** { ParameterList& axisElement = predicate.parameter.AddList(); ! axisElement.AddValue(string("rate")); axisElement.AddValue(static_cast<int>(idx)); axisElement.AddValue(mJoint->GetAngleRate(idx)); --- 48,52 ---- { ParameterList& axisElement = predicate.parameter.AddList(); ! axisElement.AddValue(string("rt")); axisElement.AddValue(static_cast<int>(idx)); axisElement.AddValue(mJoint->GetAngleRate(idx)); *************** *** 77,81 **** Predicate& predicate = predList->AddPredicate(); ! predicate.name = "hinge2"; predicate.parameter.Clear(); --- 61,65 ---- Predicate& predicate = predList->AddPredicate(); ! predicate.name = "H2J"; predicate.parameter.Clear(); *************** *** 85,89 **** InsertAxisAngle(predicate,Joint::AI_FIRST); ! InsertAxisRate(predicate,Joint::AI_SECOND); return true; --- 69,73 ---- InsertAxisAngle(predicate,Joint::AI_FIRST); ! // InsertAxisRate(predicate,Joint::AI_SECOND); return true; Index: universaljointperceptor.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/plugin/sparkagent/universaljointperceptor.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** universaljointperceptor.h 6 Jan 2006 13:57:36 -0000 1.1 --- universaljointperceptor.h 15 Mar 2007 07:26:29 -0000 1.2 *************** *** 21,28 **** #define UNIVERSALJOINTPERCEPTOR_H ! #include <oxygen/agentaspect/perceptor.h> #include <oxygen/physicsserver/universaljoint.h> ! class UniversalJointPerceptor : public oxygen::Perceptor { public: --- 21,28 ---- #define UNIVERSALJOINTPERCEPTOR_H ! #include <oxygen/agentaspect/jointperceptor.h> #include <oxygen/physicsserver/universaljoint.h> ! class UniversalJointPerceptor : public oxygen::JointPerceptor<oxygen::UniversalJoint> { public: *************** *** 34,46 **** protected: - virtual void OnLink(); - virtual void OnUnlink(); - void InsertAxisAngle(oxygen::Predicate& predicate, oxygen::Joint::EAxisIndex idx); void InsertAxisRate(oxygen::Predicate& predicate, oxygen::Joint::EAxisIndex idx); - - protected: - /** cached reference to the monitor joint */ - boost::shared_ptr<oxygen::UniversalJoint> mJoint; }; --- 34,39 ---- Index: universaljointeffector.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/plugin/sparkagent/universaljointeffector.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** universaljointeffector.h 6 Jan 2006 13:57:36 -0000 1.1 --- universaljointeffector.h 15 Mar 2007 07:26:29 -0000 1.2 *************** *** 21,28 **** #define UNIVERSALJOINTEFFECTOR_H ! #include <oxygen/agentaspect/effector.h> #include <oxygen/physicsserver/universaljoint.h> ! class UniversalJointEffector : public oxygen::Effector { public: --- 21,28 ---- #define UNIVERSALJOINTEFFECTOR_H ! #include <oxygen/agentaspect/jointeffector.h> #include <oxygen/physicsserver/universaljoint.h> ! class UniversalJointEffector : public oxygen::JointEffector<oxygen::UniversalJoint> { public: *************** *** 39,54 **** virtual boost::shared_ptr<oxygen::ActionObject> GetActionObject(const oxygen::Predicate& predicate); - - protected: - /** setup the reference to the HingeJoint parent node */ - virtual void OnLink(); - - /** remove the reference to the HingeJoint parent node */ - virtual void OnUnlink(); - - protected: - /** cached reference to the monitor joint */ - boost::shared_ptr<oxygen::UniversalJoint> mJoint; - }; --- 39,42 ---- Index: timeperceptor.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/plugin/sparkagent/timeperceptor.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** timeperceptor.cpp 2 Jan 2006 18:11:33 -0000 1.2 --- timeperceptor.cpp 15 Mar 2007 07:26:29 -0000 1.3 *************** *** 68,74 **** nowElement.AddValue(mSimulationServer->GetTime()); ! ParameterList& stepElement = predicate.parameter.AddList(); ! stepElement.AddValue(string("step")); ! stepElement.AddValue(mSimulationServer->GetSimStep()); return true; --- 68,74 ---- nowElement.AddValue(mSimulationServer->GetTime()); ! // ParameterList& stepElement = predicate.parameter.AddList(); ! // stepElement.AddValue(string("st")); ! // stepElement.AddValue(mSimulationServer->GetSimStep()); return true; Index: hingeeffector.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/plugin/sparkagent/hingeeffector.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** hingeeffector.h 2 Jan 2006 18:11:33 -0000 1.1 --- hingeeffector.h 15 Mar 2007 07:26:29 -0000 1.2 *************** *** 21,28 **** #define HINGEEFFECTOR_H ! #include <oxygen/agentaspect/effector.h> #include <oxygen/physicsserver/hingejoint.h> ! class HingeEffector : public oxygen::Effector { public: --- 21,28 ---- #define HINGEEFFECTOR_H ! #include <oxygen/agentaspect/jointeffector.h> #include <oxygen/physicsserver/hingejoint.h> ! class HingeEffector : public oxygen::JointEffector<oxygen::HingeJoint> { public: *************** *** 39,54 **** virtual boost::shared_ptr<oxygen::ActionObject> GetActionObject(const oxygen::Predicate& predicate); - - protected: - /** setup the reference to the HingeJoint parent node */ - virtual void OnLink(); - - /** remove the reference to the HingeJoint parent node */ - virtual void OnUnlink(); - - protected: - /** cached reference to the monitor joint */ - boost::shared_ptr<oxygen::HingeJoint> mJoint; - }; --- 39,42 ---- Index: hinge2perceptor.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/plugin/sparkagent/hinge2perceptor.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** hinge2perceptor.h 2 Jan 2006 18:11:33 -0000 1.2 --- hinge2perceptor.h 15 Mar 2007 07:26:29 -0000 1.3 *************** *** 23,30 **** #define HINGE2PERCEPTOR_H ! #include <oxygen/agentaspect/perceptor.h> #include <oxygen/physicsserver/hinge2joint.h> ! class Hinge2Perceptor : public oxygen::Perceptor { public: --- 23,30 ---- #define HINGE2PERCEPTOR_H ! #include <oxygen/agentaspect/jointperceptor.h> #include <oxygen/physicsserver/hinge2joint.h> ! class Hinge2Perceptor : public oxygen::JointPerceptor<oxygen::Hinge2Joint> { public: *************** *** 36,49 **** protected: - virtual void OnLink(); - virtual void OnUnlink(); - void InsertAxisAngle(oxygen::Predicate& predicate, oxygen::Joint::EAxisIndex idx); void InsertAxisRate(oxygen::Predicate& predicate, oxygen::Joint::EAxisIndex idx); - - - protected: - /** cached reference to the monitor joint */ - boost::shared_ptr<oxygen::Hinge2Joint> mJoint; }; --- 36,41 ---- Index: universaljointeffector.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/plugin/sparkagent/universaljointeffector.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** universaljointeffector.cpp 24 Jan 2006 19:16:32 -0000 1.2 --- universaljointeffector.cpp 15 Mar 2007 07:26:29 -0000 1.3 *************** *** 27,33 **** using namespace std; ! UniversalJointEffector::UniversalJointEffector() : Effector() { - SetName("universaljoint"); } --- 27,33 ---- using namespace std; ! UniversalJointEffector::UniversalJointEffector() ! : JointEffector<UniversalJoint>::JointEffector("universaljoint") { } *************** *** 100,117 **** return shared_ptr<ActionObject>(); } - - void UniversalJointEffector::OnLink() - { - mJoint = make_shared(FindParentSupportingClass<UniversalJoint>()); - - if (mJoint.get() == 0) - { - GetLog()->Error() - << "(UniversalJointEffector) ERROR: found no UniversalJoint parent\n"; - } - } - - void UniversalJointEffector::OnUnlink() - { - mJoint.reset(); - } --- 100,101 ---- Index: universaljointperceptor.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/plugin/sparkagent/universaljointperceptor.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** universaljointperceptor.cpp 22 Jan 2006 11:57:40 -0000 1.2 --- universaljointperceptor.cpp 15 Mar 2007 07:26:29 -0000 1.3 *************** *** 26,30 **** using namespace std; ! UniversalJointPerceptor::UniversalJointPerceptor() : Perceptor() { } --- 26,31 ---- using namespace std; ! UniversalJointPerceptor::UniversalJointPerceptor() ! : JointPerceptor<UniversalJoint>::JointPerceptor() { } *************** *** 34,54 **** } - void UniversalJointPerceptor::OnLink() - { - mJoint = make_shared(FindParentSupportingClass<UniversalJoint>()); - - if (mJoint.get() == 0) - { - GetLog()->Error() - << "(UniversalJointPerceptor) ERROR: found no UniversalJoint parent\n"; - } - - } - - void UniversalJointPerceptor::OnUnlink() - { - mJoint.reset(); - } - void UniversalJointPerceptor::InsertAxisAngle(Predicate& predicate, Joint::EAxisIndex idx) { --- 35,38 ---- *************** *** 56,65 **** if (idx == Joint::AI_FIRST) { ! axisElement.AddValue(string("axis1")); axisElement.AddValue(mJoint->GetAngle(Joint::AI_FIRST)); } else { ! axisElement.AddValue(string("axis2")); axisElement.AddValue(mJoint->GetAngle(Joint::AI_SECOND)); } --- 40,49 ---- if (idx == Joint::AI_FIRST) { ! axisElement.AddValue(string("ax1")); axisElement.AddValue(mJoint->GetAngle(Joint::AI_FIRST)); } else { ! axisElement.AddValue(string("ax2")); axisElement.AddValue(mJoint->GetAngle(Joint::AI_SECOND)); } *************** *** 71,80 **** if (idx == Joint::AI_FIRST) { ! axisElement.AddValue(string("rate1")); axisElement.AddValue(mJoint->GetAngleRate(Joint::AI_FIRST)); } else { ! axisElement.AddValue(string("rate2")); axisElement.AddValue(mJoint->GetAngleRate(Joint::AI_SECOND)); } --- 55,64 ---- if (idx == Joint::AI_FIRST) { ! axisElement.AddValue(string("rt1")); axisElement.AddValue(mJoint->GetAngleRate(Joint::AI_FIRST)); } else { ! axisElement.AddValue(string("rt2")); axisElement.AddValue(mJoint->GetAngleRate(Joint::AI_SECOND)); } *************** *** 97,106 **** InsertAxisAngle(predicate, Joint::AI_FIRST); ! InsertAxisRate(predicate, Joint::AI_FIRST); InsertAxisAngle(predicate, Joint::AI_SECOND); ! InsertAxisRate(predicate, Joint::AI_SECOND); return true; } - - --- 81,88 ---- InsertAxisAngle(predicate, Joint::AI_FIRST); ! // InsertAxisRate(predicate, Joint::AI_FIRST); InsertAxisAngle(predicate, Joint::AI_SECOND); ! // InsertAxisRate(predicate, Joint::AI_SECOND); return true; } --- NEW FILE: sparkagent.vcproj --- <?xml version="1.0" encoding="Windows-1252"?> <VisualStudioProject ProjectType="Visual C++" Version="8,00" Name="sparkagent" ProjectGUID="{9E5D17FC-5665-48A8-9298-747A3D690787}" RootNamespace="sparkagent" Keyword="Win32Proj" > <Platforms> <Platform Name="Win32" /> </Platforms> <ToolFiles> </ToolFiles> <Configurations> <Configuration Name="Debug|Win32" OutputDirectory="$(SolutionDir)$(ConfigurationName)" IntermediateDirectory="$(ConfigurationName)" ConfigurationType="2" CharacterSet="0" > <Tool Name="VCPreBuildEventTool" /> <Tool Name="VCCustomBuildTool" /> <Tool Name="VCXMLDataGeneratorTool" /> <Tool Name="VCWebServiceProxyGeneratorTool" /> <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\win32;..\..\;..\..\utility" PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_CONFIG_H" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" WarningLevel="3" Detect64BitPortabilityProblems="true" DebugInformationFormat="4" /> <Tool Name="VCManagedResourceCompilerTool" /> <Tool Name="VCResourceCompilerTool" /> <Tool Name="VCPreLinkEventTool" /> <Tool Name="VCLinkerTool" AdditionalDependencies="msvcrt-ruby18.lib ode.lib" LinkIncremental="2" GenerateDebugInformation="true" SubSystem="2" TargetMachine="1" /> <Tool Name="VCALinkTool" /> <Tool Name="VCManifestTool" /> <Tool Name="VCXDCMakeTool" /> <Tool Name="VCBscMakeTool" /> <Tool Name="VCFxCopTool" /> <Tool Name="VCAppVerifierTool" /> <Tool Name="VCWebDeploymentTool" /> <Tool Name="VCPostBuildEventTool" /> </Configuration> <Configuration Name="VCRelease|Win32" OutputDirectory="$(SolutionDir)$(ConfigurationName)" IntermediateDirectory="$(ConfigurationName)" ConfigurationType="2" CharacterSet="0" WholeProgramOptimization="1" > <Tool Name="VCPreBuildEventTool" /> <Tool Name="VCCustomBuildTool" /> <Tool Name="VCXMLDataGeneratorTool" /> <Tool Name="VCWebServiceProxyGeneratorTool" /> <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" AdditionalIncludeDirectories="..\..\win32;..\..\;..\..\utility" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_CONFIG_H" RuntimeLibrary="2" UsePrecompiledHeader="0" WarningLevel="3" Detect64BitPortabilityProblems="true" DebugInformationFormat="3" /> <Tool Name="VCManagedResourceCompilerTool" /> <Tool Name="VCResourceCompilerTool" /> <Tool Name="VCPreLinkEventTool" /> <Tool Name="VCLinkerTool" AdditionalDependencies="msvcrt-ruby18.lib ode.lib" LinkIncremental="1" GenerateDebugInformation="true" SubSystem="2" OptimizeReferences="2" EnableCOMDATFolding="2" TargetMachine="1" /> <Tool Name="VCALinkTool" /> <Tool Name="VCManifestTool" /> <Tool Name="VCXDCMakeTool" /> <Tool Name="VCBscMakeTool" /> <Tool Name="VCFxCopTool" /> <Tool Name="VCAppVerifierTool" /> <Tool Name="VCWebDeploymentTool" /> <Tool Name="VCPostBuildEventTool" /> </Configuration> </Configurations> <References> </References> <Files> <File RelativePath=".\export.cpp" > </File> <File RelativePath=".\hinge2action.h" > </File> <File RelativePath=".\hinge2effector.cpp" > </File> <File RelativePath=".\hinge2effector.h" > </File> <File RelativePath=".\hinge2effector_c.cpp" > </File> <File RelativePath=".\hinge2perceptor.cpp" > </File> <File RelativePath=".\hinge2perceptor.h" > </File> <File RelativePath=".\hinge2perceptor_c.cpp" > </File> <File RelativePath=".\hingeaction.h" > </File> <File RelativePath=".\hingeeffector.cpp" > </File> <File RelativePath=".\hingeeffector.h" > </File> <File RelativePath=".\hingeeffector_c.cpp" > </File> <File RelativePath=".\hingeperceptor.cpp" > </File> <File RelativePath=".\hingeperceptor.h" > </File> <File RelativePath=".\hingeperceptor_c.cpp" > </File> <File RelativePath=".\timeperceptor.cpp" > </File> <File RelativePath=".\timeperceptor.h" > </File> <File RelativePath=".\timeperceptor_c.cpp" > </File> <File RelativePath=".\universaljointaction.h" > </File> <File RelativePath=".\universaljointeffector.cpp" > </File> <File RelativePath=".\universaljointeffector.h" > </File> <File RelativePath=".\universaljointeffector_c.cpp" > </File> <File RelativePath=".\universaljointperceptor.cpp" > </File> <File RelativePath=".\universaljointperceptor.h" > </File> <File RelativePath=".\universaljointperceptor_c.cpp" > </File> </Files> <Globals> </Globals> </VisualStudioProject> Index: hingeperceptor.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/plugin/sparkagent/hingeperceptor.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** hingeperceptor.cpp 2 Jan 2006 18:11:33 -0000 1.1 --- hingeperceptor.cpp 15 Mar 2007 07:26:29 -0000 1.2 *************** *** 26,30 **** using namespace std; ! HingePerceptor::HingePerceptor() : Perceptor() { } --- 26,31 ---- using namespace std; ! HingePerceptor::HingePerceptor() ! : JointPerceptor<HingeJoint>::JointPerceptor() { } *************** *** 34,58 **** } - void HingePerceptor::OnLink() - { - mJoint = make_shared(FindParentSupportingClass<HingeJoint>()); - - if (mJoint.get() == 0) - { - GetLog()->Error() - << "(HingePerceptor) ERROR: found no HingeJoint parent\n"; - } - - } - - void HingePerceptor::OnUnlink() - { - mJoint.reset(); - } - void HingePerceptor::InsertAxisAngle(Predicate& predicate) { ParameterList& axisElement = predicate.parameter.AddList(); ! axisElement.AddValue(string("axis")); axisElement.AddValue(mJoint->GetAngle()); } --- 35,42 ---- } void HingePerceptor::InsertAxisAngle(Predicate& predicate) { ParameterList& axisElement = predicate.parameter.AddList(); ! axisElement.AddValue(string("ax")); axisElement.AddValue(mJoint->GetAngle()); } *************** *** 61,65 **** { ParameterList& axisElement = predicate.parameter.AddList(); ! axisElement.AddValue(string("rate")); axisElement.AddValue(mJoint->GetAngleRate()); } --- 45,49 ---- { ParameterList& axisElement = predicate.parameter.AddList(); ! axisElement.AddValue(string("rt")); axisElement.AddValue(mJoint->GetAngleRate()); } *************** *** 81,85 **** InsertAxisAngle(predicate); ! InsertAxisRate(predicate); return true; --- 65,69 ---- InsertAxisAngle(predicate); ! //InsertAxisRate(predicate); return true; Index: hinge2effector.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/plugin/sparkagent/hinge2effector.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** hinge2effector.cpp 2 Jan 2006 18:11:33 -0000 1.2 --- hinge2effector.cpp 15 Mar 2007 07:26:29 -0000 1.3 *************** *** 28,34 **** using namespace std; ! Hinge2Effector::Hinge2Effector() : Effector() { - SetName("hinge2"); } --- 28,34 ---- using namespace std; ! Hinge2Effector::Hinge2Effector() ! : JointEffector<Hinge2Joint>::JointEffector("hinge2") { } *************** *** 93,111 **** return shared_ptr<ActionObject>(); } - - void Hinge2Effector::OnLink() - { - mJoint = make_shared(FindParentSupportingClass<Hinge2Joint>()); - - if (mJoint.get() == 0) - { - GetLog()->Error() - << "(Hinge2Effector) ERROR: found no Hinge2Joint parent\n"; - } - - } - - void Hinge2Effector::OnUnlink() - { - mJoint.reset(); - } --- 93,94 ---- Index: hingeeffector.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/plugin/sparkagent/hingeeffector.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** hingeeffector.cpp 6 Jan 2006 13:57:36 -0000 1.2 --- hingeeffector.cpp 15 Mar 2007 07:26:29 -0000 1.3 *************** *** 27,33 **** using namespace std; ! HingeEffector::HingeEffector() : Effector() { - SetName("hinge"); } --- 27,33 ---- using namespace std; ! HingeEffector::HingeEffector() ! : JointEffector<HingeJoint>::JointEffector("hinge") { } *************** *** 91,109 **** return shared_ptr<ActionObject>(); } - - void HingeEffector::OnLink() - { - mJoint = make_shared(FindParentSupportingClass<HingeJoint>()); - - if (mJoint.get() == 0) - { - GetLog()->Error() - << "(HingeEffector) ERROR: found no HingeJoint parent\n"; - } - - } - - void HingeEffector::OnUnlink() - { - mJoint.reset(); - } --- 91,92 ---- Index: hingeperceptor.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/plugin/sparkagent/hingeperceptor.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** hingeperceptor.h 2 Jan 2006 18:11:33 -0000 1.1 --- hingeperceptor.h 15 Mar 2007 07:26:29 -0000 1.2 *************** *** 21,28 **** #define HINGEPERCEPTOR_H ! #include <oxygen/agentaspect/perceptor.h> #include <oxygen/physicsserver/hingejoint.h> ! class HingePerceptor : public oxygen::Perceptor { public: --- 21,28 ---- #define HINGEPERCEPTOR_H ! #include <oxygen/agentaspect/jointperceptor.h> #include <oxygen/physicsserver/hingejoint.h> ! class HingePerceptor : public oxygen::JointPerceptor<oxygen::HingeJoint> { public: *************** *** 34,46 **** protected: - virtual void OnLink(); - virtual void OnUnlink(); - void InsertAxisAngle(oxygen::Predicate& predicate); void InsertAxisRate(oxygen::Predicate& predicate); - - protected: - /** cached reference to the monitor joint */ - boost::shared_ptr<oxygen::HingeJoint> mJoint; }; --- 34,39 ---- |