You can subscribe to this list here.
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(4) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2009 |
Jan
(20) |
Feb
(11) |
Mar
(6) |
Apr
(5) |
May
(4) |
Jun
(7) |
Jul
(9) |
Aug
(11) |
Sep
|
Oct
(4) |
Nov
(13) |
Dec
(21) |
2010 |
Jan
(23) |
Feb
(32) |
Mar
(6) |
Apr
(2) |
May
(10) |
Jun
(15) |
Jul
(1) |
Aug
(1) |
Sep
(3) |
Oct
|
Nov
(1) |
Dec
(16) |
2011 |
Jan
(1) |
Feb
(5) |
Mar
(19) |
Apr
(13) |
May
(4) |
Jun
(2) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
(4) |
Feb
(8) |
Mar
(2) |
Apr
(6) |
May
(13) |
Jun
(1) |
Jul
|
Aug
|
Sep
(5) |
Oct
|
Nov
(4) |
Dec
|
2013 |
Jan
(1) |
Feb
(2) |
Mar
(15) |
Apr
(2) |
May
(4) |
Jun
(17) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
(6) |
Jun
(6) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
(2) |
Mar
(1) |
Apr
(1) |
May
(6) |
Jun
(1) |
Jul
(2) |
Aug
|
Sep
(7) |
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(4) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <he...@us...> - 2010-12-19 19:19:05
|
Revision: 241 http://simspark.svn.sourceforge.net/simspark/?rev=241&view=rev Author: hedayat Date: 2010-12-19 19:18:59 +0000 (Sun, 19 Dec 2010) Log Message: ----------- Added boost's date_time library to the list of required libraries Modified Paths: -------------- trunk/spark/CMakeLists.txt trunk/spark/ChangeLog Modified: trunk/spark/CMakeLists.txt =================================================================== --- trunk/spark/CMakeLists.txt 2010-12-17 00:24:51 UTC (rev 240) +++ trunk/spark/CMakeLists.txt 2010-12-19 19:18:59 UTC (rev 241) @@ -41,7 +41,7 @@ find_package(Ruby REQUIRED) find_package(Freetype REQUIRED) find_package(DevIL REQUIRED) -find_package(Boost REQUIRED thread COMPONENTS regex) +find_package(Boost REQUIRED thread COMPONENTS regex date_time) find_package(wxWidgets COMPONENTS gl base core) find_package(ODE REQUIRED) find_package(OpenGL REQUIRED) Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2010-12-17 00:24:51 UTC (rev 240) +++ trunk/spark/ChangeLog 2010-12-19 19:18:59 UTC (rev 241) @@ -24,6 +24,11 @@ * test/scenetest/main.cpp - be able to render camera image on and off screen +2010-12-14 Hedayat Vatankhah <hed...@gm...> + + * CMakeLists.txt: + - added boost date_time library to the required libs + 2010-12-14 Yuan Xu <xu...@in...> * plugin/imageperceptor This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yx...@us...> - 2010-12-17 00:24:57
|
Revision: 240 http://simspark.svn.sourceforge.net/simspark/?rev=240&view=rev Author: yxu Date: 2010-12-17 00:24:51 +0000 (Fri, 17 Dec 2010) Log Message: ----------- ops Modified Paths: -------------- trunk/spark/plugin/imageperceptor/imagerender.cpp Modified: trunk/spark/plugin/imageperceptor/imagerender.cpp =================================================================== --- trunk/spark/plugin/imageperceptor/imagerender.cpp 2010-12-17 00:23:36 UTC (rev 239) +++ trunk/spark/plugin/imageperceptor/imagerender.cpp 2010-12-17 00:24:51 UTC (rev 240) @@ -101,8 +101,7 @@ void ImageRender::Render() { - mRequested = true; - if ( (!mRequested) || + if ( (!(mRequested || !mOffScreen )) || (mOpenGLServer.expired()) || (mRenderServer.expired()) ) @@ -159,7 +158,7 @@ mDataSize = size; } - glReadPixels(, mScreenPosY, + glReadPixels(mScreenPosX, mScreenPosY, w, h, GL_RGB, GL_UNSIGNED_BYTE, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yx...@us...> - 2010-12-17 00:23:43
|
Revision: 239 http://simspark.svn.sourceforge.net/simspark/?rev=239&view=rev Author: yxu Date: 2010-12-17 00:23:36 +0000 (Fri, 17 Dec 2010) Log Message: ----------- ChangeLog Modified Paths: -------------- trunk/rcssserver3d/ChangeLog trunk/rsgedit/ChangeLog trunk/spark/ChangeLog Modified: trunk/rcssserver3d/ChangeLog =================================================================== --- trunk/rcssserver3d/ChangeLog 2010-12-17 00:23:17 UTC (rev 238) +++ trunk/rcssserver3d/ChangeLog 2010-12-17 00:23:36 UTC (rev 239) @@ -1,3 +1,9 @@ +2010-12-14 Yuan Xu <xu...@in...> + * rcssserver3d/plugin/soccer/restrictedvisionperceptor/restrictedvisionperceptor.cpp + * rcssserver3d/plugin/soccer/trainercommandparser/trainercommandparser.cpp + * spark/lib/oxygen/proxyserver/agentproxy.cpp + - compile by VC10 + 2010-09-28 Sander van Dijk <sgv...@gm...> * plugin/soccermonitor/soccerrender.cpp Modified: trunk/rsgedit/ChangeLog =================================================================== --- trunk/rsgedit/ChangeLog 2010-12-17 00:23:17 UTC (rev 238) +++ trunk/rsgedit/ChangeLog 2010-12-17 00:23:36 UTC (rev 239) @@ -1,3 +1,7 @@ +2010-12-14 Yuan Xu <xu...@in...> + * CMakeLists.txt + - use UseWxWidgets.cmake + 2010-02-28 Marian Buchta <mar...@gm...> * cmake/FindBoost.cmake: @@ -51,4 +55,4 @@ * wxutil/CMakeLists.txt: * CMakeLists.txt: - add wxWidgets definitions to toplevel compiler flags and remove from - other files \ No newline at end of file + other files Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2010-12-17 00:23:17 UTC (rev 238) +++ trunk/spark/ChangeLog 2010-12-17 00:23:36 UTC (rev 239) @@ -1,15 +1,32 @@ -2010-12-14 Yuan Xu <xu...@in...> - * rcssserver3d/plugin/soccer/restrictedvisionperceptor/restrictedvisionperceptor.cpp - * rcssserver3d/plugin/soccer/trainercommandparser/trainercommandparser.cpp - * spark/lib/oxygen/proxyserver/agentproxy.cpp - - compile by VC10 +2010-12-15 Yuan Xu <xu...@in...> + * plugin/imageperceptor/CMakeLists.txt + * plugin/imageperceptor/export.cpp + * plugin/imageperceptor/imageperceptor.cpp + * plugin/imageperceptor/imageperceptor.h + * plugin/imageperceptor/imagerender.cpp + * plugin/imageperceptor/imagerender.h + * plugin/imageperceptor/imagerender_c.cpp + - separate the render code + - render the image of camera in RenderControl + + * spark/spark.rb + - multi-threads works! + + * lib/kerosin/renderserver/baserenderserver.h + * lib/kerosin/renderserver/rendercontrol.cpp + * lib/kerosin/renderserver/renderserver.cpp + * lib/kerosin/renderserver/renderserver.h + * plugin/imageperceptor/imageperceptor.cpp + * plugin/imageperceptor/imageperceptor.h + * plugin/imageperceptor/imageperceptor_c.cpp + * plugin/imageperceptor/imagerender.cpp + * plugin/imageperceptor/imagerender.h + * test/scenetest/main.cpp + - be able to render camera image on and off screen - * rsgedit/CMakeLists.txt - - use UseWxWidgets.cmake - 2010-12-14 Yuan Xu <xu...@in...> - * spark/plugin/imageperceptor + * plugin/imageperceptor * spark/spark.rb - use base64 encoding image This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yx...@us...> - 2010-12-17 00:23:23
|
Revision: 238 http://simspark.svn.sourceforge.net/simspark/?rev=238&view=rev Author: yxu Date: 2010-12-17 00:23:17 +0000 (Fri, 17 Dec 2010) Log Message: ----------- be able to render camera image on and off screen Modified Paths: -------------- trunk/rcssserver3d/data/rsg/agent/nao/naoneckhead.rsg trunk/spark/lib/kerosin/renderserver/baserenderserver.h trunk/spark/lib/kerosin/renderserver/rendercontrol.cpp trunk/spark/lib/kerosin/renderserver/renderserver.cpp trunk/spark/lib/kerosin/renderserver/renderserver.h trunk/spark/plugin/imageperceptor/imageperceptor.cpp trunk/spark/plugin/imageperceptor/imageperceptor.h trunk/spark/plugin/imageperceptor/imageperceptor_c.cpp trunk/spark/plugin/imageperceptor/imagerender.cpp trunk/spark/plugin/imageperceptor/imagerender.h trunk/spark/test/scenetest/main.cpp Modified: trunk/rcssserver3d/data/rsg/agent/nao/naoneckhead.rsg =================================================================== --- trunk/rcssserver3d/data/rsg/agent/nao/naoneckhead.rsg 2010-12-17 00:22:35 UTC (rev 237) +++ trunk/rcssserver3d/data/rsg/agent/nao/naoneckhead.rsg 2010-12-17 00:23:17 UTC (rev 238) @@ -99,7 +99,8 @@ ;; (setLocalRotation 0 0 0) ;; (nd ImagePerceptor ;; (setInterval 3) - ;; (setViewport 0 0 320 240) + ;; (setOffScreen false) + ;; (setResolution 320 240) ;; (setFOV 58) ;; (setZNear 0.003) ;; (setZFar 50) Modified: trunk/spark/lib/kerosin/renderserver/baserenderserver.h =================================================================== --- trunk/spark/lib/kerosin/renderserver/baserenderserver.h 2010-12-17 00:22:35 UTC (rev 237) +++ trunk/spark/lib/kerosin/renderserver/baserenderserver.h 2010-12-17 00:23:17 UTC (rev 238) @@ -51,7 +51,7 @@ virtual ~BaseRenderServer() {} //! display the current active scene - virtual void Render() = 0; + virtual void Render(bool clean) = 0; //! width of the render target virtual int Width() const { return 0; } Modified: trunk/spark/lib/kerosin/renderserver/rendercontrol.cpp =================================================================== --- trunk/spark/lib/kerosin/renderserver/rendercontrol.cpp 2010-12-17 00:22:35 UTC (rev 237) +++ trunk/spark/lib/kerosin/renderserver/rendercontrol.cpp 2010-12-17 00:23:17 UTC (rev 238) @@ -87,7 +87,7 @@ // update the window (pumps event loop, etc..) and render the // current frame mOpenGLServer->Update(); - mRenderServer->Render(); + mRenderServer->Render(true); RenderCustom(); mOpenGLServer->SwapBuffers(); ++mFramesRendered; Modified: trunk/spark/lib/kerosin/renderserver/renderserver.cpp =================================================================== --- trunk/spark/lib/kerosin/renderserver/renderserver.cpp 2010-12-17 00:22:35 UTC (rev 237) +++ trunk/spark/lib/kerosin/renderserver/renderserver.cpp 2010-12-17 00:23:17 UTC (rev 238) @@ -56,7 +56,7 @@ } void -RenderServer::Render() +RenderServer::Render(bool clean) { PreparePicking(); @@ -74,21 +74,29 @@ GetLog()->Error() << "(RenderServer) ERROR: found no camera node in the active scene\n"; return; - } + } + // set the view transformation + BindCamera(mCamera); + glClearColor( - mAmbientColor.r(), - mAmbientColor.g(), - mAmbientColor.b(), - mAmbientColor.a() - ); + mAmbientColor.r(), + mAmbientColor.g(), + mAmbientColor.b(), + mAmbientColor.a() + ); - glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); - glColor3f(1,1,1); + if (clean) + { + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + } + else + { + glClear(GL_DEPTH_BUFFER_BIT); + } + glColor3f(1, 1, 1); + - // set the view transformation - BindCamera(mCamera); - // actual rendering // ambient pass Modified: trunk/spark/lib/kerosin/renderserver/renderserver.h =================================================================== --- trunk/spark/lib/kerosin/renderserver/renderserver.h 2010-12-17 00:22:35 UTC (rev 237) +++ trunk/spark/lib/kerosin/renderserver/renderserver.h 2010-12-17 00:23:17 UTC (rev 238) @@ -65,7 +65,7 @@ virtual ~RenderServer() {} //! display the current active scene - virtual void Render(); + virtual void Render(bool clean); //! @return the width of the current view virtual int Width() const; Modified: trunk/spark/plugin/imageperceptor/imageperceptor.cpp =================================================================== --- trunk/spark/plugin/imageperceptor/imageperceptor.cpp 2010-12-17 00:22:35 UTC (rev 237) +++ trunk/spark/plugin/imageperceptor/imageperceptor.cpp 2010-12-17 00:23:17 UTC (rev 238) @@ -89,9 +89,9 @@ return true; } -void ImagePerceptor::SetViewport(unsigned int x, unsigned int y, unsigned int w, unsigned int h) +void ImagePerceptor::SetResolution(unsigned int w, unsigned int h) { - mCamera->SetViewport(x, y, w, h); + mRender->SetResolution(w,h); } void ImagePerceptor::SetFOV(float fov) @@ -108,3 +108,8 @@ { mCamera->SetZFar(zFar); } + +void ImagePerceptor::SetOffScreen(bool offScreen) +{ + mRender->SetOffScreen(offScreen); +} Modified: trunk/spark/plugin/imageperceptor/imageperceptor.h =================================================================== --- trunk/spark/plugin/imageperceptor/imageperceptor.h 2010-12-17 00:22:35 UTC (rev 237) +++ trunk/spark/plugin/imageperceptor/imageperceptor.h 2010-12-17 00:23:17 UTC (rev 238) @@ -38,13 +38,15 @@ virtual void OnLink(); - void SetViewport(unsigned int x, unsigned int y, unsigned int w, unsigned int h); + void SetResolution(unsigned int w, unsigned int h); void SetFOV(float fov); void SetZNear(float zNear); void SetZFar(float zFar); + + void SetOffScreen(bool offScreen); private: boost::shared_ptr<oxygen::Camera> mCamera; Modified: trunk/spark/plugin/imageperceptor/imageperceptor_c.cpp =================================================================== --- trunk/spark/plugin/imageperceptor/imageperceptor_c.cpp 2010-12-17 00:22:35 UTC (rev 237) +++ trunk/spark/plugin/imageperceptor/imageperceptor_c.cpp 2010-12-17 00:23:17 UTC (rev 238) @@ -23,22 +23,20 @@ using namespace boost; using namespace oxygen; -FUNCTION(ImagePerceptor, setViewport) +FUNCTION(ImagePerceptor, setResolution) { - unsigned int x,y,w,h; + unsigned int w,h; if ( - (in.GetSize() != 4) || - (! in.GetValue(in[0], x) ) || - (! in.GetValue(in[1], y) ) || - (! in.GetValue(in[2], w) ) || - (! in.GetValue(in[3], h) ) + (in.GetSize() != 2) || + (! in.GetValue(in[0], w) ) || + (! in.GetValue(in[1], h) ) ) { return false; } - obj->SetViewport(x, y, w, h); + obj->SetResolution(w, h); return true; } @@ -90,11 +88,28 @@ return true; } +FUNCTION(ImagePerceptor, setOffScreen) +{ + bool offScreen; + + if ( + (in.GetSize() != 1) || + (! in.GetValue(in[0], offScreen) ) + ) + { + return false; + } + + obj->SetOffScreen(offScreen); + return true; +} + void CLASS(ImagePerceptor)::DefineClass() { DEFINE_BASECLASS(oxygen/Perceptor); - DEFINE_FUNCTION(setViewport); + DEFINE_FUNCTION(setResolution); DEFINE_FUNCTION(setFOV); DEFINE_FUNCTION(setZNear); DEFINE_FUNCTION(setZFar); + DEFINE_FUNCTION(setOffScreen); } Modified: trunk/spark/plugin/imageperceptor/imagerender.cpp =================================================================== --- trunk/spark/plugin/imageperceptor/imagerender.cpp 2010-12-17 00:22:35 UTC (rev 237) +++ trunk/spark/plugin/imageperceptor/imagerender.cpp 2010-12-17 00:23:17 UTC (rev 238) @@ -33,7 +33,6 @@ #include "imagerender.h" #include <zeitgeist/logserver/logserver.h> -#define USE_FBO // using namespace kerosin; using namespace oxygen; @@ -42,8 +41,12 @@ using namespace salt; using namespace std; +unsigned int ImageRender::autoScreenPosX = 0; +unsigned int ImageRender::autoScreenPosY = 0; + ImageRender::ImageRender(): kerosin::CustomRender(), - mDataSize(0), mWidth(0), mHeight(0), mRequested(false) + mDataSize(0), mWidth(0), mHeight(0), mRequested(false),mOffScreen(false), + mScreenPosX(0), mScreenPosY(0) { } @@ -53,7 +56,7 @@ #define REG_GL_EXT_FUN(_ptr, _function) \ static _ptr _function = (_ptr) mOpenGLServer->GetExtension(#_function);\ if ( !_function ){ \ - GetLog()->Error()<<"(Image Perceptor) ERROR: can not get "#_function"\n"; \ + GetLog()->Error()<<"(ImageRender) ERROR: can not get "#_function"\n"; \ } void ImageRender::SetCamera(boost::shared_ptr<oxygen::Camera> camera) @@ -68,7 +71,7 @@ if (mRenderServer.expired()) { GetLog()->Error() - << "(ImagePerceptor) ERROR: RenderServer not found\n"; + << "(ImageRender) ERROR: RenderServer not found\n"; } RegisterCachedPath(mOpenGLServer,"/sys/server/opengl"); @@ -76,7 +79,7 @@ if (mOpenGLServer.expired()) { GetLog()->Error() - << "(ImagePerceptor) ERROR: OpenGLServer not found\n"; + << "(ImageRender) ERROR: OpenGLServer not found\n"; } // create a framebuffer object @@ -98,6 +101,7 @@ void ImageRender::Render() { + mRequested = true; if ( (!mRequested) || (mOpenGLServer.expired()) || (mRenderServer.expired()) @@ -109,19 +113,20 @@ int w = mCamera->GetViewportWidth(); int h = mCamera->GetViewportHeight(); -#ifdef USE_FBO - REG_GL_EXT_FUN( PFNGLBINDFRAMEBUFFEREXTPROC, glBindFramebufferEXT ); - REG_GL_EXT_FUN( PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC, glFramebufferRenderbufferEXT ); - REG_GL_EXT_FUN( PFNGLRENDERBUFFERSTORAGEEXTPROC, glRenderbufferStorageEXT ); - REG_GL_EXT_FUN( PFNGLBINDRENDERBUFFEREXTPROC, glBindRenderbufferEXT); - REG_GL_EXT_FUN( PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC, glCheckFramebufferStatusEXT ); + if (mOffScreen) + { + REG_GL_EXT_FUN(PFNGLBINDFRAMEBUFFEREXTPROC, glBindFramebufferEXT); + REG_GL_EXT_FUN(PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC, glFramebufferRenderbufferEXT); + REG_GL_EXT_FUN(PFNGLRENDERBUFFERSTORAGEEXTPROC, glRenderbufferStorageEXT); + REG_GL_EXT_FUN(PFNGLBINDRENDERBUFFEREXTPROC, glBindRenderbufferEXT); + REG_GL_EXT_FUN(PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC, glCheckFramebufferStatusEXT); glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, mFBOId); glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, mRBOId); glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGB, w, h); glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, - GL_RENDERBUFFER_EXT, mRBOId); + GL_RENDERBUFFER_EXT, mRBOId); glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, mDepthBuffer); glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT, w, h); @@ -130,20 +135,22 @@ // check FBO status GLenum status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT); - if(status != GL_FRAMEBUFFER_COMPLETE_EXT){ -// GetLog()->Error()<<"fbo error!\n"; + if (status != GL_FRAMEBUFFER_COMPLETE_EXT) + { + GetLog()->Error() << "(ImageRender) fbo error!\n"; } -#endif + } + // setup the camera boost::shared_ptr<Camera> oldCamera = mRenderServer->GetCamera(); mRenderServer->SetCamera(mCamera); - mRenderServer->Render(); + mRenderServer->Render(false); -#ifdef USE_FBO -#else + if (!mOffScreen) + { glReadBuffer(GL_BACK); -#endif + } int size = w*h*3; if ( size != mDataSize ) @@ -152,7 +159,7 @@ mDataSize = size; } - glReadPixels(0, 0, + glReadPixels(, mScreenPosY, w, h, GL_RGB, GL_UNSIGNED_BYTE, @@ -160,11 +167,35 @@ mWidth = w; mHeight = h; -#ifdef USE_FBO + if (mOffScreen) + { // unbind FBO + REG_GL_EXT_FUN(PFNGLBINDFRAMEBUFFEREXTPROC, glBindFramebufferEXT); glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); -#endif + } + mRenderServer->SetCamera(oldCamera); mRequested = false; } + +void ImageRender::SetResolution(int w, int h) +{ + if (!mOffScreen) // HACK! + { + // asssert this function is called only once per instance + // auto position on screen (simple) + mScreenPosX = autoScreenPosX; + int screenWidth = mRenderServer->GetCamera()->GetViewportWidth(); + if (mScreenPosX + w > screenWidth) + { + mScreenPosX = 0; + autoScreenPosY += h; + } + autoScreenPosX = mScreenPosX + w; + mScreenPosY = autoScreenPosY; + // + } + + mCamera->SetViewport(mScreenPosX, mScreenPosY, w, h); +} \ No newline at end of file Modified: trunk/spark/plugin/imageperceptor/imagerender.h =================================================================== --- trunk/spark/plugin/imageperceptor/imagerender.h 2010-12-17 00:22:35 UTC (rev 237) +++ trunk/spark/plugin/imageperceptor/imagerender.h 2010-12-17 00:23:17 UTC (rev 238) @@ -53,7 +53,14 @@ void RequestRender() { mRequested = true; } + void SetResolution(int w, int h); + + void SetOffScreen(bool offScreen) { mOffScreen = offScreen; } + + void SetScreenPos(int x, int y) { mScreenPosX = x; mScreenPosY = y; } + private: + boost::shared_ptr<oxygen::Camera> mCamera; /** cached reference to the RenderServer */ @@ -67,10 +74,15 @@ int mWidth; int mHeight; bool mRequested; + bool mOffScreen; + int mScreenPosX, mScreenPosY; unsigned int mFBOId; unsigned int mRBOId; unsigned int mDepthBuffer; + + static unsigned int autoScreenPosX; + static unsigned int autoScreenPosY; }; DECLARE_CLASS(ImageRender); Modified: trunk/spark/test/scenetest/main.cpp =================================================================== --- trunk/spark/test/scenetest/main.cpp 2010-12-17 00:22:35 UTC (rev 237) +++ trunk/spark/test/scenetest/main.cpp 2010-12-17 00:23:17 UTC (rev 238) @@ -163,7 +163,7 @@ shared_static_cast<RenderServer>(gContext->Get("/sys/server/scene")); if (renderServer) { - renderServer->Render(); + renderServer->Render(true); } #endif } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yx...@us...> - 2010-12-17 00:22:41
|
Revision: 237 http://simspark.svn.sourceforge.net/simspark/?rev=237&view=rev Author: yxu Date: 2010-12-17 00:22:35 +0000 (Fri, 17 Dec 2010) Log Message: ----------- render the image for camera only when it is requested Modified Paths: -------------- trunk/spark/plugin/imageperceptor/imageperceptor.cpp trunk/spark/plugin/imageperceptor/imagerender.cpp trunk/spark/plugin/imageperceptor/imagerender.h Modified: trunk/spark/plugin/imageperceptor/imageperceptor.cpp =================================================================== --- trunk/spark/plugin/imageperceptor/imageperceptor.cpp 2010-12-17 00:22:16 UTC (rev 236) +++ trunk/spark/plugin/imageperceptor/imageperceptor.cpp 2010-12-17 00:22:35 UTC (rev 237) @@ -64,22 +64,29 @@ } bool ImagePerceptor::Percept(boost::shared_ptr<PredicateList> predList) -{ - Predicate &predicate = predList->AddPredicate(); - predicate.name = "IMG"; - predicate.parameter.Clear(); - - ParameterList &sizeElement = predicate.parameter.AddList(); - sizeElement.AddValue(std::string("s")); - sizeElement.AddValue(mRender->GetWidth()); - sizeElement.AddValue(mRender->GetHeight()); +{ + mRender->RequestRender(); - ParameterList &dataElement = predicate.parameter.AddList(); - dataElement.AddValue(std::string("d")); - const char* data = mRender->GetData(); - string datacode = mB64Encoder.encode(data, mRender->GetDataSize()); - dataElement.AddValue(datacode); - return true; + int size = mRender->GetDataSize(); + if (size == 0) + return false; + + Predicate &predicate = predList->AddPredicate(); + predicate.name = "IMG"; + predicate.parameter.Clear(); + + ParameterList &sizeElement = predicate.parameter.AddList(); + sizeElement.AddValue(std::string("s")); + sizeElement.AddValue(mRender->GetWidth()); + sizeElement.AddValue(mRender->GetHeight()); + + ParameterList &dataElement = predicate.parameter.AddList(); + dataElement.AddValue(std::string("d")); + const char* data = mRender->GetData(); + string datacode = mB64Encoder.encode(data, size); + dataElement.AddValue(datacode); + + return true; } void ImagePerceptor::SetViewport(unsigned int x, unsigned int y, unsigned int w, unsigned int h) Modified: trunk/spark/plugin/imageperceptor/imagerender.cpp =================================================================== --- trunk/spark/plugin/imageperceptor/imagerender.cpp 2010-12-17 00:22:16 UTC (rev 236) +++ trunk/spark/plugin/imageperceptor/imagerender.cpp 2010-12-17 00:22:35 UTC (rev 237) @@ -42,8 +42,8 @@ using namespace salt; using namespace std; -ImageRender::ImageRender(): // kerosin::CustomRender(), - mDataSize(0), mWidth(0), mHeight(0) +ImageRender::ImageRender(): kerosin::CustomRender(), + mDataSize(0), mWidth(0), mHeight(0), mRequested(false) { } @@ -98,7 +98,7 @@ void ImageRender::Render() { - if ( + if ( (!mRequested) || (mOpenGLServer.expired()) || (mRenderServer.expired()) ) @@ -166,4 +166,5 @@ #endif mRenderServer->SetCamera(oldCamera); + mRequested = false; } Modified: trunk/spark/plugin/imageperceptor/imagerender.h =================================================================== --- trunk/spark/plugin/imageperceptor/imagerender.h 2010-12-17 00:22:16 UTC (rev 236) +++ trunk/spark/plugin/imageperceptor/imagerender.h 2010-12-17 00:22:35 UTC (rev 237) @@ -51,6 +51,8 @@ int GetHeight() const { return mHeight; } + void RequestRender() { mRequested = true; } + private: boost::shared_ptr<oxygen::Camera> mCamera; @@ -64,6 +66,7 @@ int mDataSize; int mWidth; int mHeight; + bool mRequested; unsigned int mFBOId; unsigned int mRBOId; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yx...@us...> - 2010-12-17 00:22:22
|
Revision: 236 http://simspark.svn.sourceforge.net/simspark/?rev=236&view=rev Author: yxu Date: 2010-12-17 00:22:16 +0000 (Fri, 17 Dec 2010) Log Message: ----------- capitalize first characters of functions Modified Paths: -------------- trunk/spark/plugin/imageperceptor/imageperceptor.cpp trunk/spark/plugin/imageperceptor/imagerender.h Modified: trunk/spark/plugin/imageperceptor/imageperceptor.cpp =================================================================== --- trunk/spark/plugin/imageperceptor/imageperceptor.cpp 2010-12-17 00:21:59 UTC (rev 235) +++ trunk/spark/plugin/imageperceptor/imageperceptor.cpp 2010-12-17 00:22:16 UTC (rev 236) @@ -71,13 +71,13 @@ ParameterList &sizeElement = predicate.parameter.AddList(); sizeElement.AddValue(std::string("s")); - sizeElement.AddValue(mRender->getWidth()); - sizeElement.AddValue(mRender->getHeight()); + sizeElement.AddValue(mRender->GetWidth()); + sizeElement.AddValue(mRender->GetHeight()); ParameterList &dataElement = predicate.parameter.AddList(); dataElement.AddValue(std::string("d")); - const char* data = mRender->getData(); - string datacode = mB64Encoder.encode(data, mRender->getDataSize()); + const char* data = mRender->GetData(); + string datacode = mB64Encoder.encode(data, mRender->GetDataSize()); dataElement.AddValue(datacode); return true; } Modified: trunk/spark/plugin/imageperceptor/imagerender.h =================================================================== --- trunk/spark/plugin/imageperceptor/imagerender.h 2010-12-17 00:21:59 UTC (rev 235) +++ trunk/spark/plugin/imageperceptor/imagerender.h 2010-12-17 00:22:16 UTC (rev 236) @@ -43,13 +43,13 @@ void OnUnlink(); - const char* getData() const { return mData.get(); } + const char* GetData() const { return mData.get(); } - int getDataSize() const { return mDataSize; } + int GetDataSize() const { return mDataSize; } - int getWidth() const { return mWidth; } + int GetWidth() const { return mWidth; } - int getHeight() const { return mHeight; } + int GetHeight() const { return mHeight; } private: boost::shared_ptr<oxygen::Camera> mCamera; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yx...@us...> - 2010-12-17 00:22:05
|
Revision: 235 http://simspark.svn.sourceforge.net/simspark/?rev=235&view=rev Author: yxu Date: 2010-12-17 00:21:59 +0000 (Fri, 17 Dec 2010) Log Message: ----------- multi-threads works! (do we really need mutex?!) Modified Paths: -------------- trunk/spark/plugin/imageperceptor/imagerender.cpp trunk/spark/spark/spark.rb Modified: trunk/spark/plugin/imageperceptor/imagerender.cpp =================================================================== --- trunk/spark/plugin/imageperceptor/imagerender.cpp 2010-12-17 00:21:40 UTC (rev 234) +++ trunk/spark/plugin/imageperceptor/imagerender.cpp 2010-12-17 00:21:59 UTC (rev 235) @@ -164,6 +164,6 @@ // unbind FBO glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); #endif -// mRenderServer->SetCamera(oldCamera); + mRenderServer->SetCamera(oldCamera); } Modified: trunk/spark/spark/spark.rb =================================================================== --- trunk/spark/spark/spark.rb 2010-12-17 00:21:40 UTC (rev 234) +++ trunk/spark/spark/spark.rb 2010-12-17 00:21:59 UTC (rev 235) @@ -283,7 +283,7 @@ simulationServer = sparkGetSimulationServer() if (simulationServer != nil) - simulationServer.setMultiThreads(false); + simulationServer.setMultiThreads(true); simulationServer.initControlNode('oxygen/AgentControl','AgentControl') # set auto speed adjust mode. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yx...@us...> - 2010-12-17 00:21:46
|
Revision: 234 http://simspark.svn.sourceforge.net/simspark/?rev=234&view=rev Author: yxu Date: 2010-12-17 00:21:40 +0000 (Fri, 17 Dec 2010) Log Message: ----------- render the image of camera in RenderControl Modified Paths: -------------- trunk/spark/plugin/imageperceptor/imageperceptor.cpp trunk/spark/plugin/imageperceptor/imageperceptor.h Modified: trunk/spark/plugin/imageperceptor/imageperceptor.cpp =================================================================== --- trunk/spark/plugin/imageperceptor/imageperceptor.cpp 2010-12-17 00:21:21 UTC (rev 233) +++ trunk/spark/plugin/imageperceptor/imageperceptor.cpp 2010-12-17 00:21:40 UTC (rev 234) @@ -50,13 +50,21 @@ } mRender->SetCamera(mCamera); - AddChildReference(mRender); + + RegisterCachedPath(mRenderControl, "/sys/server/simulation/RenderControl"); + + if (mRenderControl.expired()) + { + GetLog()->Error() + << "(ImagePerceptor) ERROR: RenderControl not found\n"; + } else + { + mRenderControl->AddChildReference(mRender); + } } bool ImagePerceptor::Percept(boost::shared_ptr<PredicateList> predList) -{ - mRender->Render(); - +{ Predicate &predicate = predList->AddPredicate(); predicate.name = "IMG"; predicate.parameter.Clear(); Modified: trunk/spark/plugin/imageperceptor/imageperceptor.h =================================================================== --- trunk/spark/plugin/imageperceptor/imageperceptor.h 2010-12-17 00:21:21 UTC (rev 233) +++ trunk/spark/plugin/imageperceptor/imageperceptor.h 2010-12-17 00:21:40 UTC (rev 234) @@ -21,9 +21,10 @@ #ifndef IMAGEPERCEPTOR_H #define IMAGEPERCEPTOR_H +#include <libb64/encode.h> #include <oxygen/agentaspect/perceptor.h> #include <oxygen/sceneserver/camera.h> -#include <libb64/encode.h> +#include <kerosin/renderserver/rendercontrol.h> #include "imagerender.h" class ImagePerceptor : public oxygen::Perceptor @@ -50,6 +51,8 @@ boost::shared_ptr<ImageRender> mRender; + zeitgeist::Leaf::CachedPath<kerosin::RenderControl> mRenderControl; + base64::Encoder mB64Encoder; }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yx...@us...> - 2010-12-17 00:21:27
|
Revision: 233 http://simspark.svn.sourceforge.net/simspark/?rev=233&view=rev Author: yxu Date: 2010-12-17 00:21:21 +0000 (Fri, 17 Dec 2010) Log Message: ----------- separate the render code Modified Paths: -------------- trunk/spark/plugin/imageperceptor/CMakeLists.txt trunk/spark/plugin/imageperceptor/export.cpp trunk/spark/plugin/imageperceptor/imageperceptor.cpp trunk/spark/plugin/imageperceptor/imageperceptor.h Added Paths: ----------- trunk/spark/plugin/imageperceptor/imagerender.cpp trunk/spark/plugin/imageperceptor/imagerender.h trunk/spark/plugin/imageperceptor/imagerender_c.cpp Modified: trunk/spark/plugin/imageperceptor/CMakeLists.txt =================================================================== --- trunk/spark/plugin/imageperceptor/CMakeLists.txt 2010-12-16 11:27:58 UTC (rev 232) +++ trunk/spark/plugin/imageperceptor/CMakeLists.txt 2010-12-17 00:21:21 UTC (rev 233) @@ -6,6 +6,9 @@ imageperceptor.h imageperceptor.cpp imageperceptor_c.cpp + imagerender.h + imagerender.cpp + imagerender_c.cpp ) add_library(imageperceptor MODULE ${imageperceptor_LIB_SRCS}) Modified: trunk/spark/plugin/imageperceptor/export.cpp =================================================================== --- trunk/spark/plugin/imageperceptor/export.cpp 2010-12-16 11:27:58 UTC (rev 232) +++ trunk/spark/plugin/imageperceptor/export.cpp 2010-12-17 00:21:21 UTC (rev 233) @@ -19,8 +19,9 @@ */ #include "imageperceptor.h" -#include <zeitgeist/zeitgeist.h> +#include "imagerender.h" ZEITGEIST_EXPORT_BEGIN() ZEITGEIST_EXPORT(ImagePerceptor); + ZEITGEIST_EXPORT(ImageRender); ZEITGEIST_EXPORT_END() Modified: trunk/spark/plugin/imageperceptor/imageperceptor.cpp =================================================================== --- trunk/spark/plugin/imageperceptor/imageperceptor.cpp 2010-12-16 11:27:58 UTC (rev 232) +++ trunk/spark/plugin/imageperceptor/imageperceptor.cpp 2010-12-17 00:21:21 UTC (rev 233) @@ -18,101 +18,44 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -// #include <IL/il.h> -// #include <IL/ilu.h> -// #include <sstream> -#ifndef WIN32 -#if __APPLE__ -#include <OpenGL/gl.h> -#else -#include <GL/gl.h> -#endif -#else -#include <windows.h> -#include <GL/gl.h> -#include <GL/glext.h> -#endif - #include "imageperceptor.h" #include <zeitgeist/logserver/logserver.h> -#include <boost/smart_ptr/shared_array.hpp> -#define USE_FBO - -// using namespace kerosin; using namespace oxygen; using namespace boost; using namespace zeitgeist; using namespace salt; using namespace std; -ImagePerceptor::ImagePerceptor() : oxygen::Perceptor(), - mDataSize(0) +ImagePerceptor::ImagePerceptor() : oxygen::Perceptor() { - mFramesRendered = 0; } ImagePerceptor::~ImagePerceptor() { } -#define REG_GL_EXT_FUN(_ptr, _function) \ - static _ptr _function = (_ptr) mOpenGLServer->GetExtension(#_function); \ - if ( !_function ){ \ - GetLog()->Error()<<"(Image Perceptor) ERROR: can not get "#_function"\n"; \ - } - void ImagePerceptor::OnLink() { - mCamera = shared_dynamic_cast<Camera>( GetCore()->New("oxygen/Camera") ); - if ( 0 != mCamera.get() ) - { - AddChildReference(mCamera); - } - else - { - GetLog()->Error() - <<"(ImagePerceptor) ERROR: can not create camera\n"; - } - - RegisterCachedPath(mRenderServer, "/sys/server/render"); + mRender = shared_dynamic_cast<ImageRender > (GetCore()->New("ImageRender")); - if (mRenderServer.expired()) - { - GetLog()->Error() - << "(ImagePerceptor) ERROR: RenderServer not found\n"; - } + mCamera = shared_dynamic_cast<Camera > (GetCore()->New("oxygen/Camera")); + if (0 != mCamera.get()) + { + AddChildReference(mCamera); + } else + { + GetLog()->Error() + << "(ImagePerceptor) ERROR: can not create camera\n"; + } - RegisterCachedPath(mOpenGLServer,"/sys/server/opengl"); - - if (mOpenGLServer.expired()) - { - GetLog()->Error() - << "(ImagePerceptor) ERROR: OpenGLServer not found\n"; - } - - // create a framebuffer object - REG_GL_EXT_FUN( PFNGLGENFRAMEBUFFERSEXTPROC, glGenFramebuffersEXT ); - REG_GL_EXT_FUN( PFNGLGENRENDERBUFFERSEXTPROC, glGenRenderbuffersEXT); - - glGenFramebuffersEXT(1, &mFBOId); - glGenRenderbuffersEXT(1, &mRBOId); - glGenRenderbuffersEXT(1, &mDepthBuffer); - + mRender->SetCamera(mCamera); + AddChildReference(mRender); } -void ImagePerceptor::OnUnlink() -{ - REG_GL_EXT_FUN( PFNGLDELETEFRAMEBUFFERSEXTPROC, glDeleteFramebuffersEXT ); - REG_GL_EXT_FUN( PFNGLDELETERENDERBUFFERSEXTPROC, glDeleteRenderbuffersEXT ); - glDeleteFramebuffersEXT(1, &mFBOId); - glDeleteRenderbuffersEXT(1, &mRBOId); -} - bool ImagePerceptor::Percept(boost::shared_ptr<PredicateList> predList) { - if ( !Render() ) - return false; + mRender->Render(); Predicate &predicate = predList->AddPredicate(); predicate.name = "IMG"; @@ -120,107 +63,33 @@ ParameterList &sizeElement = predicate.parameter.AddList(); sizeElement.AddValue(std::string("s")); - sizeElement.AddValue(mCamera->GetViewportWidth()); - sizeElement.AddValue(mCamera->GetViewportHeight()); + sizeElement.AddValue(mRender->getWidth()); + sizeElement.AddValue(mRender->getHeight()); ParameterList &dataElement = predicate.parameter.AddList(); dataElement.AddValue(std::string("d")); - string datacode = mB64Encoder.encode(mData.get(), mDataSize); + const char* data = mRender->getData(); + string datacode = mB64Encoder.encode(data, mRender->getDataSize()); dataElement.AddValue(datacode); return true; } -bool ImagePerceptor::Render() -{ - if ( - (mOpenGLServer.expired()) || - (mRenderServer.expired()) - ) - { - return false; - } - - int w = mCamera->GetViewportWidth(); - int h = mCamera->GetViewportHeight(); - -#ifdef USE_FBO - REG_GL_EXT_FUN( PFNGLBINDFRAMEBUFFEREXTPROC, glBindFramebufferEXT ); - REG_GL_EXT_FUN( PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC, glFramebufferRenderbufferEXT ); - REG_GL_EXT_FUN( PFNGLRENDERBUFFERSTORAGEEXTPROC, glRenderbufferStorageEXT ); - REG_GL_EXT_FUN( PFNGLBINDRENDERBUFFEREXTPROC, glBindRenderbufferEXT); - REG_GL_EXT_FUN( PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC, glCheckFramebufferStatusEXT ); - - - glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, mFBOId); - glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, mRBOId); - glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGB, w, h); - glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, - GL_RENDERBUFFER_EXT, mRBOId); - - glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, mDepthBuffer); - glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT, w, h); - glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, mDepthBuffer); - - - // check FBO status - GLenum status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT); - if(status != GL_FRAMEBUFFER_COMPLETE_EXT){ - GetLog()->Error()<<"fbo error!\n"; - } -#endif - - // setup the camera - boost::shared_ptr<Camera> oldCamera = mRenderServer->GetCamera(); - mRenderServer->SetCamera(mCamera); - mRenderServer->Render(); - -#ifdef USE_FBO -#else - glReadBuffer(GL_BACK); -#endif - - glReadPixels(0, 0, - w, h, - GL_RGB, - GL_UNSIGNED_BYTE, - mData.get()); - - ++mFramesRendered; -#ifdef USE_FBO - // unbind FBO - glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); -#endif - mRenderServer->SetCamera(oldCamera); - - return true; -} - void ImagePerceptor::SetViewport(unsigned int x, unsigned int y, unsigned int w, unsigned int h) { - if ( 0!= mCamera ){ - mCamera->SetViewport(x,y,w,h); - mDataSize = 3*w*h; - mData = boost::shared_array<char>(new char[mDataSize]); - } + mCamera->SetViewport(x, y, w, h); } void ImagePerceptor::SetFOV(float fov) { - if ( 0!= mCamera ){ - mCamera->SetFOV(fov); - } + mCamera->SetFOV(fov); } void ImagePerceptor::SetZNear(float zNear) { - if ( 0!= mCamera ){ - mCamera->SetZNear(zNear); - } + mCamera->SetZNear(zNear); } void ImagePerceptor::SetZFar(float zFar) { - if ( 0!= mCamera ){ - mCamera->SetZFar(zFar); - } + mCamera->SetZFar(zFar); } Modified: trunk/spark/plugin/imageperceptor/imageperceptor.h =================================================================== --- trunk/spark/plugin/imageperceptor/imageperceptor.h 2010-12-16 11:27:58 UTC (rev 232) +++ trunk/spark/plugin/imageperceptor/imageperceptor.h 2010-12-17 00:21:21 UTC (rev 233) @@ -23,11 +23,8 @@ #include <oxygen/agentaspect/perceptor.h> #include <oxygen/sceneserver/camera.h> -#include <oxygen/sceneserver/sceneserver.h> -#include <kerosin/renderserver/baserenderserver.h> -#include <kerosin/openglserver/openglserver.h> -#include <boost/shared_array.hpp> #include <libb64/encode.h> +#include "imagerender.h" class ImagePerceptor : public oxygen::Perceptor { @@ -37,11 +34,8 @@ //! \return true, if valid data is available and false otherwise. bool Percept(boost::shared_ptr<oxygen::PredicateList> predList); - - bool Render(); virtual void OnLink(); - virtual void OnUnlink(); void SetViewport(unsigned int x, unsigned int y, unsigned int w, unsigned int h); @@ -54,22 +48,8 @@ private: boost::shared_ptr<oxygen::Camera> mCamera; - /** cached reference to the RenderServer */ - CachedPath<kerosin::BaseRenderServer> mRenderServer; + boost::shared_ptr<ImageRender> mRender; - /** cached reference to the OpenGLServer */ - CachedPath<kerosin::OpenGLServer> mOpenGLServer; - - /** total frames rendered */ - int mFramesRendered; - - boost::shared_array<char> mData; - unsigned int mDataSize; - - unsigned int mFBOId; - unsigned int mRBOId; - unsigned int mDepthBuffer; - base64::Encoder mB64Encoder; }; Copied: trunk/spark/plugin/imageperceptor/imagerender.cpp (from rev 232, trunk/spark/plugin/imageperceptor/imageperceptor.cpp) =================================================================== --- trunk/spark/plugin/imageperceptor/imagerender.cpp (rev 0) +++ trunk/spark/plugin/imageperceptor/imagerender.cpp 2010-12-17 00:21:21 UTC (rev 233) @@ -0,0 +1,169 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Copyright (C) 2008 RoboCup Soccer Server 3D Maintenance Group + $Id$ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifndef WIN32 +#if __APPLE__ +#include <OpenGL/gl.h> +#else +#include <GL/gl.h> +#endif +#else +#include <windows.h> +#include <GL/gl.h> +#include <GL/glext.h> +#endif + +#include "imagerender.h" +#include <zeitgeist/logserver/logserver.h> + +#define USE_FBO + +// using namespace kerosin; +using namespace oxygen; +using namespace boost; +using namespace zeitgeist; +using namespace salt; +using namespace std; + +ImageRender::ImageRender(): // kerosin::CustomRender(), + mDataSize(0), mWidth(0), mHeight(0) +{ +} + +ImageRender::~ImageRender() +{ +} +#define REG_GL_EXT_FUN(_ptr, _function) \ + static _ptr _function = (_ptr) mOpenGLServer->GetExtension(#_function);\ + if ( !_function ){ \ + GetLog()->Error()<<"(Image Perceptor) ERROR: can not get "#_function"\n"; \ + } + +void ImageRender::SetCamera(boost::shared_ptr<oxygen::Camera> camera) +{ + mCamera = camera; +} + +void ImageRender::OnLink() +{ + RegisterCachedPath(mRenderServer, "/sys/server/render"); + + if (mRenderServer.expired()) + { + GetLog()->Error() + << "(ImagePerceptor) ERROR: RenderServer not found\n"; + } + + RegisterCachedPath(mOpenGLServer,"/sys/server/opengl"); + + if (mOpenGLServer.expired()) + { + GetLog()->Error() + << "(ImagePerceptor) ERROR: OpenGLServer not found\n"; + } + + // create a framebuffer object + REG_GL_EXT_FUN( PFNGLGENFRAMEBUFFERSEXTPROC, glGenFramebuffersEXT ); + REG_GL_EXT_FUN( PFNGLGENRENDERBUFFERSEXTPROC, glGenRenderbuffersEXT); + + glGenFramebuffersEXT(1, &mFBOId); + glGenRenderbuffersEXT(1, &mRBOId); + glGenRenderbuffersEXT(1, &mDepthBuffer); +} + +void ImageRender::OnUnlink() +{ + REG_GL_EXT_FUN( PFNGLDELETEFRAMEBUFFERSEXTPROC, glDeleteFramebuffersEXT ); + REG_GL_EXT_FUN( PFNGLDELETERENDERBUFFERSEXTPROC, glDeleteRenderbuffersEXT ); + glDeleteFramebuffersEXT(1, &mFBOId); + glDeleteRenderbuffersEXT(1, &mRBOId); +} + +void ImageRender::Render() +{ + if ( + (mOpenGLServer.expired()) || + (mRenderServer.expired()) + ) + { + return; + } + + int w = mCamera->GetViewportWidth(); + int h = mCamera->GetViewportHeight(); + +#ifdef USE_FBO + REG_GL_EXT_FUN( PFNGLBINDFRAMEBUFFEREXTPROC, glBindFramebufferEXT ); + REG_GL_EXT_FUN( PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC, glFramebufferRenderbufferEXT ); + REG_GL_EXT_FUN( PFNGLRENDERBUFFERSTORAGEEXTPROC, glRenderbufferStorageEXT ); + REG_GL_EXT_FUN( PFNGLBINDRENDERBUFFEREXTPROC, glBindRenderbufferEXT); + REG_GL_EXT_FUN( PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC, glCheckFramebufferStatusEXT ); + + + glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, mFBOId); + glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, mRBOId); + glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGB, w, h); + glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, + GL_RENDERBUFFER_EXT, mRBOId); + + glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, mDepthBuffer); + glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT, w, h); + glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, mDepthBuffer); + + + // check FBO status + GLenum status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT); + if(status != GL_FRAMEBUFFER_COMPLETE_EXT){ +// GetLog()->Error()<<"fbo error!\n"; + } +#endif + + // setup the camera + boost::shared_ptr<Camera> oldCamera = mRenderServer->GetCamera(); + mRenderServer->SetCamera(mCamera); + mRenderServer->Render(); + +#ifdef USE_FBO +#else + glReadBuffer(GL_BACK); +#endif + + int size = w*h*3; + if ( size != mDataSize ) + { + mData = boost::shared_array<char>(new char[size]); + mDataSize = size; + } + + glReadPixels(0, 0, + w, h, + GL_RGB, + GL_UNSIGNED_BYTE, + mData.get()); + mWidth = w; + mHeight = h; + +#ifdef USE_FBO + // unbind FBO + glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); +#endif +// mRenderServer->SetCamera(oldCamera); + +} Added: trunk/spark/plugin/imageperceptor/imagerender.h =================================================================== --- trunk/spark/plugin/imageperceptor/imagerender.h (rev 0) +++ trunk/spark/plugin/imageperceptor/imagerender.h 2010-12-17 00:21:21 UTC (rev 233) @@ -0,0 +1,76 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Copyright (C) 2008 RoboCup Soccer Server 3D Maintenance Group + $Id$ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifndef IMAGERENDER_H +#define IMAGERENDER_H + +#include <oxygen/sceneserver/camera.h> +#include <oxygen/sceneserver/sceneserver.h> +#include <kerosin/renderserver/baserenderserver.h> +#include <kerosin/renderserver/customrender.h> +#include <kerosin/openglserver/openglserver.h> +#include <boost/shared_array.hpp> + +class ImageRender: public kerosin::CustomRender +{ +public: + ImageRender(); + + ~ImageRender(); + + void Render(); + + void SetCamera(boost::shared_ptr<oxygen::Camera> camera); + + void OnLink(); + + void OnUnlink(); + + const char* getData() const { return mData.get(); } + + int getDataSize() const { return mDataSize; } + + int getWidth() const { return mWidth; } + + int getHeight() const { return mHeight; } + +private: + boost::shared_ptr<oxygen::Camera> mCamera; + + /** cached reference to the RenderServer */ + zeitgeist::Leaf::CachedPath<kerosin::BaseRenderServer> mRenderServer; + + /** cached reference to the OpenGLServer */ + zeitgeist::Leaf::CachedPath<kerosin::OpenGLServer> mOpenGLServer; + + boost::shared_array<char> mData; + int mDataSize; + int mWidth; + int mHeight; + + unsigned int mFBOId; + unsigned int mRBOId; + unsigned int mDepthBuffer; +}; + +DECLARE_CLASS(ImageRender); + +#endif /* IMAGERENDER_H */ + Copied: trunk/spark/plugin/imageperceptor/imagerender_c.cpp (from rev 232, trunk/spark/plugin/imageperceptor/export.cpp) =================================================================== --- trunk/spark/plugin/imageperceptor/imagerender_c.cpp (rev 0) +++ trunk/spark/plugin/imageperceptor/imagerender_c.cpp 2010-12-17 00:21:21 UTC (rev 233) @@ -0,0 +1,26 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Copyright (C) 2008 RoboCup Soccer Server 3D Maintenance Group + $Id:$ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "imagerender.h" + +void CLASS(ImageRender)::DefineClass() +{ + DEFINE_BASECLASS(kerosin/CustomRender); +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yx...@us...> - 2010-12-16 11:28:06
|
Revision: 232 http://simspark.svn.sourceforge.net/simspark/?rev=232&view=rev Author: yxu Date: 2010-12-16 11:27:58 +0000 (Thu, 16 Dec 2010) Log Message: ----------- ChangeLog Modified Paths: -------------- trunk/spark/ChangeLog Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2010-12-16 11:27:45 UTC (rev 231) +++ trunk/spark/ChangeLog 2010-12-16 11:27:58 UTC (rev 232) @@ -1,4 +1,13 @@ 2010-12-14 Yuan Xu <xu...@in...> + * rcssserver3d/plugin/soccer/restrictedvisionperceptor/restrictedvisionperceptor.cpp + * rcssserver3d/plugin/soccer/trainercommandparser/trainercommandparser.cpp + * spark/lib/oxygen/proxyserver/agentproxy.cpp + - compile by VC10 + + * rsgedit/CMakeLists.txt + - use UseWxWidgets.cmake + +2010-12-14 Yuan Xu <xu...@in...> * spark/plugin/imageperceptor * spark/spark.rb This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yx...@us...> - 2010-12-16 11:27:52
|
Revision: 231 http://simspark.svn.sourceforge.net/simspark/?rev=231&view=rev Author: yxu Date: 2010-12-16 11:27:45 +0000 (Thu, 16 Dec 2010) Log Message: ----------- compile by VC10 Modified Paths: -------------- trunk/rcssserver3d/plugin/soccer/restrictedvisionperceptor/restrictedvisionperceptor.cpp trunk/rcssserver3d/plugin/soccer/trainercommandparser/trainercommandparser.cpp trunk/spark/lib/oxygen/proxyserver/agentproxy.cpp Modified: trunk/rcssserver3d/plugin/soccer/restrictedvisionperceptor/restrictedvisionperceptor.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/restrictedvisionperceptor/restrictedvisionperceptor.cpp 2010-12-16 11:27:19 UTC (rev 230) +++ trunk/rcssserver3d/plugin/soccer/restrictedvisionperceptor/restrictedvisionperceptor.cpp 2010-12-16 11:27:45 UTC (rev 231) @@ -26,7 +26,6 @@ #include <soccerbase/soccerbase.h> #include <salt/gmath.h> #include <list> -#include <X11/X.h> #include <math.h> #include <salt/linesegment2.h> #include <limits> Modified: trunk/rcssserver3d/plugin/soccer/trainercommandparser/trainercommandparser.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/trainercommandparser/trainercommandparser.cpp 2010-12-16 11:27:19 UTC (rev 230) +++ trunk/rcssserver3d/plugin/soccer/trainercommandparser/trainercommandparser.cpp 2010-12-16 11:27:45 UTC (rev 231) @@ -508,7 +508,7 @@ int unum; bool specified = true; - shared_ptr<SoccerRuleAspect> soccerRuleAspect; + boost::shared_ptr<SoccerRuleAspect> soccerRuleAspect; if (!SoccerBase::GetSoccerRuleAspect(*this, soccerRuleAspect)) { GetLog()->Error() << "(TrainerCommandParser) ERROR: can't get soccer rule aspect\n"; @@ -582,7 +582,7 @@ int unum; bool specified = true; - shared_ptr<SoccerRuleAspect> soccerRuleAspect; + boost::shared_ptr<SoccerRuleAspect> soccerRuleAspect; if (!SoccerBase::GetSoccerRuleAspect(*this, soccerRuleAspect)) { GetLog()->Error() << "(TrainerCommandParser) ERROR: can't get soccer rule aspect\n"; @@ -643,7 +643,7 @@ int unum; bool specified = true; - shared_ptr<SoccerRuleAspect> soccerRuleAspect; + boost::shared_ptr<SoccerRuleAspect> soccerRuleAspect; if (!SoccerBase::GetSoccerRuleAspect(*this, soccerRuleAspect)) { GetLog()->Error() << "(TrainerCommandParser) ERROR: can't get soccer rule aspect\n"; Modified: trunk/spark/lib/oxygen/proxyserver/agentproxy.cpp =================================================================== --- trunk/spark/lib/oxygen/proxyserver/agentproxy.cpp 2010-12-16 11:27:19 UTC (rev 230) +++ trunk/spark/lib/oxygen/proxyserver/agentproxy.cpp 2010-12-16 11:27:45 UTC (rev 231) @@ -23,7 +23,7 @@ #include <rcssnet/exception.hpp> #include <zeitgeist/logserver/logserver.h> #include <oxygen/simulationserver/netcontrol.h> - +#include <errno.h> #ifdef HAVE_SYS_SOCKET_H #include <sys/socket.h> #endif @@ -32,7 +32,6 @@ using namespace zeitgeist; using namespace std; using namespace rcss::net; -using boost::shared_ptr; AgentProxy::AgentProxy(int cycleMillisecs) : Node(), mCycleMillisecs(cycleMillisecs), mFinished(false), @@ -69,7 +68,7 @@ mNetMessage = FindChildSupportingClass<NetMessage>(); if (mNetMessage.get() == 0) { - mNetMessage = shared_ptr<NetMessage>(new NetMessage()); + mNetMessage = boost::shared_ptr<NetMessage>(new NetMessage()); } mAgentConnectionThread = boost::thread( @@ -107,7 +106,7 @@ string servermsg, agentmsg; boost::system_time cycleFinishTime = boost::get_system_time() + boost::posix_time::milliseconds(mCycleMillisecs); - shared_ptr<NetBuffer> netbuf(new NetBuffer); + boost::shared_ptr<NetBuffer> netbuf(new NetBuffer); TRawBuffer recvbuf; mNetMessage->PrepareToSend(syncMsg); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yx...@us...> - 2010-12-16 11:27:25
|
Revision: 230 http://simspark.svn.sourceforge.net/simspark/?rev=230&view=rev Author: yxu Date: 2010-12-16 11:27:19 +0000 (Thu, 16 Dec 2010) Log Message: ----------- use UseWxWidgets.cmake Modified Paths: -------------- trunk/rsgedit/CMakeLists.txt Modified: trunk/rsgedit/CMakeLists.txt =================================================================== --- trunk/rsgedit/CMakeLists.txt 2010-12-14 17:08:25 UTC (rev 229) +++ trunk/rsgedit/CMakeLists.txt 2010-12-16 11:27:19 UTC (rev 230) @@ -9,14 +9,16 @@ find_package(Boost REQUIRED thread COMPONENTS date_time) find_package(ODE REQUIRED) find_package(OpenGL REQUIRED) -find_package(wxWidgets REQUIRED gl base core adv) +set(wxWidgets_USE_LIBS gl adv) +find_package(wxWidgets REQUIRED) +include( ${wxWidgets_USE_FILE} ) ########## add extra flags ########## if(NOT CMAKE_BUILD_TYPE) set (CMAKE_BUILD_TYPE Release) endif(NOT CMAKE_BUILD_TYPE) -add_definitions(-DHAVE_CONFIG_H ${wxWidgets_DEFINITIONS}) +add_definitions(-DHAVE_CONFIG_H ) include_directories(${CMAKE_BINARY_DIR}) if (UNIX) set(CMAKE_CXX_FLAGS "-Wno-deprecated" CACHE This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yx...@us...> - 2010-12-14 17:08:31
|
Revision: 229 http://simspark.svn.sourceforge.net/simspark/?rev=229&view=rev Author: yxu Date: 2010-12-14 17:08:25 +0000 (Tue, 14 Dec 2010) Log Message: ----------- ChangeLog Modified Paths: -------------- trunk/spark/ChangeLog Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2010-12-14 17:08:12 UTC (rev 228) +++ trunk/spark/ChangeLog 2010-12-14 17:08:25 UTC (rev 229) @@ -1,3 +1,16 @@ +2010-12-14 Yuan Xu <xu...@in...> + + * spark/plugin/imageperceptor + * spark/spark.rb + - use base64 encoding image + + * utility/libb64/ + - add libb64 for encoding/decoding base64 + + * lib/zeitgeist/scriptserver/gcvalue.h + * FindRuby.cmake + - support ruby 1.9.1 + 2010-09-28 Sander van Dijk <sgv...@gm...> * plugin/inputsdl/inputsystemsdl.cpp This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yx...@us...> - 2010-12-14 17:08:18
|
Revision: 228 http://simspark.svn.sourceforge.net/simspark/?rev=228&view=rev Author: yxu Date: 2010-12-14 17:08:12 +0000 (Tue, 14 Dec 2010) Log Message: ----------- use base64 in image perceptor Modified Paths: -------------- trunk/rcssserver3d/data/rsg/agent/nao/naoneckhead.rsg trunk/spark/plugin/imageperceptor/CMakeLists.txt trunk/spark/plugin/imageperceptor/imageperceptor.cpp trunk/spark/plugin/imageperceptor/imageperceptor.h trunk/spark/spark/spark.rb trunk/spark/utility/libb64/cencode.h trunk/spark/utility/libb64/decode.h trunk/spark/utility/libb64/encode.h Modified: trunk/rcssserver3d/data/rsg/agent/nao/naoneckhead.rsg =================================================================== --- trunk/rcssserver3d/data/rsg/agent/nao/naoneckhead.rsg 2010-12-14 17:07:37 UTC (rev 227) +++ trunk/rcssserver3d/data/rsg/agent/nao/naoneckhead.rsg 2010-12-14 17:08:12 UTC (rev 228) @@ -85,8 +85,6 @@ 0 0 -0.005 1 0 0 $he2_min $he2_max) - - ;(nd Camera) (nd RestrictedVisionPerceptor (setViewCones 120 120) @@ -96,6 +94,18 @@ (setInterval 3) ) + ;; (nd Transform + ;; (setLocalPos 0 $Head_Radius 0) + ;; (setLocalRotation 0 0 0) + ;; (nd ImagePerceptor + ;; (setInterval 3) + ;; (setViewport 0 0 320 240) + ;; (setFOV 58) + ;; (setZNear 0.003) + ;; (setZFar 50) + ;; ) + ;; ) + (nd ObjectState (setID head) ) Modified: trunk/spark/plugin/imageperceptor/CMakeLists.txt =================================================================== --- trunk/spark/plugin/imageperceptor/CMakeLists.txt 2010-12-14 17:07:37 UTC (rev 227) +++ trunk/spark/plugin/imageperceptor/CMakeLists.txt 2010-12-14 17:08:12 UTC (rev 228) @@ -10,7 +10,7 @@ add_library(imageperceptor MODULE ${imageperceptor_LIB_SRCS}) -target_link_libraries(imageperceptor ${spark_libs} ${Boost_LIBRARIES}) +target_link_libraries(imageperceptor ${spark_libs} ${Boost_LIBRARIES} b64) if (NOT APPLE) set_target_properties(imageperceptor PROPERTIES VERSION 0.0.0 SOVERSION 0) Modified: trunk/spark/plugin/imageperceptor/imageperceptor.cpp =================================================================== --- trunk/spark/plugin/imageperceptor/imageperceptor.cpp 2010-12-14 17:07:37 UTC (rev 227) +++ trunk/spark/plugin/imageperceptor/imageperceptor.cpp 2010-12-14 17:08:12 UTC (rev 228) @@ -35,6 +35,7 @@ #include "imageperceptor.h" #include <zeitgeist/logserver/logserver.h> +#include <boost/smart_ptr/shared_array.hpp> #define USE_FBO @@ -45,7 +46,8 @@ using namespace salt; using namespace std; -ImagePerceptor::ImagePerceptor() : oxygen::Perceptor() +ImagePerceptor::ImagePerceptor() : oxygen::Perceptor(), + mDataSize(0) { mFramesRendered = 0; } @@ -113,16 +115,19 @@ return false; Predicate &predicate = predList->AddPredicate(); - predicate.name = "Image"; + predicate.name = "IMG"; predicate.parameter.Clear(); - // ParameterList &sizeElement = predicate.parameter.AddList(); - // sizeElement.AddValue(std::string("s")); - // sizeElement.AddValue(mCamera->GetViewportWidth()); - // sizeElement.AddValue(mCamera->GetViewportHeight()); + ParameterList &sizeElement = predicate.parameter.AddList(); + sizeElement.AddValue(std::string("s")); + sizeElement.AddValue(mCamera->GetViewportWidth()); + sizeElement.AddValue(mCamera->GetViewportHeight()); - predicate.parameter.AddValue(mData); - return true; + ParameterList &dataElement = predicate.parameter.AddList(); + dataElement.AddValue(std::string("d")); + string datacode = mB64Encoder.encode(mData.get(), mDataSize); + dataElement.AddValue(datacode); + return true; } bool ImagePerceptor::Render() @@ -173,14 +178,12 @@ #else glReadBuffer(GL_BACK); #endif - int size = 3*w*h; - if ( mData.size() != size ) - mData.resize(size); + glReadPixels(0, 0, w, h, GL_RGB, GL_UNSIGNED_BYTE, - const_cast<char*>(mData.data())); + mData.get()); ++mFramesRendered; #ifdef USE_FBO @@ -196,6 +199,8 @@ { if ( 0!= mCamera ){ mCamera->SetViewport(x,y,w,h); + mDataSize = 3*w*h; + mData = boost::shared_array<char>(new char[mDataSize]); } } Modified: trunk/spark/plugin/imageperceptor/imageperceptor.h =================================================================== --- trunk/spark/plugin/imageperceptor/imageperceptor.h 2010-12-14 17:07:37 UTC (rev 227) +++ trunk/spark/plugin/imageperceptor/imageperceptor.h 2010-12-14 17:08:12 UTC (rev 228) @@ -26,6 +26,8 @@ #include <oxygen/sceneserver/sceneserver.h> #include <kerosin/renderserver/baserenderserver.h> #include <kerosin/openglserver/openglserver.h> +#include <boost/shared_array.hpp> +#include <libb64/encode.h> class ImagePerceptor : public oxygen::Perceptor { @@ -61,11 +63,14 @@ /** total frames rendered */ int mFramesRendered; - std::string mData; + boost::shared_array<char> mData; + unsigned int mDataSize; unsigned int mFBOId; unsigned int mRBOId; unsigned int mDepthBuffer; + + base64::Encoder mB64Encoder; }; DECLARE_CLASS(ImagePerceptor); Modified: trunk/spark/spark/spark.rb =================================================================== --- trunk/spark/spark/spark.rb 2010-12-14 17:07:37 UTC (rev 227) +++ trunk/spark/spark/spark.rb 2010-12-14 17:08:12 UTC (rev 228) @@ -283,7 +283,7 @@ simulationServer = sparkGetSimulationServer() if (simulationServer != nil) - simulationServer.setMultiThreads(true); + simulationServer.setMultiThreads(false); simulationServer.initControlNode('oxygen/AgentControl','AgentControl') # set auto speed adjust mode. @@ -635,3 +635,6 @@ # importBundle "agentsynceffector" + +# +importBundle "imageperceptor" Modified: trunk/spark/utility/libb64/cencode.h =================================================================== --- trunk/spark/utility/libb64/cencode.h 2010-12-14 17:07:37 UTC (rev 227) +++ trunk/spark/utility/libb64/cencode.h 2010-12-14 17:08:12 UTC (rev 228) @@ -8,8 +8,6 @@ #ifndef BASE64_CENCODE_H #define BASE64_CENCODE_H -#define BUFFERSIZE 64 - typedef enum { step_A, step_B, step_C Modified: trunk/spark/utility/libb64/decode.h =================================================================== --- trunk/spark/utility/libb64/decode.h 2010-12-14 17:07:37 UTC (rev 227) +++ trunk/spark/utility/libb64/decode.h 2010-12-14 17:08:12 UTC (rev 228) @@ -59,7 +59,7 @@ codelength = len; } - plainlength = decode(code, codelength, out+totalLen); + plainlength = base64_decode_block(code, codelength, out+totalLen, &_state); code += codelength; len -= codelength; @@ -71,17 +71,18 @@ return totalLen; } + int decode(const char* code_in, const int length_in, char* plaintext_out) + { + base64_init_decodestate(&_state); + return base64_decode_block(code_in, length_in, plaintext_out, &_state); + } + protected: int decode(char value_in) { return base64_decode_value(value_in); } - int decode(const char* code_in, const int length_in, char* plaintext_out) - { - return base64_decode_block(code_in, length_in, plaintext_out, &_state); - } - private: base64_decodestate _state; int _buffersize; Modified: trunk/spark/utility/libb64/encode.h =================================================================== --- trunk/spark/utility/libb64/encode.h 2010-12-14 17:07:37 UTC (rev 227) +++ trunk/spark/utility/libb64/encode.h 2010-12-14 17:08:12 UTC (rev 228) @@ -22,7 +22,7 @@ { public: - Encoder(int buffersize_in = BUFFERSIZE) + Encoder(int buffersize_in = 128) : _buffersize(buffersize_in) { _code = new char[2 * _buffersize]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yx...@us...> - 2010-12-14 17:07:46
|
Revision: 227 http://simspark.svn.sourceforge.net/simspark/?rev=227&view=rev Author: yxu Date: 2010-12-14 17:07:37 +0000 (Tue, 14 Dec 2010) Log Message: ----------- add libb64 Modified Paths: -------------- trunk/spark/utility/CMakeLists.txt Added Paths: ----------- trunk/spark/utility/libb64/ trunk/spark/utility/libb64/CMakeLists.txt trunk/spark/utility/libb64/README trunk/spark/utility/libb64/base64.cc trunk/spark/utility/libb64/cdecode.c trunk/spark/utility/libb64/cdecode.h trunk/spark/utility/libb64/cencode.c trunk/spark/utility/libb64/cencode.h trunk/spark/utility/libb64/decode.h trunk/spark/utility/libb64/encode.h Modified: trunk/spark/utility/CMakeLists.txt =================================================================== --- trunk/spark/utility/CMakeLists.txt 2010-12-14 17:07:14 UTC (rev 226) +++ trunk/spark/utility/CMakeLists.txt 2010-12-14 17:07:37 UTC (rev 227) @@ -4,3 +4,4 @@ add_subdirectory(rcssnet) add_subdirectory(sfsexp) add_subdirectory(tinyxml) +add_subdirectory(libb64) Added: trunk/spark/utility/libb64/CMakeLists.txt =================================================================== --- trunk/spark/utility/libb64/CMakeLists.txt (rev 0) +++ trunk/spark/utility/libb64/CMakeLists.txt 2010-12-14 17:07:37 UTC (rev 227) @@ -0,0 +1,19 @@ + +set(b64_SRCS + cdecode.c + cdecode.h + cencode.c + cencode.h + ) + +set(base64_SRCS + base64.cc + ) + +add_library(b64 STATIC ${b64_SRCS}) +if(UNIX) + set_target_properties( b64 PROPERTIES COMPILE_FLAGS -fPIC) +endif(UNIX) + +add_executable(base64 ${base64_SRCS}) +target_link_libraries(base64 b64) Added: trunk/spark/utility/libb64/README =================================================================== --- trunk/spark/utility/libb64/README (rev 0) +++ trunk/spark/utility/libb64/README 2010-12-14 17:07:37 UTC (rev 227) @@ -0,0 +1,33 @@ +libb64: Base64 Encoding/Decoding Routines +Modified for SimSpark (http://simspark.sourceforge.net) +====================================== + +Overview: +-------- +libb64 is a library of ANSI C routines for fast encoding/decoding data into and +from a base64-encoded format. +Please visit http://libb64.sourceforge.net/ for more information. + +Why modify? +---------------- +We use base64 to en/decode image data inside the program, +so we use the library without stream. + +License: +------- +This work is released under into the Public Domain, +and you can take it and do whatever you want with it. + +An example of this "license" is the Creative Commons Public Domain License, a +copy of which can be found in the LICENSE file, and also online at +http://creativecommons.org/licenses/publicdomain/ + +Authors: +-------- +This modified version: Xu Yuan xuy...@gm... http://airobot.org +Original Version: Chris Venter chr...@gm... http://rocketpod.blogspot.com + +References: +---------- +* Wikipedia article: + http://en.wikipedia.org/wiki/Base64 Added: trunk/spark/utility/libb64/base64.cc =================================================================== --- trunk/spark/utility/libb64/base64.cc (rev 0) +++ trunk/spark/utility/libb64/base64.cc 2010-12-14 17:07:37 UTC (rev 227) @@ -0,0 +1,94 @@ +/* +base64.cc - c++ source to a base64 reference encoder and decoder + +This is part of the libb64 project, and has been placed in the public domain. +For details, see http://sourceforge.net/projects/libb64 +*/ + +#include "encode.h" +#include "decode.h" + +#include <iostream> +#include <fstream> +#include <string> + +#include <stdlib.h> + +// Function which prints the usage of this executable +void usage() +{ + std::cerr<< \ + "base64: Encodes and Decodes files using base64\n" \ + "Usage: base64 [-e|-d] [input] [output]\n" \ + " Where [-e] will encode the input file into the output file,\n" \ + " [-d] will decode the input file into the output file, and\n" \ + " [input] and [output] are the input and output files, respectively.\n"; +} +// Function which prints the usage of this executable, plus a short message +void usage(const std::string& message) +{ + usage(); + std::cerr<<"Incorrect invocation of base64:\n"; + std::cerr<<message<<std::endl; +} + +int main(int argc, char** argv) +{ + // Quick check for valid arguments + if (argc == 1) + { + usage(); + exit(-1); + } + if (argc != 4) + { + usage("Wrong number of arguments!"); + exit(-1); + } + + // So far so good; try to open the input file + std::string input = argv[2]; + // Note that we have to open the input in binary mode. + // This is due to some operating systems not using binary mode by default. + // Since we will most likely be dealing with binary files when encoding, we + // have to be able to deal with zeros (and other invalid chars) in the input stream. + std::ifstream instream(input.c_str(), std::ios_base::in | std::ios_base::binary); + if (!instream.is_open()) + { + usage("Could not open input file!"); + exit(-1); + } + + // Now try to open the output file + std::string output = argv[3]; + // Again, note that we have to open the ouput in binary mode. + // Similiarly, we will most likely need to deal with zeros in the output stream when we + // are decoding, and the output stream has to be able to use these invalid text chars. + std::ofstream outstream(output.c_str(), std::ios_base::out | std::ios_base::binary); + if (!outstream.is_open()) + { + usage("Could not open output file!"); + exit(-1); + } + + // determine whether we need to encode or decode: + std::string choice = argv[1]; + if (choice == "-d") + { + base64::Decoder D; + D.decode(instream, outstream); + } + else if (choice == "-e") + { + base64::Encoder E; + E.encode(instream, outstream); + } + else + { + std::cout<<"["<<choice<<"]"<<std::endl; + usage("Please specify -d or -e as first argument!"); + } + + return 0; +} + Added: trunk/spark/utility/libb64/cdecode.c =================================================================== --- trunk/spark/utility/libb64/cdecode.c (rev 0) +++ trunk/spark/utility/libb64/cdecode.c 2010-12-14 17:07:37 UTC (rev 227) @@ -0,0 +1,88 @@ +/* +cdecoder.c - c source to a base64 decoding algorithm implementation + +This is part of the libb64 project, and has been placed in the public domain. +For details, see http://sourceforge.net/projects/libb64 +*/ + +#include "cdecode.h" + +int base64_decode_value(char value_in) +{ + static const char decoding[] = {62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-2,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51}; + static const char decoding_size = sizeof(decoding); + value_in -= 43; + if (value_in < 0 || value_in > decoding_size) return -1; + return decoding[(int)value_in]; +} + +void base64_init_decodestate(base64_decodestate* state_in) +{ + state_in->step = step_a; + state_in->plainchar = 0; +} + +int base64_decode_block(const char* code_in, const int length_in, char* plaintext_out, base64_decodestate* state_in) +{ + const char* codechar = code_in; + char* plainchar = plaintext_out; + char fragment; + + *plainchar = state_in->plainchar; + + switch (state_in->step) + { + while (1) + { + case step_a: + do { + if (codechar == code_in+length_in) + { + state_in->step = step_a; + state_in->plainchar = *plainchar; + return plainchar - plaintext_out; + } + fragment = (char)base64_decode_value(*codechar++); + } while (fragment < 0); + *plainchar = (fragment & 0x03f) << 2; + case step_b: + do { + if (codechar == code_in+length_in) + { + state_in->step = step_b; + state_in->plainchar = *plainchar; + return plainchar - plaintext_out; + } + fragment = (char)base64_decode_value(*codechar++); + } while (fragment < 0); + *plainchar++ |= (fragment & 0x030) >> 4; + *plainchar = (fragment & 0x00f) << 4; + case step_c: + do { + if (codechar == code_in+length_in) + { + state_in->step = step_c; + state_in->plainchar = *plainchar; + return plainchar - plaintext_out; + } + fragment = (char)base64_decode_value(*codechar++); + } while (fragment < 0); + *plainchar++ |= (fragment & 0x03c) >> 2; + *plainchar = (fragment & 0x003) << 6; + case step_d: + do { + if (codechar == code_in+length_in) + { + state_in->step = step_d; + state_in->plainchar = *plainchar; + return plainchar - plaintext_out; + } + fragment = (char)base64_decode_value(*codechar++); + } while (fragment < 0); + *plainchar++ |= (fragment & 0x03f); + } + } + /* control should not reach here */ + return plainchar - plaintext_out; +} + Added: trunk/spark/utility/libb64/cdecode.h =================================================================== --- trunk/spark/utility/libb64/cdecode.h (rev 0) +++ trunk/spark/utility/libb64/cdecode.h 2010-12-14 17:07:37 UTC (rev 227) @@ -0,0 +1,28 @@ +/* +cdecode.h - c header for a base64 decoding algorithm + +This is part of the libb64 project, and has been placed in the public domain. +For details, see http://sourceforge.net/projects/libb64 +*/ + +#ifndef BASE64_CDECODE_H +#define BASE64_CDECODE_H + +typedef enum +{ + step_a, step_b, step_c, step_d +} base64_decodestep; + +typedef struct +{ + base64_decodestep step; + char plainchar; +} base64_decodestate; + +void base64_init_decodestate(base64_decodestate* state_in); + +int base64_decode_value(char value_in); + +int base64_decode_block(const char* code_in, const int length_in, char* plaintext_out, base64_decodestate* state_in); + +#endif /* BASE64_CDECODE_H */ Added: trunk/spark/utility/libb64/cencode.c =================================================================== --- trunk/spark/utility/libb64/cencode.c (rev 0) +++ trunk/spark/utility/libb64/cencode.c 2010-12-14 17:07:37 UTC (rev 227) @@ -0,0 +1,103 @@ +/* +cencoder.c - c source to a base64 encoding algorithm implementation + +This is part of the libb64 project, and has been placed in the public domain. +For details, see http://sourceforge.net/projects/libb64 + +Modified for SimSpark (http://simspark.sourceforge.net) +*/ + +#include "cencode.h" + +void base64_init_encodestate(base64_encodestate* state_in) +{ + state_in->step = step_A; + state_in->result = 0; + state_in->stepcount = 0; +} + +char base64_encode_value(char value_in) +{ + static const char* encoding = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + if (value_in > 63) return '='; + return encoding[(int)value_in]; +} + +int base64_encode_block(const char* plaintext_in, int length_in, char* code_out, base64_encodestate* state_in) +{ + const char* plainchar = plaintext_in; + const char* const plaintextend = plaintext_in + length_in; + char* codechar = code_out; + char result; + char fragment; + + result = state_in->result; + + switch (state_in->step) + { + while (1) + { + case step_A: + if (plainchar == plaintextend) + { + state_in->result = result; + state_in->step = step_A; + return codechar - code_out; + } + fragment = *plainchar++; + result = (fragment & 0x0fc) >> 2; + *codechar++ = base64_encode_value(result); + result = (fragment & 0x003) << 4; + case step_B: + if (plainchar == plaintextend) + { + state_in->result = result; + state_in->step = step_B; + return codechar - code_out; + } + fragment = *plainchar++; + result |= (fragment & 0x0f0) >> 4; + *codechar++ = base64_encode_value(result); + result = (fragment & 0x00f) << 2; + case step_C: + if (plainchar == plaintextend) + { + state_in->result = result; + state_in->step = step_C; + return codechar - code_out; + } + fragment = *plainchar++; + result |= (fragment & 0x0c0) >> 6; + *codechar++ = base64_encode_value(result); + result = (fragment & 0x03f) >> 0; + *codechar++ = base64_encode_value(result); + + ++(state_in->stepcount); + } + } + /* control should not reach here */ + return codechar - code_out; +} + +int base64_encode_blockend(char* code_out, base64_encodestate* state_in) +{ + char* codechar = code_out; + + switch (state_in->step) + { + case step_B: + *codechar++ = base64_encode_value(state_in->result); + *codechar++ = '='; + *codechar++ = '='; + break; + case step_C: + *codechar++ = base64_encode_value(state_in->result); + *codechar++ = '='; + break; + case step_A: + break; + } + + return codechar - code_out; +} + Added: trunk/spark/utility/libb64/cencode.h =================================================================== --- trunk/spark/utility/libb64/cencode.h (rev 0) +++ trunk/spark/utility/libb64/cencode.h 2010-12-14 17:07:37 UTC (rev 227) @@ -0,0 +1,33 @@ +/* +cencode.h - c header for a base64 encoding algorithm + +This is part of the libb64 project, and has been placed in the public domain. +For details, see http://sourceforge.net/projects/libb64 +*/ + +#ifndef BASE64_CENCODE_H +#define BASE64_CENCODE_H + +#define BUFFERSIZE 64 + +typedef enum +{ + step_A, step_B, step_C +} base64_encodestep; + +typedef struct +{ + base64_encodestep step; + char result; + int stepcount; +} base64_encodestate; + +void base64_init_encodestate(base64_encodestate* state_in); + +char base64_encode_value(char value_in); + +int base64_encode_block(const char* plaintext_in, int length_in, char* code_out, base64_encodestate* state_in); + +int base64_encode_blockend(char* code_out, base64_encodestate* state_in); + +#endif /* BASE64_CENCODE_H */ Added: trunk/spark/utility/libb64/decode.h =================================================================== --- trunk/spark/utility/libb64/decode.h (rev 0) +++ trunk/spark/utility/libb64/decode.h 2010-12-14 17:07:37 UTC (rev 227) @@ -0,0 +1,96 @@ +// :mode=c++: +/* +decode.h - c++ wrapper for a base64 decoding algorithm + +This is part of the libb64 project, and has been placed in the public domain. +For details, see http://sourceforge.net/projects/libb64 + +Modified for SimSpark (http://simspark.sourceforge.net) + */ +#ifndef BASE64_DECODE_H +#define BASE64_DECODE_H + +#include <iostream> + +namespace base64 { +extern "C" { +#include "cdecode.h" +} + +class Decoder +{ +public: + + void decode(std::istream& istream_in, std::ostream& ostream_in) + { + std::string code; + istream_in >> code; + + int len = code.size(); + char* text = new char[len]; // enough space + + int textLen = decode(code, text, len); + + ostream_in.write((const char*) text, textLen); + } + + /* Please make sure the out has enough memory (but not bigger than length of in ) + * @return the lenght of decode result + */ + int decode(const std::string& in, char* out, int out_len) + { + base64_init_decodestate(&_state); + + int codelength; + int plainlength; + int totalLen = 0; + + const char* code = in.c_str(); + int len = in.size(); + + while ( len>0 && out_len>0 ) + { + if (len > out_len) + { + codelength = out_len; + } + else + { + codelength = len; + } + + plainlength = decode(code, codelength, out+totalLen); + + code += codelength; + len -= codelength; + + out_len -= plainlength; + totalLen += plainlength; + } + + return totalLen; + } + +protected: + int decode(char value_in) + { + return base64_decode_value(value_in); + } + + int decode(const char* code_in, const int length_in, char* plaintext_out) + { + return base64_decode_block(code_in, length_in, plaintext_out, &_state); + } + +private: + base64_decodestate _state; + int _buffersize; +}; + + +} // namespace base64 + + + +#endif // BASE64_DECODE_H + Added: trunk/spark/utility/libb64/encode.h =================================================================== --- trunk/spark/utility/libb64/encode.h (rev 0) +++ trunk/spark/utility/libb64/encode.h 2010-12-14 17:07:37 UTC (rev 227) @@ -0,0 +1,108 @@ +// :mode=c++: +/* +encode.h - c++ wrapper for a base64 encoding algorithm + +This is part of the libb64 project, and has been placed in the public domain. +For details, see http://sourceforge.net/projects/libb64 + + Modified for SimSpark (http://simspark.sourceforge.net) + */ +#ifndef BASE64_ENCODE_H +#define BASE64_ENCODE_H + +#include <iostream> +#include <sstream> + +namespace base64 { +extern "C" { +#include "cencode.h" +} + +class Encoder +{ +public: + + Encoder(int buffersize_in = BUFFERSIZE) + : _buffersize(buffersize_in) + { + _code = new char[2 * _buffersize]; + } + + ~Encoder() + { + delete [] _code; + } + + void encode(std::istream& istream_in, std::ostream& ostream_in) + { + // get length + istream_in.seekg(0, std::ios::end); + int length = istream_in.tellg(); + istream_in.seekg(0, std::ios::beg); + + // allocate memory: + char* buffer = new char [length]; + + // read data as a block: + istream_in.read(buffer, length); + + std::string code = encode(buffer, length); + ostream_in << code; + } + + std::string encode(const char* in, int len) + { + base64_init_encodestate(&_state); + + int plainlength; + int codelength; + std::stringstream ss; + + while (len > 0) { + if (len > _buffersize) { + plainlength = _buffersize; + } else { + plainlength = len; + } + // + codelength = encode(in, plainlength, _code); + + ss.write(_code, codelength); + + in += plainlength; + len -= plainlength; + } + + codelength = encode_end(_code); + ss.write(_code, codelength); + + return ss.str(); + } + +protected: + + int encode(char value_in) + { + return base64_encode_value(value_in); + } + + int encode(const char* code_in, const int length_in, char* plaintext_out) + { + return base64_encode_block(code_in, length_in, plaintext_out, &_state); + } + + int encode_end(char* plaintext_out) + { + return base64_encode_blockend(plaintext_out, &_state); + } + +private: + base64_encodestate _state; + int _buffersize; + char* _code; +}; + +} // namespace base64 + +#endif // BASE64_ENCODE_H + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yx...@us...> - 2010-12-14 17:07:20
|
Revision: 226 http://simspark.svn.sourceforge.net/simspark/?rev=226&view=rev Author: yxu Date: 2010-12-14 17:07:14 +0000 (Tue, 14 Dec 2010) Log Message: ----------- support ruby 1.9.1 Modified Paths: -------------- trunk/spark/cmake/FindRuby.cmake trunk/spark/lib/zeitgeist/scriptserver/gcvalue.h Modified: trunk/spark/cmake/FindRuby.cmake =================================================================== --- trunk/spark/cmake/FindRuby.cmake 2010-11-15 00:01:13 UTC (rev 225) +++ trunk/spark/cmake/FindRuby.cmake 2010-12-14 17:07:14 UTC (rev 226) @@ -17,7 +17,7 @@ # RUBY_LIBDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"libdir"@:>@)'` # RUBY_LIBRUBYARG=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"LIBRUBYARG_SHARED"@:>@)'` -FIND_PROGRAM(RUBY_EXECUTABLE NAMES ruby ruby1.8 ruby18 ruby1.9 ruby19) +FIND_PROGRAM(RUBY_EXECUTABLE NAMES ruby ruby1.8 ruby18 ruby1.9 ruby19 ruby1.9.1) IF(RUBY_EXECUTABLE AND NOT RUBY_ARCH_DIR) @@ -86,7 +86,7 @@ # search the ruby library, the version for MSVC can have the "msvc" prefix and the "static" suffix FIND_LIBRARY(RUBY_LIBRARY - NAMES ruby ruby1.8 ruby1.9 + NAMES ruby ruby1.8 ruby1.9 ruby-1.9.1 msvcrt-ruby18 msvcrt-ruby19 msvcrt-ruby191 msvcrt-ruby18-static msvcrt-ruby19-static msvcrt-ruby191-static PATHS ${RUBY_POSSIBLE_LIB_DIR} C:/library/ruby/lib/ Modified: trunk/spark/lib/zeitgeist/scriptserver/gcvalue.h =================================================================== --- trunk/spark/lib/zeitgeist/scriptserver/gcvalue.h 2010-11-15 00:01:13 UTC (rev 225) +++ trunk/spark/lib/zeitgeist/scriptserver/gcvalue.h 2010-12-14 17:07:14 UTC (rev 226) @@ -29,6 +29,10 @@ #include <string> #include <zeitgeist/zeitgeist_defines.h> +#ifndef STR2CSTR +#define STR2CSTR StringValueCStr +#endif + namespace zeitgeist { /** \class GCValue is a ruby VALUE wrapper. It is responsible to This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-11-15 00:01:20
|
Revision: 225 http://simspark.svn.sourceforge.net/simspark/?rev=225&view=rev Author: hedayat Date: 2010-11-15 00:01:13 +0000 (Mon, 15 Nov 2010) Log Message: ----------- Small changes to fix the behavior. Still needs some attention (the agent proxy's timing should not be affected by the way agent sends/receives data) and testing Modified Paths: -------------- trunk/spark/lib/oxygen/proxyserver/agentproxy.cpp Modified: trunk/spark/lib/oxygen/proxyserver/agentproxy.cpp =================================================================== --- trunk/spark/lib/oxygen/proxyserver/agentproxy.cpp 2010-09-28 16:21:10 UTC (rev 224) +++ trunk/spark/lib/oxygen/proxyserver/agentproxy.cpp 2010-11-15 00:01:13 UTC (rev 225) @@ -122,6 +122,7 @@ while (!mAgentBuffer->IsEmpty() && mNetMessage->Extract(mAgentBuffer, agentmsg)) { + mNetMessage->PrepareToSend(agentmsg); mServerSocket->send(agentmsg.data(), agentmsg.size()); } agentBufLock.unlock(); @@ -129,12 +130,9 @@ mServerSocket->send(syncMsg.data(), syncMsg.size()); do { - int retval = mServerSocket->recv(mCycleMillisecs, - recvbuf.data(), recvbuf.size()); + int retval = mServerSocket->recv(recvbuf.data(), recvbuf.size()); if (retval > 0) netbuf->AddFragment(string(recvbuf.data(), recvbuf.size())); - else if (retval < 0 && errno == EAGAIN) - break; else { GetLog()->Error() @@ -148,12 +146,12 @@ if (!servermsg.empty()) { - mNetMessage->PrepareToSend(servermsg); - mAgentSocket->send(servermsg.data(), servermsg.size(), - MSG_DONTWAIT, Socket::DONT_CHECK); - cycleFinishTime = boost::get_system_time() + boost::posix_time::milliseconds(mCycleMillisecs); + + mNetMessage->PrepareToSend(servermsg); + mAgentSocket->send(servermsg.data(), servermsg.size(), + Socket::DONT_CHECK); } } catch (boost::thread_interrupted e) @@ -171,8 +169,7 @@ while (!mFinished) { - int retval = mAgentSocket->recv(mCycleMillisecs * 4, - recvbuf.data(), recvbuf.size()); + int retval = mAgentSocket->recv(recvbuf.data(), recvbuf.size()); if (retval > 0) { boost::mutex::scoped_lock agentBufLock(mAgentBufferMutex); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sgv...@us...> - 2010-09-28 16:21:16
|
Revision: 224 http://simspark.svn.sourceforge.net/simspark/?rev=224&view=rev Author: sgvandijk Date: 2010-09-28 16:21:10 +0000 (Tue, 28 Sep 2010) Log Message: ----------- - ChangeLog Modified Paths: -------------- trunk/rcssserver3d/ChangeLog Modified: trunk/rcssserver3d/ChangeLog =================================================================== --- trunk/rcssserver3d/ChangeLog 2010-09-28 16:20:51 UTC (rev 223) +++ trunk/rcssserver3d/ChangeLog 2010-09-28 16:21:10 UTC (rev 224) @@ -1,3 +1,8 @@ +2010-09-28 Sander van Dijk <sgv...@gm...> + + * plugin/soccermonitor/soccerrender.cpp + - render team names and scores in appropriate colors + 2010-06-08 Hedayat Vatankhah <he...@gr...> * linux/rcssserver3d.desktop: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sgv...@us...> - 2010-09-28 16:20:57
|
Revision: 223 http://simspark.svn.sourceforge.net/simspark/?rev=223&view=rev Author: sgvandijk Date: 2010-09-28 16:20:51 +0000 (Tue, 28 Sep 2010) Log Message: ----------- * plugin/inputsdl/inputsystemsdl.cpp - do not init SDL video in inputsystem Modified Paths: -------------- trunk/spark/ChangeLog trunk/spark/plugin/inputsdl/inputsystemsdl.cpp Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2010-09-28 16:18:10 UTC (rev 222) +++ trunk/spark/ChangeLog 2010-09-28 16:20:51 UTC (rev 223) @@ -1,3 +1,8 @@ +2010-09-28 Sander van Dijk <sgv...@gm...> + + * plugin/inputsdl/inputsystemsdl.cpp + - do not init SDL video in inputsystem + 2010-06-08 Hedayat Vatankhah <he...@gr...> * plugin/accelerometer/accelerometer.cpp: Modified: trunk/spark/plugin/inputsdl/inputsystemsdl.cpp =================================================================== --- trunk/spark/plugin/inputsdl/inputsystemsdl.cpp 2010-09-28 16:18:10 UTC (rev 222) +++ trunk/spark/plugin/inputsdl/inputsystemsdl.cpp 2010-09-28 16:20:51 UTC (rev 223) @@ -87,11 +87,13 @@ // input is part of the video subsystem (because of event loops, etc..) if (!SDL_WasInit(SDL_INIT_VIDEO)) { + /* if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE) < 0) { GetLog()->Error() << "ERROR: (InputSystemSDL) SDL not initialized!\n"; return false; } + */ // SDL_SetVideoMode(0,0,0,0); // static SDL_SysWMinfo pInfo; // SDL_VERSION(&pInfo.version); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sgv...@us...> - 2010-09-28 16:18:16
|
Revision: 222 http://simspark.svn.sourceforge.net/simspark/?rev=222&view=rev Author: sgvandijk Date: 2010-09-28 16:18:10 +0000 (Tue, 28 Sep 2010) Log Message: ----------- * plugin/soccermonitor/soccerrender.cpp - render team names and scores in appropriate colors Modified Paths: -------------- trunk/rcssserver3d/plugin/soccermonitor/soccerrender.cpp Modified: trunk/rcssserver3d/plugin/soccermonitor/soccerrender.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccermonitor/soccerrender.cpp 2010-08-21 07:25:14 UTC (rev 221) +++ trunk/rcssserver3d/plugin/soccermonitor/soccerrender.cpp 2010-09-28 16:18:10 UTC (rev 222) @@ -129,23 +129,36 @@ ss_r << " " << mMonitor->GetScoreRight(); int xPos; - + mFontServer->Begin(); mFont->Bind(); + + glDisable(GL_TEXTURE_2D); + glColor4f(1,1,1,0.3); + glBegin(GL_QUADS); + glVertex2f(0,0); + glVertex2f(1024, 0); + glVertex2f(1024, 40); + glVertex2f(0, 40); + glEnd(); + glEnable(GL_TEXTURE_2D); // draw left team info left justified + glColor3f(0,0,0.8); mFont->DrawString(10, 0, ss_l.str().c_str()); // draw right team info right justified // Window Width is mapped to 1024 // use 1014 as base to keep a small right margin // FIXME: remove the magic numbers. + glColor3f(0.8,0,0); xPos = int(1014-(mFont->GetStringWidth(ss_r.str().c_str()))); mFont->DrawString(xPos, 0, ss_r.str().c_str()); // draw game state info centered // Window Width is mapped to 1024 // FIXME: remove the magic number. + glColor3f(1,1,1); xPos = int((1024-(mFont->GetStringWidth(ss_c.str().c_str())))/2); mFont->DrawString(xPos, 0, ss_c.str().c_str()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kla...@us...> - 2010-08-21 07:25:21
|
Revision: 221 http://simspark.svn.sourceforge.net/simspark/?rev=221&view=rev Author: klausdorer Date: 2010-08-21 07:25:14 +0000 (Sat, 21 Aug 2010) Log Message: ----------- major rework of perceptors, effectors, nao description and more done by Stefan Glaser Modified Paths: -------------- trunk/rcssserver3d/doc/users/definitions.tex trunk/rcssserver3d/doc/users/fig/agentconnect.png trunk/rcssserver3d/doc/users/fig/movearound.png trunk/rcssserver3d/doc/users/fig/pitch.pdf trunk/rcssserver3d/doc/users/fig/press3.png trunk/rcssserver3d/doc/users/fig/presskickoff.png trunk/rcssserver3d/doc/users/fig/soccersim.png trunk/rcssserver3d/doc/users/fig/startup.png trunk/rcssserver3d/doc/users/gettingstarted.tex trunk/rcssserver3d/doc/users/robots.tex trunk/rcssserver3d/doc/users/simspark.tex trunk/rcssserver3d/doc/users/simulations.tex Added Paths: ----------- trunk/rcssserver3d/doc/users/fig/agent_vision.pdf trunk/rcssserver3d/doc/users/fig/nao_boxmodel.pdf trunk/rcssserver3d/doc/users/fig/nao_joints_DH.pdf trunk/rcssserver3d/doc/users/fig/pitch2.pdf trunk/rcssserver3d/doc/users/imagesource/ trunk/rcssserver3d/doc/users/imagesource/agent_vision.svg trunk/rcssserver3d/doc/users/imagesource/nao_boxmodel.svg trunk/rcssserver3d/doc/users/imagesource/nao_joints.svg trunk/rcssserver3d/doc/users/imagesource/nao_joints_DH.svg trunk/rcssserver3d/doc/users/imagesource/pitch.svg trunk/rcssserver3d/doc/users/imagesource/pitch2.svg Modified: trunk/rcssserver3d/doc/users/definitions.tex =================================================================== --- trunk/rcssserver3d/doc/users/definitions.tex 2010-07-08 14:14:23 UTC (rev 220) +++ trunk/rcssserver3d/doc/users/definitions.tex 2010-08-21 07:25:14 UTC (rev 221) @@ -18,6 +18,7 @@ \usepackage[british]{babel} \usepackage{lscape} \usepackage{hyperref} +\usepackage{listings} \hypersetup{ colorlinks,% citecolor=blue,% @@ -110,15 +111,16 @@ Feng Xue\\% Marian Buchta\\% Hedayat Vatankhah\\% + Stefan Glaser\\% } } \end{minipage} \hspace*{6cm} \begin{minipage}[t]{0.5\linewidth} - \textsf{\Large\flushright{Version 1.2}} + \textsf{\Large\flushright{Version 1.3}} \end{minipage} - \vspace{-4cm} + \vspace{-4.5cm} \begin{minipage}[t]{\linewidth} \hspace*{2.25cm} @@ -128,7 +130,7 @@ \vspace*{-0.25cm} \hspace*{-3cm}% \begin{minipage}[b]{3cm} - \textsf{\Large\flushleft{January 2010}} + \textsf{\Large\flushleft{August 2010}} \end{minipage} \end{titlepage}% @@ -141,3 +143,31 @@ \cfoot{} \rfoot{\sf\bfseries\thepage} + +% Define new language for Server message listings. +\definecolor{darkgreen}{rgb}{0, 0.6, 0} +\lstdefinelanguage{SSML} { + basicstyle=\ttfamily, + sensitive=true, + breaklines=true, + stringstyle=\color{flexred}, + alsoletter={0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -}, + keywords=[1] + { + teamRed, teamBlue, BeforeKickOff, 1000-501 + }, keywordstyle={[1]\color{red}}, + keywords=[2] + { + time, now, GS, t, pm, hear, self, GYR, rt, ACC, a, HJ, UJ, See, G1R, G2R, + G1L, G2L, F1R, F2R, F1L, F2L, FRP, TCH, val, pol, team, id, n, ax, c, f, + B, P, ax1, ax2 + }, keywordstyle={[2]\color{blue}}, + keywords=[3] + { + head, llowerarm, rlowerarm, lfoot, rfoot, lf, rf, torso, hj1, hj2, laj1, + raj1, laj2, raj2, laj3, raj3, laj4, raj4, llj1, rlj1, llj2, rlj2, llj3, + rlj3, llj4, rlj4, llj5, rlj5, llj6, rlj6, laj1_2, raj1_2, llj2_3, rlj2_3, + llj5_6, rlj5_6 + }, keywordstyle={[3]\color{darkgreen}}, +} + Added: trunk/rcssserver3d/doc/users/fig/agent_vision.pdf =================================================================== (Binary files differ) Property changes on: trunk/rcssserver3d/doc/users/fig/agent_vision.pdf ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/rcssserver3d/doc/users/fig/agentconnect.png =================================================================== (Binary files differ) Modified: trunk/rcssserver3d/doc/users/fig/movearound.png =================================================================== (Binary files differ) Added: trunk/rcssserver3d/doc/users/fig/nao_boxmodel.pdf =================================================================== (Binary files differ) Property changes on: trunk/rcssserver3d/doc/users/fig/nao_boxmodel.pdf ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/rcssserver3d/doc/users/fig/nao_joints_DH.pdf =================================================================== (Binary files differ) Property changes on: trunk/rcssserver3d/doc/users/fig/nao_joints_DH.pdf ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/rcssserver3d/doc/users/fig/pitch.pdf =================================================================== (Binary files differ) Added: trunk/rcssserver3d/doc/users/fig/pitch2.pdf =================================================================== (Binary files differ) Property changes on: trunk/rcssserver3d/doc/users/fig/pitch2.pdf ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/rcssserver3d/doc/users/fig/press3.png =================================================================== (Binary files differ) Modified: trunk/rcssserver3d/doc/users/fig/presskickoff.png =================================================================== (Binary files differ) Modified: trunk/rcssserver3d/doc/users/fig/soccersim.png =================================================================== (Binary files differ) Modified: trunk/rcssserver3d/doc/users/fig/startup.png =================================================================== (Binary files differ) Modified: trunk/rcssserver3d/doc/users/gettingstarted.tex =================================================================== --- trunk/rcssserver3d/doc/users/gettingstarted.tex 2010-07-08 14:14:23 UTC (rev 220) +++ trunk/rcssserver3d/doc/users/gettingstarted.tex 2010-08-21 07:25:14 UTC (rev 221) @@ -316,7 +316,8 @@ \begin{figure}[htbp] \begin{center} \includegraphics[width=0.8\textwidth]{fig/presskickoff} -\caption{Press 'k' to start the game. The play mode will switch to 'KickOff' and the time will advance.} +\caption{Press 'k' to start the game. The play mode will switch to 'KickOff +Left' and the time will advance.} \label{fig:presskickoff} \end{center} \end{figure} Added: trunk/rcssserver3d/doc/users/imagesource/agent_vision.svg =================================================================== --- trunk/rcssserver3d/doc/users/imagesource/agent_vision.svg (rev 0) +++ trunk/rcssserver3d/doc/users/imagesource/agent_vision.svg 2010-08-21 07:25:14 UTC (rev 221) @@ -0,0 +1,386 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="210mm" + height="297mm" + id="svg2" + sodipodi:version="0.32" + inkscape:version="0.46" + sodipodi:docname="agent_vision.svg" + inkscape:output_extension="org.inkscape.output.svg.inkscape"> + <defs + id="defs4"> + <marker + inkscape:stockid="Arrow1Mend" + orient="auto" + refY="0.0" + refX="0.0" + id="Arrow1Mend" + style="overflow:visible;"> + <path + id="path5787" + d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z " + style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;" + transform="scale(0.4) rotate(180) translate(10,0)" /> + </marker> + <marker + inkscape:stockid="Arrow2Lend" + orient="auto" + refY="0.0" + refX="0.0" + id="Arrow2Lend" + style="overflow:visible;"> + <path + id="path5799" + style="font-size:12.0;fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round;" + d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z " + transform="scale(1.1) rotate(180) translate(1,0)" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0.0" + refX="0.0" + id="Arrow1Lend" + style="overflow:visible;"> + <path + id="path5781" + d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z " + style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;" + transform="scale(0.8) rotate(180) translate(12.5,0)" /> + </marker> + <marker + inkscape:stockid="Arrow1Lstart" + orient="auto" + refY="0.0" + refX="0.0" + id="Arrow1Lstart" + style="overflow:visible"> + <path + id="path3209" + d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z " + style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none" + transform="scale(0.8) translate(12.5,0)" /> + </marker> + <marker + inkscape:stockid="Arrow2Mstart" + orient="auto" + refY="0.0" + refX="0.0" + id="Arrow2Mstart" + style="overflow:visible"> + <path + id="path3190" + style="font-size:12.0;fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round" + d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z " + transform="scale(0.6) translate(0,0)" /> + </marker> + <marker + inkscape:stockid="Arrow1Mstart" + orient="auto" + refY="0.0" + refX="0.0" + id="Arrow1Mstart" + style="overflow:visible"> + <path + id="path3172" + d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z " + style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none" + transform="scale(0.4) translate(10,0)" /> + </marker> + <marker + inkscape:stockid="Arrow2Mend" + orient="auto" + refY="0.0" + refX="0.0" + id="Arrow2Mend" + style="overflow:visible;"> + <path + id="path3193" + style="font-size:12.0;fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round;" + d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z " + transform="scale(0.6) rotate(180) translate(0,0)" /> + </marker> + <inkscape:perspective + sodipodi:type="inkscape:persp3d" + inkscape:vp_x="0 : 526.18109 : 1" + inkscape:vp_y="0 : 1000 : 0" + inkscape:vp_z="744.09448 : 526.18109 : 1" + inkscape:persp3d-origin="372.04724 : 350.78739 : 1" + id="perspective10" /> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="2" + inkscape:cx="229.29261" + inkscape:cy="868.04255" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="true" + inkscape:snap-bbox="true" + inkscape:bbox-nodes="false" + inkscape:bbox-paths="true" + gridtolerance="11" + inkscape:window-width="1400" + inkscape:window-height="978" + inkscape:window-x="0" + inkscape:window-y="25"> + <inkscape:grid + type="xygrid" + id="grid2383" + visible="true" + enabled="true" /> + </sodipodi:namedview> + <metadata + id="metadata7"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Ebene 1" + inkscape:groupmode="layer" + id="layer1"> + <path + style="fill:#eeeeee;fill-rule:evenodd;stroke:#000000;stroke-width:0.49999997000000002;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;fill-opacity:1" + d="M 338.51529,149.60257 L 104.0864,202.87081 L 353.8892,202.87082 L 338.51529,149.60257 L 338.51529,119.16359 L 104.06317,202.87081" + id="path3196" + sodipodi:nodetypes="cccccc" /> + <path + sodipodi:type="arc" + style="opacity:1;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:1.24999583;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="path2403" + sodipodi:cx="107.5" + sodipodi:cy="199.86218" + sodipodi:rx="2.5" + sodipodi:ry="2.5" + d="M 109.99998,199.8721 A 2.5,2.5 0 1 1 109.99864,199.77982" + sodipodi:start="0.0039669078" + sodipodi:end="6.2502327" + sodipodi:open="true" + transform="matrix(0.8000039,0,0,0.8000014,18.999423,42.474553)" /> + <path + sodipodi:type="arc" + style="opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.31129017;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="path3200" + sodipodi:cx="443.08594" + sodipodi:cy="202.08873" + sodipodi:rx="3.7684717" + sodipodi:ry="2.0178416" + d="M 441.27693,203.85888 A 3.7684717,2.0178416 0 0 1 440.17059,200.81011" + sodipodi:start="2.0714944" + sodipodi:end="3.8278617" + sodipodi:open="true" + transform="matrix(1.081844,1.1792185,-1.2090115,1.0669267,119.0544,-535.19936)" /> + <path + sodipodi:type="arc" + style="opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:1.13917136;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="path3202" + sodipodi:cx="441.21094" + sodipodi:cy="199.51843" + sodipodi:rx="0.21093996" + sodipodi:ry="0.60085875" + d="M 441.024,199.24004 A 0.21093996,0.60085875 0 1 1 441.0216,199.25355" + sodipodi:start="3.6233275" + sodipodi:end="9.8813057" + sodipodi:open="true" + transform="matrix(-0.4345015,-0.7917511,-0.1878687,0.101039,580.63622,529.81871)" /> + <path + sodipodi:type="arc" + style="opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.17094468;stroke-linecap:butt;marker-start:url(#Arrow2Mstart);marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="path3204" + sodipodi:cx="150" + sodipodi:cy="247.36218" + sodipodi:rx="30" + sodipodi:ry="30" + d="M 179.28642,240.85789 A 30,30 0 0 1 180,247.36095" + sodipodi:start="6.06464" + sodipodi:end="6.2831441" + sodipodi:open="true" + transform="matrix(2.939474,0,0,2.9104434,-336.81974,-517.06284)" /> + <path + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.49999997;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow2Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 192.67537,182.90525 C 193.25508,177.75865 192.48638,176.2367 190.47806,172.43182" + id="path2410" + sodipodi:nodetypes="cc" /> + <text + xml:space="preserve" + style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" + x="234.98438" + y="213.36218" + id="text3751"><tspan + sodipodi:role="line" + x="234.98438" + y="213.36218" + style="font-size:8px;text-align:center;text-anchor:middle" + id="tspan3753">delta-x</tspan></text> + <text + xml:space="preserve" + style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" + x="363.05469" + y="175.67859" + id="text3755"><tspan + sodipodi:role="line" + x="363.05469" + y="175.67859" + style="font-size:8px;text-align:center;text-anchor:middle" + id="tspan3757">delta-y</tspan></text> + <text + xml:space="preserve" + style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" + x="354.15625" + y="137.08875" + id="text3759"><tspan + sodipodi:role="line" + x="354.15625" + y="137.08875" + style="font-size:8px;text-align:center;text-anchor:middle" + id="tspan3761">delta-z</tspan></text> + <text + xml:space="preserve" + style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" + x="367.11719" + y="116.19031" + id="text3763"><tspan + sodipodi:role="line" + x="367.11719" + y="116.19031" + style="font-size:8px;text-align:center;text-anchor:middle" + id="tspan3765">visible object</tspan></text> + <text + xml:space="preserve" + style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" + x="88.359375" + y="210.28349" + id="text3767"><tspan + sodipodi:role="line" + x="88.359375" + y="210.28349" + style="font-size:8px;text-align:center;text-anchor:middle" + id="tspan3769">camera</tspan></text> + <path + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.99999994;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow2Mend);stroke-miterlimit:4;stroke-dasharray:7.9999998, 1.99999996, 0.99999996, 1.99999996;stroke-dashoffset:0;stroke-opacity:1" + d="M 105.16088,202.87081 L 383.68401,202.87081" + id="path3771" /> + <text + xml:space="preserve" + style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" + x="368.10938" + y="213.08875" + id="text4839"><tspan + sodipodi:role="line" + x="368.10938" + y="213.08875" + style="font-size:8px;text-align:center;text-anchor:middle" + id="tspan4841">view direction</tspan></text> + <path + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.49999997;stroke-linecap:butt;stroke-linejoin:miter;marker-start:url(#Arrow2Mstart);marker-end:url(#Arrow2Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 102.25475,195.09107 L 335.4588,111.83075" + id="path5232" /> + <path + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.49999997;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 101.01162,193.73912 L 104.03324,202.68057" + id="path5234" /> + <path + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.49999997;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 335.5169,110.22213 L 338.53853,119.16358" + id="path5238" /> + <path + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.99999988;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 103.50987,203.05297 L 336.99622,119.69305" + id="path5240" /> + <text + xml:space="preserve" + style="font-size:39.99998093px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" + x="163.88391" + y="215.13651" + id="text8222" + transform="matrix(0.941765,-0.3362716,0.3362716,0.941765,0,0)"><tspan + sodipodi:role="line" + x="163.88391" + y="215.13651" + style="font-size:7.99999762px;text-align:center;text-anchor:middle" + id="tspan8224">distance</tspan></text> + <text + xml:space="preserve" + style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" + x="198.01953" + y="179.27234" + id="text9328"><tspan + sodipodi:role="line" + x="198.01953" + y="179.27234" + style="font-size:8px;text-align:center;text-anchor:middle" + id="tspan9330">ϑ</tspan></text> + <text + xml:space="preserve" + style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" + x="196.68359" + y="194.60828" + id="text9940"><tspan + sodipodi:role="line" + x="196.68359" + y="194.60828" + style="font-size:8px;text-align:center;text-anchor:middle" + id="tspan9942">φ</tspan></text> + <g + id="g9960" + transform="translate(-0.1546783,15)"> + <g + id="g2430"> + <text + xml:space="preserve" + style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" + x="75.154678" + y="102.36218" + id="text9952"><tspan + sodipodi:role="line" + x="75.154678" + y="102.36218" + style="font-size:8px;text-align:start;text-anchor:start" + id="tspan9954">φ = horizontal angle</tspan></text> + <text + xml:space="preserve" + style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" + x="74.994514" + y="118.36218" + id="text9956"><tspan + sodipodi:role="line" + x="74.994514" + y="118.36218" + style="font-size:8px;text-align:start;text-anchor:start" + id="tspan9958">ϑ = vertical angle</tspan></text> + </g> + </g> + <path + sodipodi:type="arc" + style="opacity:1;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:1.24999583;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="path3194" + sodipodi:cx="107.5" + sodipodi:cy="199.86218" + sodipodi:rx="2.5" + sodipodi:ry="2.5" + d="M 109.99998,199.8721 A 2.5,2.5 0 1 1 109.99864,199.77982" + sodipodi:start="0.0039669078" + sodipodi:end="6.2502327" + sodipodi:open="true" + transform="matrix(0.8000039,0,0,0.8000014,252.46834,-40.871595)" /> + </g> +</svg> Added: trunk/rcssserver3d/doc/users/imagesource/nao_boxmodel.svg =================================================================== --- trunk/rcssserver3d/doc/users/imagesource/nao_boxmodel.svg (rev 0) +++ trunk/rcssserver3d/doc/users/imagesource/nao_boxmodel.svg 2010-08-21 07:25:14 UTC (rev 221) @@ -0,0 +1,2125 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="210mm" + height="297mm" + id="svg2384" + sodipodi:version="0.32" + inkscape:version="0.46" + sodipodi:docname="nao_boxmodel2.svg" + inkscape:output_extension="org.inkscape.output.svg.inkscape"> + <defs + id="defs2386"> + <marker + inkscape:stockid="Arrow2Lend" + orient="auto" + refY="0.0" + refX="0.0" + id="Arrow2Lend" + style="overflow:visible;"> + <path + id="path4928" + style="font-size:12.0;fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round;" + d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z " + transform="scale(1.1) rotate(180) translate(1,0)" /> + </marker> + <marker + inkscape:stockid="Arrow2Lstart" + orient="auto" + refY="0.0" + refX="0.0" + id="Arrow2Lstart" + style="overflow:visible"> + <path + id="path4925" + style="font-size:12.0;fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round" + d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z " + transform="scale(1.1) translate(1,0)" /> + </marker> + <marker + inkscape:stockid="Arrow1Mstart" + orient="auto" + refY="0.0" + refX="0.0" + id="Arrow1Mstart" + style="overflow:visible"> + <path + id="path4913" + d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z " + style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none" + transform="scale(0.4) translate(10,0)" /> + </marker> + <pattern + inkscape:collect="always" + xlink:href="#sand_bitmap" + id="pattern3141" + patternTransform="translate(648.5,-3.4999974)" /> + <marker + inkscape:stockid="Arrow2Sstart" + orient="auto" + refY="0.0" + refX="0.0" + id="Arrow2Sstart" + style="overflow:visible"> + <path + id="path5610" + style="font-size:12.0;fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round" + d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z " + transform="scale(0.3) translate(-2.3,0)" /> + </marker> + <marker + inkscape:stockid="Arrow1Sstart" + orient="auto" + refY="0.0" + refX="0.0" + id="Arrow1Sstart" + style="overflow:visible"> + <path + id="path5592" + d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z " + style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none" + transform="scale(0.2) translate(6,0)" /> + </marker> + <pattern + inkscape:collect="always" + xlink:href="#sand_bitmap" + id="pattern14200" + patternTransform="translate(768.5,-3.499991)" /> + <pattern + inkscape:stockid="Sand (bitmap)" + id="sand_bitmap" + height="256" + width="256" + patternUnits="userSpaceOnUse" + patternTransform="translate(-9.5,-3.4999974)"> +<!-- Seamless texture provided by FreeSeamlessTextures.com --><!-- License: creative commons attribution --> <image @@ Diff output truncated at 100000 characters. @@ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-07-08 14:14:30
|
Revision: 220 http://simspark.svn.sourceforge.net/simspark/?rev=220&view=rev Author: hedayat Date: 2010-07-08 14:14:23 +0000 (Thu, 08 Jul 2010) Log Message: ----------- Removed the ACC perceptor's filter after 2010 competitions Modified Paths: -------------- trunk/spark/ChangeLog trunk/spark/plugin/accelerometer/accelerometer.cpp Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2010-06-15 01:13:08 UTC (rev 219) +++ trunk/spark/ChangeLog 2010-07-08 14:14:23 UTC (rev 220) @@ -1,3 +1,8 @@ +2010-06-08 Hedayat Vatankhah <he...@gr...> + + * plugin/accelerometer/accelerometer.cpp: + - remove the filter again (after 0.2.1 release) + 2010-06-07 Hedayat Vatankhah <he...@gr...> * NEWS: Modified: trunk/spark/plugin/accelerometer/accelerometer.cpp =================================================================== --- trunk/spark/plugin/accelerometer/accelerometer.cpp 2010-06-15 01:13:08 UTC (rev 219) +++ trunk/spark/plugin/accelerometer/accelerometer.cpp 2010-07-08 14:14:23 UTC (rev 220) @@ -84,10 +84,5 @@ Matrix invRot = mBody->GetRotation(); invRot.InvertRotationMatrix(); -// mAcc = invRot * acc; - acc = invRot * acc; - - float k = 0.9; - mAcc = k*mAcc + (1-k)*acc; - mLastVel = vel; + mAcc = invRot * acc; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rc...@us...> - 2010-06-15 01:13:15
|
Revision: 219 http://simspark.svn.sourceforge.net/simspark/?rev=219&view=rev Author: rckeely Date: 2010-06-15 01:13:08 +0000 (Tue, 15 Jun 2010) Log Message: ----------- Added cmake.sh scripts, fixed errors with Apple build, updated plugins/CmakeFiles.txt, does not compile Modified Paths: -------------- branches/bullet-plugin/rcssserver3d/cmake/FindODE.cmake branches/bullet-plugin/rcssserver3d/rcssserver3d/main.cpp branches/bullet-plugin/spark/plugin/CMakeLists.txt Modified: branches/bullet-plugin/rcssserver3d/cmake/FindODE.cmake =================================================================== --- branches/bullet-plugin/rcssserver3d/cmake/FindODE.cmake 2010-06-14 09:38:48 UTC (rev 218) +++ branches/bullet-plugin/rcssserver3d/cmake/FindODE.cmake 2010-06-15 01:13:08 UTC (rev 219) @@ -46,6 +46,7 @@ FIND_PATH(ODE_INCLUDE_DIR ode/ode.h /usr/include /usr/local/include + $ENV{ODE_HOME}/include $ENV{OGRE_HOME}/include # OGRE SDK on WIN32 $ENV{INCLUDE} C:/library/ode/include @@ -59,6 +60,7 @@ /usr/lib /usr/lib64 /usr/local/lib + $ENV{ODE_HOME}/lib $ENV{OGRE_HOME}/lib # OGRE SDK on WIN32 C:/library/ode/lib/ "C:/Program Files/ode/lib/" Modified: branches/bullet-plugin/rcssserver3d/rcssserver3d/main.cpp =================================================================== --- branches/bullet-plugin/rcssserver3d/rcssserver3d/main.cpp 2010-06-14 09:38:48 UTC (rev 218) +++ branches/bullet-plugin/rcssserver3d/rcssserver3d/main.cpp 2010-06-15 01:13:08 UTC (rev 219) @@ -31,7 +31,7 @@ #endif #if __APPLE__ -#include <SDL.h> +#include <SDL/SDL.h> #endif using namespace spark; Modified: branches/bullet-plugin/spark/plugin/CMakeLists.txt =================================================================== --- branches/bullet-plugin/spark/plugin/CMakeLists.txt 2010-06-14 09:38:48 UTC (rev 218) +++ branches/bullet-plugin/spark/plugin/CMakeLists.txt 2010-06-15 01:13:08 UTC (rev 219) @@ -11,6 +11,7 @@ add_subdirectory(accelerometer) add_subdirectory(agentsynceffector) +add_subdirectory(bulletimps) add_subdirectory(filesystemstd) add_subdirectory(filesystemzip) add_subdirectory(forceeffector) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rc...@us...> - 2010-06-14 09:38:56
|
Revision: 218 http://simspark.svn.sourceforge.net/simspark/?rev=218&view=rev Author: rckeely Date: 2010-06-14 09:38:48 +0000 (Mon, 14 Jun 2010) Log Message: ----------- Added stubs for Bullet plugin Added Paths: ----------- branches/bullet-plugin/spark/plugin/bulletimps/ branches/bullet-plugin/spark/plugin/bulletimps/CMakeLists.txt branches/bullet-plugin/spark/plugin/bulletimps/bulletangularmotor.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletangularmotor.h branches/bullet-plugin/spark/plugin/bulletimps/bulletangularmotor_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletballjoint.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletballjoint.h branches/bullet-plugin/spark/plugin/bulletimps/bulletballjoint_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletbody.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletbody.h branches/bullet-plugin/spark/plugin/bulletimps/bulletbody_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletboxcollider.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletboxcollider.h branches/bullet-plugin/spark/plugin/bulletimps/bulletboxcollider_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletcapsulecollider.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletcapsulecollider.h branches/bullet-plugin/spark/plugin/bulletimps/bulletcapsulecollider_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletcollider.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletcollider.h branches/bullet-plugin/spark/plugin/bulletimps/bulletcollider_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletcompoundcollider.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletcompoundcollider.h branches/bullet-plugin/spark/plugin/bulletimps/bulletcompoundcollider_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletconcavecollider.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletconcavecollider.h branches/bullet-plugin/spark/plugin/bulletimps/bulletconcavecollider_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletconecollider.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletconecollider.h branches/bullet-plugin/spark/plugin/bulletimps/bulletconecollider_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletconetwistjoint.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletconetwistjoint.h branches/bullet-plugin/spark/plugin/bulletimps/bulletconetwistjoint_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletcontactjointhandler.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletcontactjointhandler.h branches/bullet-plugin/spark/plugin/bulletimps/bulletcontactjointhandler_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletconvexcollider.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletconvexcollider.h branches/bullet-plugin/spark/plugin/bulletimps/bulletconvexcollider_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletcylindercollider.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletcylindercollider.h branches/bullet-plugin/spark/plugin/bulletimps/bulletcylindercollider_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletdynamicbody.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletdynamicbody.h branches/bullet-plugin/spark/plugin/bulletimps/bulletdynamicbody_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletemptycollider.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletemptycollider.h branches/bullet-plugin/spark/plugin/bulletimps/bulletemptycollider_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletfixedjoint.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletfixedjoint.h branches/bullet-plugin/spark/plugin/bulletimps/bulletfixedjoint_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletgeneric6dofjoint.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletgeneric6dofjoint.h branches/bullet-plugin/spark/plugin/bulletimps/bulletgeneric6dofjoint_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bullethinge2joint.cpp branches/bullet-plugin/spark/plugin/bulletimps/bullethinge2joint.h branches/bullet-plugin/spark/plugin/bulletimps/bullethinge2joint_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bullethingejoint.cpp branches/bullet-plugin/spark/plugin/bulletimps/bullethingejoint.h branches/bullet-plugin/spark/plugin/bulletimps/bullethingejoint_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletjoint.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletjoint.h branches/bullet-plugin/spark/plugin/bulletimps/bulletjoint_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletphysicsobject.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletphysicsobject.h branches/bullet-plugin/spark/plugin/bulletimps/bulletphysicsobject_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletphysicsserver.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletphysicsserver.h branches/bullet-plugin/spark/plugin/bulletimps/bulletphysicsserver_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletplanecollider.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletplanecollider.h branches/bullet-plugin/spark/plugin/bulletimps/bulletplanecollider_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletraycollider.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletraycollider.h branches/bullet-plugin/spark/plugin/bulletimps/bulletraycollider_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletrigidbody.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletrigidbody.h branches/bullet-plugin/spark/plugin/bulletimps/bulletrigidbody_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletsliderjoint.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletsliderjoint.h branches/bullet-plugin/spark/plugin/bulletimps/bulletsliderjoint_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletsoftbody.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletsoftbody.h branches/bullet-plugin/spark/plugin/bulletimps/bulletsoftbody_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletspace.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletspace.h branches/bullet-plugin/spark/plugin/bulletimps/bulletspace_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletspherecollider.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletspherecollider.h branches/bullet-plugin/spark/plugin/bulletimps/bulletspherecollider_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletstaticbody.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletstaticbody.h branches/bullet-plugin/spark/plugin/bulletimps/bulletstaticbody_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bullettransformcollider.cpp branches/bullet-plugin/spark/plugin/bulletimps/bullettransformcollider.h branches/bullet-plugin/spark/plugin/bulletimps/bullettransformcollider_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletuniversaljoint.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletuniversaljoint.h branches/bullet-plugin/spark/plugin/bulletimps/bulletuniversaljoint_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletworld.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletworld.h branches/bullet-plugin/spark/plugin/bulletimps/bulletworld_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletwrapper.h branches/bullet-plugin/spark/plugin/bulletimps/export.cpp Added: branches/bullet-plugin/spark/plugin/bulletimps/CMakeLists.txt =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/CMakeLists.txt (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/CMakeLists.txt 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,115 @@ +########### next target ############### + +set(bulletimps_LIB_SRCS + export.cpp + bulletangularmotor.cpp + bulletangularmotor.h + bulletangularmotor_c.cpp + bulletballjoint.cpp + bulletballjoint.h + bulletballjoint_c.cpp + bulletbody.cpp + bulletbody.h + bulletbody_c.cpp + bulletboxcollider.cpp + bulletboxcollider.h + bulletboxcollider_c.cpp + bulletcapsulecollider.cpp + bulletcapsulecollider.h + bulletcapsulecollider_c.cpp + bulletcollider.cpp + bulletcollider.h + bulletcollider_c.cpp + bulletcompoundcollider.cpp + bulletcompoundcollider.h + bulletcompoundcollider_c.cpp + bulletconcavecollider.cpp + bulletconcavecollider.h + bulletconcavecollider_c.cpp + bulletconecollider.cpp + bulletconecollider.h + bulletconecollider_c.cpp + bulletconetwistjoint.cpp + bulletconetwistjoint.h + bulletconetwistjoint_c.cpp + bulletcontactjointhandler.cpp + bulletcontactjointhandler.h + bulletcontactjointhandler_c.cpp + bulletconvexcollider.cpp + bulletconvexcollider.h + bulletconvexcollider_c.cpp + bulletcylindercollider.cpp + bulletcylindercollider.h + bulletcylindercollider_c.cpp + bulletdynamicbody.cpp + bulletdynamicbody.h + bulletdynamicbody_c.cpp + bulletemptycollider.cpp + bulletemptycollider.h + bulletemptycollider_c.cpp + bulletfixedjoint.cpp + bulletfixedjoint.h + bulletfixedjoint_c.cpp + bulletgeneric6dofjoint.cpp + bulletgeneric6dofjoint.h + bulletgeneric6dofjoint_c.cpp + bullethinge2joint.cpp + bullethinge2joint.h + bullethinge2joint_c.cpp + bullethingejoint.cpp + bullethingejoint.h + bullethingejoint_c.cpp + bulletjoint.cpp + bulletjoint.h + bulletjoint_c.cpp + bulletphysicsobject.cpp + bulletphysicsobject.h + bulletphysicsobject_c.cpp + bulletphysicsserver.cpp + bulletphysicsserver.h + bulletphysicsserver_c.cpp + bulletplanecollider.cpp + bulletplanecollider.h + bulletplanecollider_c.cpp + bulletraycollider.cpp + bulletraycollider.h + bulletraycollider_c.cpp + bulletrigidbody.cpp + bulletrigidbody.h + bulletrigidbody_c.cpp + bulletsliderjoint.cpp + bulletsliderjoint.h + bulletsliderjoint_c.cpp + bulletsoftbody.cpp + bulletsoftbody.h + bulletsoftbody_c.cpp + bulletspace.cpp + bulletspace.h + bulletspace_c.cpp + bulletspherecollider.cpp + bulletspherecollider.h + bulletspherecollider_c.cpp + bulletstaticbody.cpp + bulletstaticbody.h + bulletstaticbody_c.cpp + bullettransformcollider.cpp + bullettransformcollider.h + bullettransformcollider_c.cpp + bulletuniversaljoint.cpp + bulletuniversaljoint.h + bulletuniversaljoint_c.cpp + bulletworld.cpp + bulletworld.h + bulletworld_c.cpp + bulletwrapper.h +) + +add_library(bulletimps MODULE ${bulletimps_LIB_SRCS}) + +target_link_libraries(bulletimps ${BULLET_LIBRARY} ${spark_libs}) + +if (NOT APPLE) + set_target_properties(bulletimps PROPERTIES VERSION 0.0.0 SOVERSION 0) +endif (NOT APPLE) + +install(TARGETS bulletimps DESTINATION ${LIBDIR}/${CMAKE_PROJECT_NAME}) Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletangularmotor.cpp =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletangularmotor.cpp (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletangularmotor.cpp 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,109 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2003 Koblenz University + $Id$ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ +#include "bulletangularmotor.h" + +using namespace oxygen; +using namespace salt; + +AngularMotorImp::AngularMotorImp() : JointImp() +{ + +} + +long AngularMotorImp::CreateAngularMotor(long worldID) +{ +// dWorldID ODEWorld = (dWorldID) worldID; +// dJointID ODEJoint = dJointCreateAMotor(ODEWorld, 0); +// return (long) ODEJoint; +} + +void AngularMotorImp::SetModeUserMode(long jointID) +{ +// dJointID ODEJoint = (dJointID) jointID; +// dJointSetAMotorMode(ODEJoint, dAMotorUser); +} + +void AngularMotorImp::SetModeEulerMode(long jointID) +{ +// dJointID ODEJoint = (dJointID) jointID; +// dJointSetAMotorMode(ODEJoint, dAMotorEuler); +} + +int AngularMotorImp::GetMode(long jointID) +{ +// dJointID ODEJoint = (dJointID) jointID; +// int motorMode = dJointGetAMotorMode(ODEJoint); +// if (motorMode = dAMotorUser) +// return 0; +// //motor is in Euler mode +// return 1; +} + +void AngularMotorImp::SetNumAxes(int num, long jointID) +{ +// dJointID ODEJoint = (dJointID) jointID; +// dJointSetAMotorNumAxes(ODEJoint, num); +} + +int AngularMotorImp::GetNumAxes(long jointID) +{ +// dJointID ODEJoint = (dJointID) jointID; +// return dJointGetAMotorNumAxes(ODEJoint); +} + +void AngularMotorImp::SetMotorAxis(int idx, int anchor, Vector3f axis, long jointID) +{ +// dJointID ODEJoint = (dJointID) jointID; + +// dJointSetAMotorAxis (ODEJoint, idx, anchor, +// axis[0], axis[1], axis[2]); +} + +int AngularMotorImp::GetAxisAnchor(int idx, long jointID) +{ +// dJointID ODEJoint = (dJointID) jointID; +// return dJointGetAMotorAxisRel(ODEJoint, idx); +} + +Vector3f AngularMotorImp::GetMotorAxis(int idx, long jointID) +{ +// dJointID ODEJoint = (dJointID) jointID; +// dVector3 dAxis; +// dJointGetAMotorAxis(ODEJoint,idx,dAxis); +// return Vector3f(dAxis[0],dAxis[1],dAxis[2]); +} + +void AngularMotorImp::SetAxisAngle(int idx, float degAngle, long jointID) +{ +// dJointID ODEJoint = (dJointID) jointID; +// dJointSetAMotorAngle(ODEJoint, idx, gDegToRad(degAngle)); +} + +float AngularMotorImp::GetAxisAngle(int idx, long jointID) +{ +// dJointID ODEJoint = (dJointID) jointID; +// return gRadToDeg(dJointGetAMotorAngle(ODEJoint, idx)); +} + +float AngularMotorImp::GetAxisAngleRate(int idx, long jointID) +{ +// dJointID ODEJoint = (dJointID) jointID; +// return gRadToDeg(dJointGetAMotorAngleRate(ODEJoint,idx)); +} Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletangularmotor.h =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletangularmotor.h (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletangularmotor.h 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,57 @@ +/* -*- 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$ + + 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 BULLETANGULARMOTOR_H +#define BULLETANGULARMOTOR_H + +#include <oxygen/physicsserver/int/angularmotorint.h> +#include "bulletjoint.h" + +class AngularMotorImp : public oxygen::AngularMotorInt, public JointImp{ + +/** An angular motor allows the relative angular velocities of two + bodies to be controlled. The angular velocity can be controlled on + up to three axes, allowing torque motors and stops to be set for + rotation about those axes. + + See physicsserver/int/angularmotorint for a documentation. +*/ + +public: + AngularMotorImp(); + long CreateAngularMotor(long worldID); + void SetModeUserMode(long jointID); + void SetModeEulerMode(long jointID); + int GetMode(long jointID); + void SetNumAxes(int num, long jointID); + int GetNumAxes(long jointID); + void SetMotorAxis(int idx, int anchor, salt::Vector3f axis, long jointID); + int GetAxisAnchor(int idx, long jointID); + salt::Vector3f GetMotorAxis(int idx, long jointID); + void SetAxisAngle(int idx, float degAngle, long jointID); + float GetAxisAngle(int idx, long jointID); + float GetAxisAngleRate(int idx, long jointID); +}; + +DECLARE_CLASS(AngularMotorImp); + +#endif //BULLETANGULARMOTOR_H Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletangularmotor_c.cpp =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletangularmotor_c.cpp (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletangularmotor_c.cpp 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,27 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Copyright (C) 2008 RoboCup Soccer Server 3D Maintenance Group + $Id$ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "odeangularmotor.h" +#include <zeitgeist/zeitgeist.h> + +void CLASS(AngularMotorImp)::DefineClass() +{ + DEFINE_BASECLASS(JointImp); +} Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletballjoint.cpp =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletballjoint.cpp (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletballjoint.cpp 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,61 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2003 Koblenz University + $Id$ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ +#include "bulletballjoint.h" + +using namespace oxygen; +using namespace boost; +using namespace salt; + +BallJointImp::BallJointImp() : Generic6DOFJointImp() +{ +} + +long BallJointImp::CreateBallJoint(long worldID) +{ + // dWorldID ODEWorld = (dWorldID) worldID; +// dJointID ODEJoint = dJointCreateBall(ODEWorld, 0); +// return (long) ODEJoint; +} + +void BallJointImp::SetAnchor(const Vector3f& gAnchor, long jointID) +{ +// dJointID ODEJoint = (dJointID) jointID; +// dJointSetBallAnchor (ODEJoint, gAnchor[0], gAnchor[1], gAnchor[2]); +} + +Vector3f BallJointImp::GetAnchor1(long jointID) +{ +// dJointID ODEJoint = (dJointID) jointID; +// dReal anchor[3]; +// dJointGetBallAnchor (ODEJoint, anchor); +// Vector3f pos = Vector3f(anchor[0],anchor[1],anchor[2]); + +// return pos; +} + +Vector3f BallJointImp::GetAnchor2(long jointID) +{ +// dJointID ODEJoint = (dJointID) jointID; +// dReal anchor[3]; +// dJointGetBallAnchor2(ODEJoint, anchor); +// Vector3f pos = Vector3f(anchor[0],anchor[1],anchor[2]); + +// return pos; +} Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletballjoint.h =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletballjoint.h (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletballjoint.h 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,43 @@ +/* -*- 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$ + + 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 BULLETBALLJOINT_H +#define BULLETBALLJOINT_H + +#include "bulletgeneric6dofjoint.h" +#include <oxygen/physicsserver/int/balljointint.h> + +class BallJointImp : public oxygen::BallJointInt, public Generic6DOFJointImp +{ + /** See physicsserver/int/balljointint.h for documentation */ + +public: + BallJointImp(); + void SetAnchor(const salt::Vector3f& anchor, long jointID); + salt::Vector3f GetAnchor1(long jointID); + salt::Vector3f GetAnchor2(long jointID); + long CreateBallJoint(long worldID); +}; + +DECLARE_CLASS(BallJointImp); + +#endif //BULLETBALLJOINT_H Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletballjoint_c.cpp =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletballjoint_c.cpp (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletballjoint_c.cpp 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,27 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Copyright (C) 2008 RoboCup Soccer Server 3D Maintenance Group + $Id$ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "odeballjoint.h" +#include <zeitgeist/zeitgeist.h> + +void CLASS(BallJointImp)::DefineClass() +{ + DEFINE_BASECLASS(Generic6DOFJointImp); +} Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletbody.cpp =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletbody.cpp (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletbody.cpp 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,29 @@ +/* -*- 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$ + + 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 "bulletbody.h" + +using namespace oxygen; + +BodyImp::BodyImp() : PhysicsObjectImp(){ + +} Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletbody.h =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletbody.h (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletbody.h 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,36 @@ +/* -*- 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$ + + 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 BULLETBODY_H +#define BULLETBODY_H + +#include "bulletphysicsobject.h" +#include <oxygen/physicsserver/int/bodyint.h> + +class BodyImp : public oxygen::BodyInt, public PhysicsObjectImp +{ +public: + BodyImp(); +}; + +DECLARE_CLASS(BodyImp); + +#endif //BULLETBODY_H Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletbody_c.cpp =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletbody_c.cpp (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletbody_c.cpp 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,27 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Copyright (C) 2008 RoboCup Soccer Server 3D Maintenance Group + $Id$ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "bulletbody.h" +#include <zeitgeist/zeitgeist.h> + +void CLASS(BodyImp)::DefineClass() +{ + DEFINE_BASECLASS(PhysicsObjectImp); +} Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletboxcollider.cpp =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletboxcollider.cpp (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletboxcollider.cpp 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,63 @@ +/* -*- 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$ + + 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 "bulletboxcollider.h" + +using namespace oxygen; +using namespace salt; + +BoxColliderImp::BoxColliderImp() : ConvexColliderImp() +{ +} + +void BoxColliderImp::SetBoxLengths(const Vector3f& extents, long geomID) +{ +// dGeomID ODEGeom = (dGeomID) geomID; +// dGeomBoxSetLengths( +// ODEGeom, +// extents[0], +// extents[1], +// extents[2] +// ); +} + +long BoxColliderImp::CreateBox() +{ +// dGeomID ODEGeom = dCreateBox (0, 1.0f, 1.0f, 1.0f); +// return (long) ODEGeom; +} + +void BoxColliderImp::GetBoxLengths(Vector3f& extents, long geomID) +{ +// dGeomID ODEGeom = (dGeomID) geomID; +// dVector3 lengths; +// dGeomBoxGetLengths(ODEGeom,lengths); +// extents[0] = lengths[0]; +// extents[1] = lengths[1]; +// extents[2] = lengths[2]; +} + +float BoxColliderImp::GetPointDepth(const Vector3f& pos, long geomID) +{ +// dGeomID ODEGeom = (dGeomID) geomID; +// return dGeomBoxPointDepth +// (ODEGeom,pos[0],pos[1],pos[2]); +} Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletboxcollider.h =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletboxcollider.h (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletboxcollider.h 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,43 @@ +/* -*- 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$ + $Id$ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ +#ifndef BULLETBOXCOLLIDER_H +#define BULLETBOXCOLLIDER_H + +#include "bulletconvexcollider.h" +#include <oxygen/physicsserver/int/boxcolliderint.h> + +class BoxColliderImp : public oxygen::BoxColliderInt, public ConvexColliderImp +{ + /** See physicsserver/int/boxcolliderint.h for documentation */ + +public: + BoxColliderImp(); + void SetBoxLengths(const salt::Vector3f& extents, long geomID); + void GetBoxLengths(salt::Vector3f& extents, long geomID); + float GetPointDepth(const salt::Vector3f& pos, long geomID); + long CreateBox(); +}; + +DECLARE_CLASS(BoxColliderImp); + +#endif //BULLETBOXCOLLIDER_H Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletboxcollider_c.cpp =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletboxcollider_c.cpp (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletboxcollider_c.cpp 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,27 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Copyright (C) 2008 RoboCup Soccer Server 3D Maintenance Group + $Id$ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "bulletboxcollider.h" +#include <zeitgeist/zeitgeist.h> + +void CLASS(BoxColliderImp)::DefineClass() +{ + DEFINE_BASECLASS(ConvexColliderImp); +} Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletcapsulecollider.cpp =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletcapsulecollider.cpp (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletcapsulecollider.cpp 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,83 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2003 Koblenz University + $Id$ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "odecapsulecollider.h" + +using namespace oxygen; +using namespace salt; + +CapsuleColliderImp::CapsuleColliderImp() : ConvexColliderImp() +{ +} + +void CapsuleColliderImp::SetParams(float radius, float length, long geomID) +{ +// dGeomID ODEGeom = (dGeomID) geomID; +// dGeomCapsuleSetParams (ODEGeom, radius, length); +} + +void CapsuleColliderImp::SetRadius(float radius, long geomID) +{ +// SetParams(radius, GetLength(geomID), geomID); +} + +void CapsuleColliderImp::SetLength(float length, long geomID) +{ +// SetParams(GetRadius(geomID), length, geomID); +} + +void CapsuleColliderImp::GetParams(float& radius, float& length, long geomID) +{ +// dGeomID ODEGeom = (dGeomID) geomID; +// dReal r,l; +// dGeomCapsuleGetParams(ODEGeom,&r,&l); +// radius = r; +// length = l; +} + +float CapsuleColliderImp::GetRadius(long geomID) +{ +// float length; +// float radius; +// GetParams(radius, length, geomID); +// return radius; +} + +float CapsuleColliderImp::GetLength(long geomID) +{ +// float radius; +// float length; +// GetParams(radius, length, geomID); +// return length; +} + +long CapsuleColliderImp::CreateCapsule() +{ +// dGeomID ODEGeom = dCreateCapsule(0, 1.0f, 1.0f); +// return (long) ODEGeom; +} + +float CapsuleColliderImp::GetPointDepth(const Vector3f& pos, long geomID) +{ +// dGeomID ODEGeom = (dGeomID) geomID; +// return dGeomCapsulePointDepth +// (ODEGeom,pos[0],pos[1],pos[2]); +} Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletcapsulecollider.h =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletcapsulecollider.h (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletcapsulecollider.h 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,54 @@ +/* -*- 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$ + + 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 BULLETCAPSULECOLLIDER_H +#define BULLETCAPSULECOLLIDER_H + +#include "bulletconvexcollider.h" +#include <oxygen/physicsserver/int/capsulecolliderint.h> + +class CapsuleColliderImp : public oxygen::CapsuleColliderInt, public ConvexColliderImp +{ +public: + /** CapsuleCollider encapsulates a capsule geometry + object. A capsule is like a cylinder except it has + half-sphere caps at its ends. This feature makes the internal + collision detection code particularly fast and accurate. + + See physicsserver/int/capsulecolliderint.h for documentation + */ + + CapsuleColliderImp(); + + void SetParams(float radius, float length, long geomID); + void SetRadius(float radius, long geomID); + void SetLength(float length, long geomID); + void GetParams(float& radius, float& length, long geomID); + float GetRadius(long geomID); + float GetLength(long geomID); + float GetPointDepth(const salt::Vector3f& pos, long geomID); + long CreateCapsule(); +}; + +DECLARE_CLASS(CapsuleColliderImp); + +#endif //BULLETCAPSULECOLLIDER_H Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletcapsulecollider_c.cpp =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletcapsulecollider_c.cpp (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletcapsulecollider_c.cpp 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,27 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Copyright (C) 2008 RoboCup Soccer Server 3D Maintenance Group + $Id$ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "odecapsulecollider.h" +#include <zeitgeist/zeitgeist.h> + +void CLASS(CapsuleColliderImp)::DefineClass() +{ + DEFINE_BASECLASS(ConvexColliderImp); +} Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletcollider.cpp =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletcollider.cpp (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletcollider.cpp 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,129 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2003 Koblenz University + $Id$ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "bulletcollider.h" +#include <oxygen/physicsserver/collider.h> + +using namespace oxygen; +using namespace salt; +using namespace boost; +using namespace std; + +ColliderImp::ColliderImp() : PhysicsObjectImp() +{ +} + +ColliderImp::~ColliderImp() +{ +} + +Collider* ColliderImp::GetColliderPointer(long geomID) +{ +// dGeomID ODEGeom = (dGeomID) geomID; +// return static_cast<Collider*>(dGeomGetData(ODEGeom)); +} + +void ColliderImp::SetRotation(const Matrix& rot, long geomID) +{ +// dGeomID ODEGeom = (dGeomID) geomID; +// dMatrix3 ODEMatrix; +// GenericPhysicsMatrix& matrixRef = (GenericPhysicsMatrix&) ODEMatrix; +// ConvertRotationMatrix(rot, matrixRef); +// dGeomSetRotation(ODEGeom, ODEMatrix); +} + +void ColliderImp::SetPosition(const Vector3f& globalPos, long geomID) +{ +// dGeomID ODEGeom = (dGeomID) geomID; +// dGeomSetPosition (ODEGeom, globalPos[0], globalPos[1], globalPos[2]); +} + +void ColliderImp::SetLocalPosition(const Vector3f& pos, long geomID) +{ +// dGeomID ODEGeom = (dGeomID) geomID; +// dGeomSetPosition (ODEGeom, pos[0], pos[1], pos[2]); +} + +Vector3f ColliderImp::GetPosition(long geomID) const +{ +// dGeomID ODEGeom = (dGeomID) geomID; +// const dReal* pos = dGeomGetPosition(ODEGeom); +// return Vector3f(pos[0],pos[1],pos[2]); +} + +long ColliderImp::GetParentSpaceID(long geomID) +{ +// dGeomID ODEGeom = (dGeomID) geomID; +// return (long) dGeomGetSpace(ODEGeom); +} + +bool ColliderImp::Intersect(boost::shared_ptr<Collider> collider, long geomID) +{ +// dGeomID ODEGeom = (dGeomID) geomID; +// dContactGeom contact; + +// return dCollide +// (ODEGeom, +// (dGeomID) collider->GetGeomID(), +// 1, /* ask for at most one collision point */ +// &contact, +// sizeof(contact) +// ) > 0; +} + +void ColliderImp::DestroyGeom(long geomID) +{ +// dGeomID ODEGeom = (dGeomID) geomID; +// dGeomDestroy(ODEGeom); +} + +void ColliderImp::TransformSetGeom(long parentGeomID, long geomID) +{ +// dGeomID parentODEGeom = (dGeomID) parentGeomID; +// dGeomID ODEGeom = (dGeomID) geomID; +// dGeomTransformSetGeom(parentODEGeom, ODEGeom); +} + +void ColliderImp::SetSpace(long spaceID, long geomID, Collider* collider) +{ +// dSpaceID ODESpace = (dSpaceID) spaceID; +// dGeomID ODEGeom = (dGeomID) geomID; + +// if (!spaceID) return; +// if (dSpaceQuery(ODESpace, ODEGeom)) return; + +// dGeomSetData(ODEGeom, collider); +// dSpaceAdd(ODESpace, ODEGeom); +} + +void ColliderImp::SetBody(long bodyID, long geomID) +{ +// dBodyID ODEBody = (dBodyID) bodyID; +// dGeomID ODEGeom = (dGeomID) geomID; +// dGeomSetBody(ODEGeom, ODEBody); +} + +void ColliderImp::RemoveFromSpace(long geomID, long spaceID) +{ +// dGeomID ODEGeom = (dGeomID) geomID; +// dSpaceID ODESpace = (dSpaceID) spaceID; +// dSpaceRemove(ODESpace, ODEGeom); +} Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletcollider.h =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletcollider.h (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletcollider.h 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,65 @@ +/* -*- 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$ + + 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 ODECOLLIDER_H +#define ODECOLLIDER_H + +#include "odephysicsobject.h" +#include <oxygen/physicsserver/int/colliderint.h> + +class ColliderImp : public oxygen::ColliderInt, public PhysicsObjectImp +{ + +public: + ColliderImp(); + virtual ~ColliderImp(); + + /** \class Collider encapsulates a geometry object- geom for + short. Geoms are the fundamental objects in the collision + system. They represent a single rigid shape as for example a + sphere or a box. A special kind of geom called 'space' can + represent a group of other geoms. A placeable geom can be + associated with rigid body objects. This allows the collision + engine to get the position and orientation of the geoms from the + bodies. A body and a geom together represent all the properties of + the simulated object. + + See physicsserver/int/colliderint.h for documentation. + */ + + oxygen::Collider* GetColliderPointer(long geomID); + void SetPosition(const salt::Vector3f& globalPos, long geomID); + void SetLocalPosition(const salt::Vector3f& pos, long GeomID); + salt::Vector3f GetPosition(long geomID) const; + void SetRotation(const salt::Matrix& rot, long geomID); + bool Intersect(boost::shared_ptr<oxygen::Collider> collider, long geomID); + long GetParentSpaceID(long geomID); + void DestroyGeom(long geomID); + void TransformSetGeom(long parentGeomID, long geomID); + void SetSpace(long spaceID, long geomID, oxygen::Collider* collider); + void SetBody(long bodyID, long geomID); + void RemoveFromSpace(long geomID, long spaceID); +}; + +DECLARE_CLASS(ColliderImp); + +#endif //ODECOLLIDER_H Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletcollider_c.cpp =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletcollider_c.cpp (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletcollider_c.cpp 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,27 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Copyright (C) 2008 RoboCup Soccer Server 3D Maintenance Group + $Id$ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "bulletcollider.h" +#include <zeitgeist/zeitgeist.h> + +void CLASS(ColliderImp)::DefineClass() +{ + DEFINE_BASECLASS(PhysicsObjectImp); +} Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletcompoundcollider.cpp =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletcompoundcollider.cpp (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletcompoundcollider.cpp 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,29 @@ +/* -*- 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$ + + 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 "bulletcompoundcollider.h" + +using namespace oxygen; + +CompoundColliderImp::CompoundColliderImp() : ColliderImp(){ + +} Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletcompoundcollider.h =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletcompoundcollider.h (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletcompoundcollider.h 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,36 @@ +/* -*- 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$ + + 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 BULLETCOMPOUNDCOLLIDER_H +#define BULLETCOMPOUNDCOLLIDER_H + +#include "bulletcollider.h" +#include <oxygen/physicsserver/int/compoundcolliderint.h> + +class CompoundColliderImp : public oxygen::CompoundColliderInt, public ColliderImp +{ +public: + CompoundColliderImp(); +}; + +DECLARE_CLASS(CompoundColliderImp); + +#endif //BULLETCOMPOUNDCOLLIDER_H Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletcompoundcollider_c.cpp =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletcompoundcollider_c.cpp (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletcompoundcollider_c.cpp 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,27 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Copyright (C) 2008 RoboCup Soccer Server 3D Maintenance Group + $Id$ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "bulletcompoundcollider.h" +#include <zeitgeist/zeitgeist.h> + +void CLASS(CompoundColliderImp)::DefineClass() +{ + DEFINE_BASECLASS(ColliderImp); +} Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletconcavecollider.cpp =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletconcavecollider.cpp (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletconcavecollider.cpp 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,29 @@ +/* -*- 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$ + + 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 "bulletconcavecollider.h" + +using namespace oxygen; + +ConcaveColliderImp::ConcaveColliderImp() : ColliderImp(){ + +} Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletconcavecollider.h =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletconcavecollider.h (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletconcavecollider.h 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,36 @@ +/* -*- 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$ + + 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 BULLETCONCAVECOLLIDER_H +#define BULLETCONCAVECOLLIDER_H + +#include "bulletcollider.h" +#include <oxygen/physicsserver/int/concavecolliderint.h> + +class ConcaveColliderImp : public oxygen::ConcaveColliderInt, public ColliderImp +{ +public: + ConcaveColliderImp(); +}; + +DECLARE_CLASS(ConcaveColliderImp); + +#endif //BULLETCONCAVECOLLIDER_H Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletconcavecollider_c.cpp =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletconcavecollider_c.cpp (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletconcavecollider_c.cpp 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,27 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Copyright (C) 2008 RoboCup Soccer Server 3D Maintenance Group + $Id$ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "bulletconcavecollider.h" +#include <zeitgeist/zeitgeist.h> + +void CLASS(ConcaveColliderImp)::DefineClass() +{ + DEFINE_BASECLASS(ColliderImp); +} Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletconecollider.cpp =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletconecollider.cpp (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletconecollider.cpp 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,29 @@ +/* -*- 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$ + + 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 "bulletconecollider.h" + +using namespace oxygen; + +ConeColliderImp::ConeColliderImp() : ConvexColliderImp(){ + +} Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletconecollider.h =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletconecollider.h (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletconecollider.h 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,36 @@ +/* -*- 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$ + + 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 hav... [truncated message content] |
From: <rc...@us...> - 2010-06-14 09:28:44
|
Revision: 217 http://simspark.svn.sourceforge.net/simspark/?rev=217&view=rev Author: rckeely Date: 2010-06-14 09:28:37 +0000 (Mon, 14 Jun 2010) Log Message: ----------- Branch for development of Bullet Physics Engine plugin Added Paths: ----------- branches/bullet-plugin/ Property changes on: branches/bullet-plugin ___________________________________________________________________ Added: svn:ignore + .project Added: svn:mergeinfo + /branches/agentselection:195-206 /branches/treehole:175 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |