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: Markus R. <rol...@us...> - 2007-03-19 00:15:36
|
Update of /cvsroot/simspark/simspark/spark/oxygen/gamecontrolserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv10810 Modified Files: gamecontrolserver.cpp Log Message: - fixed a cast Index: gamecontrolserver.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/gamecontrolserver/gamecontrolserver.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** gamecontrolserver.cpp 15 Mar 2007 07:26:27 -0000 1.2 --- gamecontrolserver.cpp 17 Mar 2007 07:01:02 -0000 1.3 *************** *** 228,232 **** GameControlServer::GetAgentCount() const { ! return mAgentMap.size(); } --- 228,232 ---- GameControlServer::GetAgentCount() const { ! return static_cast<int>(mAgentMap.size()); } |
From: Markus R. <rol...@us...> - 2007-03-19 00:15:36
|
Update of /cvsroot/simspark/simspark/contrib/plugin/soccer/visionperceptor In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv6199/visionperceptor Added Files: visionperceptor.cpp visionperceptor.h visionperceptor_c.cpp Log Message: --- NEW FILE: visionperceptor.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: visionperceptor.cpp,v 1.2 2007/03/17 06:48:38 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 "visionperceptor.h" #include <zeitgeist/logserver/logserver.h> #include <oxygen/sceneserver/scene.h> #include <oxygen/sceneserver/transform.h> #include <soccer/soccerbase/soccerbase.h> using namespace zeitgeist; using namespace oxygen; using namespace boost; using namespace salt; VisionPerceptor::VisionPerceptor() : Perceptor(), mSenseMyPos(false), mAddNoise(true), mUseRandomNoise(true), mStaticSenseAxis(true) { // set predicate name SetPredicateName("Vision"); // set some default noise values SetNoiseParams(0.0965f, 0.1225f, 0.1480f, 0.005f); } VisionPerceptor::~VisionPerceptor() { mDistRng.reset(); mPhiRng.reset(); mThetaRng.reset(); } void VisionPerceptor::SetNoiseParams(float sigma_dist, float sigma_phi, float sigma_theta, float cal_error_abs) { mSigmaDist = sigma_dist; mSigmaPhi = sigma_phi; mSigmaTheta = sigma_theta; mCalErrorAbs = cal_error_abs; NormalRngPtr rng1(new salt::NormalRNG<>(0.0,sigma_dist)); mDistRng = rng1; NormalRngPtr rng2(new salt::NormalRNG<>(0.0,sigma_phi)); mPhiRng = rng2; NormalRngPtr rng3(new salt::NormalRNG<>(0.0,sigma_theta)); mThetaRng = rng3; salt::UniformRNG<float> rng4(-mCalErrorAbs,mCalErrorAbs); mError = salt::Vector3f(rng4(),rng4(),rng4()); } void VisionPerceptor::OnLink() { SoccerBase::GetTransformParent(*this,mTransformParent); SoccerBase::GetAgentState(*this, mAgentState); SoccerBase::GetActiveScene(*this,mActiveScene); } void VisionPerceptor::OnUnlink() { mDistRng.reset(); mPhiRng.reset(); mThetaRng.reset(); mTransformParent.reset(); mAgentState.reset(); mActiveScene.reset(); } void VisionPerceptor::AddNoise(bool add_noise) { mAddNoise = add_noise; } void VisionPerceptor::UseRandomNoise(bool random_noise) { mUseRandomNoise = random_noise; } void VisionPerceptor::SetStaticSenseAxis(bool static_axis) { mStaticSenseAxis = static_axis; } bool VisionPerceptor::ConstructInternal() { mRay = shared_static_cast<oxygen::RayCollider> (GetCore()->New("oxygen/RayCollider")); if (mRay.get() == 0) { GetLog()->Error() << "Error: (VisionPerceptor) cannot create Raycollider. " << "occlusion check disabled\n"; } return true; } void VisionPerceptor::SetupVisibleObjects(TObjectList& visibleObjects) { TLeafList objectList; mActiveScene->ListChildrenSupportingClass<ObjectState>(objectList, true); salt::Vector3f myPos = mTransformParent->GetWorldTransform().Pos(); for (TLeafList::iterator i = objectList.begin(); i != objectList.end(); ++i) { ObjectData od; od.mObj = shared_static_cast<ObjectState>(*i); if (od.mObj.get() == 0) { GetLog()->Error() << "Error: (VisionPerceptor) skipped: " << (*i)->GetName() << "\n"; continue; // this should never happen } shared_ptr<Transform> j = od.mObj->GetTransformParent(); if (j.get() == 0) { continue; // this should never happen } od.mRelPos = j->GetWorldTransform().Pos() - myPos; od.mDist = od.mRelPos.Length(); visibleObjects.push_back(od); } } void VisionPerceptor::AddSense(oxygen::Predicate& predicate, ObjectData& od) const { ParameterList& element = predicate.parameter.AddList(); element.AddValue(od.mObj->GetPerceptName()); if(od.mObj->GetPerceptName() == "Player") { ParameterList player; player.AddValue(std::string("team")); player.AddValue (std::string (od.mObj->GetPerceptName(ObjectState::PT_Player) ) ); element.AddValue(player); } if (!od.mObj->GetID().empty()) { ParameterList id; id.AddValue(std::string("id")); id.AddValue(od.mObj->GetID()); element.AddValue(id); } ParameterList& position = element.AddList(); position.AddValue(std::string("pol")); position.AddValue(od.mDist); position.AddValue(od.mTheta); position.AddValue(od.mPhi); } void VisionPerceptor::ApplyNoise(ObjectData& od) const { if (mAddNoise) { if (mUseRandomNoise) { od.mDist += (*(mDistRng.get()))() * od.mDist / 100.0f; od.mTheta += (*(mThetaRng.get()))(); od.mPhi += (*(mPhiRng.get()))(); } else { /* This gives a constant random error throughout the whole * match. This behavior was not intended and is a bug and * not an intended feature. * It was kept in the simulator because I discovered this * bug only shortly before the competition. *sigh* oliver */ od.mDist += salt::NormalRNG<>(0.0,mSigmaDist)(); od.mTheta += salt::NormalRNG<>(0.0,mSigmaTheta)(); od.mPhi += salt::NormalRNG<>(0.0,mSigmaPhi)(); } } } bool VisionPerceptor::StaticAxisPercept(boost::shared_ptr<PredicateList> predList) { Predicate& predicate = predList->AddPredicate(); predicate.name = mPredicateName; predicate.parameter.Clear(); TTeamIndex ti = mAgentState->GetTeamIndex(); salt::Vector3f myPos = mTransformParent->GetWorldTransform().Pos(); TObjectList visibleObjects; SetupVisibleObjects(visibleObjects); for (std::list<ObjectData>::iterator i = visibleObjects.begin(); i != visibleObjects.end(); ++i) { ObjectData& od = (*i); od.mRelPos = SoccerBase::FlipView(od.mRelPos, ti); if (mAddNoise) { od.mRelPos += mError; } if ( (od.mRelPos.Length() <= 0.1) || (CheckOcclusion(myPos,od)) ) { // object is occluded or too close continue; } // theta is the angle in the X-Y (horizontal) plane od.mTheta = salt::gRadToDeg(salt::gArcTan2(od.mRelPos[1], od.mRelPos[0])); // latitude od.mPhi = 90.0 - salt::gRadToDeg(salt::gArcCos(od.mRelPos[2]/od.mDist)); // make some noise ApplyNoise(od); // generate a sense entry AddSense(predicate,od); } if (mSenseMyPos) { Vector3f sensedMyPos = SoccerBase::FlipView(myPos, ti); ParameterList& element = predicate.parameter.AddList(); element.AddValue(std::string("mypos")); element.AddValue(sensedMyPos[0]); element.AddValue(sensedMyPos[1]); element.AddValue(sensedMyPos[2]); } return true; } bool VisionPerceptor::DynamicAxisPercept(boost::shared_ptr<PredicateList> predList) { Predicate& predicate = predList->AddPredicate(); predicate.name = mPredicateName; predicate.parameter.Clear(); TTeamIndex ti = mAgentState->GetTeamIndex(); const Vector3f& up = mTransformParent->GetWorldTransform().Up(); // calc the percptors angle in the horizontal plane double fwTheta = gNormalizeRad(Vector2f(up[0],up[1]).GetAngleRad()); // calc the perceptors angle in the vertical plane double fwPhi = gNormalizeRad(Vector2f(up[0],up[2]).GetAngleRad()); TObjectList visibleObjects; SetupVisibleObjects(visibleObjects); for (std::list<ObjectData>::iterator i = visibleObjects.begin(); i != visibleObjects.end(); ++i) { ObjectData& od = (*i); od.mRelPos = SoccerBase::FlipView(od.mRelPos, ti); if (mAddNoise) { od.mRelPos += mError; } if (od.mRelPos.Length() <= 0.1) { // object is too close continue; } // theta is the angle in horizontal plane, with fwAngle as 0 degree od.mTheta = gRadToDeg(gNormalizeRad( Vector2f(od.mRelPos[0],od.mRelPos[1]).GetAngleRad() - fwTheta )); // latitude with fwPhi as 0 degreee od.mPhi = gRadToDeg(gNormalizeRad( Vector2f(od.mRelPos[0],od.mRelPos[2]).GetAngleRad() - fwPhi )); // make some noise ApplyNoise(od); // generate a sense entry AddSense(predicate,od); } return true; } bool VisionPerceptor::Percept(boost::shared_ptr<PredicateList> predList) { if ( (mTransformParent.get() == 0) || (mActiveScene.get() == 0) || (mAgentState.get() == 0) ) { return false; } return mStaticSenseAxis ? StaticAxisPercept(predList) : DynamicAxisPercept(predList); } bool VisionPerceptor::CheckOcclusion(const Vector3f& my_pos, const ObjectData& od) const { // (occlusion test disabled for now, every object is visible) return false; } void VisionPerceptor::SetSenseMyPos(bool sense) { mSenseMyPos = sense; } --- NEW FILE: visionperceptor.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: visionperceptor.h,v 1.2 2007/03/17 06:48:38 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 VISIONPERCEPTOR_H #define VISIONPERCEPTOR_H #include <salt/random.h> #include <oxygen/agentaspect/perceptor.h> #include <oxygen/physicsserver/raycollider.h> #include <oxygen/sceneserver/sceneserver.h> #include <oxygen/sceneserver/transform.h> #include <soccer/agentstate/agentstate.h> class VisionPerceptor : public oxygen::Perceptor { protected: typedef boost::shared_ptr<salt::NormalRNG<> > NormalRngPtr; struct ObjectData { boost::shared_ptr<ObjectState> mObj; float mTheta; // angle in the X-Y (horizontal) plane float mPhi; // latitude angle float mDist; // distance between perceptor and object salt::Vector3f mRelPos; ObjectData& operator=(const ObjectData& rhs) { mObj = rhs.mObj; mRelPos = rhs.mRelPos; mTheta = rhs.mTheta; mPhi = rhs.mPhi; mDist = rhs.mDist; } int operator==(const ObjectData& rhs) const { return mDist == rhs.mDist; } int operator<(const ObjectData& rhs) const { return mDist < rhs.mDist; } }; typedef std::list<ObjectData> TObjectList; public: VisionPerceptor(); virtual ~VisionPerceptor(); //! \return true, if valid data is available and false otherwise. bool Percept(boost::shared_ptr<oxygen::PredicateList> predList); /** Set the noise parameters of the vision perceptor. * * This will always create new calibration error values. * The random noise added each step is normally distributed around 0.0. * The (fixed) calibration error is calculated once for each axis. It * is uniformly distributed between -cal_error_abs and cal_error_abs and * added to the "camera" coordinates. * * \param sigma_dist the sigma for the distance error distribution * \param sigma_phi the sigma for the horizontal angle error distribution * \param sigma_theta the sigma for the latitudal angle error distribution * \param cal_error_abs absolute value of the maximum calibration error * along each axis. */ void SetNoiseParams(float sigma_dist, float sigma_phi, float sigma_theta, float cal_error_abs); //! Turn sensing of agent position on/off void SetSenseMyPos(bool sense); /** Turn noise off/on. \param add_noise flag if noise should be used at all. */ void AddNoise(bool add_noise); /** Turn randomization off/on. \param random_noise flag if the measurement noise is randomized each step. */ void UseRandomNoise(bool random_noise); //! Turn senses relative to the X-axis of the team off/on void SetStaticSenseAxis(bool static_axis); protected: /** constructs the internal ray collider */ virtual bool ConstructInternal(); /** prepares a list of visible objects */ void SetupVisibleObjects(TObjectList& visibleObjects); /** Percept implementation for a static relative axis */ bool StaticAxisPercept(boost::shared_ptr<oxygen::PredicateList> predList); /** Percept implementation relative to the current orientation of the VisionPerceptor node */ bool DynamicAxisPercept(boost::shared_ptr<oxygen::PredicateList> predList); /** Checks if the given object is occluded, seen from from my_pos */ bool CheckOcclusion(const salt::Vector3f& my_pos, const ObjectData& od) const; /** constructs a sense entry for the given object in the given predicate*/ void AddSense(oxygen::Predicate& predicate, ObjectData& od) const; /** applies noise to the setup ObjectData */ void ApplyNoise(ObjectData& od) const; virtual void OnLink(); virtual void OnUnlink(); protected: //! vision calibration error salt::Vector3f mError; //! true, if the absolute position of the agent is sensed. bool mSenseMyPos; //! sigma for random measurement error (distance) float mSigmaDist; //! sigma for random measurement error (horizontal angle) float mSigmaTheta; //! sigma for random measurement error (latitudal angle) float mSigmaPhi; //! absolute maximum value of the calibration error float mCalErrorAbs; //! flag if we should noisify the data bool mAddNoise; //! flag if the error should be randomized each step bool mUseRandomNoise; /** flag if the senses are always relative to the X-axis of the team, default true */ bool mStaticSenseAxis; //! ray collider to check occlusion boost::shared_ptr<oxygen::RayCollider> mRay; //! random number generator for distance errors NormalRngPtr mDistRng; //! random number generator for angle errors NormalRngPtr mThetaRng; //! random number generator for angle errors NormalRngPtr mPhiRng; boost::shared_ptr<oxygen::Scene> mActiveScene; //! a reference to the next transorm parent boost::shared_ptr<oxygen::Transform> mTransformParent; //! a reference to the scene server boost::shared_ptr<oxygen::SceneServer> mSceneServer; //! a reference to the agent state boost::shared_ptr<AgentState> mAgentState; }; DECLARE_CLASS(VisionPerceptor); #endif //VISIONPERCEPTOR_H --- NEW FILE: visionperceptor_c.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: visionperceptor_c.cpp,v 1.2 2007/03/17 06:48:38 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 "visionperceptor.h" using namespace boost; using namespace oxygen; using namespace std; FUNCTION(VisionPerceptor,setNoiseParams) { float inDist; float inPhi; float inTheta; float inErrorAbs; if ( (in.GetSize() != 4) || (! in.GetValue(in[0],inDist)) || (! in.GetValue(in[1],inPhi)) || (! in.GetValue(in[2],inTheta)) || (! in.GetValue(in[3],inErrorAbs)) ) { return false; } obj->SetNoiseParams(inDist,inPhi,inTheta,inErrorAbs); return true; } FUNCTION(VisionPerceptor,addNoise) { bool inAddNoise; if ( (in.GetSize() != 1) || (! in.GetValue(in.begin(),inAddNoise)) ) { return false; } obj->AddNoise(inAddNoise); return true; } FUNCTION(VisionPerceptor,useRandomNoise) { bool inRandomNoise; if ( (in.GetSize() != 1) || (! in.GetValue(in.begin(),inRandomNoise)) ) { return false; } obj->UseRandomNoise(inRandomNoise); return true; } FUNCTION(VisionPerceptor,setSenseMyPos) { bool inSenseMyPos; if ( (in.GetSize() != 1) || (! in.GetValue(in.begin(),inSenseMyPos)) ) { return false; } obj->SetSenseMyPos(inSenseMyPos); return true; } FUNCTION(VisionPerceptor,setStaticSenseAxis) { bool inStaticAxis; if ( (in.GetSize() != 1) || (! in.GetValue(in.begin(),inStaticAxis)) ) { return false; } obj->SetStaticSenseAxis(inStaticAxis); return true; } void CLASS(VisionPerceptor)::DefineClass() { DEFINE_BASECLASS(oxygen/Perceptor); DEFINE_FUNCTION(setNoiseParams); DEFINE_FUNCTION(addNoise); DEFINE_FUNCTION(useRandomNoise); DEFINE_FUNCTION(setSenseMyPos); DEFINE_FUNCTION(setStaticSenseAxis); } |
From: Markus R. <rol...@us...> - 2007-03-18 23:52:28
|
Update of /cvsroot/simspark/simspark/contrib/plugin/soccer In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv32380 Added Files: soccer.vcproj Log Message: - readding soccer.vcproj, it got lost in the WIN32 merge --- NEW FILE: soccer.vcproj --- <?xml version="1.0" encoding="Windows-1252"?> <VisualStudioProject ProjectType="Visual C++" Version="8,00" Name="soccer" ProjectGUID="{D6BD532A-E11A-4391-A37C-2D55027EE219}" RootNamespace="soccer" 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="..\..\..\spark\win32;..\..\..\spark;..\..\..\spark\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="..\..\..\spark\win32;..\..\..\spark;..\..\..\spark\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> <Filter Name="objectstate" > <File RelativePath=".\objectstate\objectstate.cpp" > </File> <File RelativePath=".\objectstate\objectstate.h" > </File> <File RelativePath=".\objectstate\objectstate_c.cpp" > </File> </Filter> <Filter Name="soccernode" > <File RelativePath=".\soccernode\soccernode.cpp" > </File> <File RelativePath=".\soccernode\soccernode.h" > </File> <File RelativePath=".\soccernode\soccernode_c.cpp" > </File> </Filter> <Filter Name="agentstate" > <File RelativePath=".\agentstate\agentstate.cpp" > </File> <File RelativePath=".\agentstate\agentstate.h" > </File> <File RelativePath=".\agentstate\agentstate_c.cpp" > </File> </Filter> <Filter Name="soccerbase" > <File RelativePath=".\soccerbase\soccerbase.cpp" > </File> <File RelativePath=".\soccerbase\soccerbase.h" > </File> <File RelativePath=".\soccerbase\soccertypes.h" > </File> </Filter> <Filter Name="visionperceptor" > <File RelativePath=".\visionperceptor\visionperceptor.cpp" > </File> <File RelativePath=".\visionperceptor\visionperceptor.h" > </File> <File RelativePath=".\visionperceptor\visionperceptor_c.cpp" > </File> </Filter> <File RelativePath=".\export.cpp" > </File> </Files> <Globals> </Globals> </VisualStudioProject> |
From: Markus R. <rol...@us...> - 2007-03-18 22:48:53
|
Update of /cvsroot/simspark/simspark/contrib/plugin/soccer/objectstate In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv6199/objectstate Added Files: .cvsignore objectstate.cpp objectstate.h objectstate_c.cpp Log Message: --- NEW FILE: .cvsignore --- *.lo .deps .dirstamp .libs --- NEW FILE: objectstate.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) 2004 RoboCup Soccer Server 3D Maintenance Group $Id: objectstate.cpp,v 1.2 2007/03/17 06:48:38 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 "objectstate.h" using namespace oxygen; ObjectState::ObjectState() : SoccerNode() { } ObjectState::~ObjectState() { } void ObjectState::SetPerceptName(const std::string& name, TPerceptType pt) { mPerceptNames[pt] = name; } void ObjectState::SetPerceptName(const std::string& name, TPerceptType pt1, TPerceptType pt2) { // mPerceptNames[pt1] = "Player"; mPerceptNames[pt1] = "P"; mPerceptNames[pt2] = name; } std::string ObjectState::GetPerceptName(TPerceptType pt) const { TPerceptStringMap::const_iterator i = mPerceptNames.find(pt); if (i == mPerceptNames.end()) return std::string(); return i->second; } void ObjectState::SetID(const std::string& id, TPerceptType pt) { mIDs[pt] = id; } std::string ObjectState::GetID(TPerceptType pt) const { TPerceptStringMap::const_iterator i = mIDs.find(pt); if (i == mIDs.end()) return std::string(); return i->second; } --- NEW FILE: objectstate_c.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: objectstate_c.cpp,v 1.2 2007/03/17 06:48:38 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 "objectstate.h" using namespace boost; using namespace oxygen; using namespace std; FUNCTION(ObjectState,setPerceptName) { string inName; if ( (in.GetSize() != 1) || (! in.GetValue(in.begin(),inName)) ) { return false; } obj->SetPerceptName(inName); return true; } FUNCTION(ObjectState,setID) { string inId; if ( (in.GetSize() != 1) || (! in.GetValue(in.begin(), inId)) ) { return false; } obj->SetID(inId); return true; } void CLASS(ObjectState)::DefineClass() { DEFINE_BASECLASS(SoccerNode); DEFINE_FUNCTION(setPerceptName); DEFINE_FUNCTION(setID); } --- NEW FILE: objectstate.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) 2004 RoboCup Soccer Server 3D Maintenance Group $Id: objectstate.h,v 1.2 2007/03/17 06:48:38 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 OBJECTSTATE_H #define OBJECTSTATE_H #include <soccer/soccernode/soccernode.h> class ObjectState : public SoccerNode { public: typedef enum TPerceptType { PT_Default, PT_TooFar, PT_Player }; public: ObjectState(); virtual ~ObjectState(); /** set the object name for perceptors */ virtual void SetPerceptName(const std::string& name, TPerceptType pt = PT_Default); /** set the object name for perceptors */ virtual void SetPerceptName(const std::string& name, TPerceptType pt1 , TPerceptType pt2 ); /** returns the object name for perceptors */ virtual std::string GetPerceptName(TPerceptType pt = PT_Default) const; /** set the object id for perceptors */ virtual void SetID(const std::string& id, TPerceptType pt = PT_Default); /** returns the object id */ virtual std::string GetID(TPerceptType pt = PT_Default) const; protected: typedef std::map<TPerceptType, std::string> TPerceptStringMap; /** object names */ TPerceptStringMap mPerceptNames; /** object ids */ TPerceptStringMap mIDs; }; DECLARE_CLASS(ObjectState); #endif // OBJECTSTATE_H |
From: Markus R. <rol...@us...> - 2007-03-18 12:48:51
|
Update of /cvsroot/simspark/simspark/contrib/agentspark In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv305 Added Files: agentspark.vcproj Log Message: - readding agentspark.vcproj, it got lost in the WIN32 merge --- NEW FILE: agentspark.vcproj --- <?xml version="1.0" encoding="Windows-1252"?> <VisualStudioProject ProjectType="Visual C++" Version="8,00" Name="agentspark" ProjectGUID="{A544868D-F263-40AC-BEDF-FFF0660B3E32}" RootNamespace="agentspark" Keyword="Win32Proj" > <Platforms> <Platform Name="Win32" /> </Platforms> <ToolFiles> </ToolFiles> <Configurations> <Configuration Name="Debug|Win32" OutputDirectory="$(SolutionDir)$(ConfigurationName)" IntermediateDirectory="$(ConfigurationName)" ConfigurationType="1" CharacterSet="0" > <Tool Name="VCPreBuildEventTool" /> <Tool Name="VCCustomBuildTool" /> <Tool Name="VCXMLDataGeneratorTool" /> <Tool Name="VCWebServiceProxyGeneratorTool" /> <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\spark\win32;..\..\spark;..\..\spark\utility;..\" PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_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="comctl32.lib rpcrt4.lib msvcrt-ruby18.lib ode.lib wsock32.lib opengl32.lib glu32.lib glaux.lib wxbase28d.lib wxmsw28d_core.lib wxmsw28d_adv.lib wxmsw28d_html.lib wxbase28d_xml.lib wxexpatd.lib wxmsw28d_aui.lib wxmsw28d_gl.lib wxzlibd.lib wxpngd.lib" LinkIncremental="2" AdditionalLibraryDirectories="" GenerateDebugInformation="true" SubSystem="1" 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="1" CharacterSet="0" WholeProgramOptimization="1" > <Tool Name="VCPreBuildEventTool" /> <Tool Name="VCCustomBuildTool" /> <Tool Name="VCXMLDataGeneratorTool" /> <Tool Name="VCWebServiceProxyGeneratorTool" /> <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" AdditionalIncludeDirectories="..\..\spark\win32;..\..\spark;..\..\spark\utility;..\" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_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="comctl32.lib rpcrt4.lib wsock32.lib opengl32.lib glu32.lib glaux.lib c:\ruby\lib\msvcrt-ruby18.lib ode.lib wxbase28.lib wxbase28_net.lib wxbase28_xml.lib wxexpat.lib wxjpeg.lib wxmsw28_adv.lib wxmsw28_aui.lib wxmsw28_core.lib wxmsw28_gl.lib wxmsw28_html.lib wxmsw28_media.lib wxmsw28_qa.lib wxmsw28_richtext.lib wxmsw28_xrc.lib wxpng.lib wxregex.lib wxtiff.lib wxzlib.lib" LinkIncremental="1" GenerateDebugInformation="true" SubSystem="1" 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=".\behavior.h" > </File> <File RelativePath=".\hoap2behavior.cpp" > </File> <File RelativePath=".\hoap2behavior.h" > </File> <File RelativePath=".\main.cpp" > </File> <File RelativePath=".\soccerbotbehavior.cpp" > </File> <File RelativePath=".\soccerbotbehavior.h" > </File> </Files> <Globals> </Globals> </VisualStudioProject> |
From: Oliver O. <fr...@us...> - 2007-03-15 07:27:07
|
Update of /cvsroot/simspark/simspark/spark/oxygen/simulationserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv7790/spark/oxygen/simulationserver Modified Files: agentcontrol.cpp agentcontrol.h monitorcontrol.cpp monitorcontrol.h netclient.cpp netcontrol.cpp netcontrol.h netmessage.cpp simulationserver.cpp simulationserver.h Log Message: Merged WIN32 branch back to main trunk (access previous version with tag pre_merge_WIN32) Index: simulationserver.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/simulationserver/simulationserver.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** simulationserver.cpp 8 Jan 2006 14:07:38 -0000 1.3 --- simulationserver.cpp 15 Mar 2007 07:26:28 -0000 1.4 *************** *** 22,28 **** #include "simulationserver.h" #include "simcontrolnode.h" - #include <oxygen/monitorserver/monitorserver.h> - #include <oxygen/sceneserver/sceneserver.h> - #include <oxygen/gamecontrolserver/gamecontrolserver.h> #include <zeitgeist/logserver/logserver.h> #include <signal.h> --- 22,25 ---- *************** *** 65,81 **** void SimulationServer::OnLink() { ! mMonitorServer = shared_dynamic_cast<MonitorServer> ! (GetCore()->Get("/sys/server/monitor")); ! ! if (mMonitorServer.get() == 0) ! { ! GetLog()->Error() ! << "(SimulationServer) ERROR: MonitorServer not found.\n"; ! } ! ! mGameControlServer = shared_dynamic_cast<GameControlServer> ! (GetCore()->Get("/sys/server/gamecontrol")); ! if (mGameControlServer.get() == 0) { GetLog()->Error() --- 62,68 ---- void SimulationServer::OnLink() { ! RegisterCachedPath(mGameControlServer, "/sys/server/gamecontrol"); ! if (mGameControlServer.expired()) { GetLog()->Error() *************** *** 83,90 **** } ! mSceneServer = shared_dynamic_cast<SceneServer> ! (GetCore()->Get("/sys/server/scene")); ! ! if (mSceneServer.get() == 0) { GetLog()->Error() --- 70,75 ---- } ! RegisterCachedPath(mSceneServer, "/sys/server/scene"); ! if (mSceneServer.expired()) { GetLog()->Error() *************** *** 93,104 **** } - - void SimulationServer::OnUnlink() - { - mMonitorServer.reset(); - mGameControlServer.reset(); - mSceneServer.reset(); - } - void SimulationServer::Quit() { --- 78,81 ---- *************** *** 203,208 **** { if ( ! (mSceneServer.get() == 0) || ! (mGameControlServer.get() == 0) ) { --- 180,185 ---- { if ( ! (mSceneServer.expired()) || ! (mGameControlServer.expired()) ) { *************** *** 224,228 **** // simulate passed time in one single step mSceneServer->Update(mSumDeltaTime); ! mGameControlServer->Update(mSimStep); mSimTime += mSumDeltaTime; mSumDeltaTime = 0; --- 201,205 ---- // simulate passed time in one single step mSceneServer->Update(mSumDeltaTime); ! mGameControlServer->Update(mSumDeltaTime); mSimTime += mSumDeltaTime; mSumDeltaTime = 0; *************** *** 336,352 **** } - shared_ptr<GameControlServer> SimulationServer::GetGameControlServer() - { - return mGameControlServer; - } - - shared_ptr<MonitorServer> SimulationServer::GetMonitorServer() - { - return mMonitorServer; - } - shared_ptr<SceneServer> SimulationServer::GetSceneServer() { ! return mSceneServer; } --- 313,319 ---- } shared_ptr<SceneServer> SimulationServer::GetSceneServer() { ! return mSceneServer.get(); } Index: monitorcontrol.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/simulationserver/monitorcontrol.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** monitorcontrol.h 5 Dec 2005 21:21:18 -0000 1.1 --- monitorcontrol.h 15 Mar 2007 07:26:28 -0000 1.2 *************** *** 22,25 **** --- 22,26 ---- #include "netcontrol.h" + #include <oxygen/monitorserver/monitorserver.h> namespace oxygen *************** *** 56,64 **** protected: virtual void OnLink(); - virtual void OnUnlink(); protected: /** cached reference to the MonitorServer */ ! boost::shared_ptr<MonitorServer> mMonitorServer; /** the update interval for the connected monitors in cycles */ --- 57,64 ---- protected: virtual void OnLink(); protected: /** cached reference to the MonitorServer */ ! CachedPath<MonitorServer> mMonitorServer; /** the update interval for the connected monitors in cycles */ Index: agentcontrol.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/simulationserver/agentcontrol.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** agentcontrol.h 5 Dec 2005 21:21:18 -0000 1.1 --- agentcontrol.h 15 Mar 2007 07:26:28 -0000 1.2 *************** *** 22,25 **** --- 22,26 ---- #include "netcontrol.h" + #include <oxygen/gamecontrolserver/gamecontrolserver.h> namespace oxygen *************** *** 53,61 **** protected: virtual void OnLink(); - virtual void OnUnlink(); protected: /** cached reference to the GameControlServer */ ! boost::shared_ptr<GameControlServer> mGameControlServer; }; --- 54,61 ---- protected: virtual void OnLink(); protected: /** cached reference to the GameControlServer */ ! CachedPath<GameControlServer> mGameControlServer; }; Index: monitorcontrol.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/simulationserver/monitorcontrol.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** monitorcontrol.cpp 5 Dec 2005 21:21:18 -0000 1.1 --- monitorcontrol.cpp 15 Mar 2007 07:26:28 -0000 1.2 *************** *** 22,26 **** #include "netmessage.h" #include <zeitgeist/logserver/logserver.h> - #include <oxygen/monitorserver/monitorserver.h> #include <oxygen/sceneserver/sceneserver.h> #include <oxygen/sceneserver/scene.h> --- 22,25 ---- *************** *** 44,62 **** { NetControl::OnLink(); ! shared_ptr<SimulationServer> sim = GetSimulationServer(); ! if (sim.get() == 0) { GetLog()->Error() ! << "(MonitorControl) ERROR: SimulationServer not found\n"; return; } - - mMonitorServer = sim->GetMonitorServer(); - } - - void MonitorControl::OnUnlink() - { - NetControl::OnUnlink(); - mMonitorServer.reset(); } --- 43,54 ---- { NetControl::OnLink(); ! RegisterCachedPath(mMonitorServer, "/sys/server/monitor"); ! ! if (mMonitorServer.expired()) { GetLog()->Error() ! << "(MonitorControl) ERROR: MonitorServer not found\n"; return; } } *************** *** 73,77 **** string header = mMonitorServer->GetMonitorHeaderInfo(); mNetMessage->PrepareToSend(header); ! SendMessage(client->addr,header); } --- 65,69 ---- string header = mMonitorServer->GetMonitorHeaderInfo(); mNetMessage->PrepareToSend(header); ! SendClientMessage(client->addr,header); } *************** *** 96,100 **** // send updates to all connected monitors ! string info = mMonitorServer->GetMonitorInfo(); mNetMessage->PrepareToSend(info); --- 88,92 ---- // send updates to all connected monitors ! string info = mMonitorServer->GetMonitorData(); mNetMessage->PrepareToSend(info); *************** *** 105,109 **** ) { ! SendMessage((*iter).second,info); } --- 97,101 ---- ) { ! SendClientMessage((*iter).second,info); } *************** *** 167,170 **** mMonitorInterval = i; } - - --- 159,160 ---- Index: netclient.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/simulationserver/netclient.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** netclient.cpp 13 Dec 2005 21:26:40 -0000 1.2 --- netclient.cpp 15 Mar 2007 07:26:28 -0000 1.3 *************** *** 22,29 **** #include "netclient.h" #include <zeitgeist/logserver/logserver.h> - #include <netinet/in.h> #include <rcssnet/exception.hpp> #include <cerrno> using namespace oxygen; using namespace zeitgeist; --- 22,32 ---- #include "netclient.h" #include <zeitgeist/logserver/logserver.h> #include <rcssnet/exception.hpp> #include <cerrno> + #ifndef WIN32 + #include <netinet/in.h> + #endif + using namespace oxygen; using namespace zeitgeist; *************** *** 204,208 **** { // test for available data ! int fd = mSocket->getFD(); fd_set readfds; --- 207,211 ---- { // test for available data ! Socket::SocketDesc fd = mSocket->getFD(); fd_set readfds; *************** *** 214,218 **** time.tv_usec = 0; ! int rval = select(fd+1, &readfds, 0, 0, &time ); if (rval == 0) --- 217,227 ---- time.tv_usec = 0; ! #ifdef WIN32 ! int maxFd = 0; ! #else ! int maxFd = fd + 1; ! #endif ! ! int rval = select(maxFd, &readfds, 0, 0, &time ); if (rval == 0) Index: netmessage.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/simulationserver/netmessage.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** netmessage.cpp 5 Dec 2005 21:21:18 -0000 1.1 --- netmessage.cpp 15 Mar 2007 07:26:28 -0000 1.2 *************** *** 20,24 **** --- 20,28 ---- #include "netmessage.h" #include "netbuffer.h" + #include <rcssnet/socket.hpp> + + #ifndef WIN32 #include <netinet/in.h> + #endif using namespace oxygen; *************** *** 38,42 **** { // prefix the message with it's payload length ! unsigned int len = htonl(msg.size()); string prefix((const char*)&len,sizeof(unsigned int)); msg = prefix + msg; --- 42,46 ---- { // prefix the message with it's payload length ! unsigned int len = htonl(static_cast<u_long>(msg.size())); string prefix((const char*)&len,sizeof(unsigned int)); msg = prefix + msg; *************** *** 45,50 **** --- 49,60 ---- bool NetMessage::Extract(shared_ptr<NetBuffer> buffer, std::string& msg) { + if (buffer.get() == 0) + { + return false; + } + // a message is prefixed with it's payload length const unsigned int preSz = sizeof(unsigned int); + string& data = buffer->GetData(); Index: netcontrol.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/simulationserver/netcontrol.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** netcontrol.h 24 May 2006 10:07:10 -0000 1.2 --- netcontrol.h 15 Mar 2007 07:26:28 -0000 1.3 *************** *** 113,122 **** /** sends a message to the given client */ ! void SendMessage(boost::shared_ptr<Client> client, ! const std::string& msg); /** sends a message to the client with the given address */ ! void SendMessage(const rcss::net::Addr& addr, ! const std::string& msg); /** create a socket according to the given ESocketType */ --- 113,122 ---- /** sends a message to the given client */ ! void SendClientMessage(boost::shared_ptr<Client> client, ! const std::string& msg); /** sends a message to the client with the given address */ ! void SendClientMessage(const rcss::net::Addr& addr, ! const std::string& msg); /** create a socket according to the given ESocketType */ *************** *** 162,165 **** --- 162,168 ---- void RemoveClient(const rcss::net::Addr& from); + /** removes a client entry and closes the associated socket. */ + void RemoveClient(TAddrMap::iterator iter); + /** removes all clients marked in the mCloseClients list */ void CloseDeadConnections(); Index: netcontrol.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/simulationserver/netcontrol.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** netcontrol.cpp 5 Dec 2005 21:21:18 -0000 1.1 --- netcontrol.cpp 15 Mar 2007 07:26:28 -0000 1.2 *************** *** 21,25 **** #include "netmessage.h" #include <zeitgeist/logserver/logserver.h> - #include <netinet/in.h> #include <rcssnet/exception.hpp> #include <rcssnet/tcpsocket.hpp> --- 21,24 ---- *************** *** 28,31 **** --- 27,34 ---- #include <cerrno> + #ifndef WIN32 + #include <netinet/in.h> + #endif + using namespace rcss::net; using namespace oxygen; *************** *** 209,220 **** // close all client connections ! for ( ! TAddrMap::iterator iter = mClients.begin(); ! iter != mClients.end(); ! ++iter ! ) ! { ! RemoveClient((*iter).second->addr); ! } // shutdown the server socket --- 212,219 ---- // close all client connections ! while (! mClients.empty()) ! { ! RemoveClient(mClients.begin()); ! } // shutdown the server socket *************** *** 224,228 **** << DescribeSocketType() << std::endl; mSocket.reset(); - mClients.clear(); } --- 223,226 ---- *************** *** 245,261 **** } ! void NetControl::RemoveClient(const Addr& from) { ! TAddrMap::iterator mapIter = mClients.find(from); ! ! if (mapIter == mClients.end()) ! { ! GetLog()->Warning() ! << "(NetControl) '" << GetName() ! << "' RemoveClient called with an unknown client address\n"; ! return; ! } ! ! shared_ptr<Client> client = (*mapIter).second; ClientDisconnect(client); --- 243,249 ---- } ! void NetControl::RemoveClient(TAddrMap::iterator iter) { ! shared_ptr<Client> client = (*iter).second; ClientDisconnect(client); *************** *** 266,270 **** << ((socket.get() != 0) ? "TCP" : "UDP") << " connection from '" ! << from.getHostStr() << ":" << from.getPort() << "' id " << client->id << endl; --- 254,258 ---- << ((socket.get() != 0) ? "TCP" : "UDP") << " connection from '" ! << client->addr.getHostStr() << ":" << client->addr.getPort() << "' id " << client->id << endl; *************** *** 274,278 **** } ! mClients.erase(mapIter); } --- 262,281 ---- } ! mClients.erase(iter); ! } ! ! void NetControl::RemoveClient(const Addr& from) ! { ! TAddrMap::iterator mapIter = mClients.find(from); ! ! if (mapIter == mClients.end()) ! { ! GetLog()->Warning() ! << "(NetControl) '" << GetName() ! << "' RemoveClient called with an unknown client address\n"; ! return; ! } ! ! RemoveClient(mapIter); } *************** *** 287,291 **** } ! void NetControl::SendMessage(shared_ptr<Client> client, const string& msg) { if (client.get() == 0) --- 290,294 ---- } ! void NetControl::SendClientMessage(shared_ptr<Client> client, const string& msg) { if (client.get() == 0) *************** *** 319,323 **** } ! void NetControl::SendMessage(const Addr& addr, const string& msg) { TAddrMap::iterator iter = mClients.find(addr); --- 322,326 ---- } ! void NetControl::SendClientMessage(const Addr& addr, const string& msg) { TAddrMap::iterator iter = mClients.find(addr); *************** *** 331,335 **** } ! SendMessage((*iter).second,msg); } --- 334,338 ---- } ! SendClientMessage((*iter).second,msg); } *************** *** 344,348 **** } ! int fd = mSocket->getFD(); fd_set readfds; --- 347,351 ---- } ! Socket::SocketDesc fd = mSocket->getFD(); fd_set readfds; *************** *** 356,360 **** for(;;) { ! int ret = select(fd+1, &readfds, 0, 0, &time); if (ret == 0) --- 359,370 ---- for(;;) { ! #ifdef WIN32 ! // maxFd is ignored on Win32 and is present just for api compatibility ! int maxFd = 0; ! #else ! int maxFd = fd + 1; ! #endif ! ! int ret = select(maxFd, &readfds, 0, 0, &time); if (ret == 0) *************** *** 384,387 **** --- 394,402 ---- shared_ptr<Socket> socket(mSocket->accept(addr)); + if (socket.get() == 0) + { + return; + } + int ret = socket->setNonBlocking(true); *************** *** 478,482 **** } ! int fd = mSocket->getFD(); fd_set readfds; --- 493,497 ---- } ! Socket::SocketDesc fd = mSocket->getFD(); fd_set readfds; *************** *** 490,494 **** for(;;) { ! int ret = select(fd+1, &readfds, 0, 0, &time); if (ret == 0) --- 505,516 ---- for(;;) { ! #ifdef WIN32 ! // maxFd is ignored on Win32 and is present just for api compatibility ! int maxFd = 0; ! #else ! int maxFd = fd + 1; ! #endif ! ! int ret = select(maxFd, &readfds, 0, 0, &time); if (ret == 0) *************** *** 534,537 **** --- 556,564 ---- void NetControl::ReadTCPMessages() { + if (mClients.empty()) + { + return; + } + // generate a set of client socket fds fd_set client_fds; *************** *** 546,551 **** ) { ! const int fd = (*iter).second->socket->getFD(); maxFd = std::max<int>(fd,maxFd); FD_SET(fd,&client_fds); } --- 573,583 ---- ) { ! const Socket::SocketDesc fd = (*iter).second->socket->getFD(); ! #ifdef WIN32 ! // maxFd is ignored for Win32 ! maxFd = 0; ! #else maxFd = std::max<int>(fd,maxFd); + #endif FD_SET(fd,&client_fds); } *************** *** 584,588 **** ) { ! const int fd = (*iter).second->socket->getFD(); if (! FD_ISSET(fd, &test_fds)) { --- 616,620 ---- ) { ! const Socket::SocketDesc fd = (*iter).second->socket->getFD(); if (! FD_ISSET(fd, &test_fds)) { *************** *** 599,603 **** } else { ! if (rval < 0) { GetLog()->Error() --- 631,635 ---- } else { ! if (rval <= 0) { GetLog()->Error() *************** *** 605,614 **** << "' recv returned error on a client socket '" << strerror(errno) << "' " << endl; - continue; } - // (rval==0) indicates a close() on - // the client side - // mark the client connection to be // closed and exclude it from further --- 637,642 ---- Index: simulationserver.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/simulationserver/simulationserver.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** simulationserver.h 2 Jan 2006 20:37:41 -0000 1.2 --- simulationserver.h 15 Mar 2007 07:26:28 -0000 1.3 *************** *** 24,34 **** #include <zeitgeist/node.h> namespace oxygen { ! class GameControlServer; ! class MonitorServer; ! class SceneServer; ! class SimControlNode; class SimulationServer : public zeitgeist::Node --- 24,33 ---- #include <zeitgeist/node.h> + #include <oxygen/gamecontrolserver/gamecontrolserver.h> + #include <oxygen/sceneserver/sceneserver.h> namespace oxygen { ! class SimControlNode; class SimulationServer : public zeitgeist::Node *************** *** 121,130 **** virtual void Run(int argc = 0, char** argv = 0); - /** returns the cached MonitorServer reference */ - boost::shared_ptr<MonitorServer> GetMonitorServer(); - - /** returns the cached GameControlServer reference */ - boost::shared_ptr<GameControlServer> GetGameControlServer(); - /** returns thr cached SceneServer reference */ boost::shared_ptr<SceneServer> GetSceneServer(); --- 120,123 ---- *************** *** 135,139 **** protected: virtual void OnLink(); - virtual void OnUnlink(); /** advances the simulation mSumDeltaTime seconds. If mSimStep is --- 128,131 ---- *************** *** 180,191 **** int mCycle; - /** a cached reference to the monitor server */ - boost::shared_ptr<MonitorServer> mMonitorServer; - /** a cached reference to the GameControlServer */ ! boost::shared_ptr<GameControlServer> mGameControlServer; /** a cached reference to the SceneServer */ ! boost::shared_ptr<SceneServer> mSceneServer; }; --- 172,180 ---- int mCycle; /** a cached reference to the GameControlServer */ ! CachedPath<GameControlServer> mGameControlServer; /** a cached reference to the SceneServer */ ! CachedPath<SceneServer> mSceneServer; }; Index: agentcontrol.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/simulationserver/agentcontrol.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** agentcontrol.cpp 5 Dec 2005 21:21:18 -0000 1.1 --- agentcontrol.cpp 15 Mar 2007 07:26:28 -0000 1.2 *************** *** 22,26 **** #include "netmessage.h" #include <zeitgeist/logserver/logserver.h> - #include <oxygen/gamecontrolserver/gamecontrolserver.h> #include <oxygen/agentaspect/agentaspect.h> --- 22,25 ---- *************** *** 42,60 **** { NetControl::OnLink(); ! shared_ptr<SimulationServer> sim = GetSimulationServer(); ! if (sim.get() == 0) ! { ! GetLog()->Error() ! << "(AgentControl) ERROR: SimulationServer not found\n"; ! return; ! } ! ! mGameControlServer = sim->GetGameControlServer(); ! } ! void AgentControl::OnUnlink() ! { ! NetControl::OnUnlink(); ! mGameControlServer.reset(); } --- 41,51 ---- { NetControl::OnLink(); ! RegisterCachedPath(mGameControlServer, "/sys/server/gamecontrol"); ! if (mGameControlServer.expired()) ! { ! GetLog()->Error() ! << "(AgentControl) ERROR: GameControlServer not found.\n"; ! } } *************** *** 181,185 **** mNetMessage->PrepareToSend(senses); ! SendMessage(client,senses); } } --- 172,176 ---- mNetMessage->PrepareToSend(senses); ! SendClientMessage(client,senses); } } |
From: Oliver O. <fr...@us...> - 2007-03-15 07:27:07
|
Update of /cvsroot/simspark/simspark/spark/oxygen/gamecontrolserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv7790/spark/oxygen/gamecontrolserver Modified Files: gamecontrolserver.cpp gamecontrolserver.h predicate.cpp Log Message: Merged WIN32 branch back to main trunk (access previous version with tag pre_merge_WIN32) Index: gamecontrolserver.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/gamecontrolserver/gamecontrolserver.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** gamecontrolserver.cpp 5 Dec 2005 21:16:49 -0000 1.1 --- gamecontrolserver.cpp 15 Mar 2007 07:26:27 -0000 1.2 *************** *** 206,210 **** // the real thing should query the AgentAspect corresponding to // the agent. ! return 0.2; } --- 206,210 ---- // the real thing should query the AgentAspect corresponding to // the agent. ! return 0.2f; } *************** *** 214,218 **** // the real thing should query the AgentAspect corresponding to // the agent ! return 0.1; } --- 214,218 ---- // 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; } --- 222,232 ---- // the real thing should query the AgentAspect corresponding to // the agent. ! return 0.1f; ! } ! ! int ! GameControlServer::GetAgentCount() const ! { ! return mAgentMap.size(); } Index: predicate.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/gamecontrolserver/predicate.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** predicate.cpp 5 Dec 2005 21:16:49 -0000 1.1 --- predicate.cpp 15 Mar 2007 07:26:27 -0000 1.2 *************** *** 208,212 **** int PredicateList::GetSize() const { ! return mList.size(); } --- 208,212 ---- int PredicateList::GetSize() const { ! return static_cast<int>(mList.size()); } Index: gamecontrolserver.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/gamecontrolserver/gamecontrolserver.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** gamecontrolserver.h 5 Dec 2005 21:16:49 -0000 1.1 --- gamecontrolserver.h 15 Mar 2007 07:26:27 -0000 1.2 *************** *** 101,104 **** --- 101,109 ---- float GetActionLatency(int id); + /** returns the number of agents currently connected + to the simulator + */ + int GetAgentCount() const; + /** returns the AgentAspect for the given \param id */ boost::shared_ptr<AgentAspect> GetAgentAspect(int id); |
From: Oliver O. <fr...@us...> - 2007-03-15 07:27:07
|
Update of /cvsroot/simspark/simspark/spark/plugin/rubysceneimporter In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv7790/spark/plugin/rubysceneimporter Modified Files: rubysceneimporter.cpp rubysceneimporter.h Added Files: rubysceneimporter.vcproj Log Message: Merged WIN32 branch back to main trunk (access previous version with tag pre_merge_WIN32) --- NEW FILE: rubysceneimporter.vcproj --- <?xml version="1.0" encoding="Windows-1252"?> <VisualStudioProject ProjectType="Visual C++" Version="8,00" Name="rubysceneimporter" ProjectGUID="{8A81E2A6-8337-4003-8BDD-59F6F54C2EFC}" RootNamespace="rubysceneimporter" 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" 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" 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=".\rubysceneimporter.cpp" > </File> <File RelativePath=".\rubysceneimporter.h" > </File> <File RelativePath=".\rubysceneimporter_c.cpp" > </File> </Files> <Globals> </Globals> </VisualStudioProject> Index: rubysceneimporter.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/plugin/rubysceneimporter/rubysceneimporter.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** rubysceneimporter.h 18 Dec 2005 17:53:56 -0000 1.2 --- rubysceneimporter.h 15 Mar 2007 07:26:28 -0000 1.3 *************** *** 50,54 **** TMethodInvocationList invocationList; ! ParamEnv(); ParamEnv(boost::shared_ptr<zeitgeist::ParameterList> p) : parameter(p) {}; --- 50,54 ---- TMethodInvocationList invocationList; ! ParamEnv() {}; ParamEnv(boost::shared_ptr<zeitgeist::ParameterList> p) : parameter(p) {}; *************** *** 112,119 **** /** the major version of the scen graph file */ ! float mVersionMajor; /** the minor version of the scen graph file */ ! float mVersionMinor; /** the last supplied fileName */ --- 112,119 ---- /** the major version of the scen graph file */ ! int mVersionMajor; /** the minor version of the scen graph file */ ! int mVersionMinor; /** the last supplied fileName */ Index: rubysceneimporter.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/plugin/rubysceneimporter/rubysceneimporter.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** rubysceneimporter.cpp 18 Dec 2005 17:53:56 -0000 1.2 --- rubysceneimporter.cpp 15 Mar 2007 07:26:28 -0000 1.3 *************** *** 114,118 **** { mFileName = S_FROMSTRING; ! return ParseScene(scene.c_str(),scene.size(),root,parameter); } --- 114,118 ---- { mFileName = S_FROMSTRING; ! return ParseScene(scene.c_str(),static_cast<int>(scene.size()),root,parameter); } *************** *** 345,349 **** int idx = (*iter).second; ! if (idx >= env.parameter->GetSize()) { GetLog()->Error() --- 345,352 ---- int idx = (*iter).second; ! if ( ! (idx < 0) || ! (idx >= env.parameter->GetSize()) ! ) { GetLog()->Error() *************** *** 535,538 **** --- 538,543 ---- Invoke(invoc); } + + return true; } *************** *** 643,647 **** // create a new variable env.parameter->AddValue(value); ! env.parameterMap[varname] = (env.parameterMap.size() - 1); } else { --- 648,653 ---- // create a new variable env.parameter->AddValue(value); ! int idx = (static_cast<int>(env.parameterMap.size())); ! env.parameterMap[varname] = idx; } else { *************** *** 699,703 **** } ! int idx = env.parameterMap.size(); env.parameterMap[param] = idx; sexp = sexp->next; --- 705,709 ---- } ! int idx = static_cast<int>(env.parameterMap.size()); env.parameterMap[param] = idx; sexp = sexp->next; |
Update of /cvsroot/simspark/simspark/spark/oxygen/physicsserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv7790/spark/oxygen/physicsserver Modified Files: angularmotor_c.cpp body.cpp body.h bodycontroller.cpp bodycontroller.h collider.cpp collider.h collisionhandler.cpp collisionhandler.h contactjointhandler_c.cpp fixedjoint.cpp fixedjoint.h fixedjoint_c.cpp joint.cpp joint.h odeobject.cpp odeobject.h physicsserver.cpp physicsserver.h space.cpp space.h world.cpp world.h world_c.cpp Added Files: odewrapper.h transformcollider_c.cpp Log Message: Merged WIN32 branch back to main trunk (access previous version with tag pre_merge_WIN32) Index: physicsserver.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/physicsserver.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** physicsserver.cpp 5 Dec 2005 21:16:49 -0000 1.1 --- physicsserver.cpp 15 Mar 2007 07:26:27 -0000 1.2 *************** *** 21,25 **** #include "physicsserver.h" - #include <ode/ode.h> using namespace oxygen; --- 21,24 ---- Index: collider.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/collider.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** collider.cpp 14 Apr 2006 16:27:27 -0000 1.2 --- collider.cpp 15 Mar 2007 07:26:27 -0000 1.3 *************** *** 38,46 **** Collider::~Collider() { - if (mODEGeom) - { - dGeomDestroy(mODEGeom); - mODEGeom = 0; - } } --- 38,41 ---- *************** *** 252,253 **** --- 247,258 ---- } + void Collider::DestroyODEObject() + { + if (! mODEGeom) + { + return; + } + + dGeomDestroy(mODEGeom); + mODEGeom = 0; + } Index: joint.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/joint.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** joint.cpp 12 Feb 2006 11:36:52 -0000 1.4 --- joint.cpp 15 Mar 2007 07:26:27 -0000 1.5 *************** *** 33,42 **** Joint::~Joint() { - EnableFeedback(false); - if (mODEJoint) - { - dJointDestroy(mODEJoint); - mODEJoint = 0; - } } --- 33,36 ---- *************** *** 182,186 **** } ! return dAreConnected(body1->GetODEBody(),body2->GetODEBody()); } --- 176,184 ---- } ! const bool connected = ! (dAreConnected(body1->GetODEBody(),body2->GetODEBody()) ! == 1); ! ! return connected; } *************** *** 197,202 **** } ! return dAreConnectedExcluding(body1->GetODEBody(),body2->GetODEBody(), ! joint_type); } --- 195,206 ---- } ! const bool connected = ! (dAreConnectedExcluding(body1->GetODEBody(), ! body2->GetODEBody(), ! joint_type ! ) ! == 1); ! ! return connected; } *************** *** 414,419 **** } ! ! ! --- 418,430 ---- } + void Joint::DestroyODEObject() + { + if (! mODEJoint) + { + return; + } ! EnableFeedback(false); ! dJointDestroy(mODEJoint); ! mODEJoint = 0; ! } Index: bodycontroller.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/bodycontroller.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** bodycontroller.h 5 Dec 2005 21:16:49 -0000 1.1 --- bodycontroller.h 15 Mar 2007 07:26:27 -0000 1.2 *************** *** 38,41 **** --- 38,44 ---- virtual ~BodyController() {} + /** update variables from a script */ + virtual void UpdateCached(); + protected: /** sets up the reference to the controlled body */ --- NEW FILE: transformcollider_c.cpp --- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2003 Koblenz University $Id: transformcollider_c.cpp,v 1.2 2007/03/15 07:26:27 fruit Exp $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "transformcollider.h" using namespace oxygen; using namespace boost; using namespace salt; void CLASS(TransformCollider)::DefineClass() { DEFINE_BASECLASS(oxygen/Collider); } Index: joint.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/joint.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** joint.h 12 Feb 2006 11:36:52 -0000 1.2 --- joint.h 15 Mar 2007 07:26:27 -0000 1.3 *************** *** 66,69 **** --- 66,72 ---- virtual ~Joint(); + /** destroy the managed ODE object */ + virtual void DestroyODEObject(); + /** attaches the joint to some new bodies. If the joint is already attached, it will be detached from the old bodies first. To Index: collider.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/collider.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** collider.h 14 Apr 2006 16:27:27 -0000 1.2 --- collider.h 15 Mar 2007 07:26:27 -0000 1.3 *************** *** 128,131 **** --- 128,134 ---- virtual void PrePhysicsUpdateInternal(float deltaTime); + /** destroy the managed ODE object */ + virtual void DestroyODEObject(); + // // Members --- NEW FILE: odewrapper.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: odewrapper.h,v 1.2 2007/03/15 07:26:27 fruit Exp $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef OXYGEN_ODEWRAPPER_H #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 #ifdef copysignf #undef copysignf #endif #ifdef copysign #undef copysign #endif #endif // WIN32 #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 #include <config.h> #endif #endif // OXYGEN_ODEWRAPPER Index: physicsserver.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/physicsserver.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** physicsserver.h 5 Dec 2005 21:16:49 -0000 1.1 --- physicsserver.h 15 Mar 2007 07:26:27 -0000 1.2 *************** *** 25,29 **** #include <zeitgeist/class.h> #include <zeitgeist/leaf.h> ! #include <ode/ode.h> namespace oxygen --- 25,29 ---- #include <zeitgeist/class.h> #include <zeitgeist/leaf.h> ! #include "odewrapper.h" namespace oxygen Index: collisionhandler.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/collisionhandler.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** collisionhandler.h 5 Dec 2005 21:16:49 -0000 1.1 --- collisionhandler.h 15 Mar 2007 07:26:27 -0000 1.2 *************** *** 24,28 **** #include <oxygen/sceneserver/basenode.h> ! #include <ode/ode.h> namespace oxygen --- 24,28 ---- #include <oxygen/sceneserver/basenode.h> ! #include "odewrapper.h" namespace oxygen *************** *** 50,53 **** --- 50,56 ---- virtual ~CollisionHandler() {}; + /** update variables from a script */ + virtual void UpdateCached(); + /** HandleCollision is called from the Collider to which this CollisionHandler is registered to. Derived classes implement *************** *** 100,103 **** --- 103,108 ---- virtual void OnUnlink(); + void ResetCache(); + // // Members Index: collisionhandler.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/collisionhandler.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** collisionhandler.cpp 5 Dec 2005 21:16:49 -0000 1.1 --- collisionhandler.cpp 15 Mar 2007 07:26:27 -0000 1.2 *************** *** 33,39 **** --- 33,59 ---- CollisionHandler::OnLink() { + UpdateCached(); + } + + void + CollisionHandler::ResetCache() + { + mCollider.reset(); + mWorld.reset(); + mSpace.reset(); + } + + void + CollisionHandler::UpdateCached() + { // setup the scene, world, space and collider references shared_ptr<Scene> scene = GetScene(); + ResetCache(); + if (scene.get() == 0) + { + return; + } + mWorld = shared_static_cast<World>(scene->GetChildOfClass("World")); if (mWorld.get() == 0) *************** *** 61,67 **** CollisionHandler::OnUnlink() { ! mCollider.reset(); ! mWorld.reset(); ! mSpace.reset(); } --- 81,86 ---- CollisionHandler::OnUnlink() { ! BaseNode::OnUnlink(); ! ResetCache(); } Index: space.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/space.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** space.h 5 Dec 2005 21:16:49 -0000 1.1 --- space.h 15 Mar 2007 07:26:27 -0000 1.2 *************** *** 65,68 **** --- 65,71 ---- virtual void HandleCollide(dGeomID obj1, dGeomID obj2); + /** destroy the managed ODE object */ + virtual void DestroyODEObject(); + protected: /** creates them managed ODE space and a contact joint group */ *************** *** 72,75 **** --- 75,83 ---- virtual void PostPhysicsUpdateInternal(); + /** destroys the ODE bodies managed by all Body objects that are + registered to this Space + */ + void DestroySpaceObjects(); + // // Members Index: space.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/space.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** space.cpp 5 Dec 2005 21:16:49 -0000 1.1 --- space.cpp 15 Mar 2007 07:26:27 -0000 1.2 *************** *** 35,39 **** } ! Space::Space() : mODESpace(0), mODEContactGroup(0) { } --- 35,39 ---- } ! Space::Space() : ODEObject(), mODESpace(0), mODEContactGroup(0) { } *************** *** 46,56 **** mODEContactGroup = 0; } - - // release the ODE space - if (mODESpace) - { - dSpaceDestroy(mODESpace); - mODESpace = 0; - } } --- 46,49 ---- *************** *** 77,81 **** const dBodyID b2 = dGeomGetBody(obj2); ! if ((b1) && (b2) && (dAreConnected(b1,b2))) { return; --- 70,74 ---- const dBodyID b2 = dGeomGetBody(obj2); ! if ((b1) && (b2) && (dAreConnectedExcluding(b1,b2,dJointTypeContact))) { return; *************** *** 88,92 **** // expect that dCollide() will return contacts for every pair // passed to the callback. ! static const int nContacts = 6; static dContact contacts[nContacts]; --- 81,85 ---- // expect that dCollide() will return contacts for every pair // passed to the callback. ! static const int nContacts = 4; static dContact contacts[nContacts]; *************** *** 141,142 **** --- 134,188 ---- } + void Space::DestroySpaceObjects() + { + shared_ptr<Scene> scene = GetScene(); + if (scene.get() == 0) + { + return; + } + + TLeafList objects; + + const bool recursive = true; + scene->ListChildrenSupportingClass<ODEObject>(objects, recursive); + + for ( + TLeafList::iterator iter = objects.begin(); + iter != objects.end(); + ++iter + ) + { + shared_ptr<ODEObject> object = shared_static_cast<ODEObject>(*iter); + if (object->GetSpaceID() != mODESpace) + { + continue; + } + + object->DestroyODEObject(); + } + } + + void Space::DestroyODEObject() + { + static bool recurseLock = false; + + if ( + (recurseLock) || + (! mODESpace) + ) + { + return; + } + + recurseLock = true; + + // make sure that all objects registered to this space are destroyed + // before this space. Any other order provokes a segfault in ODE. + DestroySpaceObjects(); + + // release the ODE space + dSpaceDestroy(mODESpace); + mODESpace = 0; + + recurseLock = false; + } Index: fixedjoint.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/fixedjoint.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** fixedjoint.h 12 Feb 2006 11:36:52 -0000 1.2 --- fixedjoint.h 15 Mar 2007 07:26:27 -0000 1.3 *************** *** 35,38 **** --- 35,43 ---- virtual ~FixedJoint(); + /** Call this on the fixed joint after it has been attached to remember + the current desired relative offset and desired relative rotation + between the bodies. */ + void SetFixed(); + protected: /** creates a new fixed joint */ Index: fixedjoint.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/fixedjoint.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** fixedjoint.cpp 12 Feb 2006 11:36:52 -0000 1.2 --- fixedjoint.cpp 15 Mar 2007 07:26:27 -0000 1.3 *************** *** 55,56 **** --- 55,61 ---- } + void FixedJoint::SetFixed() + { + dJointSetFixed(mODEJoint); + } + Index: world.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/world.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** world.h 22 Jan 2006 18:57:15 -0000 1.2 --- world.h 15 Mar 2007 07:26:27 -0000 1.3 *************** *** 89,92 **** --- 89,108 ---- void Step(float deltaTime); + bool GetAutoDisableFlag() const; + void SetAutoDisableFlag(bool flag); + + /** Set and get the depth of the surface layer around all geometry + objects. Contacts are allowed to sink into the surface layer up to + the given depth before coming to rest. The default value is + zero. Increasing this to some small value (e.g. 0.001) can help + prevent jittering problems due to contacts being repeatedly made + and broken. + */ + void SetContactSurfaceLayer(float depth); + float GetContactSurfaceLayer() const; + + /** destroy the managed ODE object */ + virtual void DestroyODEObject(); + protected: /** creates them managed ODE world */ Index: angularmotor_c.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/angularmotor_c.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** angularmotor_c.cpp 5 Dec 2005 21:16:49 -0000 1.1 --- angularmotor_c.cpp 15 Mar 2007 07:26:27 -0000 1.2 *************** *** 116,120 **** } ! obj->SetAxisAngle(static_cast<Joint::EAxisIndex>(inAxisIdx),inDegAngle); return true; } --- 116,120 ---- } ! obj->SetAxisAngle(static_cast<Joint::EAxisIndex>(inAxisIdx),static_cast<float>(inDegAngle)); return true; } Index: body.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/body.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** body.cpp 14 Apr 2006 16:27:27 -0000 1.2 --- body.cpp 15 Mar 2007 07:26:27 -0000 1.3 *************** *** 35,43 **** Body::~Body() { - if (mODEBody) - { - dBodyDestroy(mODEBody); - mODEBody = 0; - } } --- 35,38 ---- *************** *** 106,109 **** --- 101,115 ---- } + void Body::DestroyODEObject() + { + if (mODEBody == 0) + { + return; + } + + dBodyDestroy(mODEBody); + mODEBody = 0; + } + void Body::OnLink() { Index: body.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/body.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** body.h 14 Apr 2006 16:27:26 -0000 1.2 --- body.h 15 Mar 2007 07:26:27 -0000 1.3 *************** *** 176,179 **** --- 176,182 ---- salt::Vector3f GetPosition() const; + /** destroy the managed ODE object */ + virtual void DestroyODEObject(); + protected: /** creates the managed ODE body and moves it to the position of Index: odeobject.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/odeobject.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** odeobject.cpp 5 Dec 2005 21:16:49 -0000 1.1 --- odeobject.cpp 15 Mar 2007 07:26:27 -0000 1.2 *************** *** 29,33 **** using namespace boost; ! /** returns the world node */ shared_ptr<World> ODEObject::GetWorld() { --- 29,45 ---- using namespace boost; ! ODEObject::ODEObject() : BaseNode() ! { ! } ! ! ODEObject::~ODEObject() ! { ! } ! ! void ODEObject::OnUnlink() ! { ! DestroyODEObject(); ! } ! shared_ptr<World> ODEObject::GetWorld() { *************** *** 120,123 **** matrix[11] = 0; } - - --- 132,133 ---- Index: world_c.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/world_c.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** world_c.cpp 5 Dec 2005 21:16:49 -0000 1.1 --- world_c.cpp 15 Mar 2007 07:26:27 -0000 1.2 *************** *** 84,87 **** --- 84,129 ---- } + FUNCTION(World,setAutoDisableFlag) + { + bool inFlag; + + if ( + (in.GetSize() != 1) || + (! in.GetValue(in.begin(),inFlag)) + ) + { + return false; + } + + obj->SetAutoDisableFlag(inFlag); + return true; + } + + FUNCTION(World,getAutoDisableFlag) + { + return obj->GetAutoDisableFlag(); + } + + FUNCTION(World,setContactSurfaceLayer) + { + float inDepth; + + if ( + (in.GetSize() != 1) || + (! in.GetValue(in.begin(),inDepth)) + ) + { + return false; + } + + obj->SetContactSurfaceLayer(inDepth); + return true; + } + + FUNCTION(World,getContactSurfaceLayer) + { + return obj->GetContactSurfaceLayer(); + } + void CLASS(World)::DefineClass() { *************** *** 92,94 **** --- 134,140 ---- DEFINE_FUNCTION(setCFM); DEFINE_FUNCTION(getCFM); + DEFINE_FUNCTION(setAutoDisableFlag); + DEFINE_FUNCTION(getAutoDisableFlag); + DEFINE_FUNCTION(setContactSurfaceLayer); + DEFINE_FUNCTION(getContactSurfaceLayer); } Index: contactjointhandler_c.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/contactjointhandler_c.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** contactjointhandler_c.cpp 5 Dec 2005 21:16:49 -0000 1.1 --- contactjointhandler_c.cpp 15 Mar 2007 07:26:27 -0000 1.2 *************** *** 50,54 **** } ! obj->SetMinBounceVel(inVel); return true; } --- 50,54 ---- } ! obj->SetMinBounceVel(static_cast<float>(inVel)); return true; } *************** *** 65,69 **** } ! obj->SetBounceValue(inValue); return true; } --- 65,69 ---- } ! obj->SetBounceValue(static_cast<float>(inValue)); return true; } *************** *** 95,99 **** } ! obj->SetContactSoftERP(inERP); return true; } --- 95,99 ---- } ! obj->SetContactSoftERP(static_cast<float>(inERP)); return true; } *************** *** 125,129 **** } ! obj->SetContactSoftCFM(inCFM); return true; } --- 125,129 ---- } ! obj->SetContactSoftCFM(static_cast<float>(inCFM)); return true; } *************** *** 155,159 **** } ! obj->SetContactSlip(inSlip); return true; } --- 155,159 ---- } ! obj->SetContactSlip(static_cast<float>(inSlip)); return true; } *************** *** 170,174 **** } ! obj->SetContactMu(inMu); return true; --- 170,174 ---- } ! obj->SetContactMu(static_cast<float>(inMu)); return true; Index: world.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/world.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** world.cpp 22 Jan 2006 18:57:14 -0000 1.2 --- world.cpp 15 Mar 2007 07:26:27 -0000 1.3 *************** *** 21,29 **** #include "world.h" using namespace oxygen; using namespace salt; ! World::World() : mODEWorld(0) { } --- 21,32 ---- #include "world.h" + #include "space.h" + #include <oxygen/sceneserver/scene.h> + using namespace boost; using namespace oxygen; using namespace salt; ! World::World() : ODEObject(), mODEWorld(0) { } *************** *** 31,40 **** World::~World() { - // release the ODE world - if (mODEWorld) - { - dWorldDestroy(mODEWorld); - mODEWorld = 0; - } } --- 34,37 ---- *************** *** 85,88 **** --- 82,105 ---- } + bool World::GetAutoDisableFlag() const + { + return (dWorldGetAutoDisableFlag(mODEWorld) == 1); + } + + void World::SetAutoDisableFlag(bool flag) + { + dWorldSetAutoDisableFlag(mODEWorld, static_cast<int>(flag)); + } + + void World::SetContactSurfaceLayer(float depth) + { + dWorldSetContactSurfaceLayer(mODEWorld, depth); + } + + float World::GetContactSurfaceLayer() const + { + return dWorldGetContactSurfaceLayer(mODEWorld); + } + bool World::ConstructInternal() { *************** *** 92,93 **** --- 109,138 ---- return (mODEWorld != 0); } + + void World::DestroyODEObject() + { + static bool recurseLock = false; + if (recurseLock) + { + return; + } + + recurseLock = true; + + shared_ptr<Space> space = GetSpace(); + if (space.get() != 0) + { + space->DestroyODEObject(); + } + + if (mODEWorld == 0) + { + return; + } + + // release the ODE world + dWorldDestroy(mODEWorld); + mODEWorld = 0; + + recurseLock = false; + } Index: odeobject.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/odeobject.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** odeobject.h 5 Dec 2005 21:16:49 -0000 1.1 --- odeobject.h 15 Mar 2007 07:26:27 -0000 1.2 *************** *** 24,28 **** #include <oxygen/sceneserver/basenode.h> ! #include <ode/ode.h> namespace oxygen --- 24,28 ---- #include <oxygen/sceneserver/basenode.h> ! #include "odewrapper.h" namespace oxygen *************** *** 39,51 **** // Functions // ! ODEObject() : BaseNode() {}; ! virtual ~ODEObject() {}; ! ! protected: ! /** returns the world node */ ! boost::shared_ptr<World> GetWorld(); ! /** returns the space node */ ! boost::shared_ptr<Space> GetSpace(); /** returns the ODE world handle */ --- 39,50 ---- // Functions // ! ODEObject(); ! virtual ~ODEObject(); ! /** This rountine is called, before the hierarchy object is ! removed from the parent. It can be overridden to support ! custom 'unlink' behavior. ! */ ! virtual void OnUnlink(); /** returns the ODE world handle */ *************** *** 55,58 **** --- 54,67 ---- dSpaceID GetSpaceID(); + /** destroy the managed ODE object */ + virtual void DestroyODEObject() = 0; + + protected: + /** returns the world node */ + boost::shared_ptr<World> GetWorld(); + + /** returns the space node */ + boost::shared_ptr<Space> GetSpace(); + /** converts the rotation part of a salt::Matrix to an ODE dMatrix3 */ Index: bodycontroller.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/bodycontroller.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** bodycontroller.cpp 5 Dec 2005 21:16:49 -0000 1.1 --- bodycontroller.cpp 15 Mar 2007 07:26:27 -0000 1.2 *************** *** 30,33 **** --- 30,46 ---- void BodyController::OnLink() { + UpdateCached(); + } + + void BodyController::OnUnlink() + { + BaseNode::OnUnlink(); + mBody.reset(); + } + + void BodyController::UpdateCached() + { + mBody.reset(); + mBody = shared_dynamic_cast<Body> (make_shared(GetParentSupportingClass("Body"))); *************** *** 39,45 **** } } - - void BodyController::OnUnlink() - { - mBody.reset(); - } --- 52,53 ---- Index: fixedjoint_c.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/fixedjoint_c.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** fixedjoint_c.cpp 5 Dec 2005 21:16:49 -0000 1.1 --- fixedjoint_c.cpp 15 Mar 2007 07:26:27 -0000 1.2 *************** *** 26,31 **** --- 26,38 ---- using namespace salt; + FUNCTION(FixedJoint, setFixed) + { + obj->SetFixed(); + return true; + } + void CLASS(FixedJoint)::DefineClass() { DEFINE_BASECLASS(oxygen/Joint); + DEFINE_FUNCTION(setFixed); } |
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 ---- |
From: Oliver O. <fr...@us...> - 2007-03-15 07:27:06
|
Update of /cvsroot/simspark/simspark/spark/plugin/sceneeffector In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv7790/spark/plugin/sceneeffector Modified Files: sceneeffector.cpp Added Files: sceneeffector.vcproj Log Message: Merged WIN32 branch back to main trunk (access previous version with tag pre_merge_WIN32) Index: sceneeffector.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/plugin/sceneeffector/sceneeffector.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** sceneeffector.cpp 25 Dec 2005 14:54:35 -0000 1.1 --- sceneeffector.cpp 15 Mar 2007 07:26:28 -0000 1.2 *************** *** 53,57 **** } ! boost::shared_ptr<AgentAspect> aspect =GetAgentAspect(); if (aspect.get() == 0) --- 53,57 ---- } ! shared_ptr<AgentAspect> aspect =GetAgentAspect(); if (aspect.get() == 0) *************** *** 62,66 **** } ! aspect->ImportScene(sceneAction->GetScene(), shared_ptr<ParameterList>()); return true; } --- 62,68 ---- } ! shared_ptr<ParameterList> parameter(new ParameterList()); ! ! aspect->ImportScene(sceneAction->GetScene(), parameter); return true; } --- NEW FILE: sceneeffector.vcproj --- <?xml version="1.0" encoding="Windows-1252"?> <VisualStudioProject ProjectType="Visual C++" Version="8,00" Name="sceneeffector" ProjectGUID="{AE03EAFA-DFD9-43B3-8777-13A27167A692}" RootNamespace="sceneeffector" 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=".\sceneeffector.cpp" > </File> <File RelativePath=".\sceneeffector.h" > </File> <File RelativePath=".\sceneeffector_c.cpp" > </File> </Files> <Globals> </Globals> </VisualStudioProject> |
From: Oliver O. <fr...@us...> - 2007-03-15 07:27:06
|
Update of /cvsroot/simspark/simspark/spark/oxygen/monitorserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv7790/spark/oxygen/monitorserver Modified Files: monitorserver.cpp monitorserver.h Log Message: Merged WIN32 branch back to main trunk (access previous version with tag pre_merge_WIN32) Index: monitorserver.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/monitorserver/monitorserver.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** monitorserver.h 5 Dec 2005 21:16:49 -0000 1.1 --- monitorserver.h 15 Mar 2007 07:26:27 -0000 1.2 *************** *** 64,68 **** * done by the simulation engine */ ! std::string GetMonitorInfo(); /** If a monitor sends information to the world model, this --- 64,68 ---- * done by the simulation engine */ ! std::string GetMonitorData(); /** If a monitor sends information to the world model, this Index: monitorserver.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/monitorserver/monitorserver.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** monitorserver.cpp 5 Dec 2005 21:16:49 -0000 1.1 --- monitorserver.cpp 15 Mar 2007 07:26:27 -0000 1.2 *************** *** 162,166 **** } ! string MonitorServer::GetMonitorInfo() { shared_ptr<MonitorSystem> monitorSystem = GetMonitorSystem(); --- 162,166 ---- } ! string MonitorServer::GetMonitorData() { shared_ptr<MonitorSystem> monitorSystem = GetMonitorSystem(); |
From: Oliver O. <fr...@us...> - 2007-03-15 07:27:06
|
Update of /cvsroot/simspark/simspark/spark/salt In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv7790/spark/salt Modified Files: fileclasses.cpp fileclasses.h gmath.h sharedlibrary.cpp vector.h Added Files: salt.vcproj Log Message: Merged WIN32 branch back to main trunk (access previous version with tag pre_merge_WIN32) --- NEW FILE: salt.vcproj --- <?xml version="1.0" encoding="Windows-1252"?> <VisualStudioProject ProjectType="Visual C++" Version="8,00" Name="salt" ProjectGUID="{17DECC5C-BD53-4ECE-8E4F-707C52D4987C}" RootNamespace="salt" Keyword="Win32Proj" > <Platforms> <Platform Name="Win32" /> </Platforms> <ToolFiles> </ToolFiles> <Configurations> <Configuration Name="Debug|Win32" OutputDirectory="$(SolutionDir)$(ConfigurationName)" IntermediateDirectory="$(ConfigurationName)" ConfigurationType="4" CharacterSet="0" > <Tool Name="VCPreBuildEventTool" /> <Tool Name="VCCustomBuildTool" /> <Tool Name="VCXMLDataGeneratorTool" /> <Tool Name="VCWebServiceProxyGeneratorTool" /> <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" Optimization="0" PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_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="VCLibrarianTool" /> <Tool Name="VCALinkTool" /> <Tool Name="VCXDCMakeTool" /> <Tool Name="VCBscMakeTool" /> <Tool Name="VCFxCopTool" /> <Tool Name="VCPostBuildEventTool" /> </Configuration> <Configuration Name="VCRelease|Win32" OutputDirectory="$(SolutionDir)$(ConfigurationName)" IntermediateDirectory="$(ConfigurationName)" ConfigurationType="4" CharacterSet="0" WholeProgramOptimization="1" > <Tool Name="VCPreBuildEventTool" /> <Tool Name="VCCustomBuildTool" /> <Tool Name="VCXMLDataGeneratorTool" /> <Tool Name="VCWebServiceProxyGeneratorTool" /> <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_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="VCLibrarianTool" /> <Tool Name="VCALinkTool" /> <Tool Name="VCXDCMakeTool" /> <Tool Name="VCBscMakeTool" /> <Tool Name="VCFxCopTool" /> <Tool Name="VCPostBuildEventTool" /> </Configuration> </Configurations> <References> </References> <Files> <File RelativePath=".\bounds.cpp" > </File> <File RelativePath=".\bounds.h" > </File> <File RelativePath=".\defines.h" > </File> <File RelativePath=".\fileclasses.cpp" > </File> <File RelativePath=".\fileclasses.h" > </File> <File RelativePath=".\frustum.cpp" > </File> <File RelativePath=".\frustum.h" > </File> <File RelativePath=".\gmath.h" > </File> <File RelativePath=".\matrix.cpp" > </File> <File RelativePath=".\matrix.h" > </File> <File RelativePath=".\path.cpp" > </File> <File RelativePath=".\path.h" > </File> <File RelativePath=".\plane.cpp" > </File> <File RelativePath=".\plane.h" > </File> <File RelativePath=".\random.h" > </File> <File RelativePath=".\rect.h" > </File> <File RelativePath=".\salt.h" > </File> <File RelativePath=".\sharedlibrary.cpp" > </File> <File RelativePath=".\sharedlibrary.h" > </File> <File RelativePath=".\tvector.h" > </File> <File RelativePath=".\vector.h" > </File> </Files> <Globals> </Globals> </VisualStudioProject> Index: fileclasses.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/salt/fileclasses.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** fileclasses.h 5 Dec 2005 20:56:00 -0000 1.1 --- fileclasses.h 15 Mar 2007 07:26:29 -0000 1.2 *************** *** 39,45 **** --- 39,59 ---- #include <cstdlib> + #ifndef PATH_MAX + #define PATH_MAX 4096 + #endif + namespace salt { + /** Defines the native path separator character for the + platform + */ + static const char* PathSeparator = + #ifdef WIN32 + "\\"; + #else + "/"; + #endif + /** RFile defines an interface and some basic support functions for * classes providing read only file services Index: gmath.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/salt/gmath.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** gmath.h 10 Feb 2006 10:12:19 -0000 1.2 --- gmath.h 15 Mar 2007 07:26:29 -0000 1.3 *************** *** 40,43 **** --- 40,51 ---- #endif + #ifndef M_PI + #define M_PI 3.1415926535897932384626433832795 + #endif + + #ifndef M_PI_2 + #define M_PI_2 1.57079632679489661923132169164 /* pi/2 */ + #endif + // better directly use the cmath constants static const double gPI = M_PI; // was ((float)3.1415926535); *************** *** 153,157 **** f_inline TYPE gDegToRad(TYPE deg) { ! return (static_cast<TYPE>(deg)) * (M_PI / 180.0); } --- 161,165 ---- f_inline TYPE gDegToRad(TYPE deg) { ! return (static_cast<TYPE>(deg * (M_PI / 180.0))); } *************** *** 159,163 **** f_inline TYPE gRadToDeg(TYPE rad) { ! return (static_cast<TYPE>(rad)) * (180.0 / M_PI); } --- 167,171 ---- f_inline TYPE gRadToDeg(TYPE rad) { ! return (static_cast<TYPE>(rad * (180.0 / M_PI))); } Index: vector.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/salt/vector.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** vector.h 5 Dec 2005 20:56:00 -0000 1.1 --- vector.h 15 Mar 2007 07:26:29 -0000 1.2 *************** *** 70,74 **** } ! return rad; } --- 70,74 ---- } ! return static_cast<float>(rad); } Index: fileclasses.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/salt/fileclasses.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** fileclasses.cpp 5 Dec 2005 20:56:00 -0000 1.1 --- fileclasses.cpp 15 Mar 2007 07:26:29 -0000 1.2 *************** *** 210,214 **** long oldPos = mPosition; ! mPosition += (size*count); if(mPosition >= mSize) { --- 210,214 ---- long oldPos = mPosition; ! mPosition += static_cast<long>(size*count); if(mPosition >= mSize) { *************** *** 297,301 **** } ! int StdFile::GetPos(long*/* pos*/) { return ftell((FILE*)mHandle); --- 297,301 ---- } ! int StdFile::GetPos(long* /*pos*/) { return ftell((FILE*)mHandle); Index: sharedlibrary.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/salt/sharedlibrary.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** sharedlibrary.cpp 22 Jan 2006 12:13:08 -0000 1.3 --- sharedlibrary.cpp 15 Mar 2007 07:26:29 -0000 1.4 *************** *** 21,29 **** */ #include "sharedlibrary.h" - #include <dlfcn.h> #include <iostream> using namespace salt; bool SharedLibrary::Open(const std::string &libName) --- 21,71 ---- */ #include "sharedlibrary.h" #include <iostream> + #ifdef WIN32 + #include <windows.h> + #else + #include <dlfcn.h> + #endif + using namespace salt; + #ifdef WIN32 + + bool SharedLibrary::Open(const std::string &libName) + { + if (mLibHandle) + { + Close(); + } + + #if INIT_DEBUG + std::cerr << "(SharedLibrary) Opening " << libName + ".so\n"; + #endif + mLibHandle = ::LoadLibrary((libName + ".dll").c_str()); + + return (mLibHandle!=NULL); + } + + void* SharedLibrary::GetProcAddress(const std::string &procName) + { + if (mLibHandle) + { + return ::GetProcAddress((HMODULE)mLibHandle, procName.c_str()); + } + return NULL; + } + + void SharedLibrary::Close() + { + if (mLibHandle) + { + ::FreeLibrary((HMODULE)mLibHandle); + mLibHandle = NULL; + } + } + + #else + bool SharedLibrary::Open(const std::string &libName) *************** *** 40,44 **** if (mLibHandle == NULL) { ! std::cerr << "(SharedLibrary) ERROR: dlopen faild for " << libName << " with: \n\t" << dlerror() << std::endl; } --- 82,86 ---- if (mLibHandle == NULL) { ! std::cerr << "(SharedLibrary) ERROR: dlopen failed for " << libName << " with: \n\t" << dlerror() << std::endl; } *************** *** 70,73 **** --- 112,117 ---- } + #endif // WIN32 + const std::string& SharedLibrary::GetName() const *************** *** 75,76 **** --- 119,122 ---- return mName; } + + |
From: Oliver O. <fr...@us...> - 2007-03-15 07:27:06
|
Update of /cvsroot/simspark/simspark/spark/kerosin/openglserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv7790/spark/kerosin/openglserver Modified Files: openglserver.cpp openglserver.h openglsystem.h Added Files: openglwrapper.h Log Message: Merged WIN32 branch back to main trunk (access previous version with tag pre_merge_WIN32) Index: openglserver.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/openglserver/openglserver.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** openglserver.cpp 5 Dec 2005 21:38:23 -0000 1.1 --- openglserver.cpp 15 Mar 2007 07:26:26 -0000 1.2 *************** *** 20,25 **** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ - #include "openglserver.h" #include "openglsystem.h" #include <zeitgeist/scriptserver/scriptserver.h> --- 20,25 ---- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "openglserver.h" + #include "openglwrapper.h" #include "openglsystem.h" #include <zeitgeist/scriptserver/scriptserver.h> *************** *** 29,32 **** --- 29,51 ---- using namespace std; + #ifdef __APPLE__ + // code below from http://developer.apple.com/qa/qa2001/qa1188.html + #import <mach-o/dyld.h> + void *NSGLGetProcAddress(const char *name) + { + NSSymbol symbol; + char *symbolName; + // Prepend a '_' for the Unix C symbol mangling convention + symbolName = (char*) malloc (strlen (name) + 2); + strcpy(symbolName + 1, name); + symbolName[0] = '_'; + symbol = NULL; + if (NSIsSymbolNameDefined (symbolName)) + symbol = NSLookupAndBindSymbol (symbolName); + free (symbolName); + return symbol ? NSAddressOfSymbol (symbol) : NULL; + } + #endif + namespace kerosin { *************** *** 48,53 **** using namespace zeitgeist; ! OpenGLServer::OpenGLServer() : Leaf(), mExtensionReg(new GLExtensionReg()), ! mWantsToQuit(false), mHolder( new MapHolder() ) { } --- 67,71 ---- using namespace zeitgeist; ! OpenGLServer::OpenGLServer() : Leaf(), mWantsToQuit(false), mHolder( new MapHolder() ) { } *************** *** 57,65 **** } - boost::shared_ptr<GLExtensionReg> OpenGLServer::GetExtensionReg() const - { - return mExtensionReg; - } - void OpenGLServer::Quit() { --- 75,78 ---- *************** *** 92,179 **** } - unsigned int OpenGLServer::LoadARBProgram(GLenum /*target*/, const char* /*fileName*/) - { - #if 0 - // only try to load stuff if the extension is supported - if (!mExtensionReg->Has_GL_ARB_vertex_program()) - { - return 0; - } - - // before actually loading, try the cache - MapHolder::TProgramCache::iterator entry = mHolder->mPrograms.find(fileName); - - if (entry != mHolder->mPrograms.end()) - { - // we already have a match - return (*entry).second; - } - - unsigned int id = 0; - - // open file - shared_ptr<FileServer> fileServer = shared_static_cast<FileServer>(GetCore()->Get("/sys/server/file")); - salt::RFile *file = fileServer->Open(fileName); - - if (!file) return 0; - - unsigned char *buffer = new unsigned char[file->Size()+1]; - file->Read(buffer, file->Size()); - - glGenProgramsARB(1, &id); - glBindProgramARB(target, id); - - // try to load the actual program - glProgramStringARB(target, GL_PROGRAM_FORMAT_ASCII_ARB, file->Size(), buffer); - - // free memory - delete file; - delete []buffer; - - const unsigned char* error = glGetString(GL_PROGRAM_ERROR_STRING_ARB); - - // if an error occured, display error message - if (error[0] != 0) - { - int i; - glDeleteProgramsARB(1, &id); - glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &i); - GetCore()->GetLogServer()->Error() << "ERROR: Loading ARB program (Pos: " << i << ")..." << endl; - GetCore()->GetLogServer()->Error() << " => " << error << endl; - return 0; - } - - // enter program into the cache - mHolder->mPrograms[fileName] = id; - - return id; - #else - return 0; - #endif - } - - unsigned int OpenGLServer::LoadARBVertexProgram(const char* fileName) - { - // only try to load stuff if the extension is supported - if (!mExtensionReg->Has_GL_ARB_vertex_program()) - { - return 0; - } - - return LoadARBProgram(GL_VERTEX_PROGRAM_ARB, fileName); - } - - unsigned int OpenGLServer::LoadARBFragmentProgram(const char* /*fileName*/) - { - // only try to load stuff if the extension is supported - // if (!mExtensionReg->Has_GL_ARB_fragment_program()) - // { - // return 0; - // } - - // return LoadARBProgram(GL_FRAGMENT_PROGRAM_ARB, fileName); - return 0; - } - bool OpenGLServer::Init(const string& openGLSysName) { --- 105,108 ---- *************** *** 203,212 **** } - mExtensionReg->Init(); - - // if (!mExtensionReg->Has_GL_ARB_vertex_program() || !mExtensionReg->Has_GL_ARB_fragment_program()) - // { - // GetLog()->Normal() << "WARNING: GL_ARB_vertex_program not supported. " - // << "disabling fancy lighting\n" << endl; mSupportsFancyLighting = false; --- 132,135 ---- *************** *** 228,239 **** } - void OpenGLServer::ToggleFancyLighting() - { - if (mSupportsFancyLighting) - mSupportsFancyLighting = false; - else - mSupportsFancyLighting = true; - } - int OpenGLServer::AllocLight() --- 151,154 ---- *************** *** 258,260 **** --- 173,207 ---- } + // Maybe see also http://rainwarrior.thenoos.net/dragon/sdl_glsl.html + // and http://www.evl.uic.edu/arao/cs594/sdlglsl.html to rework the stuff here more platform independently + // The code below uses stuff from the apple developer website (hidden in openglwrapper.h) + void* OpenGLServer::GetExtension(const char* name) + { + #ifdef WIN32 + return wglGetProcAddress(name); + #elif defined(__APPLE__) + return NSGLGetProcAddress(name); + #else + return glXGetProcAddressARB((unsigned char*)name); + #endif + } + #define PROC_ADDRESS(_ptr, _function)\ + static _ptr proc = (_ptr) GetExtension(#_function); + + void OpenGLServer::glActiveTextureARB(unsigned int texture) + { + #ifdef __APPLE__ + // this is ugly, but I don't know where are the function prototypes in mac os X? + return ::glActiveTextureARB(texture); + #else + PROC_ADDRESS(PFNGLACTIVETEXTUREARBPROC, "glActiveTextureARB"); + + if (! proc) + { + return; + } + + (proc)(static_cast<GLenum>(texture)); + #endif + } Index: openglsystem.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/openglserver/openglsystem.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** openglsystem.h 5 Dec 2005 21:38:23 -0000 1.1 --- openglsystem.h 15 Mar 2007 07:26:26 -0000 1.2 *************** *** 51,55 **** protected: - // // members --- 51,54 ---- --- NEW FILE: openglwrapper.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: openglwrapper.h,v 1.2 2007/03/15 07:26:26 fruit Exp $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef KEROSIN_OPENGLWRAPPER_H #define KEROSIN_OPENGLWRAPPER_H #define GL_GLEXT_PROTOTYPES #ifdef WIN32 #define WIN32_LEAN_AND_MEAN 1 #include <windows.h> #endif #ifdef __APPLE__ #include <OpenGL/gl.h> #include <OpenGL/glext.h> #else #include <GL/gl.h> #include <GL/glext.h> #endif #if defined(WIN32) #include <GL/wglext.h> #elif defined(__APPLE__) /* nothing here */ #else #include <GL/glx.h> #include <GL/glxext.h> #endif #endif // KEROSIN_OPENGLWRAPPER_H Index: openglserver.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/openglserver/openglserver.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** openglserver.h 5 Dec 2005 21:38:23 -0000 1.1 --- openglserver.h 15 Mar 2007 07:26:26 -0000 1.2 *************** *** 27,31 **** #include <zeitgeist/class.h> #include <zeitgeist/leaf.h> - #include "glextensionreg.h" namespace kerosin --- 27,30 ---- *************** *** 44,54 **** // protected: - //! this structure will be used to map program names to OpenGL IDs - // #if HAVE_HASH_MAP - // typedef std::hash_map<std::string, unsigned int> TProgramCache; - // #else - // typedef std::map<std::string, unsigned int> TProgramCache; - // #endif - //! set of OpenGL light constants typedef std::set<int> TLightSet; --- 43,46 ---- *************** *** 68,73 **** bool Init(const std::string& openGLSysName); - boost::shared_ptr<GLExtensionReg> GetExtensionReg() const; - //! if this is called, the application will 'want to quit' void Quit(); --- 60,63 ---- *************** *** 82,97 **** void SwapBuffers() const; - //! vertex and fragment program loading - unsigned int LoadARBProgram(GLenum target, const char* fileName); - - //! vertex and fragment program loading - unsigned int LoadARBVertexProgram(const char* fileName); - - //! vertex and fragment program loading - unsigned int LoadARBFragmentProgram(const char* fileName); - - bool SupportsFancyLighting() const { return mSupportsFancyLighting; } - void ToggleFancyLighting(); - /** returns the next availble GL light constant or -1 if no more lights are available --- 72,75 ---- *************** *** 102,105 **** --- 80,89 ---- void PutLight(int l); + /** returns the address of an OpenGL extension by name */ + static void* GetExtension(const char* name); + + /** looksup and calls glActiveTextureARB extension if available */ + static void glActiveTextureARB(unsigned int texture); + protected: //! set up opengl viewport *************** *** 110,116 **** // protected: - //! this contains information on all available extensions - boost::shared_ptr<GLExtensionReg> mExtensionReg; - //! a flag, which can be used to control the shutdown of the display window and the application bool mWantsToQuit; --- 94,97 ---- |
From: Oliver O. <fr...@us...> - 2007-03-15 07:27:05
|
Update of /cvsroot/simspark/simspark/spark/plugin/sparkmonitor In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv7790/spark/plugin/sparkmonitor Modified Files: sparkmonitorclient.cpp Log Message: Merged WIN32 branch back to main trunk (access previous version with tag pre_merge_WIN32) Index: sparkmonitorclient.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/plugin/sparkmonitor/sparkmonitorclient.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** sparkmonitorclient.cpp 13 Dec 2005 21:48:50 -0000 1.1 --- sparkmonitorclient.cpp 15 Mar 2007 07:26:29 -0000 1.2 *************** *** 99,106 **** string msg; ! while (mNetMessage->Extract(mNetBuffer, msg)) { ParseMessage(msg); } } --- 99,110 ---- string msg; ! ! if (mNetMessage.get() != 0) ! { ! while (mNetMessage->Extract(mNetBuffer, msg)) { ParseMessage(msg); } + } } |
From: Oliver O. <fr...@us...> - 2007-03-15 07:27:05
|
Update of /cvsroot/simspark/simspark/spark/plugin/rosimporter In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv7790/spark/plugin/rosimporter Modified Files: Makefile.am rosimporter.cpp Log Message: Merged WIN32 branch back to main trunk (access previous version with tag pre_merge_WIN32) Index: Makefile.am =================================================================== RCS file: /cvsroot/simspark/simspark/spark/plugin/rosimporter/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile.am 18 Feb 2006 19:53:06 -0000 1.2 --- Makefile.am 15 Mar 2007 07:26:28 -0000 1.3 *************** *** 4,7 **** --- 4,8 ---- export.cpp \ roselements.cpp\ + roselements.h \ rosimporter.cpp\ rosimporter.h \ Index: rosimporter.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/plugin/rosimporter/rosimporter.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** rosimporter.cpp 23 Feb 2006 13:40:23 -0000 1.9 --- rosimporter.cpp 15 Mar 2007 07:26:28 -0000 1.10 *************** *** 21,25 **** */ #include "rosimporter.h" - #include <GL/glu.h> #include <tinyxml/xmlfunctions.h> #include <zeitgeist/logserver/logserver.h> --- 21,24 ---- |
From: Oliver O. <fr...@us...> - 2007-03-15 07:27:05
|
Update of /cvsroot/simspark/simspark/spark/plugin/inputsdl In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv7790/spark/plugin/inputsdl Modified Files: keyboardsdl.cpp Log Message: Merged WIN32 branch back to main trunk (access previous version with tag pre_merge_WIN32) Index: keyboardsdl.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/plugin/inputsdl/keyboardsdl.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** keyboardsdl.cpp 25 Dec 2005 18:32:27 -0000 1.2 --- keyboardsdl.cpp 15 Mar 2007 07:26:28 -0000 1.3 *************** *** 216,219 **** --- 216,221 ---- mInputSystem->GetInputServer()->GetModifierState(); + modState = Input::eNone; + if (event->key.keysym.mod & KMOD_LSHIFT) { |
From: Oliver O. <fr...@us...> - 2007-03-15 07:27:05
|
Update of /cvsroot/simspark/simspark/spark/oxygen/geometryserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv7790/spark/oxygen/geometryserver Modified Files: stdmeshimporter.cpp Log Message: Merged WIN32 branch back to main trunk (access previous version with tag pre_merge_WIN32) Index: stdmeshimporter.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/geometryserver/stdmeshimporter.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** stdmeshimporter.cpp 5 Dec 2005 21:16:49 -0000 1.1 --- stdmeshimporter.cpp 15 Mar 2007 07:26:27 -0000 1.2 *************** *** 309,314 **** float tmp,nx,start_nx,start_ny; ! float l = ccLength * 0.5; ! float a = g2PI / n; float sa = gSin(a); float ca = gCos(a); --- 309,314 ---- float tmp,nx,start_nx,start_ny; ! float l = ccLength * 0.5f; ! float a = static_cast<float>(g2PI / n); float sa = gSin(a); float ca = gCos(a); |
From: Oliver O. <fr...@us...> - 2007-03-15 07:27:05
|
Update of /cvsroot/simspark/simspark/spark/kerosin/inputserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv7790/spark/kerosin/inputserver Modified Files: inputcontrol.cpp inputcontrol.h inputserver.cpp Log Message: Merged WIN32 branch back to main trunk (access previous version with tag pre_merge_WIN32) Index: inputcontrol.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/inputserver/inputcontrol.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** inputcontrol.h 5 Dec 2005 21:38:22 -0000 1.1 --- inputcontrol.h 15 Mar 2007 07:26:25 -0000 1.2 *************** *** 111,114 **** --- 111,117 ---- bool RegisterInputItem(const std::string& inputItem, const std::string& name); + /** update variables from a script */ + virtual void UpdateCached(); + protected: virtual void OnLink(); Index: inputcontrol.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/inputserver/inputcontrol.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** inputcontrol.cpp 25 Dec 2005 18:32:27 -0000 1.2 --- inputcontrol.cpp 15 Mar 2007 07:26:25 -0000 1.3 *************** *** 34,39 **** { mDeltaTime = 0; ! mHorSens = 0.3; ! mVertSens = 0.3; mAdvanceTime = true; mMouseLook = false; --- 34,39 ---- { mDeltaTime = 0; ! mHorSens = 0.3f; ! mVertSens = 0.3f; mAdvanceTime = true; mMouseLook = false; *************** *** 315,316 **** --- 315,321 ---- return true; } + + void InputControl::UpdateCached() + { + mFPSController.reset(); + } Index: inputserver.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/inputserver/inputserver.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** inputserver.cpp 25 Dec 2005 18:32:27 -0000 1.2 --- inputserver.cpp 15 Mar 2007 07:26:25 -0000 1.3 *************** *** 34,38 **** InputServer::InputServer() : ! Node(), mModifierState(Input::Input::eNone), mScanCodeMap(new ScanCodeMap()) { // default to a german keyboard layout --- 34,38 ---- InputServer::InputServer() : ! Node(), mModifierState(Input::eUnknown), mScanCodeMap(new ScanCodeMap()) { // default to a german keyboard layout *************** *** 310,314 **** //printf("Looking at: %d %d %d", (*bind).mCode, (*bind).cmd, (*bind).modifier); ! if (bind.modifier == mModifierState) { if (input.mType == Input::eButton) --- 310,317 ---- //printf("Looking at: %d %d %d", (*bind).mCode, (*bind).cmd, (*bind).modifier); ! if ( ! (bind.modifier == 0 && mModifierState == 0) || ! (bind.modifier & mModifierState) ! ) { if (input.mType == Input::eButton) |
From: Oliver O. <fr...@us...> - 2007-03-15 07:27:05
|
Update of /cvsroot/simspark/simspark/spark/oxygen/sceneserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv7790/spark/oxygen/sceneserver Modified Files: fpscontroller.cpp fpscontroller.h fpscontroller_c.cpp sceneserver.cpp sceneserver.h Log Message: Merged WIN32 branch back to main trunk (access previous version with tag pre_merge_WIN32) Index: fpscontroller.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/sceneserver/fpscontroller.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** fpscontroller.h 5 Dec 2005 21:21:17 -0000 1.1 --- fpscontroller.h 15 Mar 2007 07:26:28 -0000 1.2 *************** *** 50,53 **** --- 50,59 ---- void AdjustVAngle(const float delta); + /** sets the current horizontal angle */ + void SetHAngleDeg(const float angleDeg); + + /** sets the current vertical angle */ + void SetVAngleDeg(const float angleDeg); + /** enables or disables forward movement */ void Forward(const bool state); *************** *** 86,93 **** float mAcceleration; ! /** the current horizontal angle */ float mHAngle; ! /** the current vertical angle */ float mVAngle; --- 92,99 ---- float mAcceleration; ! /** the current horizontal angle in degrees*/ float mHAngle; ! /** the current vertical angle in degrees */ float mVAngle; Index: fpscontroller_c.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/sceneserver/fpscontroller_c.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** fpscontroller_c.cpp 5 Dec 2005 21:21:17 -0000 1.1 --- fpscontroller_c.cpp 15 Mar 2007 07:26:28 -0000 1.2 *************** *** 41,44 **** --- 41,76 ---- } + FUNCTION(FPSController,setHAngle) + { + float inAngleDeg; + + if ( + (in.GetSize() != 1) || + (! in.GetValue(in.begin(),inAngleDeg)) + ) + { + return false; + } + + obj->SetHAngleDeg(inAngleDeg); + return true; + } + + FUNCTION(FPSController,setVAngle) + { + float inAngleDeg; + + if ( + (in.GetSize() != 1) || + (! in.GetValue(in.begin(),inAngleDeg)) + ) + { + return false; + } + + obj->SetVAngleDeg(inAngleDeg); + return true; + } + FUNCTION(FPSController,getAcceleration) { *************** *** 51,53 **** --- 83,87 ---- DEFINE_FUNCTION(setAcceleration); DEFINE_FUNCTION(getAcceleration); + DEFINE_FUNCTION(setHAngle); + DEFINE_FUNCTION(setVAngle); } Index: sceneserver.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/sceneserver/sceneserver.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** sceneserver.h 5 Dec 2005 21:21:17 -0000 1.1 --- sceneserver.h 15 Mar 2007 07:26:28 -0000 1.2 *************** *** 37,40 **** --- 37,41 ---- #include <zeitgeist/class.h> #include <zeitgeist/node.h> + #include "scene.h" namespace oxygen *************** *** 66,70 **** /** creates a new scene hierarchy at a specific location, new hierarchy is also made current */ ! boost::shared_ptr<Scene> CreateScene(const std::string &location); /** sets the active scene */ --- 67,71 ---- /** creates a new scene hierarchy at a specific location, new hierarchy is also made current */ ! bool CreateScene(const std::string &location); /** sets the active scene */ *************** *** 72,76 **** /** returns a reference to the current active scene */ ! boost::shared_ptr<Scene> GetActiveScene() { return mActiveScene; } /** updates the state of the current active scene (deltaTime is in --- 73,77 ---- /** returns a reference to the current active scene */ ! boost::shared_ptr<Scene> GetActiveScene() { return mActiveScene.get(); } /** updates the state of the current active scene (deltaTime is in *************** *** 118,122 **** private: /** the current active scene */ ! boost::shared_ptr<Scene> mActiveScene; /** cached reference to the Space node below the active scene */ --- 119,123 ---- private: /** the current active scene */ ! CachedPath<Scene> mActiveScene; /** cached reference to the Space node below the active scene */ Index: sceneserver.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/sceneserver/sceneserver.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sceneserver.cpp 18 Feb 2006 19:46:54 -0000 1.2 --- sceneserver.cpp 15 Mar 2007 07:26:28 -0000 1.3 *************** *** 49,53 **** } ! boost::shared_ptr<Scene> SceneServer::CreateScene(const std::string &location) { shared_ptr<CoreContext> context = GetCore()->CreateContext(); --- 49,53 ---- } ! bool SceneServer::CreateScene(const std::string &location) { shared_ptr<CoreContext> context = GetCore()->CreateContext(); *************** *** 56,86 **** (context->New("oxygen/Scene", location)); ! if (scene.get() != 0) ! { ! ResetCache(); ! mActiveScene = scene; ! } ! ! return scene; } bool SceneServer::SetActiveScene(const std::string &location) { ! shared_ptr<Scene> scene = ! shared_dynamic_cast<Scene>(GetCore()->Get(location)); ! ! if (scene.get() != 0) ! { ! ResetCache(); ! mActiveScene = scene; ! return true; ! } ! ! return false; } void SceneServer::ResetCache() { - mActiveScene.reset(); mActiveSpace.reset(); mActiveWorld.reset(); --- 56,73 ---- (context->New("oxygen/Scene", location)); ! ResetCache(); ! RegisterCachedPath(mActiveScene, location); ! return (scene.get() != 0); } bool SceneServer::SetActiveScene(const std::string &location) { ! ResetCache(); ! RegisterCachedPath(mActiveScene, location); ! return (mActiveScene.get() != 0); } void SceneServer::ResetCache() { mActiveSpace.reset(); mActiveWorld.reset(); Index: fpscontroller.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/sceneserver/fpscontroller.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** fpscontroller.cpp 5 Dec 2005 21:21:17 -0000 1.1 --- fpscontroller.cpp 15 Mar 2007 07:26:28 -0000 1.2 *************** *** 104,107 **** --- 104,117 ---- } + void FPSController::SetHAngleDeg(const float angleDeg) + { + mHAngle = angleDeg; + } + + void FPSController::SetVAngleDeg(const float angleDeg) + { + mVAngle = angleDeg; + } + void FPSController::Forward(const bool state) { |
From: Oliver O. <fr...@us...> - 2007-03-15 07:27:05
|
Update of /cvsroot/simspark/simspark/spark/plugin/sexpparser In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv7790/spark/plugin/sexpparser Modified Files: sexpparser.cpp Added Files: sexpparser.vcproj Log Message: Merged WIN32 branch back to main trunk (access previous version with tag pre_merge_WIN32) --- NEW FILE: sexpparser.vcproj --- <?xml version="1.0" encoding="Windows-1252"?> <VisualStudioProject ProjectType="Visual C++" Version="8,00" Name="sexpparser" ProjectGUID="{949142E4-5E9B-4C5F-9BD9-2EF9DA5CCCA6}" RootNamespace="sexpparser" 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" 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" 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=".\sexpparser.cpp" > </File> <File RelativePath=".\sexpparser.h" > </File> <File RelativePath=".\sexpparser_c.cpp" > </File> </Files> <Globals> </Globals> </VisualStudioProject> Index: sexpparser.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/plugin/sexpparser/sexpparser.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** sexpparser.cpp 13 Dec 2005 21:48:50 -0000 1.1 --- sexpparser.cpp 15 Mar 2007 07:26:28 -0000 1.2 *************** *** 41,45 **** char* c = const_cast<char*>(input.c_str()); pcont_t* pcont = init_continuation(c); ! sexp_t* sexp = iparse_sexp(c,input.size(),pcont); while (sexp != 0) --- 41,45 ---- char* c = const_cast<char*>(input.c_str()); pcont_t* pcont = init_continuation(c); ! sexp_t* sexp = iparse_sexp(c,static_cast<int>(input.size()),pcont); while (sexp != 0) *************** *** 47,51 **** SexpToPredicate(predList,sexp); destroy_sexp(sexp); ! sexp = iparse_sexp(c,input.size(),pcont); } --- 47,51 ---- SexpToPredicate(predList,sexp); destroy_sexp(sexp); ! sexp = iparse_sexp(c,static_cast<int>(input.size()),pcont); } |
From: Oliver O. <fr...@us...> - 2007-03-15 07:27:04
|
Update of /cvsroot/simspark/simspark/spark/kerosin In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv7790/spark/kerosin Modified Files: Makefile.am kerosin-config.in kerosin.cpp kerosin.h Added Files: kerosin.vcproj Log Message: Merged WIN32 branch back to main trunk (access previous version with tag pre_merge_WIN32) Index: kerosin-config.in =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/kerosin-config.in,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** kerosin-config.in 25 Dec 2005 14:55:51 -0000 1.2 --- kerosin-config.in 15 Mar 2007 07:26:25 -0000 1.3 *************** *** 103,106 **** --- 103,109 ---- convlib="libkerosin.la" fi + if test `uname` = "Darwin"; then + convlib="$convlib -framework OpenGL -framework IL -framework SDL " + fi echo @libdir@/simspark/$convlib fi Index: kerosin.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/kerosin.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** kerosin.cpp 5 Dec 2005 21:38:22 -0000 1.1 --- kerosin.cpp 15 Mar 2007 07:26:25 -0000 1.2 *************** *** 28,32 **** --- 28,37 ---- Kerosin::Kerosin(zeitgeist::Zeitgeist &zg) { + #ifndef WIN32 zg.GetCore()->RegisterClassObject(new CLASS(SoundServer), "kerosin/"); + zg.GetCore()->RegisterClassObject(new CLASS(ImageServer), "kerosin/"); + zg.GetCore()->RegisterClassObject(new CLASS(FontServer), "kerosin/"); + #endif + zg.GetCore()->RegisterClassObject(new CLASS(InputServer), "kerosin/"); zg.GetCore()->RegisterClassObject(new CLASS(InputSystem), "kerosin/"); *************** *** 34,39 **** zg.GetCore()->RegisterClassObject(new CLASS(InputDevice), "kerosin/"); zg.GetCore()->RegisterClassObject(new CLASS(InputControl), "kerosin/"); ! zg.GetCore()->RegisterClassObject(new CLASS(ImageServer), "kerosin/"); ! zg.GetCore()->RegisterClassObject(new CLASS(FontServer), "kerosin/"); zg.GetCore()->RegisterClassObject(new CLASS(OpenGLServer), "kerosin/"); zg.GetCore()->RegisterClassObject(new CLASS(OpenGLSystem), "kerosin/"); --- 39,43 ---- zg.GetCore()->RegisterClassObject(new CLASS(InputDevice), "kerosin/"); zg.GetCore()->RegisterClassObject(new CLASS(InputControl), "kerosin/"); ! zg.GetCore()->RegisterClassObject(new CLASS(OpenGLServer), "kerosin/"); zg.GetCore()->RegisterClassObject(new CLASS(OpenGLSystem), "kerosin/"); Index: Makefile.am =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/Makefile.am,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Makefile.am 8 Mar 2006 17:00:17 -0000 1.6 --- Makefile.am 15 Mar 2007 07:26:25 -0000 1.7 *************** *** 3,16 **** pkglib_LTLIBRARIES = libkerosin_debug.la libkerosin_debug_la_SOURCES = $(sources) ! nodist_libkerosin_debug_la_SOURCES = openglserver/glextensionreg.cpp libkerosin_debug_la_CXXFLAGS = -O -g -W -Wall ! libkerosin_debug_la_LIBADD = @FREETYPE_LIBADD@ -lSDL @IL_LIBADD@ -lGL libkerosin_debug_la_LDFLAGS = -version-info @kerosin_version_info@ else pkglib_LTLIBRARIES = libkerosin.la libkerosin_la_SOURCES = $(sources) ! nodist_libkerosin_la_SOURCES = openglserver/glextensionreg.cpp libkerosin_la_CXXFLAGS = -O2 ! libkerosin_la_LIBADD = @FREETYPE_LIBADD@ -lSDL @IL_LIBADD@ -lGL libkerosin_la_LDFLAGS = -version-info @kerosin_version_info@ endif --- 3,16 ---- pkglib_LTLIBRARIES = libkerosin_debug.la libkerosin_debug_la_SOURCES = $(sources) ! # nodist_libkerosin_debug_la_SOURCES = openglserver/glextensionreg.cpp libkerosin_debug_la_CXXFLAGS = -O -g -W -Wall ! libkerosin_debug_la_LIBADD = @FREETYPE_LIBADD@ @SDL_LIBADD@ @IL_LIBADD@ @GL_LIBADD@ libkerosin_debug_la_LDFLAGS = -version-info @kerosin_version_info@ else pkglib_LTLIBRARIES = libkerosin.la libkerosin_la_SOURCES = $(sources) ! # nodist_libkerosin_la_SOURCES = openglserver/glextensionreg.cpp libkerosin_la_CXXFLAGS = -O2 ! libkerosin_la_LIBADD = @FREETYPE_LIBADD@ @SDL_LIBADD@ @IL_LIBADD@ @GL_LIBADD@ libkerosin_la_LDFLAGS = -version-info @kerosin_version_info@ endif *************** *** 18,33 **** bin_SCRIPTS = kerosin-config ! BUILT_SOURCES = openglserver/glextensionreg.h ! nobase_nodist_libpkginclude_HEADERS = openglserver/glextensionreg.h ! openglserver/glextensionreg.cpp: ${top_srcdir}/utility/glextgen/glextensionreg.cpp ! @echo "Copying generated glextension sources" ! cp ${top_srcdir}/utility/glextgen/glextensionreg.cpp $@ ! openglserver/glextensionreg.h: ${top_srcdir}/utility/glextgen/glextensionreg.h ! cp ${top_srcdir}/utility/glextgen/glextensionreg.h $@ ! ${top_srcdir}/utility/glextgen/glextensionreg.cpp ${top_srcdir}/utility/glextgen/glextensionreg.h: ! cd ${top_srcdir}/utility/glextgen/ && $(MAKE) $(AM_MAKEFLAGS) all endif --- 18,33 ---- bin_SCRIPTS = kerosin-config ! # BUILT_SOURCES = openglserver/glextensionreg.h ! # nobase_nodist_libpkginclude_HEADERS = openglserver/glextensionreg.h ! # openglserver/glextensionreg.cpp: ${top_srcdir}/utility/glextgen/glextensionreg.cpp ! # @echo "Copying generated glextension sources" ! # cp ${top_srcdir}/utility/glextgen/glextensionreg.cpp $@ ! # openglserver/glextensionreg.h: ${top_srcdir}/utility/glextgen/glextensionreg.h ! # cp ${top_srcdir}/utility/glextgen/glextensionreg.h $@ ! # ${top_srcdir}/utility/glextgen/glextensionreg.cpp ${top_srcdir}/utility/glextgen/glextensionreg.h: ! # cd ${top_srcdir}/utility/glextgen/ && $(MAKE) $(AM_MAKEFLAGS) all endif *************** *** 144,147 **** --- 144,149 ---- textureserver/texture2d.h \ textureserver/textureserver.h \ + openglserver/openglwrapper.h \ + openglserver/openglsystem.h \ openglserver/openglserver.h \ openglserver/glbase.h \ Index: kerosin.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/kerosin.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** kerosin.h 5 Dec 2005 21:38:22 -0000 1.1 --- kerosin.h 15 Mar 2007 07:26:25 -0000 1.2 *************** *** 30,34 **** --- 30,40 ---- #define KEROSIN_KEROSIN_H + #ifndef WIN32 #include "soundserver/soundserver.h" + #include "imageserver/imageserver.h" + #include "fontserver/fontserver.h" + #include "fontserver/font.h" + #endif + #include "inputserver/inputserver.h" #include "inputserver/inputsystem.h" *************** *** 36,42 **** #include "inputserver/inputcontrol.h" #include "inputserver/inputitem.h" ! #include "imageserver/imageserver.h" ! #include "fontserver/fontserver.h" ! #include "fontserver/font.h" #include "openglserver/openglserver.h" #include "openglserver/openglsystem.h" --- 42,46 ---- #include "inputserver/inputcontrol.h" #include "inputserver/inputitem.h" ! #include "openglserver/openglserver.h" #include "openglserver/openglsystem.h" --- NEW FILE: kerosin.vcproj --- <?xml version="1.0" encoding="Windows-1252"?> <VisualStudioProject ProjectType="Visual C++" Version="8,00" Name="kerosin" ProjectGUID="{38291F56-23B6-4B5D-8810-D2AD2A379EE9}" RootNamespace="kerosin" Keyword="Win32Proj" > <Platforms> <Platform Name="Win32" /> </Platforms> <ToolFiles> </ToolFiles> <Configurations> <Configuration Name="Debug|Win32" OutputDirectory="$(SolutionDir)$(ConfigurationName)" IntermediateDirectory="$(ConfigurationName)" ConfigurationType="4" CharacterSet="0" > <Tool Name="VCPreBuildEventTool" /> <Tool Name="VCCustomBuildTool" /> <Tool Name="VCXMLDataGeneratorTool" /> <Tool Name="VCWebServiceProxyGeneratorTool" /> <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\win32;..\;sceneserver/helper;..\utility" PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_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="VCLibrarianTool" /> <Tool Name="VCALinkTool" /> <Tool Name="VCXDCMakeTool" /> <Tool Name="VCBscMakeTool" /> <Tool Name="VCFxCopTool" /> <Tool Name="VCPostBuildEventTool" /> </Configuration> <Configuration Name="VCRelease|Win32" OutputDirectory="$(SolutionDir)$(ConfigurationName)" IntermediateDirectory="$(ConfigurationName)" ConfigurationType="4" CharacterSet="0" WholeProgramOptimization="1" > <Tool Name="VCPreBuildEventTool" /> <Tool Name="VCCustomBuildTool" /> <Tool Name="VCXMLDataGeneratorTool" /> <Tool Name="VCWebServiceProxyGeneratorTool" /> <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" AdditionalIncludeDirectories="..\win32;..\;sceneserver/helper;..\utility" PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_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="VCLibrarianTool" /> <Tool Name="VCALinkTool" /> <Tool Name="VCXDCMakeTool" /> <Tool Name="VCBscMakeTool" /> <Tool Name="VCFxCopTool" /> <Tool Name="VCPostBuildEventTool" /> </Configuration> </Configurations> <References> </References> <Files> <Filter Name="materialserver" > <File RelativePath=".\materialserver\material.cpp" > </File> <File RelativePath=".\materialserver\material.h" > </File> <File RelativePath=".\materialserver\material2dtexture.cpp" > </File> <File RelativePath=".\materialserver\material2dtexture.h" > </File> <File RelativePath=".\materialserver\material2dtexture_c.cpp" > </File> <File RelativePath=".\materialserver\material_c.cpp" > </File> <File RelativePath=".\materialserver\materialserver.cpp" > </File> <File RelativePath=".\materialserver\materialserver.h" > </File> <File RelativePath=".\materialserver\materialserver_c.cpp" > </File> <File RelativePath=".\materialserver\materialsolid.cpp" > </File> <File RelativePath=".\materialserver\materialsolid.h" > </File> <File RelativePath=".\materialserver\materialsolid_c.cpp" > </File> </Filter> <Filter Name="openglserver" > <File RelativePath=".\openglserver\glbase.h" > </File> <File RelativePath=".\openglserver\openglserver.cpp" > </File> <File RelativePath=".\openglserver\openglserver.h" > </File> <File RelativePath=".\openglserver\openglserver_c.cpp" > </File> <File RelativePath=".\openglserver\openglsystem.h" > </File> <File RelativePath=".\openglserver\openglsystem_c.cpp" > </File> </Filter> <Filter Name="inputserver" > <File RelativePath=".\inputserver\input.cpp" > </File> <File RelativePath=".\inputserver\input.h" > </File> <File RelativePath=".\inputserver\inputcontrol.cpp" > </File> <File RelativePath=".\inputserver\inputcontrol.h" > </File> <File RelativePath=".\inputserver\inputcontrol_c.cpp" > </File> <File RelativePath=".\inputserver\inputdevice.cpp" > </File> <File RelativePath=".\inputserver\inputdevice.h" > </File> <File RelativePath=".\inputserver\inputdevice_c.cpp" > </File> <File RelativePath=".\inputserver\inputitem.cpp" > </File> <File RelativePath=".\inputserver\inputitem.h" > </File> <File RelativePath=".\inputserver\inputitem_c.cpp" > </File> <File RelativePath=".\inputserver\inputserver.cpp" > </File> <File RelativePath=".\inputserver\inputserver.h" > </File> <File RelativePath=".\inputserver\inputserver_c.cpp" > </File> <File RelativePath=".\inputserver\inputsystem.cpp" > </File> <File RelativePath=".\inputserver\inputsystem.h" > </File> <File RelativePath=".\inputserver\inputsystem_c.cpp" > </File> <File RelativePath=".\inputserver\scancodemap.cpp" > </File> <File RelativePath=".\inputserver\scancodemap.h" > </File> </Filter> <Filter Name="renderserver" > <File RelativePath=".\renderserver\customrender.cpp" > </File> <File RelativePath=".\renderserver\customrender.h" > </File> <File RelativePath=".\renderserver\customrender_c.cpp" > </File> <File RelativePath=".\renderserver\rendercontrol.cpp" > </File> <File RelativePath=".\renderserver\rendercontrol.h" > </File> <File RelativePath=".\renderserver\rendercontrol_c.cpp" > </File> <File RelativePath=".\renderserver\rendernode.cpp" > </File> <File RelativePath=".\renderserver\rendernode.h" > </File> <File RelativePath=".\renderserver\rendernode_c.cpp" > </File> <File RelativePath=".\renderserver\renderserver.cpp" > </File> <File RelativePath=".\renderserver\renderserver.h" > </File> <File RelativePath=".\renderserver\renderserver_c.cpp" > </File> </Filter> <Filter Name="sceneserver" > <File RelativePath=".\sceneserver\axis.cpp" > </File> <File RelativePath=".\sceneserver\axis.h" > </File> <File RelativePath=".\sceneserver\axis_c.cpp" > </File> <File RelativePath=".\sceneserver\box.cpp" > </File> <File RelativePath=".\sceneserver\box.h" > </File> <File RelativePath=".\sceneserver\box_c.cpp" > </File> <File RelativePath=".\sceneserver\ccylinder.cpp" > </File> <File RelativePath=".\sceneserver\ccylinder.h" > </File> <File RelativePath=".\sceneserver\ccylinder_c.cpp" > </File> <File RelativePath=".\sceneserver\light.cpp" > </File> <File RelativePath=".\sceneserver\light.h" > </File> <File RelativePath=".\sceneserver\light_c.cpp" > </File> <File RelativePath=".\sceneserver\singlematnode.cpp" > </File> <File RelativePath=".\sceneserver\singlematnode.h" > </File> <File RelativePath=".\sceneserver\singlematnode_c.cpp" > </File> <File RelativePath=".\sceneserver\sphere.cpp" > </File> <File RelativePath=".\sceneserver\sphere.h" > </File> <File RelativePath=".\sceneserver\sphere_c.cpp" > </File> <File RelativePath=".\sceneserver\staticmesh.cpp" > </File> <File RelativePath=".\sceneserver\staticmesh.h" > </File> <File RelativePath=".\sceneserver\staticmesh_c.cpp" > </File> <Filter Name="helper" > <File RelativePath=".\sceneserver\helper\nv_algebra.cpp" > </File> <File RelativePath=".\sceneserver\helper\NVMeshMender.cpp" > </File> <File RelativePath=".\sceneserver\helper\NVMeshMender.h" > </File> <Filter Name="nv_math" > <File RelativePath=".\sceneserver\helper\nv_math\nv_algebra.h" > </File> <File RelativePath=".\sceneserver\helper\nv_math\nv_math.h" > </File> <File RelativePath=".\sceneserver\helper\nv_math\nv_mathdecl.h" > </File> </Filter> </Filter> </Filter> <Filter Name="textureserver" > <File RelativePath=".\textureserver\texture.cpp" > </File> <File RelativePath=".\textureserver\texture.h" > </File> <File RelativePath=".\textureserver\texture2d.cpp" > </File> <File RelativePath=".\textureserver\texture2d.h" > </File> <File RelativePath=".\textureserver\textureserver.cpp" > </File> <File RelativePath=".\textureserver\textureserver.h" > </File> <File RelativePath=".\textureserver\textureserver_c.cpp" > </File> </Filter> <File RelativePath=".\kerosin.cpp" > </File> <File RelativePath=".\kerosin.h" > </File> </Files> <Globals> </Globals> </VisualStudioProject> |
From: Oliver O. <fr...@us...> - 2007-03-15 07:27:04
|
Update of /cvsroot/simspark/simspark/spark/kerosin/renderserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv7790/spark/kerosin/renderserver Modified Files: rendercontrol.cpp rendercontrol.h renderserver.cpp renderserver.h Log Message: Merged WIN32 branch back to main trunk (access previous version with tag pre_merge_WIN32) Index: renderserver.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/renderserver/renderserver.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** renderserver.h 18 Feb 2006 19:43:13 -0000 1.2 --- renderserver.h 15 Mar 2007 07:26:26 -0000 1.3 *************** *** 42,45 **** --- 42,46 ---- #include <zeitgeist/class.h> #include <zeitgeist/leaf.h> + #include <oxygen/sceneserver/sceneserver.h> #include <kerosin/openglserver/glbase.h> *************** *** 77,80 **** --- 78,84 ---- void SetAmbientColor(const RGBA& ambient); + /** update variables from a script */ + virtual void UpdateCached(); + protected: /** get the active scene node from the sceneServer */ *************** *** 104,113 **** /** reference to the SceneServer */ ! boost::shared_ptr<oxygen::SceneServer> mSceneServer; ! ! /** reference to the OpenGLServer */ ! boost::shared_ptr<kerosin::OpenGLServer> mOpenGLServer; - unsigned int mAmbientVP; RGBA mAmbientColor; }; --- 108,113 ---- /** reference to the SceneServer */ ! CachedPath<oxygen::SceneServer> mSceneServer; RGBA mAmbientColor; }; *************** *** 118,119 **** --- 118,134 ---- #endif // KEROSIN_RENDERSERVER_H + + + + + + + + + + + + + + + Index: rendercontrol.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/renderserver/rendercontrol.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** rendercontrol.cpp 5 Dec 2005 21:38:23 -0000 1.1 --- rendercontrol.cpp 15 Mar 2007 07:26:26 -0000 1.2 *************** *** 21,26 **** #include "customrender.h" #include <zeitgeist/logserver/logserver.h> - #include <kerosin/renderserver/renderserver.h> - #include <kerosin/openglserver/openglserver.h> using namespace kerosin; --- 21,24 ---- *************** *** 41,48 **** void RenderControl::OnLink() { ! mRenderServer = shared_dynamic_cast<RenderServer> ! (GetCore()->Get("/sys/server/render")); ! if (mRenderServer.get() == 0) { GetLog()->Error() --- 39,45 ---- void RenderControl::OnLink() { ! RegisterCachedPath(mRenderServer, "/sys/server/render"); ! if (mRenderServer.expired()) { GetLog()->Error() *************** *** 50,57 **** } ! mOpenGLServer = shared_dynamic_cast<OpenGLServer> ! (GetCore()->Get("/sys/server/opengl")); ! if (mOpenGLServer.get() == 0) { GetLog()->Error() --- 47,53 ---- } ! RegisterCachedPath(mOpenGLServer,"/sys/server/opengl"); ! if (mOpenGLServer.expired()) { GetLog()->Error() *************** *** 60,69 **** } - void RenderControl::OnUnlink() - { - mRenderServer.reset(); - mOpenGLServer.reset(); - } - void RenderControl::RenderCustom() { --- 56,59 ---- *************** *** 85,88 **** --- 75,86 ---- void RenderControl::EndCycle() { + if ( + (mOpenGLServer.expired()) || + (mRenderServer.expired()) + ) + { + return; + } + // update the window (pumps event loop, etc..) and render the // current frame Index: renderserver.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/renderserver/renderserver.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** renderserver.cpp 18 Feb 2006 19:43:13 -0000 1.2 --- renderserver.cpp 15 Mar 2007 07:26:26 -0000 1.3 *************** *** 25,29 **** #include <oxygen/sceneserver/scene.h> #include <oxygen/sceneserver/camera.h> ! #include <kerosin/openglserver/openglserver.h> #include <kerosin/sceneserver/staticmesh.h> #include <kerosin/sceneserver/light.h> --- 25,29 ---- #include <oxygen/sceneserver/scene.h> #include <oxygen/sceneserver/camera.h> ! #include <kerosin/openglserver/openglwrapper.h> #include <kerosin/sceneserver/staticmesh.h> #include <kerosin/sceneserver/light.h> *************** *** 49,82 **** { // setup SceneServer reference ! mSceneServer = shared_dynamic_cast<SceneServer> ! (GetCore()->Get("/sys/server/scene")); ! if (mSceneServer.get() == 0) { GetLog()->Error() << "(RenderServer) ERROR: SceneServer not found\n"; } - - // setup OpenGLServer reference - mOpenGLServer = shared_dynamic_cast<OpenGLServer> - (GetCore()->Get("sys/server/opengl")); - - if (mOpenGLServer.get() == 0) - { - GetLog()->Error() - << "(RenderServer) ERROR: OpenGLServer not found\n"; - } else - { - mAmbientVP = 0; - #if 0 - mAmbientVP = mOpenGLServer->LoadARBVertexProgram - ("/sys/program/ambient.vp"); - if (mAmbientVP == 0) - { - GetLog()->Error() - << "(RenderServer) ERROR: Could not load vertex program\n"; - } - #endif - } } --- 49,59 ---- { // setup SceneServer reference ! RegisterCachedPath(mSceneServer, "/sys/server/scene"); ! if (mSceneServer.expired()) { GetLog()->Error() << "(RenderServer) ERROR: SceneServer not found\n"; } } *************** *** 84,90 **** RenderServer::OnUnlink() { - mSceneServer.reset(); - mOpenGLServer.reset(); mActiveScene.reset(); } --- 61,66 ---- RenderServer::OnUnlink() { mActiveScene.reset(); + Leaf::OnUnlink(); } *************** *** 92,96 **** RenderServer::GetActiveScene() { ! if (mSceneServer.get() == 0) { mActiveScene.reset(); --- 68,72 ---- RenderServer::GetActiveScene() { ! if (mSceneServer.expired()) { mActiveScene.reset(); *************** *** 110,185 **** void - RenderServer::RenderFancyLighting(const salt::Frustum& /*frustum*/, - boost::shared_ptr<oxygen::Camera>& /*camera*/, - TLeafList& /*myLights*/, TLeafList& /*allMeshes*/, - TLeafList& /*visibleMeshes*/) - - { - #if 0 - glEnable(GL_VERTEX_PROGRAM_ARB); - glBindProgramARB(GL_VERTEX_PROGRAM_ARB, mAmbientVP); - - glColor3f(0.1f,0.1f,0.1f); - mActiveScene->RenderAmbient(); - - // render lights - glBlendFunc(GL_ONE, GL_ONE); - glEnable(GL_BLEND); - //glEnable(GL_ALPHA_TEST); - //glAlphaFunc(GL_GREATER, 0.0f); - glDepthMask(0); - glDepthFunc(GL_EQUAL); - - for (TLeafList::iterator i=myLights.begin(); i != myLights.end(); ++i) - { - shared_ptr<Light> light = shared_static_cast<Light>(*i); - - // only render the light if it is visible - if (frustum.Intersects(light->GetWorldBoundingBox())!=Frustum::FS_OUTSIDE) - { - for (TLeafList::iterator j=visibleMeshes.begin(); j != visibleMeshes.end(); ++j) - { - shared_ptr<StaticMesh> mesh = shared_static_cast<StaticMesh>(*j); - - // we only have to render meshes, whose bounding volume intersects the light volume - if (light->GetWorldBoundingBox().Intersects(mesh->GetWorldBoundingBox())) - { - Matrix toObjectSpace; - toObjectSpace.Identity(); - toObjectSpace = mesh->GetWorldTransform(); - toObjectSpace.InvertRotationMatrix(); - //light->GetWorldTransform().Pos().Dump(); - light->Prepare(); - Vector3f lightPos = toObjectSpace.Transform(light->GetWorldTransform().Pos()); - Vector3f viewPos = toObjectSpace.Transform(camera->GetWorldTransform().Pos()); - glProgramLocalParameter4fARB(GL_VERTEX_PROGRAM_ARB, 0, lightPos.x(), lightPos.y(), lightPos.z(), 1.0f); - glProgramLocalParameter4fARB(GL_VERTEX_PROGRAM_ARB, 1, viewPos.x(), viewPos.y(), viewPos.z(), 1.0f); - light->RenderLitMesh(shared_static_cast<StaticMesh>(*j)); - } - } - } - } - - glDisable(GL_BLEND); - glDepthMask(1); - - glActiveTextureARB(GL_TEXTURE0_ARB); - glDisable(GL_TEXTURE_2D); - glActiveTextureARB(GL_TEXTURE1_ARB); - glDisable(GL_TEXTURE_2D); - glActiveTextureARB(GL_TEXTURE2_ARB); - glDisable(GL_TEXTURE_2D); - - glEnable(GL_VERTEX_PROGRAM_ARB); - glBindProgramARB(GL_VERTEX_PROGRAM_ARB, mAmbientVP); - - // standard rendering - mActiveScene->Render(); - - glDisable(GL_VERTEX_PROGRAM_ARB); - #endif - } - - void RenderServer::Render() { --- 86,89 ---- *************** *** 213,240 **** BindCamera(camera); - #if 0 - // get the view frustum from the camera - Frustum frustum; - camera->DescribeFrustum(frustum); - - // cull lights and geometries against the frustum - TLeafList myLights; - TLeafList allMeshes; - TLeafList visibleMeshes; - - mActiveScene->GetChildrenSupportingClass("Light", myLights, true); - mActiveScene->GetChildrenSupportingClass("StaticMesh", allMeshes, true); - - TLeafList::iterator i; - for (i = allMeshes.begin(); i != allMeshes.end(); ++i) - { - // try to cull meshes, which are outside the viewing frustum - if (frustum.Intersects(shared_static_cast<StaticMesh>(*i)->GetWorldBoundingBox())!=Frustum::FS_OUTSIDE) - { - visibleMeshes.push_back(*i); - } - } - #endif - // actual rendering --- 117,120 ---- *************** *** 273,287 **** // reset GL lights glDisable(GL_LIGHTING); - - #if 0 - // test for fancy lighting support - disabled for now - const bool doFancyLighting = false; /*openglServer->SupportsFancyLighting()*/ - - if (doFancyLighting) - { - RenderFancyLighting(frustum, camera, myLights, allMeshes, visibleMeshes); - } - else - #endif } --- 153,156 ---- *************** *** 345,346 **** --- 214,220 ---- mAmbientColor = ambient; } + + void RenderServer::UpdateCached() + { + mActiveScene.reset(); + } Index: rendercontrol.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/renderserver/rendercontrol.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** rendercontrol.h 5 Dec 2005 21:38:23 -0000 1.1 --- rendercontrol.h 15 Mar 2007 07:26:26 -0000 1.2 *************** *** 22,31 **** #include <oxygen/simulationserver/simcontrolnode.h> namespace kerosin { - class RenderServer; - class OpenGLServer; - /** \class RenderControl is a SimControlNode that renders the current scene and pumps the SDL event loop at the end of each simulation --- 22,30 ---- #include <oxygen/simulationserver/simcontrolnode.h> + #include <kerosin/renderserver/renderserver.h> + #include <kerosin/openglserver/openglserver.h> namespace kerosin { /** \class RenderControl is a SimControlNode that renders the current scene and pumps the SDL event loop at the end of each simulation *************** *** 46,59 **** protected: virtual void OnLink(); - virtual void OnUnlink(); - void RenderCustom(); protected: /** cached reference to the RenderServer */ ! boost::shared_ptr<kerosin::RenderServer> mRenderServer; /** cached reference to the OpenGLServer */ ! boost::shared_ptr<kerosin::OpenGLServer> mOpenGLServer; /** total frames rendered */ --- 45,56 ---- protected: virtual void OnLink(); void RenderCustom(); protected: /** cached reference to the RenderServer */ ! CachedPath<kerosin::RenderServer> mRenderServer; /** cached reference to the OpenGLServer */ ! CachedPath<kerosin::OpenGLServer> mOpenGLServer; /** total frames rendered */ |
From: Oliver O. <fr...@us...> - 2007-03-15 07:27:03
|
Update of /cvsroot/simspark/simspark/spark In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv7790/spark Modified Files: ChangeLog Makefile.am README acinclude.m4 configure.ac Added Files: simspark.sln Log Message: Merged WIN32 branch back to main trunk (access previous version with tag pre_merge_WIN32) --- NEW FILE: simspark.sln --- (This appears to be a binary file; contents omitted.) Index: ChangeLog =================================================================== RCS file: /cvsroot/simspark/simspark/spark/ChangeLog,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ChangeLog 19 Dec 2005 20:09:16 -0000 1.1 --- ChangeLog 15 Mar 2007 07:26:25 -0000 1.2 *************** *** 0 **** --- 1,87 ---- + 2007-03-15 Oliver Obst <fr...@cs...> + 2007-03-15 Oliver Obst <fr...@us...> + + * kerosin/kerosin-config.in: + - workaround for Mac OS included + * zeitgeist/scriptserver/scriptserver.cpp: + - fixed problem with including config.h an Mac OS + + * plugin/inputsdl/keyboardsdl.cpp: fixed bug with eNone enum + + + 2007-03-06 Oliver Obst <fr...@us...> + + * zeitgeist/core.cpp: + - fixed Core::BindClass to attach a core to ClassClass + + 2007-02-28 Oliver Obst <fr...@us...> + + * configure.ac: - added test directory + * kerosin/Makefile.am: + - added openglwrapper.h and openglsystem.h to Makefile + * plugin/openglsyssdl/openglsystemsdl.cpp: + - replaced GL.h inclusion by our openglwrapper + * plugin/rosimporter/rosimporter.cpp: + - removed the GL/glu.h include + * utility/sfsexp/Makefile.am: + - removed EXTRA_DIST for README + * plugin/rosimporter/Makefile.am: + - added roselements.h to Makefile + * plugin/openglsyssdl/Makefile.am: + - added openglsystemsdl.h file to Makefile + * Makefile.am: + - added test and plugin subdir + * oxygen/Makefile.am: + - added jointeffector.h and jointperceptor.h to Makefile + - added transformcollider.h to Makefile + * utility/rcssnet/Makefile.am: + - added handler.cpp to the Makefile + * utility/tinyxml/Makefile.am: + - added header files, so they go into the distribution as well + * acinclude.m4: + - fixed all graphic related checks to work with Mac OS X + + * kerosin/fontserver/font.cpp: + * kerosin/fontserver/font.h: + - moved including OpenGL stuff from font.cpp to font.h + - changed handle from uint to GLuint + + * kerosin/openglserver/openglwrapper.h: + - added apple MacOS specific stuff + * kerosin/textureserver/texture.cpp: + * kerosin/textureserver/texture.h: + - moved inclusion of openglwrapper from .cpp to .h + - changed the texture handle from uint to GLuint + + 2007-02-28 Oliver Obst <fr...@us...> + + * oxygen/Makefile.am: added odewrapper.h + + + 2007-02-27 Oliver Obst <fr...@us...> + + * zeitgeist/scriptserver/scriptserver.cpp: + - included config.h to get the PACKAGE_NAME + + 2007-02-13 Oliver Obst <fr...@us...> + + * configure.ac: + - fixed contact email address + - added check for header files needed to compile + + * acinclude.m4: + - included checks for the OpenGL stuff on a Mac + - removed the checks that were needed to build the glextreg stuff + + * utility/Makefile.am: + removed the glextgen from parent directory Makefile + + * utility/rcssnet/socket.hpp: + HAVE_SOCKET indicates already the presence of the socket function (and may be defined even without + having a type SOCKET). I changed the conditional compile HAVE_SOCKET to HAVE_SOCKETTYPE. + + * zeitgeist/core.cpp: + fixes to compile on a Mac + - execinfo.h should be checked for in configure + - the CatchSignal Method seems pretty linux-specific, so I changed the conditional compile to just that + Index: acinclude.m4 =================================================================== RCS file: /cvsroot/simspark/simspark/spark/acinclude.m4,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** acinclude.m4 8 Mar 2006 17:07:54 -0000 1.4 --- acinclude.m4 15 Mar 2007 07:26:25 -0000 1.5 *************** *** 26,30 **** [RUBY_CPPFLAGS=''], [unset ac_cv_header_ruby_h ! ruby_tmp=$CPPFLAGS ruby_includedir=`$RUBY -rrbconfig -e "print Config::CONFIG[['archdir']]"` AC_MSG_NOTICE(trying again in $ruby_includedir) --- 26,30 ---- [RUBY_CPPFLAGS=''], [unset ac_cv_header_ruby_h ! ruby_tmp_cppflags=$CPPFLAGS ruby_includedir=`$RUBY -rrbconfig -e "print Config::CONFIG[['archdir']]"` AC_MSG_NOTICE(trying again in $ruby_includedir) *************** *** 34,38 **** [AC_MSG_ERROR(check your ruby installation)] ) ! CPPFLAGS=$ruby_tmp ] ) --- 34,38 ---- [AC_MSG_ERROR(check your ruby installation)] ) ! CPPFLAGS=$ruby_tmp_cppflags ] ) *************** *** 50,54 **** AC_MSG_CHECKING([for libruby]) ! rcss_tmp="$LDFLAGS" LDFLAGS="$LDFLAGS $RUBY_LDFLAGS" AC_LINK_IFELSE([int main() { return 0; }], --- 50,54 ---- AC_MSG_CHECKING([for libruby]) ! rcss_tmp_ldflags="$LDFLAGS" LDFLAGS="$LDFLAGS $RUBY_LDFLAGS" AC_LINK_IFELSE([int main() { return 0; }], *************** *** 57,61 **** AC_MSG_ERROR([libruby cannot be found. If you compile ruby on your own, make sure to configure ruby with '--enable-shared' to create the library.])]) ! LDFLAGS="$rcss_tmp" # Substitute Makefile Vars. --- 57,61 ---- AC_MSG_ERROR([libruby cannot be found. If you compile ruby on your own, make sure to configure ruby with '--enable-shared' to create the library.])]) ! LDFLAGS="$rcss_tmp_ldflags" # Substitute Makefile Vars. *************** *** 144,170 **** #----------------------------------------------------------------------------- AC_DEFUN([RCSS_CHECK_GL], [ ! RCSS_KEROSIN_IF_ELSE([ ! # check for OpenGL location and used extensions ! AC_CHECK_HEADERS([GL/gl.h GL/glut.h],, ! RCSS_BUILD_KEROSIN_ERROR([not all required OpenGL headers could not be found. Please specify the location of the OpenGL header directory using the CPPFLAGS environment variable])) ! RCSS_KEROSIN_IF_ELSE([ ! AC_CHECK_HEADERS([GL/glx.h], AC_SUBST([GLTARGET], [x]), ! AC_CHECK_HEADERS([GL/wglext.h], ! AC_SUBST([GLTARGET], [win32]), ! RCSS_BUILD_KEROSIN_ERROR([could not find ! X nor MS Windows GL extensions]), ! [#include <GL/gl.h>]), ! [#include <GL/gl.h>]) ! ! # subst'ing the directory where the prepocessor finds gl.h ! GLDIR=`echo "#include <GL/gl.h>" | /lib/cpp -M | awk '{ print @S|@2 }'` ! GLDIR=`dirname "$GLDIR"` ! AC_SUBST([GLDIR], [$GLDIR]) ! # checking if linking against libGL succeeds - RCSS_KEROSIN_IF_ELSE([ AC_MSG_CHECKING([if linking against libGL succeeds]) ! rcss_tmp="$LDFLAGS" LDFLAGS="$LDFLAGS -lGL" AC_LINK_IFELSE([#include <GL/gl.h> int main() { glColor3f(0,0,0); }], --- 144,181 ---- #----------------------------------------------------------------------------- AC_DEFUN([RCSS_CHECK_GL], [ ! AC_CHECK_HEADERS([OpenGL/gl.h GLUT/glut.h], [rcss_iamamac=yes], [rcss_iamamac=no]) ! AC_MSG_CHECKING([if I am a Mac]) ! if test "$rcss_iamamac" = "yes"; then ! AC_MSG_RESULT([yes]) ! RCSS_KEROSIN_IF_ELSE([ # checking if linking against libGL succeeds AC_MSG_CHECKING([if linking against libGL succeeds]) ! rcss_tmp_ldflags="$LDFLAGS" ! LDFLAGS="$LDFLAGS -framework GLUT -framework OpenGL" ! GL_LIBADD="" ! AC_LINK_IFELSE([#include <OpenGL/gl.h> ! int main() { glColor3f(0,0,0); }], ! [AC_MSG_RESULT([yes])], ! [AC_MSG_RESULT([no]) ! RCSS_BUILD_KEROSIN_ERROR([to build libkerosin, set LDFLAGS so that libGL can be found])]) ! LDFLAGS="$rcss_tmp_ldflags" ! AC_MSG_CHECKING([if linking against libglut succeeds]) ! LDFLAGS="$LDFLAGS -framework GLUT -framework OpenGL" ! AC_LINK_IFELSE([#include <GLUT/glut.h> ! int main() { glutMainLoop(); }], ! [AC_MSG_RESULT([yes])], ! [AC_MSG_RESULT([no]) ! RCSS_BUILD_KEROSIN_ERROR([to build libkerosin, set LDFLAGS so that libglut or can be found]) ! ]) ! LDFLAGS="$rcss_tmp_ldflags" ! ]) ! else ! AC_MSG_RESULT([sorry]) ! # checking if linking against libGL succeeds ! RCSS_KEROSIN_IF_ELSE([ ! AC_MSG_CHECKING([if linking against libGL succeeds]) ! rcss_tmp_ldflags="$LDFLAGS" LDFLAGS="$LDFLAGS -lGL" + GL_LIBADD="-lGL" AC_LINK_IFELSE([#include <GL/gl.h> int main() { glColor3f(0,0,0); }], *************** *** 172,176 **** [AC_MSG_RESULT([no]) RCSS_BUILD_KEROSIN_ERROR([to build libkerosin, set LDFLAGS so that libGL can be found])]) ! LDFLAGS="$rcss_tmp" AC_MSG_CHECKING([if linking against libglut succeeds]) LDFLAGS="$LDFLAGS -lGL -lGLU -lglut" --- 183,187 ---- [AC_MSG_RESULT([no]) RCSS_BUILD_KEROSIN_ERROR([to build libkerosin, set LDFLAGS so that libGL can be found])]) ! LDFLAGS="$rcss_tmp_ldflags" AC_MSG_CHECKING([if linking against libglut succeeds]) LDFLAGS="$LDFLAGS -lGL -lGLU -lglut" *************** *** 181,188 **** RCSS_BUILD_KEROSIN_ERROR([to build libkerosin, set LDFLAGS so that libglut or can be found]) ]) ! LDFLAGS="$rcss_tmp" ! ]) ! ]) ! ]) ]) # RCSS_CHECK_GL --- 192,199 ---- RCSS_BUILD_KEROSIN_ERROR([to build libkerosin, set LDFLAGS so that libglut or can be found]) ]) ! LDFLAGS="$rcss_tmp_ldflags" ! ]) ! fi ! AC_SUBST(GL_LIBADD) ]) # RCSS_CHECK_GL *************** *** 209,218 **** AC_MSG_WARN([To enable image support, please set CPPFLAGS appropriately or you can specify the location of the DevIL installation using the DEVIL environment variable (e.g. ./configure DEVIL=$HOME/DevIL)])]) ]) ! if test "$rcss_tmp" = "no"; then ! IL_LIBADD="" ! else ! IL_LIBADD="-lIL" RCSS_KEROSIN_IF_ELSE([rcss_tmp="$LDFLAGS" ! LDFLAGS="$LDFLAGS -lIL" AC_LINK_IFELSE([#include <IL/il.h> #include <stdarg.h> /* _vsnprintf may be undefined (and it is needed by libIL) */ --- 220,233 ---- AC_MSG_WARN([To enable image support, please set CPPFLAGS appropriately or you can specify the location of the DevIL installation using the DEVIL environment variable (e.g. ./configure DEVIL=$HOME/DevIL)])]) ]) ! IL_LIBADD="" ! if test "$rcss_tmp" != "no"; then ! if test "$rcss_iamamac" = "yes"; then ! rcss_ld="-framework IL" ! else ! IL_LIBADD="-lIL" ! rcss_ld="-lIL" ! fi RCSS_KEROSIN_IF_ELSE([rcss_tmp="$LDFLAGS" ! LDFLAGS="$LDFLAGS $rcss_ld" AC_LINK_IFELSE([#include <IL/il.h> #include <stdarg.h> /* _vsnprintf may be undefined (and it is needed by libIL) */ *************** *** 245,272 **** Please set CPPFLAGS appropriately or you can specify the location of the SDL installation using the SDL environment variable (e.g. ./configure SDL=$HOME/SDL)])) ]) RCSS_KEROSIN_IF_ELSE([ ! rcss_tmp="$LDFLAGS" ! LDFLAGS="$LDFLAGS -lSDL" AC_LINK_IFELSE([#include <SDL/SDL.h> ! int main() { return SDL_Init(0); }],, RCSS_BUILD_KEROSIN_ERROR([The SDL library (libSDL.a or libSDL.so) cannot be found. Please set LDFLAGS appropriately or you can specify the location of the SDL installation using the SDL environment variable (e.g. ./configure SDL=$HOME/SDL)])) ! LDFLAGS="$rcss_tmp" ]) - - ]) # RCSS_CHECK_SDL # RCSS_CHECK_SLANG #----------------------------------------------------------------------------- AC_DEFUN([RCSS_CHECK_SLANG], [ RCSS_KEROSIN_IF_ELSE([ ! rcss_tmp="$LDFLAGS" LDFLAGS="$LDFLAGS -lslang" AC_LINK_IFELSE([int main() { return 0; }],, RCSS_BUILD_KEROSIN_ERROR([The S-Lang library (libslang.a or libslang.so) cannot be found. Please set LDFLAGS appropriately.])) ! LDFLAGS="$rcss_tmp" ]) ]) # RCSS_CHECK_SLANG --- 260,312 ---- Please set CPPFLAGS appropriately or you can specify the location of the SDL installation using the SDL environment variable (e.g. ./configure SDL=$HOME/SDL)])) ]) + RCSS_CREATE_LIBSDLMAIN + + if test "$rcss_iamamac" = "yes"; then + rcss_cpp_add="-I/Library/Frameworks/SDL.framework/Headers" + rcss_ld_add="-framework SDL -framework Cocoa $srcdir/macosX/libSDLmain.a" + SDL_LIBADD="" + else + rcss_cpp_add="" + rcss_ld_add="-lSDL" + SDL_LIBADD="-lSDL" + fi + AC_SUBST(SDL_LIBADD) RCSS_KEROSIN_IF_ELSE([ ! rcss_tmp_ldflags="$LDFLAGS" ! rcss_tmp_cppflags="$CPPFLAGS" ! CPPFLAGS="$CPPFLAGS $rcss_cpp_add" ! LDFLAGS="$LDFLAGS $rcss_ld_add" AC_LINK_IFELSE([#include <SDL/SDL.h> ! extern "C" int main(int argc, char **argv) { return SDL_Init(0); }],, RCSS_BUILD_KEROSIN_ERROR([The SDL library (libSDL.a or libSDL.so) cannot be found. Please set LDFLAGS appropriately or you can specify the location of the SDL installation using the SDL environment variable (e.g. ./configure SDL=$HOME/SDL)])) ! LDFLAGS="$rcss_tmp_ldflags" ! CPPFLAGS="$rcss_tmp_cppflags" ]) ]) # RCSS_CHECK_SDL + # RCSS_CREATE_LIBSDLMAIN + #----------------------------------------------------------------------------- + AC_DEFUN([RCSS_CREATE_LIBSDLMAIN], [ + if test "$rcss_iamamac" = "yes"; then + AC_MSG_NOTICE([Creating libsdlmain.a...]) + $CC -I/Library/Frameworks/SDL.framework/Headers -o $srcdir/macosX/SDLMain.o -c $srcdir/macosX/SDLMain.m + $AR -rcs $srcdir/macosX/libSDLmain.a $srcdir/macosX/SDLMain.o + fi + ]) # RCSS_CREATE_LIBSDLMAIN + # RCSS_CHECK_SLANG #----------------------------------------------------------------------------- AC_DEFUN([RCSS_CHECK_SLANG], [ + if test "$rcss_iamamac" = "no"; then RCSS_KEROSIN_IF_ELSE([ ! rcss_tmp_ldflags="$LDFLAGS" LDFLAGS="$LDFLAGS -lslang" AC_LINK_IFELSE([int main() { return 0; }],, RCSS_BUILD_KEROSIN_ERROR([The S-Lang library (libslang.a or libslang.so) cannot be found. Please set LDFLAGS appropriately.])) ! LDFLAGS="$rcss_tmp_ldflags" ]) + fi ]) # RCSS_CHECK_SLANG *************** *** 443,446 **** ])# RCSS_BOOST_REGEX - - --- 483,484 ---- Index: configure.ac =================================================================== RCS file: /cvsroot/simspark/simspark/spark/configure.ac,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** configure.ac 8 Mar 2006 17:13:42 -0000 1.5 --- configure.ac 15 Mar 2007 07:26:25 -0000 1.6 *************** *** 1,4 **** # Process this file with autoconf to produce a configure script. ! AC_INIT([simspark], 0.1, [sse...@li...]) AC_CONFIG_SRCDIR([salt/salt.h]) AC_CONFIG_HEADER([config.h]) --- 1,4 ---- # Process this file with autoconf to produce a configure script. ! AC_INIT([simspark], 0.1, [sim...@li...]) AC_CONFIG_SRCDIR([salt/salt.h]) AC_CONFIG_HEADER([config.h]) *************** *** 48,54 **** AC_HEADER_STDC AC_CHECK_HEADERS([poll.h]) ! AC_CHECK_HEADERS([arpa/nameser.h]) ! AC_CHECK_HEADERS([resolv.h netdb.h]) AC_CHECK_HEADERS([float.h limits.h memory.h stdlib.h string.h]) AC_CHECK_HEADER([boost/version.hpp],, --- 48,55 ---- AC_HEADER_STDC AC_CHECK_HEADERS([poll.h]) ! AC_CHECK_HEADERS([arpa/nameser.h arpa/inet.h]) ! AC_CHECK_HEADERS([resolv.h netdb.h sys/socket.h netinet/in.h Winsock2.h]) AC_CHECK_HEADERS([float.h limits.h memory.h stdlib.h string.h]) + AC_CHECK_HEADERS([execinfo.h]) AC_CHECK_HEADER([boost/version.hpp],, *************** *** 128,133 **** AC_CONFIG_FILES([Makefile \ utility/Makefile \ - utility/glextgen/Makefile \ - utility/glextgen/glextgen.rb \ utility/libobj/Makefile \ utility/sfsexp/Makefile \ --- 129,132 ---- *************** *** 144,147 **** --- 143,148 ---- spark/Makefile \ spark/spark-config \ + test/Makefile \ + test/coretest/Makefile \ plugin/Makefile \ plugin/filesystemstd/Makefile \ *************** *** 153,158 **** plugin/rosimporter/Makefile \ plugin/sparkmonitor/Makefile \ ! plugin/sparkagent/Makefile \ ! test/coretest/Makefile ], [test -f salt/salt-config && chmod a+x salt/salt-config && \ test -f zeitgeist/zeitgeist-config && chmod a+x zeitgeist/zeitgeist-config && \ --- 154,158 ---- plugin/rosimporter/Makefile \ plugin/sparkmonitor/Makefile \ ! plugin/sparkagent/Makefile ], [test -f salt/salt-config && chmod a+x salt/salt-config && \ test -f zeitgeist/zeitgeist-config && chmod a+x zeitgeist/zeitgeist-config && \ Index: Makefile.am =================================================================== RCS file: /cvsroot/simspark/simspark/spark/Makefile.am,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Makefile.am 19 Dec 2005 20:09:16 -0000 1.1 --- Makefile.am 15 Mar 2007 07:26:25 -0000 1.2 *************** *** 1,4 **** ### utility subdir has to be made first ! SUBDIRS = utility salt zeitgeist oxygen kerosin spark pkginclude_HEADERS = \ --- 1,4 ---- ### utility subdir has to be made first ! SUBDIRS = utility salt zeitgeist oxygen kerosin spark plugin test pkginclude_HEADERS = \ *************** *** 6,9 **** --- 6,12 ---- CLEANFILES = + DISTCLEANFILES = $(top_srcdir)/macosX/SDLMain.o $(top_srcdir)/macosX/libSDLmain.a + EXTRA_DIST = macosX/SDLMain.h macosX/SDLMain.m \ + win32/config.h win32/simspark.iss win32/spark.ico EXTRA_SRC_DISTS = Index: README =================================================================== RCS file: /cvsroot/simspark/simspark/spark/README,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** README 19 Dec 2005 20:09:16 -0000 1.1 --- README 15 Mar 2007 07:26:25 -0000 1.2 *************** *** 0 **** --- 1 ---- + Simspark README |
From: Oliver O. <fr...@us...> - 2007-03-15 07:27:03
|
Update of /cvsroot/simspark/simspark/spark/kerosin/sceneserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv7790/spark/kerosin/sceneserver Modified Files: axis.cpp light.cpp light.h staticmesh.cpp Log Message: Merged WIN32 branch back to main trunk (access previous version with tag pre_merge_WIN32) Index: light.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/sceneserver/light.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** light.h 5 Dec 2005 21:38:23 -0000 1.1 --- light.h 15 Mar 2007 07:26:26 -0000 1.2 *************** *** 24,27 **** --- 24,28 ---- #include <kerosin/openglserver/glbase.h> + #include <kerosin/openglserver/openglserver.h> #include "staticmesh.h" #include "oxygen/geometryserver/indexbuffer.h" *************** *** 121,126 **** std::vector<oxygen::IndexBuffer> mCachedIndices; ! /** reference to the RenderServer */ ! boost::shared_ptr<OpenGLServer> mOpenGLServer; }; --- 122,127 ---- std::vector<oxygen::IndexBuffer> mCachedIndices; ! /** reference to the OpenGLServer */ ! CachedPath<OpenGLServer> mOpenGLServer; }; Index: light.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/sceneserver/light.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** light.cpp 5 Dec 2005 21:38:23 -0000 1.1 --- light.cpp 15 Mar 2007 07:26:26 -0000 1.2 *************** *** 25,37 **** */ #include "light.h" - #include <kerosin/renderserver/renderserver.h> - #include <kerosin/openglserver/openglserver.h> #include <zeitgeist/logserver/logserver.h> ! ! /* ! // define the symbol BOOL to prevent opcode.h to typedef BOOL ! #define BOOL BOOL ! #include <opcode/Opcode.h> ! */ using namespace boost; --- 25,31 ---- */ #include "light.h" #include <zeitgeist/logserver/logserver.h> ! #include <kerosin/openglserver/openglwrapper.h> ! #include <kerosin/renderserver/renderserver.h> using namespace boost; *************** *** 159,163 **** void Light::FlushCache() { ! const unsigned int n = mCachedIndices.size(); for (unsigned int i=0; i<n; ++i) { --- 153,159 ---- void Light::FlushCache() { ! const unsigned int n ! = static_cast<unsigned int>(mCachedIndices.size()); ! for (unsigned int i=0; i<n; ++i) { *************** *** 175,213 **** void Light::OnLink() { ! mOpenGLServer = shared_dynamic_cast<OpenGLServer> ! (GetCore()->Get("sys/server/opengl")); ! if (mOpenGLServer.get() == 0) { GetLog()->Error() << "(Light) ERROR: OpenGLServer not found\n"; ! } else ! { ! mGLLight = mOpenGLServer->AllocLight(); ! ! if (mGLLight < 0) ! { ! GetLog()->Error() ! << "(Light) ERROR: No more OpenGL lights available\n"; ! } ! ! #if 0 ! mVP = mOpenGLServer->LoadARBVertexProgram("sys/program/omnilight.vp"); ! if (mVP == 0) ! { ! GetLog()->Error() ! << "(Light) ERROR: Could not load vertex program\n"; ! } ! ! mFP = mOpenGLServer->LoadARBFragmentProgram("sys/program/omnilight.fp"); ! if (mFP == 0) ! { ! GetLog()->Error() ! << "(Light) ERROR: Could not load fragment program\n"; ! } ! #endif ! } } --- 171,190 ---- void Light::OnLink() { ! RegisterCachedPath(mOpenGLServer, "sys/server/opengl"); ! if (mOpenGLServer.expired()) { GetLog()->Error() << "(Light) ERROR: OpenGLServer not found\n"; ! return; ! } ! mGLLight = mOpenGLServer->AllocLight(); + if (mGLLight < 0) + { + GetLog()->Error() + << "(Light) ERROR: No more OpenGL lights available\n"; + } } *************** *** 215,219 **** { if ( ! (mOpenGLServer.get() != 0) && (mGLLight >= 0) ) --- 192,196 ---- { if ( ! (! mOpenGLServer.expired()) && (mGLLight >= 0) ) *************** *** 223,227 **** } ! mOpenGLServer.reset(); } --- 200,204 ---- } ! BaseNode::OnUnlink(); } Index: axis.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/sceneserver/axis.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** axis.cpp 15 Feb 2006 00:59:02 -0000 1.2 --- axis.cpp 15 Mar 2007 07:26:26 -0000 1.3 *************** *** 21,25 **** */ #include "axis.h" ! #include "../openglserver/openglserver.h" #include <kerosin/openglserver/glbase.h> --- 21,25 ---- */ #include "axis.h" ! #include "../openglserver/openglwrapper.h" #include <kerosin/openglserver/glbase.h> Index: staticmesh.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/sceneserver/staticmesh.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** staticmesh.cpp 15 Feb 2006 00:57:05 -0000 1.2 --- staticmesh.cpp 15 Mar 2007 07:26:26 -0000 1.3 *************** *** 22,26 **** #include "staticmesh.h" #include <zeitgeist/logserver/logserver.h> ! #include <kerosin/openglserver/openglserver.h> #include <kerosin/materialserver/material.h> #include <kerosin/materialserver/materialserver.h> --- 22,26 ---- #include "staticmesh.h" #include <zeitgeist/logserver/logserver.h> ! #include <kerosin/openglserver/openglwrapper.h> #include <kerosin/materialserver/material.h> #include <kerosin/materialserver/materialserver.h> *************** *** 54,58 **** } ! const int n = mMesh->GetVertexCount() * 3; const float* arPos = mMesh->GetPos().get(); --- 54,58 ---- } ! const int n = mMesh->GetVertexCount(); const float* arPos = mMesh->GetPos().get(); *************** *** 76,80 **** void StaticMesh::RenderInternal() { ! if (mMesh.get() == 0) { return; --- 76,83 ---- void StaticMesh::RenderInternal() { ! if ( ! (mMesh.get() == 0) || ! (mMaterials.empty()) ! ) { return; |