You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(153) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(48) |
Feb
(46) |
Mar
(12) |
Apr
(4) |
May
(4) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
(263) |
Mar
(235) |
Apr
(66) |
May
(42) |
Jun
(270) |
Jul
(65) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Oliver O. <fr...@us...> - 2007-06-17 13:39:37
|
Update of /cvsroot/simspark/simspark/spark/oxygen/sceneserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21072/oxygen/sceneserver Modified Files: camera.cpp camera.h camera_c.cpp fpscontroller.cpp Log Message: merge from projectx branch Index: camera_c.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/sceneserver/camera_c.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** camera_c.cpp 5 Dec 2005 21:21:17 -0000 1.1 --- camera_c.cpp 17 Jun 2007 13:38:32 -0000 1.2 *************** *** 163,166 **** --- 163,186 ---- } + FUNCTION(Camera,lookAt) + { + int inX; + int inY; + int inZ; + + if ( + (in.GetSize() != 3) || + (! in.GetValue(in[0],inX)) || + (! in.GetValue(in[1],inY)) || + (! in.GetValue(in[2],inZ)) + ) + { + return false; + } + + obj->LookAt(salt::Vector3f(inX,inY,inZ)); + return true; + } + void CLASS(Camera)::DefineClass() { *************** *** 179,181 **** --- 199,202 ---- DEFINE_FUNCTION(adjustZFar); DEFINE_FUNCTION(getZFar); + DEFINE_FUNCTION(lookAt); } Index: camera.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/sceneserver/camera.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** camera.h 5 Dec 2005 21:21:17 -0000 1.1 --- camera.h 17 Jun 2007 13:38:32 -0000 1.2 *************** *** 46,73 **** /** sets viewpoint properties */ void SetViewport(int x, int y, int width, int height); ! int GetViewportX(); ! int GetViewportY(); ! int GetViewportWidth(); ! int GetViewportHeight(); /** sets the field of view (FOV) */ ! void SetFOV(const float fov); /** sets the distance of the Z near plane */ ! void SetZNear(const float zNear); /** sets the distance of the Z far plane */ ! void SetZFar(const float zFar); /** adjusts the current FOV, i.e. adds a delta increment */ ! void AdjustFOV(const float fov); /** adjusts the distance of the Z near plane, i.e adds a delta increment */ ! void AdjustZNear(const float zNear); /** adjusts the distance of the Z far plane, i.e adds a delta increment */ ! void AdjustZFar(const float zFar); /** returns the field of View */ --- 46,74 ---- /** sets viewpoint properties */ void SetViewport(int x, int y, int width, int height); ! ! int GetViewportX() const; ! int GetViewportY() const; ! int GetViewportWidth() const; ! int GetViewportHeight() const; /** sets the field of view (FOV) */ ! void SetFOV(float fov); /** sets the distance of the Z near plane */ ! void SetZNear(float zNear); /** sets the distance of the Z far plane */ ! void SetZFar(float zFar); /** adjusts the current FOV, i.e. adds a delta increment */ ! void AdjustFOV(float fov); /** adjusts the distance of the Z near plane, i.e adds a delta increment */ ! void AdjustZNear(float zNear); /** adjusts the distance of the Z far plane, i.e adds a delta increment */ ! void AdjustZFar(float zFar); /** returns the field of View */ *************** *** 90,93 **** --- 91,99 ---- void DescribeFrustum(salt::Frustum& frustum) const; + /** turn the camera so that it looks to a given point. + * @param toPoint the point to look at + */ + void LookAt(const salt::Vector3f& toPoint); + /** sets the view transform to be the inverted WorldTransform and sets up the projection transform matrix Index: camera.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/sceneserver/camera.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** camera.cpp 5 Dec 2005 21:21:17 -0000 1.1 --- camera.cpp 17 Jun 2007 13:38:32 -0000 1.2 *************** *** 32,36 **** mFOV = 60.0f; mZNear = 1.0f; ! mZFar = 2000.0f; mX = 0; mY = 0; --- 32,36 ---- mFOV = 60.0f; mZNear = 1.0f; ! mZFar = 100000.0f; mX = 0; mY = 0; *************** *** 49,53 **** transforms. It is really fast and very generic because of that. */ ! void Camera::DescribeFrustum(Frustum& frustum) const { // concatenate projection and view transform --- 49,54 ---- transforms. It is really fast and very generic because of that. */ ! void ! Camera::DescribeFrustum(Frustum& frustum) const { // concatenate projection and view transform *************** *** 91,95 **** } ! void Camera::Bind() { mViewTransform = GetWorldTransform(); --- 92,97 ---- } ! void ! Camera::Bind() { mViewTransform = GetWorldTransform(); *************** *** 106,110 **** } ! void Camera::OnLink() { bool gotSetup = --- 108,113 ---- } ! void ! Camera::OnLink() { bool gotSetup = *************** *** 121,125 **** } ! void Camera::UpdateHierarchyInternal() { // make sure values are within bounds --- 124,129 ---- } ! void ! Camera::UpdateHierarchyInternal() { // make sure values are within bounds *************** *** 130,134 **** } ! void Camera::SetViewport(int x, int y, int width, int height) { mX = x; --- 134,139 ---- } ! void ! Camera::SetViewport(int x, int y, int width, int height) { mX = x; *************** *** 138,213 **** } ! int Camera::GetViewportX() { return mX; } ! int Camera::GetViewportY() { return mY; } ! int Camera::GetViewportWidth() { return mWidth; } ! int Camera::GetViewportHeight() { return mHeight; } ! void Camera::SetFOV(const float fov) { mFOV = fov; } ! void Camera::SetZNear(const float zNear) { mZNear = zNear; } ! void Camera::SetZFar(const float zFar) { mZFar = zFar; } ! void Camera::AdjustFOV(const float fov) { mFOV+=fov; } ! void Camera::AdjustZNear(const float zNear) { mZNear+=zNear; } ! void Camera::AdjustZFar(const float zFar) { mZFar+=zFar; } ! float Camera::GetFOV() const { return mFOV; } ! float Camera::GetZNear() const { return mZNear; } ! float Camera::GetZFar()const { return mZFar; } ! const salt::Matrix& Camera::GetViewTransform() const { return mViewTransform; } ! const salt::Matrix& Camera::GetProjectionTransform() const { return mProjectionTransform; } --- 143,245 ---- } ! int ! Camera::GetViewportX() const { return mX; } ! int ! Camera::GetViewportY() const { return mY; } ! int ! Camera::GetViewportWidth() const { return mWidth; } ! int ! Camera::GetViewportHeight() const { return mHeight; } ! void ! Camera::SetFOV(float fov) { mFOV = fov; } ! void ! Camera::SetZNear(float zNear) { mZNear = zNear; } ! void ! Camera::SetZFar(float zFar) { mZFar = zFar; } ! void ! Camera::AdjustFOV(float fov) { mFOV+=fov; } ! void ! Camera::AdjustZNear(float zNear) { mZNear+=zNear; } ! void ! Camera::AdjustZFar(float zFar) { mZFar+=zFar; } ! float ! Camera::GetFOV() const { return mFOV; } ! float ! Camera::GetZNear() const { return mZNear; } ! float ! Camera::GetZFar() const { return mZFar; } ! const salt::Matrix& ! Camera::GetViewTransform() const { return mViewTransform; } ! const salt::Matrix& ! Camera::GetProjectionTransform() const { return mProjectionTransform; } + + void + Camera::LookAt(const salt::Vector3f& toPoint) + { + Matrix m; + salt::Vector3f fromPoint; + fromPoint = GetWorldTransform().Pos(); + // std::cerr << "Camera: look from " << fromPoint << " at " << toPoint << "\n"; + salt::Vector3f up(0,0,1); + m.LookAt(fromPoint, toPoint, up); + SetWorldTransform(m); + } Index: fpscontroller.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/sceneserver/fpscontroller.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** fpscontroller.cpp 31 Mar 2007 13:23:30 -0000 1.3 --- fpscontroller.cpp 17 Jun 2007 13:38:32 -0000 1.4 *************** *** 54,58 **** } ! void FPSController::PrepareUpdate(Matrix& matrix, Matrix& fwd, Vector3f& vec) { // determine force direction --- 54,59 ---- } ! void ! FPSController::PrepareUpdate(Matrix& matrix, Matrix& fwd, Vector3f& vec) { // determine force direction *************** *** 88,94 **** { if (mBody.get() == 0) ! { ! return; ! } Matrix matrix; --- 89,95 ---- { if (mBody.get() == 0) ! { ! return; ! } Matrix matrix; |
From: Oliver O. <fr...@us...> - 2007-06-17 13:39:37
|
Update of /cvsroot/simspark/simspark/spark/oxygen/agentaspect In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21072/oxygen/agentaspect Modified Files: agentaspect.cpp agentaspect.h effector.h Log Message: merge from projectx branch Index: effector.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/agentaspect/effector.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** effector.h 5 Dec 2005 21:16:49 -0000 1.1 --- effector.h 17 Jun 2007 13:38:32 -0000 1.2 *************** *** 1,5 **** /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University --- 1,5 ---- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of simspark Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University *************** *** 23,30 **** #define OXYGEN_EFFECTOR_H - // #ifdef HAVE_CONFIG_H - // #include <config.h> - // #endif - #include <oxygen/sceneserver/basenode.h> #include <oxygen/gamecontrolserver/baseparser.h> --- 23,26 ---- Index: agentaspect.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/agentaspect/agentaspect.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** agentaspect.h 5 Dec 2005 21:16:49 -0000 1.1 --- agentaspect.h 17 Jun 2007 13:38:32 -0000 1.2 *************** *** 1,5 **** /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University --- 1,5 ---- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of simspark Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University *************** *** 23,30 **** #define OXYGEN_AGENTASPECT_H - // #ifdef HAVE_CONFIG_H - // #include <config.h> - // #endif - #include <oxygen/sceneserver/transform.h> #include <oxygen/gamecontrolserver/actionobject.h> --- 23,26 ---- *************** *** 46,54 **** /** Initializes the AgentAspect. Called immediately after the ! AgentAspect is created by the GameControlServer. \param ! createEffector is the name of the initial effector class that ! the agent uses to construct all remaining parts */ ! virtual bool Init(const std::string& createEffector); /** RealizeActions realizes the actions described by \param --- 42,51 ---- /** Initializes the AgentAspect. Called immediately after the ! AgentAspect is created by the GameControlServer. ! \param createEffector is the name of the initial effector class that ! the agent uses to construct all remaining parts ! \param id a unique ID to set */ ! virtual bool Init(const std::string& createEffector, int id); /** RealizeActions realizes the actions described by \param *************** *** 68,71 **** --- 65,71 ---- virtual boost::shared_ptr<Effector> GetEffector(const std::string predicate) const; + //! @return the unique ID for the agent aspect + inline int ID() const { return mID; } + protected: typedef std::map<std::string, boost::shared_ptr<Effector> > TEffectorMap; *************** *** 75,78 **** --- 75,79 ---- private: + int mID; }; Index: agentaspect.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/agentaspect/agentaspect.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** agentaspect.cpp 5 Dec 2005 21:16:49 -0000 1.1 --- agentaspect.cpp 17 Jun 2007 13:38:32 -0000 1.2 *************** *** 1,5 **** /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University --- 1,5 ---- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of simspark Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University *************** *** 31,34 **** --- 31,35 ---- { SetName("agentAspect"); + mID = -1; } *************** *** 130,135 **** bool ! AgentAspect::Init(const string& createEffector) { shared_ptr<Effector> create = shared_dynamic_cast<Effector> (GetCore()->New(createEffector)); --- 131,138 ---- bool ! AgentAspect::Init(const string& createEffector, int id) { + mID = id; + shared_ptr<Effector> create = shared_dynamic_cast<Effector> (GetCore()->New(createEffector)); |
From: Oliver O. <fr...@us...> - 2007-06-17 13:39:37
|
Update of /cvsroot/simspark/simspark/spark/kerosin/openglserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21072/kerosin/openglserver Modified Files: openglserver.cpp openglserver.h openglsystem.h openglwrapper.h Log Message: merge from projectx branch Index: openglserver.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/openglserver/openglserver.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** openglserver.cpp 15 Mar 2007 07:26:26 -0000 1.2 --- openglserver.cpp 17 Jun 2007 13:38:30 -0000 1.3 *************** *** 26,29 **** --- 26,30 ---- #include <zeitgeist/fileserver/fileserver.h> #include <zeitgeist/logserver/logserver.h> + #include <sstream> using namespace std; *************** *** 85,109 **** } ! void OpenGLServer::Update() { if (mGLSystem.get() == 0) ! { ! return; ! } mGLSystem->Update(); } ! void OpenGLServer::SwapBuffers() const { if (mGLSystem.get() == 0) ! { ! return; ! } mGLSystem->SwapBuffers(); } ! bool OpenGLServer::Init(const string& openGLSysName) { GetLog()->Normal() << "(OpenGLServer) Init " << openGLSysName << "\n"; --- 86,113 ---- } ! void ! OpenGLServer::Update() { if (mGLSystem.get() == 0) ! { ! return; ! } mGLSystem->Update(); } ! void ! OpenGLServer::SwapBuffers() const { if (mGLSystem.get() == 0) ! { ! return; ! } mGLSystem->SwapBuffers(); } ! bool ! OpenGLServer::Init(const string& openGLSysName) { GetLog()->Normal() << "(OpenGLServer) Init " << openGLSysName << "\n"; *************** *** 111,134 **** if (! openGLSysName.empty()) ! { ! // create the OpenGLSystem ! mGLSystem = shared_dynamic_cast<OpenGLSystem> ! (GetCore()->New(openGLSysName)); ! if(mGLSystem.get() == 0) ! { ! // could not create OpenGLSystem ! GetLog()->Error() << "(OpenGLServer) ERROR: unable to create " ! << openGLSysName << "\n"; ! return false; ! } ! if (mGLSystem->Init() == false) ! { ! GetLog()->Error() << "(InputServer) ERROR: unable to initialize " ! << openGLSysName << "\n"; ! return false; ! } } mSupportsFancyLighting = false; --- 115,138 ---- if (! openGLSysName.empty()) ! { ! // create the OpenGLSystem ! mGLSystem = shared_dynamic_cast<OpenGLSystem> ! (GetCore()->New(openGLSysName)); ! if (mGLSystem.get() == 0) ! { ! // could not create OpenGLSystem ! GetLog()->Error() << "(OpenGLServer) ERROR: unable to create " ! << openGLSysName << "\n"; ! return false; ! } ! if (mGLSystem->Init() == false) ! { ! GetLog()->Error() << "(InputServer) ERROR: unable to initialize " ! << openGLSysName << "\n"; ! return false; } + } mSupportsFancyLighting = false; *************** *** 136,142 **** // prepare the set of available lights for (int i=0;i<GL_MAX_LIGHTS;++i) ! { ! mAvailableLights.insert(GL_LIGHT0+i); ! } return true; --- 140,146 ---- // prepare the set of available lights for (int i=0;i<GL_MAX_LIGHTS;++i) ! { ! mAvailableLights.insert(GL_LIGHT0+i); ! } return true; *************** *** 155,161 **** { if (mAvailableLights.size() == 0) ! { ! return -1; ! } TLightSet::iterator iter = mAvailableLights.begin(); --- 159,165 ---- { if (mAvailableLights.size() == 0) ! { ! return -1; ! } TLightSet::iterator iter = mAvailableLights.begin(); *************** *** 190,194 **** static _ptr proc = (_ptr) GetExtension(#_function); ! void OpenGLServer::glActiveTextureARB(unsigned int texture) { #ifdef __APPLE__ --- 194,199 ---- static _ptr proc = (_ptr) GetExtension(#_function); ! void ! OpenGLServer::glActiveTextureARB(unsigned int texture) { #ifdef __APPLE__ *************** *** 197,201 **** #else PROC_ADDRESS(PFNGLACTIVETEXTUREARBPROC, "glActiveTextureARB"); - if (! proc) { --- 202,205 ---- *************** *** 206,207 **** --- 210,231 ---- #endif } + + long int + OpenGLServer::GetWindowHandle() const + { + if (mGLSystem.get() == 0) + { + return 0; + } + return mGLSystem->GetWindowHandle(); + } + + bool + OpenGLServer::IsGLLocked() const + { + if (mGLSystem.get() == 0) + { + return true; + } + return mGLSystem->IsGLLocked(); + } Index: openglsystem.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/openglserver/openglsystem.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** openglsystem.h 15 Mar 2007 07:26:26 -0000 1.2 --- openglsystem.h 17 Jun 2007 13:38:30 -0000 1.3 *************** *** 50,53 **** --- 50,59 ---- virtual void SwapBuffers() = 0; + //! get a handle for the active window. + virtual unsigned long int GetWindowHandle() const { return 0; } + + //! return if the GL subsystem locks using OpenGL to get exclusive access. + virtual bool IsGLLocked() const { return false; } + protected: // Index: openglwrapper.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/openglserver/openglwrapper.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** openglwrapper.h 9 Apr 2007 17:13:44 -0000 1.3 --- openglwrapper.h 17 Jun 2007 13:38:30 -0000 1.4 *************** *** 42,46 **** #include <GL/wglext.h> #elif defined(__APPLE__) ! /* nothing here */ #else #include <GL/glx.h> --- 42,46 ---- #include <GL/wglext.h> #elif defined(__APPLE__) ! #include <OpenGL/glu.h> #else #include <GL/glx.h> Index: openglserver.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/openglserver/openglserver.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** openglserver.h 15 Mar 2007 07:26:26 -0000 1.2 --- openglserver.h 17 Jun 2007 13:38:30 -0000 1.3 *************** *** 1,5 **** /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University --- 1,5 ---- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of simspark Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University *************** *** 83,89 **** static void* GetExtension(const char* name); ! /** looksup and calls glActiveTextureARB extension if available */ static void glActiveTextureARB(unsigned int texture); protected: //! set up opengl viewport --- 83,95 ---- static void* GetExtension(const char* name); ! /** looks up and calls glActiveTextureARB extension if available */ static void glActiveTextureARB(unsigned int texture); + //! return the main window handle from the gl subsystem + long int GetWindowHandle() const; + + //! return if the GL subsystem locks using OpenGL to get exclusive access + bool IsGLLocked() const; + protected: //! set up opengl viewport |
From: Oliver O. <fr...@us...> - 2007-06-17 13:39:37
|
Update of /cvsroot/simspark/simspark/spark/kerosin/textureserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21072/kerosin/textureserver Modified Files: texture.cpp texture.h texture2d.cpp texture2d.h textureserver.cpp textureserver.h Log Message: merge from projectx branch Index: texture2d.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/textureserver/texture2d.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** texture2d.cpp 15 Mar 2007 07:26:26 -0000 1.2 --- texture2d.cpp 17 Jun 2007 13:38:31 -0000 1.3 *************** *** 1,22 **** /* -*- 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 "texture2d.h" --- 1,22 ---- /* -*- 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 "texture2d.h" *************** *** 26,30 **** using namespace kerosin; ! Texture2D::Texture2D() : Texture() { } --- 26,30 ---- using namespace kerosin; ! Texture2D::Texture2D(bool use_gl) : Texture(use_gl) { } Index: textureserver.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/textureserver/textureserver.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** textureserver.cpp 15 Mar 2007 07:26:26 -0000 1.2 --- textureserver.cpp 17 Jun 2007 13:38:31 -0000 1.3 *************** *** 1,22 **** /* -*- 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. */ --- 1,22 ---- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of simspark ! Fri May 9 2003 ! Copyright (C) 2002,2003 Koblenz University ! 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. */ *************** *** 54,57 **** --- 54,59 ---- } #endif + // setup OpenGLServer reference + RegisterCachedPath(mOpenGLServer, "/sys/server/opengl"); } *************** *** 61,73 **** if (entry != mTextureCache.end()) ! { ! // we already have a match ! return (*entry).second; ! } ! if (mImageServer.expired()) ! { ! return shared_ptr<Texture>(); ! } #ifdef WIN32 --- 63,75 ---- if (entry != mTextureCache.end()) ! { ! // we already have a match ! return (*entry).second; ! } ! if (mImageServer.expired()) ! { ! return shared_ptr<Texture>(); ! } #ifdef WIN32 *************** *** 78,86 **** if (! image.get()) ! { ! return shared_ptr<Texture>(); ! } ! Texture2D *tex2D = new Texture2D(); tex2D->Create(image); shared_ptr<Texture> texture(tex2D); --- 80,94 ---- if (! image.get()) ! { ! return shared_ptr<Texture>(); ! } ! bool use_gl = false; ! if (!mOpenGLServer.expired()) ! { ! use_gl = !mOpenGLServer->IsGLLocked(); ! } ! ! Texture2D *tex2D = new Texture2D(use_gl); tex2D->Create(image); shared_ptr<Texture> texture(tex2D); Index: textureserver.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/textureserver/textureserver.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** textureserver.h 15 Mar 2007 07:26:26 -0000 1.2 --- textureserver.h 17 Jun 2007 13:38:31 -0000 1.3 *************** *** 1,5 **** /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University --- 1,5 ---- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of simspark Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University *************** *** 24,43 **** #ifdef HAVE_CONFIG_H - #ifdef PACKAGE_BUGREPORT #undef PACKAGE_BUGREPORT - #endif - #ifdef PACKAGE_NAME #undef PACKAGE_NAME - #endif - #ifdef PACKAGE_STRING #undef PACKAGE_STRING - #endif - #ifdef PACKAGE_TARNAME #undef PACKAGE_TARNAME - #endif - #ifdef PACKAGE_VERSION #undef PACKAGE_VERSION ! #endif ! #include <config.h> #endif --- 24,33 ---- #ifdef HAVE_CONFIG_H #undef PACKAGE_BUGREPORT #undef PACKAGE_NAME #undef PACKAGE_STRING #undef PACKAGE_TARNAME #undef PACKAGE_VERSION ! #include <sparkconfig.h> #endif *************** *** 79,87 **** virtual ~TextureServer(); - /** retrieve pointer to the OpenGL server ... used by Textures to - check extensions - */ - boost::shared_ptr<OpenGLServer> GetOpenGLServer() const; - /** load (or returned cached) texture */ boost::shared_ptr<Texture> GetTexture(const std::string &name); --- 69,72 ---- *************** *** 97,101 **** /** reference to the ImageServer */ CachedPath<ImageServer> mImageServer; ! /** registry of cached textures */ TTextureCache mTextureCache; --- 82,87 ---- /** reference to the ImageServer */ CachedPath<ImageServer> mImageServer; ! /** reference to the OpenGLServer */ ! CachedPath<OpenGLServer> mOpenGLServer; /** registry of cached textures */ TTextureCache mTextureCache; Index: texture.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/textureserver/texture.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** texture.cpp 15 Mar 2007 07:26:26 -0000 1.2 --- texture.cpp 17 Jun 2007 13:38:31 -0000 1.3 *************** *** 1,22 **** /* -*- 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 "texture.h" --- 1,22 ---- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of simspark ! Fri May 9 2003 ! Copyright (C) 2002,2003 Koblenz University ! 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 "texture.h" *************** *** 25,30 **** using namespace kerosin; ! Texture::Texture() ! : mTexID(0), mWidth(0), mHeight(0) { } --- 25,30 ---- using namespace kerosin; ! Texture::Texture(bool use_gl) ! : mTexID(0), mWidth(0), mHeight(0), mUseGL(use_gl) { } *************** *** 35,61 **** } ! void Texture::Reset() { if (! mTexID) ! { ! return; ! } ! glDeleteTextures(1, &mTexID); mTexID = 0; } ! void Texture::Acquire() { Reset(); ! glGenTextures(1, &mTexID); } ! unsigned int Texture::GetWidth() const { return mWidth; } ! unsigned int Texture::GetHeight() const { return mHeight; --- 35,65 ---- } ! void ! Texture::Reset() { if (! mTexID) ! { ! return; ! } ! if (mUseGL) glDeleteTextures(1, &mTexID); mTexID = 0; } ! void ! Texture::Acquire() { Reset(); ! if (mUseGL) glGenTextures(1, &mTexID); } ! unsigned int ! Texture::GetWidth() const { return mWidth; } ! unsigned int ! Texture::GetHeight() const { return mHeight; Index: texture2d.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/textureserver/texture2d.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** texture2d.h 15 Mar 2007 07:26:26 -0000 1.2 --- texture2d.h 17 Jun 2007 13:38:31 -0000 1.3 *************** *** 36,40 **** // public: ! Texture2D(); ~Texture2D(); --- 36,40 ---- // public: ! Texture2D(bool use_gl = false); ~Texture2D(); Index: texture.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/textureserver/texture.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** texture.h 15 Mar 2007 07:26:26 -0000 1.2 --- texture.h 17 Jun 2007 13:38:31 -0000 1.3 *************** *** 58,62 **** // public: ! Texture(); virtual ~Texture(); --- 58,62 ---- // public: ! Texture(bool use_gl = false); virtual ~Texture(); *************** *** 97,106 **** //! OpenGL texture handle GLuint mTexID; - //! width of texture unsigned int mWidth; - //! height of texture unsigned int mHeight; }; --- 97,106 ---- //! OpenGL texture handle GLuint mTexID; //! width of texture unsigned int mWidth; //! height of texture unsigned int mHeight; + //! flag if we want to access OpenGL + bool mUseGL; }; |
From: Oliver O. <fr...@us...> - 2007-06-17 13:39:37
|
Update of /cvsroot/simspark/simspark/spark/kerosin/renderserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21072/kerosin/renderserver Modified Files: rendercontrol.cpp rendercontrol.h rendercontrol_c.cpp renderserver.cpp renderserver.h renderserver_c.cpp Added Files: baserenderserver.cpp baserenderserver.h baserenderserver_c.cpp Log Message: merge from projectx branch --- NEW FILE: baserenderserver.cpp --- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- this file is part of simspark Tue May 9 2006 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2007 RoboCup Soccer Server 3D Maintenance Group $Id: baserenderserver.cpp,v 1.2 2007/06/17 13:38:30 fruit Exp $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. BaseRenderServer NOTE: This is an abstract renderserver in order to support different render servers HISTORY: 29/03/07 - OO - Initial version */ #include "baserenderserver.h" #include <oxygen/sceneserver/sceneserver.h> #include <oxygen/sceneserver/scene.h> #include <zeitgeist/logserver/logserver.h> using namespace oxygen; using namespace kerosin; using namespace salt; using namespace zeitgeist; void BaseRenderServer::OnLink() { // setup SceneServer reference RegisterCachedPath(mSceneServer, "/sys/server/scene"); if (mSceneServer.expired()) { GetLog()->Error() << "(BaseRenderServer) ERROR: SceneServer not found\n"; } } void BaseRenderServer::OnUnlink() { mActiveScene.reset(); Leaf::OnUnlink(); } bool BaseRenderServer::GetActiveScene() { if (mSceneServer.expired()) { mActiveScene.reset(); } mActiveScene = mSceneServer->GetActiveScene(); if (mActiveScene.get() == 0) { GetLog()->Error() << "(BaseRenderServer) ERROR: found no active scene\n"; return false; } return true; } void BaseRenderServer::UpdateCached() { mActiveScene.reset(); } --- NEW FILE: baserenderserver.h --- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- this file is part of simspark Tue May 9 2006 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2007 RoboCup Soccer Server 3D Maintenance Group $Id: baserenderserver.h,v 1.2 2007/06/17 13:38:31 fruit Exp $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. BaseRenderServer NOTE: This is an abstract renderserver in order to support different render servers HISTORY: 29/03/07 - OO - Initial version */ #ifndef KEROSIN_BASERENDERSERVER_H #define KEROSIN_BASERENDERSERVER_H #include <zeitgeist/class.h> #include <zeitgeist/leaf.h> namespace oxygen { class Scene; class SceneServer; class Camera; class BaseNode; } namespace kerosin { class BaseRenderServer : public zeitgeist::Leaf { public: virtual ~BaseRenderServer() {} //! display the current active scene virtual void Render() = 0; //! width of the render target virtual int Width() const { return 0; } //! height of the render target virtual int Height() const { return 0; } //! get a shot of the current frame virtual bool CopyFrame(char* /* buffer */) const { return false; } protected: /** get the active scene node from the sceneServer */ virtual bool GetActiveScene(); /** set up SceneServer reference */ virtual void OnLink(); /** reset SceneServer reference */ virtual void OnUnlink(); /** update variables from a script */ virtual void UpdateCached(); // // Members // protected: /** reference to the current active scene */ boost::shared_ptr<oxygen::Scene> mActiveScene; /** reference to the SceneServer */ CachedPath<oxygen::SceneServer> mSceneServer; }; DECLARE_ABSTRACTCLASS(BaseRenderServer); } //namespace kerosin #endif // KEROSIN_BASERENDERSERVER_H Index: renderserver_c.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/renderserver/renderserver_c.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** renderserver_c.cpp 5 Dec 2005 21:38:23 -0000 1.1 --- renderserver_c.cpp 17 Jun 2007 13:38:31 -0000 1.2 *************** *** 1,2 **** --- 1,23 ---- + /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of simspark + Tue May 9 2006 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2007 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 "renderserver.h" *************** *** 6,11 **** ! void CLASS(RenderServer)::DefineClass() { ! DEFINE_BASECLASS(zeitgeist/Leaf); } --- 27,33 ---- ! void ! CLASS(RenderServer)::DefineClass() { ! DEFINE_BASECLASS(kerosin/BaseRenderServer); } Index: renderserver.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/renderserver/renderserver.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** renderserver.cpp 9 Apr 2007 17:02:25 -0000 1.4 --- renderserver.cpp 17 Jun 2007 13:38:31 -0000 1.5 *************** *** 1,28 **** /* -*- 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 "renderserver.h" #include <oxygen/sceneserver/sceneserver.h> #include <oxygen/sceneserver/scene.h> #include <oxygen/sceneserver/camera.h> #include <kerosin/openglserver/openglwrapper.h> #include <kerosin/sceneserver/staticmesh.h> --- 1,28 ---- /* -*- 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 "renderserver.h" #include <oxygen/sceneserver/sceneserver.h> #include <oxygen/sceneserver/scene.h> #include <oxygen/sceneserver/camera.h> + #include <oxygen/physicsserver/spherecollider.h> #include <kerosin/openglserver/openglwrapper.h> #include <kerosin/sceneserver/staticmesh.h> *************** *** 39,43 **** static GLuint gSelectBuffer[4096]; ! RenderServer::RenderServer() : Leaf() { mAmbientColor = RGBA(0.0,0.0,0.0,0.0); --- 39,43 ---- static GLuint gSelectBuffer[4096]; ! RenderServer::RenderServer() : BaseRenderServer() { mAmbientColor = RGBA(0.0,0.0,0.0,0.0); *************** *** 48,95 **** } - RenderServer::~RenderServer() - { - } - - void - RenderServer::OnLink() - { - // setup SceneServer reference - RegisterCachedPath(mSceneServer, "/sys/server/scene"); - - if (mSceneServer.expired()) - { - GetLog()->Error() - << "(RenderServer) ERROR: SceneServer not found\n"; - } - } - - void - RenderServer::OnUnlink() - { - mActiveScene.reset(); - Leaf::OnUnlink(); - } - - bool - RenderServer::GetActiveScene() - { - if (mSceneServer.expired()) - { - mActiveScene.reset(); - } - - mActiveScene = mSceneServer->GetActiveScene(); - - if (mActiveScene.get() == 0) - { - GetLog()->Error() << - "(RenderServer) ERROR: found no active scene\n"; - return false; - } - - return true; - } - void RenderServer::PreparePicking() --- 48,51 ---- *************** *** 107,113 **** if (! GetActiveScene()) ! { ! return; ! } // get a camera to render with --- 63,69 ---- if (! GetActiveScene()) ! { ! return; ! } // get a camera to render with *************** *** 116,124 **** if (camera.get() == 0) ! { ! GetLog()->Error() ! << "(RenderServer) ERROR: found no camera node in the active scene\n"; ! return; ! } glClearColor( --- 72,80 ---- if (camera.get() == 0) ! { ! GetLog()->Error() ! << "(RenderServer) ERROR: found no camera node in the active scene\n"; ! return; ! } glClearColor( *************** *** 147,168 **** if (lights.size() == 0) ! { ! // no lights in the scene, disable lighting ! glDisable(GL_LIGHTING); ! } else ! { ! glEnable(GL_LIGHTING); ! glShadeModel (GL_SMOOTH); ! // prepare all lights ! for ( ! TLeafList::iterator iter = lights.begin(); ! iter != lights.end(); ! ++iter ! ) ! { ! (shared_static_cast<Light>(*iter))->Prepare(); ! } ! } // standard rendering --- 103,125 ---- if (lights.size() == 0) ! { ! // no lights in the scene, disable lighting ! glDisable(GL_LIGHTING); ! } ! else ! { ! glEnable(GL_LIGHTING); ! glShadeModel (GL_SMOOTH); ! // prepare all lights ! for ( ! TLeafList::iterator iter = lights.begin(); ! iter != lights.end(); ! ++iter ! ) ! { ! (shared_static_cast<Light>(*iter))->Prepare(); ! } ! } // standard rendering *************** *** 173,179 **** if (mEnablePicking) ! { ! ProcessPicks(); ! } } --- 130,198 ---- if (mEnablePicking) ! { ! ProcessPicks(); ! } ! } ! ! ! int ! RenderServer::Width() const ! { ! if (mActiveScene.get() == 0) return 0; ! ! // get camera ! shared_ptr<Camera> camera = ! shared_static_cast<Camera>(mActiveScene->GetChildOfClass("Camera", true)); ! ! if (camera.get() == 0) ! { ! GetLog()->Error() ! << "(RenderServer) ERROR: found no camera node in the active scene\n"; ! return 0; ! } ! return camera->GetViewportWidth(); ! } ! ! int ! RenderServer::Height() const ! { ! if (mActiveScene.get() == 0) return 0; ! ! // get camera ! shared_ptr<Camera> camera = ! shared_static_cast<Camera>(mActiveScene->GetChildOfClass("Camera", true)); ! ! if (camera.get() == 0) ! { ! GetLog()->Error() ! << "(RenderServer) ERROR: found no camera node in the active scene\n"; ! return 0; ! } ! return camera->GetViewportHeight(); ! } ! ! bool ! RenderServer::CopyFrame(char* buffer) const ! { ! if (mActiveScene.get() == 0) return false; ! glReadPixels(0,0,Width()-1,Height()-1,GL_RGB,GL_UNSIGNED_BYTE,buffer); ! ! size_t len = Width() * 3; ! uint8_t* line = new uint8_t[len]; /* one line of packed RGB pixels */ ! ! unsigned char* a; ! unsigned char* b; ! ! for (int y = 0; y < Height() >> 1; ++y) ! { ! a = ( unsigned char * ) & buffer[y * len]; ! b = ( unsigned char * ) & buffer[(Height() - ( y + 1 )) * len]; ! ! memcpy(line, a, len); ! memcpy(a, b, len); ! memcpy(b, line, len); ! } ! delete[] line; ! return true; } *************** *** 212,216 **** ptr += names+2; } - mPickedNode.reset(); for (;;) --- 231,234 ---- *************** *** 237,241 **** RenderServer::RenderScene(boost::shared_ptr<BaseNode> node) { ! // test for and render using a RenderNode shared_ptr<RenderNode> renderNode = shared_dynamic_cast<RenderNode>(node); if (renderNode.get() != 0) --- 255,265 ---- RenderServer::RenderScene(boost::shared_ptr<BaseNode> node) { ! #if 0 ! shared_ptr<SphereCollider> collider = shared_dynamic_cast<SphereCollider>(node); ! if (collider != 0) ! { ! std::cerr << "RenderScene (spherecollider radius: " << collider->GetRadius() << ")\n"; ! } ! #endif shared_ptr<RenderNode> renderNode = shared_dynamic_cast<RenderNode>(node); if (renderNode.get() != 0) *************** *** 253,257 **** glMultMatrixf(node->GetWorldTransform().m); ! renderNode->RenderInternal(); if (mEnablePicking) --- 277,287 ---- glMultMatrixf(node->GetWorldTransform().m); ! renderNode->RenderInternal(); ! ! if (mEnablePicking) ! { ! // pop name from OpenGL name stack ! glPopName(); ! } if (mEnablePicking) *************** *** 266,278 **** // traverse the the hierarchy for (TLeafList::iterator i = node->begin(); i!= node->end(); ++i) { ! shared_ptr<BaseNode> node = shared_dynamic_cast<BaseNode>(*i); ! if (node.get() == 0) ! { ! continue; ! } ! ! RenderScene(node); } } --- 296,308 ---- // traverse the the hierarchy for (TLeafList::iterator i = node->begin(); i!= node->end(); ++i) + { + shared_ptr<BaseNode> node = shared_dynamic_cast<BaseNode>(*i); + if (node.get() == 0) { ! continue; } + + RenderScene(node); + } } *************** *** 324,328 **** } ! void RenderServer::SetAmbientColor(const RGBA& ambient) { mAmbientColor = ambient; --- 354,359 ---- } ! void ! RenderServer::SetAmbientColor(const RGBA& ambient) { mAmbientColor = ambient; --- NEW FILE: baserenderserver_c.cpp --- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- this file is part of simspark Tue May 9 2006 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2007 RoboCup Soccer Server 3D Maintenance Group $Id: baserenderserver_c.cpp,v 1.2 2007/06/17 13:38:31 fruit Exp $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "baserenderserver.h" #include <oxygen/sceneserver/sceneserver.h> using namespace boost; using namespace kerosin; using namespace zeitgeist; void CLASS(BaseRenderServer)::DefineClass() { DEFINE_BASECLASS(zeitgeist/Leaf); } Index: rendercontrol.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/renderserver/rendercontrol.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** rendercontrol.cpp 15 Mar 2007 07:26:26 -0000 1.2 --- rendercontrol.cpp 17 Jun 2007 13:38:31 -0000 1.3 *************** *** 21,24 **** --- 21,25 ---- #include "customrender.h" #include <zeitgeist/logserver/logserver.h> + #include <oxygen/sceneserver/sceneserver.h> using namespace kerosin; *************** *** 56,60 **** } ! void RenderControl::RenderCustom() { // get list of registered CustomMonitor objects --- 57,62 ---- } ! void ! RenderControl::RenderCustom() { // get list of registered CustomMonitor objects *************** *** 67,74 **** ++iter ) ! { ! shared_static_cast<CustomRender>((*iter)) ! ->Render(); ! } } --- 69,75 ---- ++iter ) ! { ! shared_static_cast<CustomRender>((*iter))->Render(); ! } } *************** *** 79,85 **** (mRenderServer.expired()) ) ! { ! return; ! } // update the window (pumps event loop, etc..) and render the --- 80,86 ---- (mRenderServer.expired()) ) ! { ! return; ! } // update the window (pumps event loop, etc..) and render the *************** *** 92,96 **** } ! int RenderControl::GetFramesRendered() { return mFramesRendered; --- 93,98 ---- } ! int ! RenderControl::GetFramesRendered() const { return mFramesRendered; Index: rendercontrol.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/renderserver/rendercontrol.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** rendercontrol.h 15 Mar 2007 07:26:26 -0000 1.2 --- rendercontrol.h 17 Jun 2007 13:38:31 -0000 1.3 *************** *** 22,26 **** #include <oxygen/simulationserver/simcontrolnode.h> ! #include <kerosin/renderserver/renderserver.h> #include <kerosin/openglserver/openglserver.h> --- 22,26 ---- #include <oxygen/simulationserver/simcontrolnode.h> ! #include <kerosin/renderserver/baserenderserver.h> #include <kerosin/openglserver/openglserver.h> *************** *** 38,42 **** /** returns the total number of rendered frames */ ! int GetFramesRendered(); /** renders the scene at the end of each simulation cycle */ --- 38,42 ---- /** returns the total number of rendered frames */ ! int GetFramesRendered() const; /** renders the scene at the end of each simulation cycle */ *************** *** 49,53 **** protected: /** cached reference to the RenderServer */ ! CachedPath<kerosin::RenderServer> mRenderServer; /** cached reference to the OpenGLServer */ --- 49,53 ---- protected: /** cached reference to the RenderServer */ ! CachedPath<kerosin::BaseRenderServer> mRenderServer; /** cached reference to the OpenGLServer */ Index: renderserver.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/renderserver/renderserver.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** renderserver.h 9 Apr 2007 17:02:25 -0000 1.4 --- renderserver.h 17 Jun 2007 13:38:31 -0000 1.5 *************** *** 20,27 **** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - 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. - RenderServer --- 20,23 ---- *************** *** 39,57 **** #define KEROSIN_RENDERSERVER_H #include <salt/frustum.h> - #include <zeitgeist/class.h> - #include <zeitgeist/leaf.h> #include <oxygen/sceneserver/sceneserver.h> #include <kerosin/openglserver/glbase.h> #include <kerosin/openglserver/openglwrapper.h> - namespace oxygen - { - class Scene; - class SceneServer; - class Camera; - class BaseNode; - } - namespace kerosin { --- 35,45 ---- #define KEROSIN_RENDERSERVER_H + #include "baserenderserver.h" + #include <salt/frustum.h> #include <oxygen/sceneserver/sceneserver.h> #include <kerosin/openglserver/glbase.h> #include <kerosin/openglserver/openglwrapper.h> namespace kerosin { *************** *** 59,63 **** class RenderNode; ! class RenderServer : public zeitgeist::Leaf { // --- 47,51 ---- class RenderNode; ! class RenderServer : public BaseRenderServer { // *************** *** 69,76 **** public: RenderServer(); ! ~RenderServer(); //! display the current active scene ! void Render(); //! render the scene with fancy lighting --- 57,71 ---- public: RenderServer(); ! virtual ~RenderServer() {} //! display the current active scene ! virtual void Render(); ! ! //! @return the width of the current view ! virtual int Width() const; ! //! @return the width of the height view ! virtual int Height() const; ! //! Read the current screen content into a buffer ! bool CopyFrame(char* buffer) const; //! render the scene with fancy lighting *************** *** 96,108 **** protected: - /** get the active scene node from the sceneServer */ - bool RenderServer::GetActiveScene(); - - /** set up SceneServer reference */ - virtual void OnLink(); - - /** reset SceneServer reference */ - virtual void OnUnlink(); - /** render a scene recursively. \param node the scene base node --- 91,94 ---- *************** *** 126,132 **** // protected: - /** reference to the current active scene */ - boost::shared_ptr<oxygen::Scene> mActiveScene; - /** reference to the SceneServer */ CachedPath<oxygen::SceneServer> mSceneServer; --- 112,115 ---- *************** *** 146,153 **** /** the picking position in OpenGL window coordinates */ salt::Vector2f mPickAt; - /** the pick radius around mPickAt */ double mPickRange; - /** the picked result node */ boost::weak_ptr<RenderNode> mPickedNode; --- 129,134 ---- Index: rendercontrol_c.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/renderserver/rendercontrol_c.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** rendercontrol_c.cpp 5 Dec 2005 21:38:23 -0000 1.1 --- rendercontrol_c.cpp 17 Jun 2007 13:38:31 -0000 1.2 *************** *** 19,22 **** --- 19,23 ---- */ #include "rendercontrol.h" + #include <oxygen/sceneserver/sceneserver.h> using namespace kerosin; |
From: Oliver O. <fr...@us...> - 2007-06-17 13:39:37
|
Update of /cvsroot/simspark/simspark/spark/kerosin/sceneserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21072/kerosin/sceneserver Modified Files: axis.cpp light.cpp staticmesh.cpp staticmesh.h staticmesh_c.cpp Log Message: merge from projectx branch Index: axis.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/sceneserver/axis.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** axis.cpp 15 Apr 2007 12:19:53 -0000 1.4 --- axis.cpp 17 Jun 2007 13:38:31 -0000 1.5 *************** *** 1,22 **** /* -*- 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 "axis.h" --- 1,22 ---- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of simspark ! Fri May 9 2003 ! Copyright (C) 2002,2003 Koblenz University ! 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 "axis.h" Index: light.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/sceneserver/light.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** light.cpp 15 Mar 2007 07:26:26 -0000 1.2 --- light.cpp 17 Jun 2007 13:38:31 -0000 1.3 *************** *** 27,31 **** #include <zeitgeist/logserver/logserver.h> #include <kerosin/openglserver/openglwrapper.h> - #include <kerosin/renderserver/renderserver.h> using namespace boost; --- 27,30 ---- Index: staticmesh.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/sceneserver/staticmesh.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** staticmesh.cpp 15 Mar 2007 07:26:26 -0000 1.3 --- staticmesh.cpp 17 Jun 2007 13:38:31 -0000 1.4 *************** *** 33,37 **** using namespace oxygen; ! StaticMesh::StaticMesh() : mScale(1.0f,1.0f,1.0f) { } --- 33,41 ---- using namespace oxygen; ! StaticMesh::StaticMesh() : mScale(1.0f,1.0f,1.0f), ! mCastShadows(true), ! mUseExternalMesh(false), ! mExternalMeshName(""), ! mExternalMeshScale(1.0f,1.0f,1.0f) { } *************** *** 228,229 **** --- 232,288 ---- } + + /** returns the materials used to render the mesh */ + const StaticMesh::TMaterialList& + StaticMesh::GetMaterials() const + { + return mMaterials; + } + + bool + StaticMesh::CastShadows() const + { + return mCastShadows; + } + + void + StaticMesh::SetCastShadows(bool shadows) + { + mCastShadows = shadows; + } + + void + StaticMesh::SetUseExternalMesh(bool external) + { + mUseExternalMesh = external; + } + + bool + StaticMesh::UseExternalMesh() const + { + return mUseExternalMesh; + } + + void + StaticMesh::SetExternalMeshName(const std::string& name) + { + mExternalMeshName = name; + } + + const std::string& + StaticMesh::GetExternalMeshName() const + { + return mExternalMeshName; + } + + void + StaticMesh::SetExternalMeshScale(const salt::Vector3f& scale) + { + mExternalMeshScale = scale; + } + + const salt::Vector3f& + StaticMesh::ExternalMeshScale() const + { + return mExternalMeshScale; + } Index: staticmesh_c.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/sceneserver/staticmesh_c.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** staticmesh_c.cpp 5 Dec 2005 21:38:23 -0000 1.1 --- staticmesh_c.cpp 17 Jun 2007 13:38:31 -0000 1.2 *************** *** 54,63 **** if ( ! (in.GetSize() == 0) || ! (! in.GetValue(in[0], inScale)) ) ! { ! return false; ! } obj->SetScale(inScale); --- 54,63 ---- if ( ! (in.GetSize() != 3) || ! (! in.GetValue(in.begin(), inScale)) ) ! { ! return false; ! } obj->SetScale(inScale); *************** *** 65,68 **** --- 65,133 ---- } + FUNCTION(StaticMesh,setCastShadows) + { + bool shadows; + + if ( + (in.GetSize() != 1) || + (! in.GetValue(in[0], shadows)) + ) + { + return false; + } + + obj->SetCastShadows(shadows); + return true; + } + + FUNCTION(StaticMesh,setUseExternalMesh) + { + bool external; + + if ( + (in.GetSize() != 1) || + (! in.GetValue(in[0], external)) + ) + { + return false; + } + + obj->SetUseExternalMesh(external); + return true; + } + + + FUNCTION(StaticMesh,setExternalMeshName) + { + std::string name; + + if ( + (in.GetSize() != 1) || + (! in.GetValue(in[0], name)) + ) + { + return false; + } + obj->SetExternalMeshName(name); + return true; + } + + FUNCTION(StaticMesh,setExternalMeshScale) + { + Vector3f inScale; + std::cerr << "*********************************************************************************\n"; + if ( + (in.GetSize() != 3) || + (! in.GetValue(in.begin(), inScale)) + ) + { + return false; + } + std::cerr << "setting External Mesh scale to " << inScale << "\n*********************************************************************************\n"; + + obj->SetExternalMeshScale(inScale); + return true; + } + void CLASS(StaticMesh)::DefineClass() { *************** *** 70,72 **** --- 135,141 ---- DEFINE_FUNCTION(load); DEFINE_FUNCTION(setScale); + DEFINE_FUNCTION(setCastShadows) + DEFINE_FUNCTION(setUseExternalMesh) + DEFINE_FUNCTION(setExternalMeshName) + DEFINE_FUNCTION(setExternalMeshScale) } Index: staticmesh.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/sceneserver/staticmesh.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** staticmesh.h 5 Dec 2005 21:38:23 -0000 1.1 --- staticmesh.h 17 Jun 2007 13:38:31 -0000 1.2 *************** *** 42,46 **** public: typedef std::vector<oxygen::IndexBuffer> TIndexBuffers; ! // // Function --- 42,46 ---- public: typedef std::vector<oxygen::IndexBuffer> TIndexBuffers; ! typedef std::vector<boost::shared_ptr<Material> > TMaterialList; // // Function *************** *** 83,86 **** --- 83,126 ---- const zeitgeist::ParameterList& GetMeshParameter(); + /** returns the materials used to render the mesh */ + const TMaterialList& GetMaterials() const; + + /** a hint for the graphics engine if the mesh casts shadows or now. + By default, StaticMeshes cast shadows. The respective graphics engine + might ignore this flag if the GE cannot cast shadows. + */ + bool CastShadows() const; + + /** set the flag if the mesh should cast shadows or not. + The actual graphics engine might ignore this flag if it cannot render + shadows or disables shadows globally. + */ + void SetCastShadows(bool shadows); + + /** Set the flag if the GE should use an external mesh for rendering. + By default, using external meshes is switched off. For this to work, + the external mesh name has to be set. + */ + void SetUseExternalMesh(bool external = true); + /** Get the flag if the GE should use an external mesh for rendering. + If set to true, the GE can use a different (possibly more advanced) + mesh. The hint for the kind of external mesh should be given by the + Get/SetExternalMeshName() methods of this class. + */ + bool UseExternalMesh() const; + /** Set the name of the external mesh. + \string name the external mesh name + */ + void SetExternalMeshName(const std::string& name); + /** Get the name of the external mesh to use. + \return the name + */ + const std::string& GetExternalMeshName() const; + //! Set an additional scale for the external mesh + void SetExternalMeshScale(const salt::Vector3f& scale); + /** Get the external mesh scale. + @return the external mesh scale */ + const salt::Vector3f& ExternalMeshScale() const; + // // Members *************** *** 94,98 **** /** the materials used to render the mesh */ ! std::vector<boost::shared_ptr<Material> > mMaterials; /** the name of the loaded mesh */ --- 134,138 ---- /** the materials used to render the mesh */ ! TMaterialList mMaterials; /** the name of the loaded mesh */ *************** *** 101,104 **** --- 141,154 ---- /** the list of parameters the mesh was loaded with */ zeitgeist::ParameterList mMeshParameter; + + //! the flag if the mesh should cast shadows + bool mCastShadows; + + //! the flag if the GE can use an external mesh + bool mUseExternalMesh; + //! the external mesh name + std::string mExternalMeshName; + //! additional scale factors along each axis for external meshes + salt::Vector3f mExternalMeshScale; }; |
From: Oliver O. <fr...@us...> - 2007-06-17 13:39:37
|
Update of /cvsroot/simspark/simspark/spark/kerosin In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21072/kerosin Modified Files: Makefile.am kerosin.cpp kerosin.h kerosin.rb Log Message: merge from projectx branch Index: kerosin.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/kerosin.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** kerosin.cpp 15 Mar 2007 07:26:25 -0000 1.2 --- kerosin.cpp 17 Jun 2007 13:38:29 -0000 1.3 *************** *** 42,45 **** --- 42,46 ---- zg.GetCore()->RegisterClassObject(new CLASS(OpenGLServer), "kerosin/"); zg.GetCore()->RegisterClassObject(new CLASS(OpenGLSystem), "kerosin/"); + zg.GetCore()->RegisterClassObject(new CLASS(BaseRenderServer), "kerosin/"); zg.GetCore()->RegisterClassObject(new CLASS(RenderServer), "kerosin/"); zg.GetCore()->RegisterClassObject(new CLASS(RenderControl), "kerosin/"); *************** *** 50,54 **** --- 51,57 ---- zg.GetCore()->RegisterClassObject(new CLASS(Material), "kerosin/"); zg.GetCore()->RegisterClassObject(new CLASS(Material2DTexture), "kerosin/"); + zg.GetCore()->RegisterClassObject(new CLASS(MaterialExternal), "kerosin/"); zg.GetCore()->RegisterClassObject(new CLASS(MaterialSolid), "kerosin/"); + zg.GetCore()->RegisterClassObject(new CLASS(MaterialExporter), "kerosin/"); // scene graph *************** *** 61,64 **** --- 64,68 ---- zg.GetCore()->RegisterClassObject(new CLASS(Sphere), "kerosin/"); + // std::cerr << "Kerosin run init script\n"; // load default setting zg.GetCore()->GetRoot()->GetScript()->RunInitScript Index: Makefile.am =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/Makefile.am,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Makefile.am 15 Mar 2007 07:26:25 -0000 1.7 --- Makefile.am 17 Jun 2007 13:38:29 -0000 1.8 *************** *** 3,7 **** pkglib_LTLIBRARIES = libkerosin_debug.la libkerosin_debug_la_SOURCES = $(sources) - # nodist_libkerosin_debug_la_SOURCES = openglserver/glextensionreg.cpp libkerosin_debug_la_CXXFLAGS = -O -g -W -Wall libkerosin_debug_la_LIBADD = @FREETYPE_LIBADD@ @SDL_LIBADD@ @IL_LIBADD@ @GL_LIBADD@ --- 3,6 ---- *************** *** 10,14 **** pkglib_LTLIBRARIES = libkerosin.la libkerosin_la_SOURCES = $(sources) - # nodist_libkerosin_la_SOURCES = openglserver/glextensionreg.cpp libkerosin_la_CXXFLAGS = -O2 libkerosin_la_LIBADD = @FREETYPE_LIBADD@ @SDL_LIBADD@ @IL_LIBADD@ @GL_LIBADD@ --- 9,12 ---- *************** *** 18,33 **** bin_SCRIPTS = kerosin-config - # BUILT_SOURCES = openglserver/glextensionreg.h - # nobase_nodist_libpkginclude_HEADERS = openglserver/glextensionreg.h - - # openglserver/glextensionreg.cpp: ${top_srcdir}/utility/glextgen/glextensionreg.cpp - # @echo "Copying generated glextension sources" - # cp ${top_srcdir}/utility/glextgen/glextensionreg.cpp $@ - - # openglserver/glextensionreg.h: ${top_srcdir}/utility/glextgen/glextensionreg.h - # cp ${top_srcdir}/utility/glextgen/glextensionreg.h $@ - - # ${top_srcdir}/utility/glextgen/glextensionreg.cpp ${top_srcdir}/utility/glextgen/glextensionreg.h: - # cd ${top_srcdir}/utility/glextgen/ && $(MAKE) $(AM_MAKEFLAGS) all endif --- 16,19 ---- *************** *** 68,75 **** --- 54,64 ---- materialserver/material2dtexture.cpp \ materialserver/material2dtexture_c.cpp \ + materialserver/materialexternal.cpp \ + materialserver/materialexternal_c.cpp \ materialserver/materialsolid.cpp \ materialserver/materialsolid_c.cpp \ materialserver/materialserver.cpp \ materialserver/materialserver_c.cpp \ + materialserver/materialexporter_c.cpp \ sceneserver/axis.cpp \ sceneserver/axis_c.cpp \ *************** *** 97,100 **** --- 86,91 ---- openglserver/openglserver_c.cpp \ openglserver/openglsystem_c.cpp \ + renderserver/baserenderserver.cpp \ + renderserver/baserenderserver_c.cpp \ renderserver/renderserver.cpp \ renderserver/renderserver_c.cpp \ *************** *** 128,132 **** --- 119,125 ---- sceneserver/helper/nv_math/nv_mathdecl.h \ materialserver/material2dtexture.h \ + materialserver/materialexternal.h \ materialserver/materialsolid.h \ + materialserver/materialexporter.h \ sceneserver/singlematnode.h \ sceneserver/light.h \ *************** *** 148,151 **** --- 141,145 ---- openglserver/openglserver.h \ openglserver/glbase.h \ + renderserver/baserenderserver.h \ renderserver/renderserver.h \ renderserver/rendernode.h \ Index: kerosin.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/kerosin.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** kerosin.h 15 Mar 2007 07:26:25 -0000 1.2 --- kerosin.h 17 Jun 2007 13:38:29 -0000 1.3 *************** *** 53,57 **** --- 53,59 ---- #include "materialserver/material.h" #include "materialserver/material2dtexture.h" + #include "materialserver/materialexternal.h" #include "materialserver/materialsolid.h" + #include "materialserver/materialexporter.h" // scene graph Index: kerosin.rb =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/kerosin.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** kerosin.rb 2 Jan 2006 20:39:41 -0000 1.1 --- kerosin.rb 17 Jun 2007 13:38:29 -0000 1.2 *************** *** 13,17 **** # ! createVariable('Application.Title', 'Kerosin'); --- 13,17 ---- # ! createVariable('Application.Title', 'SimSpark'); |
From: Oliver O. <fr...@us...> - 2007-06-17 13:39:37
|
Update of /cvsroot/simspark/simspark/spark/kerosin/imageserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21072/kerosin/imageserver Modified Files: image.h imageserver.h Log Message: merge from projectx branch Index: imageserver.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/imageserver/imageserver.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** imageserver.h 8 Mar 2006 09:18:56 -0000 1.2 --- imageserver.h 17 Jun 2007 13:38:30 -0000 1.3 *************** *** 24,28 **** #ifdef HAVE_CONFIG_H ! #include <config.h> #endif #ifdef HAVE_IL_IL_H --- 24,28 ---- #ifdef HAVE_CONFIG_H ! #include <sparkconfig.h> #endif #ifdef HAVE_IL_IL_H Index: image.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/imageserver/image.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** image.h 8 Mar 2006 09:18:56 -0000 1.2 --- image.h 17 Jun 2007 13:38:30 -0000 1.3 *************** *** 33,37 **** */ #ifdef HAVE_CONFIG_H ! #include <config.h> #endif #ifdef HAVE_IL_IL_H --- 33,37 ---- */ #ifdef HAVE_CONFIG_H ! #include <sparkconfig.h> #endif #ifdef HAVE_IL_IL_H |
From: Oliver O. <fr...@us...> - 2007-06-17 13:39:37
|
Update of /cvsroot/simspark/simspark/spark/oxygen In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21072/oxygen Modified Files: Makefile.am oxygen.cpp oxygen.h Log Message: merge from projectx branch Index: oxygen.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/oxygen.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** oxygen.h 14 Apr 2006 16:27:26 -0000 1.2 --- oxygen.h 17 Jun 2007 13:38:31 -0000 1.3 *************** *** 75,78 **** --- 75,79 ---- #include "geometryserver/geometryserver.h" + #include "geometryserver/meshexporter.h" #include "geometryserver/meshimporter.h" #include "geometryserver/stdmeshimporter.h" Index: oxygen.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/oxygen.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** oxygen.cpp 14 Apr 2006 16:27:26 -0000 1.2 --- oxygen.cpp 17 Jun 2007 13:38:31 -0000 1.3 *************** *** 46,49 **** --- 46,50 ---- // geometry zg.GetCore()->RegisterClassObject(new CLASS(GeometryServer), "oxygen/"); + zg.GetCore()->RegisterClassObject(new CLASS(MeshExporter), "oxygen/"); zg.GetCore()->RegisterClassObject(new CLASS(MeshImporter), "oxygen/"); zg.GetCore()->RegisterClassObject(new CLASS(StdMeshImporter), "oxygen/"); Index: Makefile.am =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/Makefile.am,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Makefile.am 17 May 2007 17:49:23 -0000 1.5 --- Makefile.am 17 Jun 2007 13:38:31 -0000 1.6 *************** *** 150,153 **** --- 150,154 ---- geometryserver/geometryserver.cpp \ geometryserver/geometryserver_c.cpp \ + geometryserver/meshexporter_c.cpp \ geometryserver/meshimporter.cpp \ geometryserver/meshimporter_c.cpp \ *************** *** 223,226 **** --- 224,228 ---- simulationserver/netbuffer.h \ geometryserver/geometryserver.h \ + geometryserver/meshexporter.h \ geometryserver/meshimporter.h \ geometryserver/stdmeshimporter.h \ |
From: Oliver O. <fr...@us...> - 2007-06-17 13:39:37
|
Update of /cvsroot/simspark/simspark/spark/plugin/inputsdl In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21072/plugin/inputsdl Modified Files: inputsystemsdl.cpp Log Message: merge from projectx branch Index: inputsystemsdl.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/plugin/inputsdl/inputsystemsdl.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** inputsystemsdl.cpp 8 Jan 2006 14:06:59 -0000 1.3 --- inputsystemsdl.cpp 17 Jun 2007 13:38:33 -0000 1.4 *************** *** 26,29 **** --- 26,30 ---- #include <zeitgeist/logserver/logserver.h> #include <SDL/SDL_thread.h> + #include <SDL/SDL_syswm.h> #include "timersdl.h" *************** *** 80,89 **** // input is part of the video subsystem (because of event loops, etc..) if (!SDL_WasInit(SDL_INIT_VIDEO)) { ! GetLog()->Error() ! << "ERROR: (InputSystemSDL) SDL not initialized!" ! << std::endl; return false; } // we need a mutex object --- 81,107 ---- // 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); + SDL_GetWMInfo(&pInfo); + + // Also, SDL keeps an internal record of the window size + // and position. Because SDL does not own the window, it + // missed the WM_POSCHANGED message and has no record of + // either size or position. It defaults to {0, 0, 0, 0}, + // which is then used to trap the mouse "inside the + // window". We have to fake a window-move to allow SDL + // to catch up, after which we can safely grab input. + // RECT r; + // GetWindowRect(pInfo.window, &r); + // SetWindowPos(pInfo.window, 0, r.left, r.top, 0, 0, SWP_NOMOVE | SWP_NOSIZE); + SDL_WM_GrabInput(SDL_GRAB_ON); + } // we need a mutex object *************** *** 177,181 **** bool ret = InputSystem::GetInput(input); SDL_UnlockMutex(mMutex); - return ret; } --- 195,198 ---- |
From: Oliver O. <fr...@us...> - 2007-06-17 13:39:37
|
Update of /cvsroot/simspark/simspark/spark/oxygen/simulationserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21072/oxygen/simulationserver Modified Files: simulationserver.cpp Log Message: merge from projectx branch Index: simulationserver.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/simulationserver/simulationserver.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** simulationserver.cpp 15 Jun 2007 09:25:39 -0000 1.5 --- simulationserver.cpp 17 Jun 2007 13:38:32 -0000 1.6 *************** *** 36,44 **** { if (sig_num == SIGINT) ! { ! signal(SIGINT, CatchSignal); ! SimulationServer::mExit = true; ! std::cout << "(SimulationServer) caught SIGINT. exiting.\n"; ! } } --- 36,44 ---- { if (sig_num == SIGINT) ! { ! signal(SIGINT, CatchSignal); ! SimulationServer::mExit = true; ! std::cerr << "(SimulationServer) caught SIGINT. exiting.\n"; ! } } *************** *** 188,213 **** (mGameControlServer.expired()) ) ! { ! return; ! } if (mSimStep > 0) { ! // world is stepped in discrete steps ! while (mSumDeltaTime >= mSimStep) ! { ! mSceneServer->Update(mSimStep); ! mGameControlServer->Update(mSimStep); ! mSumDeltaTime -= mSimStep; ! mSimTime += mSimStep; ! } ! } else ! { ! // simulate passed time in one single step ! mSceneServer->Update(mSumDeltaTime); ! mGameControlServer->Update(mSumDeltaTime); ! mSimTime += mSumDeltaTime; ! mSumDeltaTime = 0; ! } } --- 188,213 ---- (mGameControlServer.expired()) ) ! { ! return; ! } if (mSimStep > 0) + { + // world is stepped in discrete steps + while (mSumDeltaTime >= mSimStep) { ! mSceneServer->Update(mSimStep); ! mGameControlServer->Update(mSimStep); ! mSumDeltaTime -= mSimStep; ! mSimTime += mSimStep; ! } ! } else ! { ! // simulate passed time in one single step ! mSceneServer->Update(mSumDeltaTime); ! mGameControlServer->Update(mSumDeltaTime); ! mSimTime += mSumDeltaTime; ! mSumDeltaTime = 0; ! } } *************** *** 282,288 **** while (! mExit) ! { ! Cycle(); ! } Done(); --- 282,288 ---- while (! mExit) ! { ! Cycle(); ! } Done(); *************** *** 298,304 **** if (mAutoTime) ! { ! AdvanceTime(mSimStep); ! } Step(); --- 298,304 ---- if (mAutoTime) ! { ! AdvanceTime(mSimStep); ! } Step(); |
From: Oliver O. <fr...@us...> - 2007-06-17 13:39:37
|
Update of /cvsroot/simspark/simspark/spark/kerosin/materialserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21072/kerosin/materialserver Modified Files: material2dtexture.cpp material2dtexture.h materialserver.cpp materialserver.h materialserver_c.cpp materialsolid.cpp materialsolid.h materialsolid_c.cpp Added Files: materialexporter.h materialexporter_c.cpp materialexternal.cpp materialexternal.h materialexternal_c.cpp Log Message: merge from projectx branch --- NEW FILE: materialexporter.h --- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- this file is part of simspark Tue May 9 2006 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2007 RoboCup Soccer Server 3D Maintenance Group $Id: materialexporter.h,v 1.2 2007/06/17 13:38:30 fruit Exp $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. MaterialExporter NOTE: This class serves as an (abstract) exporter to register materials with other graphic engines (possibly also for exporting). HISTORY: 03/05/07 - OO - Initial version */ #ifndef KEROSIN_MATERIALEXPORTER_H #define KEROSIN_MATERIALEXPORTER_H #include <zeitgeist/class.h> #include <zeitgeist/node.h> #include "material.h" namespace kerosin { /** \class MaterialExporter. This class can be used to implement custom material server, which needs to be informed about the materials used for a specific simulation. By registering a MaterialExporter implementation to the MaterialServer, materials can be registered (exported) to another class. */ class MaterialExporter : public zeitgeist::Leaf { public: virtual ~MaterialExporter() {} /** Register / Export the given material. \param material the material to register / export. */ virtual void RegisterMaterial(boost::shared_ptr<Material> material) = 0; }; DECLARE_ABSTRACTCLASS(MaterialExporter); } // end namespace kerosin #endif // KEROSIN_MATERIALEXPORTER Index: materialsolid.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/materialserver/materialsolid.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** materialsolid.h 18 Feb 2006 19:41:48 -0000 1.2 --- materialsolid.h 17 Jun 2007 13:38:30 -0000 1.3 *************** *** 1,5 **** /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University --- 1,5 ---- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of simspark Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University *************** *** 64,67 **** --- 64,88 ---- const RGBA& GetEmission() const; + /** a hint for the graphics engine if the depth-buffer should be checked + for this material or not. + @returns true if the depth-check should be enabled for this material + */ + bool DepthCheck() const; + + //! set the flag if the depth-buffer should be checked. + void SetDepthCheck(bool depthCheck); + + /** Set the shininess of the material. + When specular light is reflected, this value determines the size of + the region that appears shiny. + @param val + */ + void SetShininess(float val); + + /** get the shininess of the material. + @return a value representing the shininess. + */ + float GetShininess() const; + protected: /** sets up all lighting material properties */ *************** *** 83,86 **** --- 104,114 ---- /** the emitted light intensity of the material */ RGBA mEmission; + + //! flag if depth-buffer should be checked + bool mDepthCheck; + + //! value for the size of the reflecting region + float mShininess; + }; Index: materialserver.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/materialserver/materialserver.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** materialserver.h 19 Feb 2006 11:10:11 -0000 1.2 --- materialserver.h 17 Jun 2007 13:38:30 -0000 1.3 *************** *** 49,54 **** --- 49,70 ---- boost::shared_ptr<Material> GetMaterial(const std::string &name); + /** Create an instance of a material exporter and register it to the MaterialServer. + A MaterialExporter is a class that takes care to additionally register/export + materials registered at the MaterialServer at another class (potentially + external to spark). This has to be done only when spark/kerosin + rendering alone is not enough. + \param name name of the MaterialExporter class name + \returns true if successful + */ + bool InitMaterialExporter(const std::string& name); + + //! export all registered materials via all registered exporters + void ExportAllMaterial(); + protected: virtual void OnLink(); + + //! export a single material to all registered exporters + void ExportMaterial(boost::shared_ptr<Material> material); }; Index: materialsolid_c.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/materialserver/materialsolid_c.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** materialsolid_c.cpp 5 Dec 2005 21:38:22 -0000 1.1 --- materialsolid_c.cpp 17 Jun 2007 13:38:30 -0000 1.2 *************** *** 1,5 **** /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University --- 1,5 ---- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of simspark Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University *************** *** 43,46 **** --- 43,69 ---- } + #if 0 + static bool + readRGBAVal(const zeitgeist::ParameterList& in, RGBA& m) + { + int r,g,b; + + if ( + (in.GetSize() != 4) || + (! in.GetValue(in[0], r)) || + (! in.GetValue(in[1], g)) || + (! in.GetValue(in[2], b)) || + (! in.GetValue(in[3], m.a())) + ) + { + return false; + } + m.r() = r / 255.0; + m.g() = g / 255.0; + m.b() = b / 255.0; + return true; + } + #endif + FUNCTION(MaterialSolid,setAmbient) { *************** *** 67,70 **** --- 90,107 ---- } + #if 0 + FUNCTION(MaterialSolid,setDiffuseVal) + { + RGBA m; + if (! readRGBAVal(in,m)) + { + return false; + } + + obj->SetDiffuse(m); + return true; + } + #endif + FUNCTION(MaterialSolid,setSpecular) { *************** *** 91,94 **** --- 128,161 ---- } + FUNCTION(MaterialSolid,setDepthCheck) + { + bool depthCheck; + if ( + (in.GetSize() == 0) || + (! in.GetValue(in[0], depthCheck)) + ) + { + return false; + } + + obj->SetDepthCheck(depthCheck); + return true; + } + + FUNCTION(MaterialSolid,setShininess) + { + float val; + if ( + (in.GetSize() == 0) || + (! in.GetValue(in[0], val)) + ) + { + return false; + } + + obj->SetShininess(val); + return true; + } + void CLASS(MaterialSolid)::DefineClass() { *************** *** 96,100 **** --- 163,170 ---- DEFINE_FUNCTION(setAmbient); DEFINE_FUNCTION(setDiffuse); + // DEFINE_FUNCTION(setDiffuseVal); DEFINE_FUNCTION(setSpecular); DEFINE_FUNCTION(setEmission); + DEFINE_FUNCTION(setDepthCheck); + DEFINE_FUNCTION(setShininess); } Index: material2dtexture.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/materialserver/material2dtexture.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** material2dtexture.cpp 15 Mar 2007 07:26:26 -0000 1.2 --- material2dtexture.cpp 17 Jun 2007 13:38:30 -0000 1.3 *************** *** 33,37 **** using namespace std; ! Material2DTexture::Material2DTexture() : MaterialSolid() { } --- 33,38 ---- using namespace std; ! Material2DTexture::Material2DTexture() : MaterialSolid(), ! mTexDiffuseName(""), mTexNormalName(""), mTexSpecularName("") { } *************** *** 41,45 **** } ! bool Material2DTexture::LoadTexture(const std::string& texName, shared_ptr<Texture>& store) { shared_ptr<ScriptServer> scriptServer = GetCore()->GetScriptServer(); --- 42,47 ---- } ! bool ! Material2DTexture::LoadTexture(const std::string& texName, shared_ptr<Texture>& store) { shared_ptr<ScriptServer> scriptServer = GetCore()->GetScriptServer(); *************** *** 50,58 **** if (textureServer.get() == 0) ! { ! GetLog()->Error() ! << "(Material2DTexture) ERROR: cannot find TextureServer\n"; ! return false; ! } store = textureServer->GetTexture(texName); --- 52,60 ---- if (textureServer.get() == 0) ! { ! GetLog()->Error() ! << "(Material2DTexture) ERROR: cannot find TextureServer\n"; ! return false; ! } store = textureServer->GetTexture(texName); *************** *** 60,101 **** } ! bool Material2DTexture::SetDiffuseTexture(const std::string& texName) { return LoadTexture(texName,mTexDiffuse); } ! bool Material2DTexture::SetNormalTexture(const std::string& texName) { return LoadTexture(texName,mTexNormal); } ! bool Material2DTexture::SetSpecularTexture(const std::string& texName) { return LoadTexture(texName,mTexSpecular); } ! void Material2DTexture::Bind() { SetupMaterial(); if (mTexDiffuse.get() != 0) { OpenGLServer::glActiveTextureARB(GL_TEXTURE0_ARB); glEnable(GL_TEXTURE_2D); - mTexDiffuse->Bind(); } if (mTexNormal.get() != 0) { OpenGLServer::glActiveTextureARB(GL_TEXTURE1_ARB); glEnable(GL_TEXTURE_2D); - mTexNormal->Bind(); } if (mTexSpecular.get() != 0) { OpenGLServer::glActiveTextureARB(GL_TEXTURE2_ARB); glEnable(GL_TEXTURE_2D); - mTexSpecular->Bind(); } } --- 62,160 ---- } ! bool ! Material2DTexture::SetDiffuseTexture(const std::string& texName) { + mTexDiffuseName = texName; return LoadTexture(texName,mTexDiffuse); } ! const std::string& ! Material2DTexture::GetDiffuseTextureName() const ! { ! return mTexDiffuseName; ! } ! ! bool ! Material2DTexture::HasDiffuseTexture() const ! { ! return (!mTexDiffuseName.empty() && mTexDiffuse.get() != 0); ! } ! ! bool ! Material2DTexture::SetNormalTexture(const std::string& texName) { + mTexNormalName = texName; return LoadTexture(texName,mTexNormal); } ! const std::string& ! Material2DTexture::GetNormalTextureName() const { + return mTexNormalName; + } + + bool + Material2DTexture::HasNormalTexture() const + { + return (!mTexNormalName.empty() && mTexNormal.get() != 0); + } + + bool + Material2DTexture::SetSpecularTexture(const std::string& texName) + { + mTexSpecularName = texName; return LoadTexture(texName,mTexSpecular); } ! const std::string& ! Material2DTexture::GetSpecularTextureName() const { + return mTexSpecularName; + } + + bool + Material2DTexture::HasSpecularTexture() const + { + return (!mTexSpecularName.empty() && mTexSpecular.get() != 0); + } + + void + Material2DTexture::Bind() + { + shared_ptr<OpenGLServer> openGLServer = + shared_dynamic_cast<OpenGLServer>(GetCore()->Get("/sys/server/opengl")); + + bool use_gl = ((openGLServer.get() != 0) && (!openGLServer->IsGLLocked())); + SetupMaterial(); if (mTexDiffuse.get() != 0) + { + if (use_gl) { OpenGLServer::glActiveTextureARB(GL_TEXTURE0_ARB); glEnable(GL_TEXTURE_2D); } + mTexDiffuse->Bind(); + } if (mTexNormal.get() != 0) + { + if (use_gl) { OpenGLServer::glActiveTextureARB(GL_TEXTURE1_ARB); glEnable(GL_TEXTURE_2D); } + mTexNormal->Bind(); + } if (mTexSpecular.get() != 0) + { + if (use_gl) { OpenGLServer::glActiveTextureARB(GL_TEXTURE2_ARB); glEnable(GL_TEXTURE_2D); } + mTexSpecular->Bind(); + } } --- NEW FILE: materialexternal_c.cpp --- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- this file is part of simspark Wed May 9 2007 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group $Id: materialexternal_c.cpp,v 1.2 2007/06/17 13:38:30 fruit Exp $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "materialexternal.h" using namespace zeitgeist; using namespace kerosin; using namespace salt; using namespace boost; FUNCTION(MaterialExternal,setReference) { std::string name; if ( (in.GetSize() == 0) || (! in.GetValue(in[0], name)) ) { return false; } obj->SetReference(name); return true; } void CLASS(MaterialExternal)::DefineClass() { DEFINE_BASECLASS(kerosin/MaterialSolid); DEFINE_FUNCTION(setReference); } --- NEW FILE: materialexternal.h --- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- this file is part of simspark Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group $Id: materialexternal.h,v 1.2 2007/06/17 13:38:30 fruit Exp $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef KEROSIN_MATERIALEXTERNAL_H #define KEROSIN_MATERIALEXTERNAL_H #include "materialsolid.h" namespace kerosin { class MaterialExternal : public MaterialSolid { // Functions public: MaterialExternal(); virtual ~MaterialExternal(); virtual void Bind(); //! @return the name of the reference const std::string& GetReference() const; //! Set the name of the reference void SetReference(const std::string& name); protected: /** sets up all lighting material properties */ void SetupMaterial(); // Members protected: /** the external file reference */ std::string mName; }; DECLARE_CLASS(MaterialExternal); }; #endif // KEROSIN_MATERIALEXTERNAL_H --- NEW FILE: materialexporter_c.cpp --- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- this file is part of simspark Tue May 9 2006 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2007 RoboCup Soccer Server 3D Maintenance Group $Id: materialexporter_c.cpp,v 1.2 2007/06/17 13:38:30 fruit Exp $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. MeshExporter NOTE: This class serves as an (abstract) exporter, to register materials with other graphic engines (possibly also for exporting) HISTORY: 03/05/07 - OO - Initial version */ #include "materialexporter.h" using namespace kerosin; void CLASS(MaterialExporter)::DefineClass() { DEFINE_BASECLASS(zeitgeist/Leaf); } --- NEW FILE: materialexternal.cpp --- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- this file is part of simspark Wed May 9 2007 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group $Id: materialexternal.cpp,v 1.2 2007/06/17 13:38:30 fruit Exp $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "materialexternal.h" using namespace kerosin; MaterialExternal::MaterialExternal() : MaterialSolid(), mName("") { } MaterialExternal::~MaterialExternal() { } void MaterialExternal::SetupMaterial() { /* We don't do anything here. This overwrites the original SetupMaterial from MaterialSolid, which calles OpenGl functions. */ } void MaterialExternal::Bind() { /* We don't do anything here. This overwrites the original Bind from MaterialSolid, which calles OpenGl functions. */ } const std::string& MaterialExternal::GetReference() const { return mName; } void MaterialExternal::SetReference(const std::string& name) { mName = name; } Index: materialsolid.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/materialserver/materialsolid.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** materialsolid.cpp 15 Mar 2007 07:26:26 -0000 1.3 --- materialsolid.cpp 17 Jun 2007 13:38:30 -0000 1.4 *************** *** 1,5 **** /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University --- 1,5 ---- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of simspark Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University *************** *** 35,39 **** mDiffuse(1.0f,1.0f,1.0f,1.0f), mSpecular(0.0f,0.0f,0.0f,1.0f), ! mEmission(0.0f,0.0f,0.0f,1.0f) { } --- 35,41 ---- mDiffuse(1.0f,1.0f,1.0f,1.0f), mSpecular(0.0f,0.0f,0.0f,1.0f), ! mEmission(0.0f,0.0f,0.0f,1.0f), ! mDepthCheck(true), ! mShininess(128.0f) { } *************** *** 101,109 **** } ! const RGBA& MaterialSolid::GetEmission() const { return mEmission; } --- 103,133 ---- } ! const RGBA& ! MaterialSolid::GetEmission() const { return mEmission; } + bool + MaterialSolid::DepthCheck() const + { + return mDepthCheck; + } + + void + MaterialSolid::SetDepthCheck(bool depthCheck) + { + mDepthCheck = depthCheck; + } + void + MaterialSolid::SetShininess(float val) + { + mShininess = val; + } + float + MaterialSolid::GetShininess() const + { + return mShininess; + } Index: materialserver.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/materialserver/materialserver.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** materialserver.cpp 19 Feb 2006 11:10:11 -0000 1.2 --- materialserver.cpp 17 Jun 2007 13:38:30 -0000 1.3 *************** *** 1,22 **** /* -*- 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 "materialserver.h" --- 1,22 ---- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of simspark ! Fri May 9 2003 ! Copyright (C) 2002,2003 Koblenz University ! 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 "materialserver.h" *************** *** 25,28 **** --- 25,29 ---- #include "material.h" #include "materialsolid.h" + #include "materialexporter.h" using namespace boost; *************** *** 38,47 **** } ! void MaterialServer::RegisterMaterial(shared_ptr<Material> material) { if (material.get() == 0) ! { ! return; ! } // remove any previous material with the same name --- 39,49 ---- } ! void ! MaterialServer::RegisterMaterial(shared_ptr<Material> material) { if (material.get() == 0) ! { ! return; ! } // remove any previous material with the same name *************** *** 50,58 **** if (previous.get() != 0) ! { ! GetLog()->Debug() << "(MaterialServer) removing material " ! << material->GetName() << "\n"; ! RemoveChildReference(previous); ! } // register new material --- 52,60 ---- if (previous.get() != 0) ! { ! GetLog()->Debug() << "(MaterialServer) removing material " ! << material->GetName() << "\n"; ! RemoveChildReference(previous); ! } // register new material *************** *** 61,67 **** GetLog()->Debug() << "(MaterialServer) registered material " << material->GetName() << "\n"; } ! shared_ptr<Material> MaterialServer::GetMaterial(const std::string& name) { shared_ptr<Material> material = --- 63,71 ---- GetLog()->Debug() << "(MaterialServer) registered material " << material->GetName() << "\n"; + } ! shared_ptr<Material> ! MaterialServer::GetMaterial(const std::string& name) { shared_ptr<Material> material = *************** *** 69,81 **** if (material.get() == 0) ! { ! GetLog()->Error() << "(MaterialServer) ERROR: Unknown material '" ! << name << "'\n"; ! } return material; } ! void MaterialServer::OnLink() { // create the default material --- 73,86 ---- if (material.get() == 0) ! { ! GetLog()->Error() << "(MaterialServer) ERROR: Unknown material '" ! << name << "'\n"; ! } return material; } ! void ! MaterialServer::OnLink() { // create the default material *************** *** 85,86 **** --- 90,140 ---- AddChildReference(defMat); } + + bool + MaterialServer::InitMaterialExporter(const std::string& name) + { + shared_ptr<MaterialExporter> exporter + = shared_dynamic_cast<MaterialExporter>(GetCore()->New(name)); + + if (exporter.get() == 0) + { + GetLog()->Error() << "(MaterialServer) ERROR: " + << "unable to create MaterialExporter '" << name << "'\n"; + return false; + } + + exporter->SetName(name); + AddChildReference(exporter); + + GetLog()->Normal() << "(MaterialServer) MaterialExporter '" << name << "' registered\n"; + + return true; + } + + void + MaterialServer::ExportAllMaterial() + { + GetLog()->Debug() << "(MaterialServer) ExportAllMaterial\n"; + TLeafList materials; + ListChildrenSupportingClass<Material>(materials); + + for (TLeafList::const_iterator mi = materials.begin(); mi != materials.end(); ++mi) + { + shared_ptr<Material> m = shared_static_cast<Material>(*mi); + ExportMaterial(m); + } + GetLog()->Debug() << "(MaterialServer) ExportAllMaterial done\n"; + } + + void + MaterialServer::ExportMaterial(shared_ptr<Material> material) + { + TLeafList exporters; + ListChildrenSupportingClass<MaterialExporter>(exporters); + + for (TLeafList::const_iterator bi = exporters.begin(); bi != exporters.end(); ++bi) + { + shared_ptr<MaterialExporter> mb = shared_static_cast<MaterialExporter>(*bi); + mb->RegisterMaterial(material); + } + } Index: material2dtexture.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/materialserver/material2dtexture.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** material2dtexture.h 5 Dec 2005 21:38:22 -0000 1.1 --- material2dtexture.h 17 Jun 2007 13:38:30 -0000 1.2 *************** *** 40,49 **** --- 40,61 ---- /** loads the diffuse texture */ bool SetDiffuseTexture(const std::string& texName); + //! @return the name of the set diffuse texture + const std::string& GetDiffuseTextureName() const; + //! @return true if there is a diffuse texture name and a texture + bool HasDiffuseTexture() const; /** loads the normal texture */ bool SetNormalTexture(const std::string& texName); + //! @return the name of the set normal texture + const std::string& GetNormalTextureName() const; + //! @return true if there is a normal texture name and a texture + bool HasNormalTexture() const; /** loads the specular texture */ bool SetSpecularTexture(const std::string& texName); + //! @return the name of the set specular texture + const std::string& GetSpecularTextureName() const; + //! @return true if there is a specular texture name and a texture + bool HasSpecularTexture() const; /** binds the managed material, i.e. sets all necessary OpenGL *************** *** 60,69 **** --- 72,87 ---- // protected: + //! the diffuse texture name + std::string mTexDiffuseName; /** the diffuse texture */ boost::shared_ptr<Texture> mTexDiffuse; + //! the normal texture name + std::string mTexNormalName; /** the normal texture */ boost::shared_ptr<Texture> mTexNormal; + //! the specular texture name + std::string mTexSpecularName; /** the specular texture */ boost::shared_ptr<Texture> mTexSpecular; Index: materialserver_c.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/materialserver/materialserver_c.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** materialserver_c.cpp 5 Dec 2005 21:38:22 -0000 1.1 --- materialserver_c.cpp 17 Jun 2007 13:38:30 -0000 1.2 *************** *** 25,32 **** using namespace boost; using namespace kerosin; ! using namespace zeitgeist; ! void CLASS(MaterialServer)::DefineClass() { ! DEFINE_BASECLASS(zeitgeist/Node); } --- 25,63 ---- using namespace boost; using namespace kerosin; ! using namespace std; ! FUNCTION(MaterialServer,initMaterialExporter) { ! string inExporterName; ! ! if ( ! (in.GetSize() != 1) || ! (! in.GetValue(in.begin(),inExporterName)) ! ) ! { ! return false; ! } ! ! return obj->InitMaterialExporter(inExporterName); ! } ! ! FUNCTION(MaterialServer,exportAllMaterial) ! { ! if ( ! (in.GetSize() != 0) ! ) ! { ! return false; ! } ! ! obj->ExportAllMaterial(); ! return true; ! } ! ! void ! CLASS(MaterialServer)::DefineClass() ! { ! DEFINE_BASECLASS(zeitgeist/Node); ! DEFINE_FUNCTION(initMaterialExporter); ! DEFINE_FUNCTION(exportAllMaterial); } |
From: Oliver O. <fr...@us...> - 2007-06-17 13:39:37
|
Update of /cvsroot/simspark/simspark/spark/oxygen/gamecontrolserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21072/oxygen/gamecontrolserver Modified Files: gamecontrolserver.cpp Log Message: merge from projectx branch Index: gamecontrolserver.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/gamecontrolserver/gamecontrolserver.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** gamecontrolserver.cpp 17 Mar 2007 07:01:02 -0000 1.3 --- gamecontrolserver.cpp 17 Jun 2007 13:38:32 -0000 1.4 *************** *** 1,5 **** /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University --- 1,5 ---- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of simspark Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University *************** *** 161,165 **** scene->SetModified(true); ! return aspect->Init(mCreateEffector); } --- 161,165 ---- scene->SetModified(true); ! return aspect->Init(mCreateEffector,id); } |
From: Oliver O. <fr...@us...> - 2007-06-17 13:39:37
|
Update of /cvsroot/simspark/simspark/spark In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21072 Modified Files: .cvsignore ChangeLog Makefile.am README acinclude.m4 configure.ac Log Message: merge from projectx branch Index: .cvsignore =================================================================== RCS file: /cvsroot/simspark/simspark/spark/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** .cvsignore 19 Dec 2005 20:09:16 -0000 1.1 --- .cvsignore 17 Jun 2007 13:38:29 -0000 1.2 *************** *** 3,8 **** aclocal.m4 autom4te.cache ! config.h ! config.h.in config.log config.status --- 3,8 ---- aclocal.m4 autom4te.cache ! sparkconfig.h ! sparkconfig.h.in config.log config.status Index: ChangeLog =================================================================== RCS file: /cvsroot/simspark/simspark/spark/ChangeLog,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ChangeLog 15 Mar 2007 07:26:25 -0000 1.2 --- ChangeLog 17 Jun 2007 13:38:29 -0000 1.3 *************** *** 1,3 **** ! 2007-03-15 Oliver Obst <fr...@cs...> 2007-03-15 Oliver Obst <fr...@us...> --- 1,293 ---- ! 2007-06-17 Oliver Obst <fr...@us...> ! ! * acinclude.m4: ! - added check for boost thread lib ! * spark/spark.h: ! - added compiler warning for compiling without kerosin ! * plugin/inputsdl/inputsystemsdl.cpp: ! - some SDL fixes for MacOS ! * plugin/objimporter/objimporter.cpp: ! - fixed a constant (number of faces) ! * kerosin/materialserver/materialexternal_c.cpp: ! * kerosin/materialserver/materialexternal.cpp: ! * kerosin/materialserver/materialexternal.h: ! - added materialexternal ! * kerosin/Makefile.am: ! - added materialexternal ! - finally removed glextensionreg stuff ! * kerosin/kerosin-config.in: ! - added extra framework flags for Darwin (MacOS) ! * kerosin/kerosin.h: ! * kerosin/kerosin.cpp: ! - added materialexternal ! * kerosin/kerosin.rb: ! - changed application title to SimSpark ! * kerosin/inputserver/inputserver.cpp: ! - added debug code (not compiled by default) ! * kerosin/materialserver/material2dtexture.cpp: ! * kerosin/materialserver/material2dtexture.h: ! - added methods to access names of the different textures used ! * kerosin/openglserver/openglserver.cpp: ! * kerosin/openglserver/openglserver.h: ! - added method IsGLLocked(), to access the same method from the GL subsystem ! * kerosin/openglserver/openglsystem.h: ! - added virtual method IsGLLocked(), ! used to indicate that the GL System wants to prevent direct GL access by other classes ! * kerosin/openglserver/openglwrapper.h: ! - for MacOS (at least), glu is needed, too. ! * kerosin/renderserver/renderserver.cpp: ! * kerosin/renderserver/renderserver.h: ! - merged from HEAD ! - added methods to deliver Width() and Height() of current view ! - added method to copy current view into a buffer ! * kerosin/sceneserver/staticmesh.h: ! * kerosin/sceneserver/staticmesh.cpp: ! - added method to set flag if an external mesh should be used (for external GE) ! - added method to set external mesh name (for external GE) ! - added method to set external mesh scale ! * kerosin/sceneserver/staticmesh_c.cpp: ! - fixed bug with setting the scale of staticmesh ! - added method to set flag if an external mesh should be used (for external GE) ! - added method to set external mesh name (for external GE) ! - added method to set external mesh scale ! * kerosin/textureserver/texture.cpp: ! - added flag to constructor if gL methods should be used ! - access OpenGL only if GL is not "locked" (based on the flag used during construction) ! * kerosin/textureserver/texture.h: ! * kerosin/textureserver/texture2d.cpp: ! * kerosin/textureserver/texture2d.h: ! - added flag to constructor if GL methods should be used ! * kerosin/textureserver/textureserver.cpp: ! - call Texture constructors with a flag if GL methods should be used or not ! * kerosin/textureserver/textureserver.h: ! - removed method to access reference to GLServer ! * zeitgeist/scriptserver/scriptserver.h: ! - added script error type for (not initialized) ! * kerosin/inputserver/inputcontrol.cpp: ! * kerosin/inputserver/inputcontrol.h: ! * salt/matrix.cpp: ! * salt/matrix.h: ! * kerosin/sceneserver/axis.cpp: ! * kerosin/sceneserver/axis.h: ! * oxygen/Makefile.am: ! * oxygen/geometryserver/geometryserver.cpp: ! * oxygen/physicsserver/body.cpp: ! * oxygen/physicsserver/body.h: ! * oxygen/physicsserver/collider.cpp: ! * oxygen/physicsserver/collider.h: ! * oxygen/physicsserver/hingejoint.cpp: ! * oxygen/physicsserver/hingejoint.h: ! * oxygen/physicsserver/odeobject.cpp: ! * oxygen/physicsserver/odeobject.h: ! * oxygen/physicsserver/space.cpp: ! * oxygen/physicsserver/space.h: ! * oxygen/physicsserver/universaljoint.cpp: ! * oxygen/physicsserver/universaljoint.h: ! * oxygen/sceneserver/basenode.cpp: ! * oxygen/sceneserver/basenode.h: ! * oxygen/sceneserver/fpscontroller.cpp: ! * oxygen/sceneserver/fpscontroller.h: ! * oxygen/sceneserver/scenedict.cpp: ! * oxygen/sceneserver/scenedict.h: ! * oxygen/sceneserver/sceneimporter.h: ! * oxygen/sceneserver/sceneserver.cpp: ! * oxygen/sceneserver/transform.h: ! * oxygen/simulationserver/simulationserver_c.cpp: ! * oxygen/simulationserver/simulationserver.cpp: ! * oxygen/simulationserver/simulationserver.h: ! * oxygen/simulationserver/netmessage.cpp: ! * zeitgeist/leaf.h: ! - merge from HEAD ! ! 2007-06-04 Oliver Obst <fr...@us...> ! ! * plugin/voidmeshimporter/Makefile.am: ! * plugin/voidmeshimporter/voidmeshimporter.cpp: ! * plugin/voidmeshimporter/voidmeshimporter.h: ! * plugin/voidmeshimporter/voidmeshimporter_c.cpp: ! * plugin/voidmeshimporter/export.cpp: ! - copied voidmeshimporter from rcssserver3D CVS ! ! 2007-06-01 Oliver Obst <fr...@us...> ! ! * zeitgeist/class.h: ! removed using hash_map from class (always using STL map) ! ! * kerosin/renderserver/baserenderserver.h: ! - added virtual methods to get the width, the height, and the ! contents of the current screen ! ! * kerosin/openglserver/openglserver.h: ! * kerosin/openglserver/openglserver.cpp: ! - replaced GetWindowHandleStr() by GetWindowHandle() (suggested by Markus) ! ! * kerosin/materialserver/materialsolid_c.cpp: ! * kerosin/materialserver/materialsolid.cpp: ! * kerosin/materialserver/materialsolid.h: ! - added a flag and methods indicating if depth checks for the ! material should be enabled ! - added a value and methods for the shininess of a material ! ! * kerosin/materialserver/materialserver.cpp: ! - added log messages / changed comments ! * kerosin/inputserver/inputserver.cpp: ! - whitespace changes ! ! * kerosin/inputserver/inputcontrol.cpp: ! - stopping the FPSController handle being reset during update ! ! * oxygen/agentaspect/agentaspect.cpp: ! * oxygen/agentaspect/agentaspect.h: ! - added agent ID to agentaspect ! ! * oxygen/gamecontrolserver/gamecontrolserver.cpp: ! - call AgentAspect::Init() using the agent id ! ! * oxygen/simulationserver/simulationserver_c.cpp: ! - returning success after calling quit ! (instead of returning an undefined value) ! ! * oxygen/sceneserver/camera.cpp: ! - increased default zfar to 10000 ! ! 2007-05-10 Oliver Obst <fr...@us...> ! ! * kerosin/sceneserver/staticmesh_c.cpp: ! * kerosin/sceneserver/staticmesh.cpp: ! * kerosin/sceneserver/staticmesh.h: ! - added methods to set/getflags if a mesh based object should cast ! shadows. This can be used by the graphics engine to ! disable/enable shadows for specific objects. The default value ! is "enabled" for all mesh based objects. ! ! 2007-05-08 Oliver Obst <fr...@us...> ! ! * kerosin/Makefile.am: ! * kerosin/kerosin.h: ! * kerosin/kerosin.cpp: ! - added MaterialExporter ! ! * kerosin/sceneserver/staticmesh.cpp: ! * kerosin/sceneserver/staticmesh.h: ! - added a method that returns the list of materials used ! ! * kerosin/materialserver/materialserver_c.cpp: ! * kerosin/materialserver/materialserver.cpp: ! * kerosin/materialserver/materialserver.h: ! - Added facilities to export registered materials. ! - the (protected) method ExportMaterial(material) exports one ! material via all registered exporters ! - exporters can be created and registered via ! InitMaterialExporter(name) ! - ExportAllMaterial() exports all materials (when it's called). ! Materials can't just be exported automatically, as one ! possible method to register materials is to just put them in ! the tree below the MaterialServer. So ExportAllMaterial has to ! be called manually after Materials have been installed (can ! also be called from Ruby). ! ! * kerosin/materialserver/materialexporter.h: ! * kerosin/materialserver/materialexporter_c.cpp: ! - added abstract MaterialExporter. This class can be used to ! customise the material server, which needs to be informed about ! the materials used for a specific simulation. By registering a ! MaterialExporter implementation to the MaterialServer, materials ! can be registered (exported) to another class. ! ! * oxygen/sceneserver/camera.cpp: ! * oxygen/sceneserver/camera.h: ! * oxygen/sceneserver/camera_c.cpp: ! - added LookAt() method (making the camera looking at a point) ! - added lookAt() ruby fkt ! - cosmetic changes ! ! * zeitgeist/leaf.h, zeitgeist/leaf.cpp, ! zeitgeist/node.h, zeitgeist/node.cpp: ! Added some of the changes from the rsgedit_fileref branch (Markus Rollmann): ! - added member GetNumberOfChildren() to node that returns the ! total number of children ! - modified SetParent() to care for a uniqe name among sibling ! nodes. If another sibling with the same name exists the current ! number of children is appended to the node name. If mporter ! classes create nodes in a stable order this also assures ! consistent node names through simulation restarts ! ! 2007-04-05 Oliver Obst <fr...@us...> ! ! * oxygen/Makefile.am, oxygen/oxygen.cpp, oxygen/oxygen.h, ! oxygen/geometryserver/geometryserver_c.cpp, ! oxygen/geometryserver/geometryserver.cpp, ! oxygen/geometryserver/geometryserver.h: ! - added support for meshexporter ! ! * oxygen/geometryserver/meshexporter_c.cpp: added abstract meshexporter ! * oxygen/geometryserver/meshexporter.h: added abstract meshexporter ! * spark/spark.rb: removed second GeometryServer ! ! ! 2007-03-30 Oliver Obst <fr...@us...> ! ! * kerosin/renderserver/baserenderserver.h, ! * kerosin/renderserver/baserenderserver.cpp, ! * kerosin/renderserver/baserenderserver_c.cpp: ! added an abstract base renderer, designed to implement different renderservers ! ! * kerosin/renderserver/renderserver.h: ! * kerosin/renderserver/renderserver.cpp: ! * kerosin/renderserver/renderserver_c.cpp: ! * kerosin/renderserver/rendercontrol_c.cpp: ! * kerosin/renderserver/rendercontrol.h, ! * kerosin/renderserver/rendercontrol.cpp: ! - changes due to split off of the baserenderserver ! ! * configure.ac: ! - changed config.h to sparkconfig.h ! - check for MacOS corefoundation.h ! - make spark-config executable at the end of the configuration ! ! * salt/fileclasses.cpp: ! - include corefoundation header ! - changed config.h to sparkconfig.h ! ! * zeitgeist/scriptserver/scriptserver.cpp: ! - replaced config.h by sparkconfig.h ! - pathname changes due to changes in file classes ! - fixed pkgdatadir ! ! * zeitgeist/zeitgeist-config.in: ! - added framework for building MacOS apps using zeitgeist ! ! * Makefile.am, spark/spark.h, test/coretest/main.cpp, ! utility/rcssnet/udpsocket.cpp, utility/rcssnet/tcpsocket.cpp, ! utility/rcssnet/socket.hpp, utility/rcssnet/socket.cpp, ! utility/rcssnet/exception.cpp, utility/rcssnet/addr.cpp, ! zeitgeist/class.h, kerosin/imageserver/imageserver.h, ! kerosin/imageserver/image.h, salt/path.h, salt/defines.h, ! oxygen/physicsserver/odewrapper.h: ! - changed config.h to sparkconfig.h ! ! * salt/sharedlibrary.h: ! * salt/rect.h: ! * salt/tvector.h: ! - removed config.h inclusion ! ! * salt/sharedlibrary.cpp: ! - including fileclasses.h ! ! * salt/fileclasses.h, salt/fileclasses.cpp: ! - added a static method Sep() to RFile, returning the OS-specific path separator ! - added a static method BundlePath() to RFile, returning the OS-specific bundle path ! - changed config.h to sparkconfig.h ! - removed static global method PathSeparator() ! ! * kerosin/openglserver/openglsystem.h: ! - added a pure virtual method to get a handle for the window ! ! * kerosin/openglserver/openglserver.h, kerosin/openglserver/openglserver.cpp: ! - added method to get a handle string for the glwindow ! ! * kerosin/kerosin.cpp, kerosin/Makefile.am: ! - added baserenderserver ! 2007-03-15 Oliver Obst <fr...@us...> *************** *** 9,12 **** --- 299,313 ---- * plugin/inputsdl/keyboardsdl.cpp: fixed bug with eNone enum + 2007-03-07 Oliver Obst <fr...@us...> + + * salt/sharedlibrary.cpp: + - added ../plugins/ to the dlopen search dir (mainly to get MacOS + apps running in application folders) + * acinclude.m4: + - define HAVE_KEROSIN_KEROSIN_H instead of HAVE_KEROSIN_H + * spark/spark.cpp: + * spark/spark.h: + * win32/config.h: + - changed HAVE_KEROSIN_H to HAVE_KEROSIN_KEROSIN_H 2007-03-06 Oliver Obst <fr...@us...> Index: acinclude.m4 =================================================================== RCS file: /cvsroot/simspark/simspark/spark/acinclude.m4,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** acinclude.m4 15 Mar 2007 07:26:25 -0000 1.5 --- acinclude.m4 17 Jun 2007 13:38:29 -0000 1.6 *************** *** 338,342 **** # RCSS_BUILD_KEROSIN_INTERNAL ! # defines preprocessor symbol HAVE_KEROSIN_H if kerosin can be build # set automake conditional BUILD_KEROSIN to true if kerosin can be build #----------------------------------------------------------------------------- --- 338,342 ---- # RCSS_BUILD_KEROSIN_INTERNAL ! # defines preprocessor symbol HAVE_KEROSIN_KEROSIN_H if kerosin can be build # set automake conditional BUILD_KEROSIN to true if kerosin can be build #----------------------------------------------------------------------------- *************** *** 349,353 **** AC_MSG_CHECKING([if libkerosin will be build]) AC_MSG_RESULT([$rcss_build_kerosin]) ! RCSS_KEROSIN_IF_ELSE([AC_DEFINE(HAVE_KEROSIN_H, 1, [Define to 1 if using the kerosin header])],[ AC_MSG_ERROR([libkerosin cannot be build without all required libraries.]) AC_MSG_ERROR([the list of libraries required for kerosin can be found in the documentation]) --- 349,353 ---- AC_MSG_CHECKING([if libkerosin will be build]) AC_MSG_RESULT([$rcss_build_kerosin]) ! RCSS_KEROSIN_IF_ELSE([AC_DEFINE(HAVE_KEROSIN_KEROSIN_H, 1, [Define to 1 if using the kerosin header])],[ AC_MSG_ERROR([libkerosin cannot be build without all required libraries.]) AC_MSG_ERROR([the list of libraries required for kerosin can be found in the documentation]) *************** *** 466,470 **** # RCSS_BOOST_REGEX([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # --------------------------------------------------------- ! # Checks for the spades library AC_DEFUN([RCSS_BOOST_REGEX], [AS_VAR_PUSHDEF([rcss_boost_regex], [rcss_cv_boost_regex])dnl --- 466,470 ---- # RCSS_BOOST_REGEX([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # --------------------------------------------------------- ! # Checks for the boost library AC_DEFUN([RCSS_BOOST_REGEX], [AS_VAR_PUSHDEF([rcss_boost_regex], [rcss_cv_boost_regex])dnl *************** *** 483,484 **** --- 483,510 ---- ])# RCSS_BOOST_REGEX + # RCSS_BOOST_THREADS_LIB + # --------------------------------------------------------- + # Checks for the boost threads library under various names + # Substitutes: @BOOST_THREADS_LIB@ + AC_DEFUN([RCSS_BOOST_THREADS_LIB], [ + AC_MSG_CHECKING(boost thread library) + AC_LANG_PUSH(C++) + OLD_LDFLAGS="$LDFLAGS" + LDFLAGS="$OLDLDFLAGS -lboost_thread" + AC_LINK_IFELSE([int main() { return 0; }], + [rcss_boost_threads_lib=boost_thread], + [LDFLAGS="$OLDLDFLAGS -lboost_thread-mt" + AC_LINK_IFELSE([int main() { return 0; }], + [rcss_boost_threads_lib=boost_thread-mt], + [ LDFLAGS="$OLDLDFLAGS -lboost_thread-gcc-mt" + AC_LINK_IFELSE([int main() { return 0; }], + [rcss_boost_threads_lib=boost_thread-gcc-mt], + [rcss_boost_threads_lib=]) + ]) + ]) + LDFLAGS="$OLD_LDFLAGS" + AC_LANG_POP(C++) + BOOST_THREADS_LIB=$rcss_boost_threads_lib + AC_MSG_RESULT($rcss_boost_threads_lib) + AC_SUBST(BOOST_THREADS_LIB) + ])# RCSS_BOOST_THREADS_LIBS Index: configure.ac =================================================================== RCS file: /cvsroot/simspark/simspark/spark/configure.ac,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** configure.ac 15 Mar 2007 07:26:25 -0000 1.6 --- configure.ac 17 Jun 2007 13:38:29 -0000 1.7 *************** *** 2,6 **** AC_INIT([simspark], 0.1, [sim...@li...]) AC_CONFIG_SRCDIR([salt/salt.h]) ! AC_CONFIG_HEADER([config.h]) AC_CONFIG_AUX_DIR([config.aux]) --- 2,6 ---- AC_INIT([simspark], 0.1, [sim...@li...]) AC_CONFIG_SRCDIR([salt/salt.h]) ! AC_CONFIG_HEADER([sparkconfig.h]) AC_CONFIG_AUX_DIR([config.aux]) *************** *** 52,55 **** --- 52,56 ---- AC_CHECK_HEADERS([float.h limits.h memory.h stdlib.h string.h]) AC_CHECK_HEADERS([execinfo.h]) + AC_CHECK_HEADERS([CoreFoundation/CoreFoundation.h]) AC_CHECK_HEADER([boost/version.hpp],, *************** *** 159,162 **** test -f oxygen/oxygen-config && chmod a+x oxygen/oxygen-config && \ test -f kerosin/kerosin-config && chmod a+x kerosin/kerosin-config && \ ! test -f app/simulator/rcsoccersim3D && chmod +x app/simulator/rcsoccersim3D]) AC_OUTPUT --- 160,163 ---- test -f oxygen/oxygen-config && chmod a+x oxygen/oxygen-config && \ test -f kerosin/kerosin-config && chmod a+x kerosin/kerosin-config && \ ! test -f spark/spark-config && chmod +x spark/spark-config ]) AC_OUTPUT Index: Makefile.am =================================================================== RCS file: /cvsroot/simspark/simspark/spark/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile.am 15 Mar 2007 07:26:25 -0000 1.2 --- Makefile.am 17 Jun 2007 13:38:29 -0000 1.3 *************** *** 3,12 **** pkginclude_HEADERS = \ ! config.h CLEANFILES = DISTCLEANFILES = $(top_srcdir)/macosX/SDLMain.o $(top_srcdir)/macosX/libSDLmain.a EXTRA_DIST = macosX/SDLMain.h macosX/SDLMain.m \ ! win32/config.h win32/simspark.iss win32/spark.ico EXTRA_SRC_DISTS = --- 3,12 ---- pkginclude_HEADERS = \ ! sparkconfig.h CLEANFILES = DISTCLEANFILES = $(top_srcdir)/macosX/SDLMain.o $(top_srcdir)/macosX/libSDLmain.a EXTRA_DIST = macosX/SDLMain.h macosX/SDLMain.m \ ! win32/sparkconfig.h win32/simspark.iss win32/spark.ico EXTRA_SRC_DISTS = Index: README =================================================================== RCS file: /cvsroot/simspark/simspark/spark/README,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** README 15 Mar 2007 07:26:25 -0000 1.2 --- README 17 Jun 2007 13:38:29 -0000 1.3 *************** *** 1 **** --- 1,22 ---- Simspark README + + Mac OS X: + + - on some systems, the ODE library has a bad install name. There are 2 ways to fix it. + For both ways, you have to first locate libode.dylib on your system. You can do this using + "locate libode.dylib" in a shell. For example, in my system, libode.dylib is located at + "/opt/local/lib/libode.dylib", but the install name was just "libode.dylib". + You can check the install name of you ODE library using + otool -D /opt/local/lib/libode.dylib + (use the path where it is located on your system) + + First possible solution: + Add the pathname of your libode.dylib to the shell variable DYLD_FALLBACK_LIBRARY_PATH. + I.e. open ~/.profile with your preferred text editor, and add the line + export DYLD_FALLBACK_LIBRARY_PATH=/opt/local/lib + somewhere. + + Second possible solution: + Change the install name of your libode.dylib : + install_name_tool -id /opt/local/lib/libode.dylib /opt/local/lib/libode.dylib + (of course, use the location of libode on your system). |
From: Oliver O. <fr...@us...> - 2007-06-17 13:39:37
|
Update of /cvsroot/simspark/simspark/spark/kerosin/inputserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21072/kerosin/inputserver Modified Files: inputcontrol.cpp inputserver.cpp Log Message: merge from projectx branch Index: inputcontrol.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/inputserver/inputcontrol.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** inputcontrol.cpp 31 Mar 2007 13:18:16 -0000 1.4 --- inputcontrol.cpp 17 Jun 2007 13:38:30 -0000 1.5 *************** *** 263,288 **** if (mAdvanceTime) ! { ! // pass the delta time on to the SimulationServer ! GetSimulationServer()->AdvanceTime(mDeltaTime); ! } } ! float InputControl::GetDeltaTime() { return mDeltaTime; } ! void InputControl::SetAdvanceTime(bool advance) { mAdvanceTime = advance; } ! bool InputControl::GetAdvanceTime() { return mAdvanceTime; } ! bool InputControl::RegisterInputItem(const string& inputItemName, const string& name) { // check if a input item of the requested type was already created --- 263,292 ---- if (mAdvanceTime) ! { ! // pass the delta time on to the SimulationServer ! GetSimulationServer()->AdvanceTime(mDeltaTime); ! } } ! float ! InputControl::GetDeltaTime() { return mDeltaTime; } ! void ! InputControl::SetAdvanceTime(bool advance) { mAdvanceTime = advance; } ! bool ! InputControl::GetAdvanceTime() { return mAdvanceTime; } ! bool ! InputControl::RegisterInputItem(const string& inputItemName, const string& name) { // check if a input item of the requested type was already created *************** *** 291,297 **** if (inputItem.get() != 0) ! { ! return true; ! } // create the input item --- 295,301 ---- if (inputItem.get() != 0) ! { ! return true; ! } // create the input item *************** *** 299,307 **** if (inputItem.get() == 0) ! { ! GetLog()->Error() << "ERROR: (InputControl) Cannot create input item '" ! << inputItemName << "'" << std::endl; ! return false; ! } // link the input item in the hierarchy --- 303,311 ---- if (inputItem.get() == 0) ! { ! GetLog()->Error() << "ERROR: (InputControl) Cannot create input item '" ! << inputItemName << "'" << std::endl; ! return false; ! } // link the input item in the hierarchy *************** *** 309,317 **** if (! AddChildReference(inputItem)) ! { ! GetLog()->Error() << "ERROR: (InputControl) Cannot link the input item '" ! << inputItemName << "' to the hierarchy\n"; ! return false; ! } GetLog()->Debug() << "(InputControl) Registered input item '" --- 313,321 ---- if (! AddChildReference(inputItem)) ! { ! GetLog()->Error() << "ERROR: (InputControl) Cannot link the input item '" ! << inputItemName << "' to the hierarchy\n"; ! return false; ! } GetLog()->Debug() << "(InputControl) Registered input item '" *************** *** 321,326 **** } ! void InputControl::UpdateCached() { ! mFPSController.reset(); } --- 325,331 ---- } ! void ! InputControl::UpdateCached() { ! // mFPSController.reset(); } Index: inputserver.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/inputserver/inputserver.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** inputserver.cpp 15 Mar 2007 07:26:25 -0000 1.3 --- inputserver.cpp 17 Jun 2007 13:38:30 -0000 1.4 *************** *** 263,283 **** } ! bool InputServer::GetInput(Input &input, bool raw) { shared_ptr<InputSystem> inputSystem = GetInputSystem(); if (inputSystem.get() == 0) ! { ! GetLog()->Error() ! << "(InputServer) ERROR: no InputSystem installed\n"; ! input.mId = -1; ! return false; ! } if (! inputSystem->GetInput(input)) ! { ! input.mId = -1; ! return false; ! } if ( --- 263,284 ---- } ! bool ! InputServer::GetInput(Input &input, bool raw) { shared_ptr<InputSystem> inputSystem = GetInputSystem(); if (inputSystem.get() == 0) ! { ! GetLog()->Error() ! << "(InputServer) ERROR: no InputSystem installed\n"; ! input.mId = -1; ! return false; ! } if (! inputSystem->GetInput(input)) ! { ! input.mId = -1; ! return false; ! } if ( *************** *** 285,300 **** (raw) ) ! { ! // return Input::eUser input ! return true; ! } ! // translate raw input to binding TBindMap::iterator bindListIter = mBindings.find(input.mCode); if (bindListIter == mBindings.end()) ! { ! input.mId = -1; ! return false; ! } // we have an entry for the scan code --- 286,300 ---- (raw) ) ! { ! // return Input::eUser input ! return true; ! } // translate raw input to binding TBindMap::iterator bindListIter = mBindings.find(input.mCode); if (bindListIter == mBindings.end()) ! { ! input.mId = -1; ! return false; ! } // we have an entry for the scan code *************** *** 306,310 **** --- 306,323 ---- ++bindIter ) + { + const Bind& bind = (*bindIter); + + //printf("Looking at: %d %d %d", (*bind).mCode, (*bind).cmd, (*bind).modifier); + if (bind.modifier == mModifierState) { + #if 0 + if (input.mType == Input::eButton) + { + if ((bind.event == eKeyUpDown) || + (bind.event == eKeyUp && input.mData.l == 0) || + (bind.event == eKeyDown && input.mData.l == 1) + ) + #else const Bind& bind = (*bindIter); *************** *** 314,336 **** (bind.modifier & mModifierState) ) ! { ! if (input.mType == Input::eButton) ! { ! if ((bind.event == eKeyUpDown) || ! (bind.event == eKeyUp && input.mData.l == 0) || ! (bind.event == eKeyDown && input.mData.l == 1) ! ) ! { ! input.mId = bind.cmd; ! return true; ! } ! } else if (input.mType == Input::eAxis) ! { ! input.mId = bind.cmd; ! return true; ! } ! } } ! input.mId = -1; --- 327,342 ---- (bind.modifier & mModifierState) ) ! #endif ! { ! input.mId = bind.cmd; ! return true; ! } ! else if (input.mType == Input::eAxis) ! { ! input.mId = bind.cmd; ! return true; ! } } ! } input.mId = -1; |
From: Oliver O. <fr...@us...> - 2007-06-17 13:39:37
|
Update of /cvsroot/simspark/simspark/spark/oxygen/physicsserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21072/oxygen/physicsserver Modified Files: dragcontroller.cpp space.cpp Log Message: merge from projectx branch Index: space.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/space.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** space.cpp 1 May 2007 13:14:40 -0000 1.3 --- space.cpp 17 Jun 2007 13:38:32 -0000 1.4 *************** *** 195,199 **** } ! void Space::DestroySpaceObjects() { shared_ptr<Scene> scene = GetScene(); --- 195,200 ---- } ! void ! Space::DestroySpaceObjects() { shared_ptr<Scene> scene = GetScene(); *************** *** 238,242 **** } ! void Space::DestroyODEObject() { if (! mODESpace) --- 239,244 ---- } ! void ! Space::DestroyODEObject() { if (! mODESpace) Index: dragcontroller.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/dragcontroller.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** dragcontroller.cpp 12 Feb 2006 11:36:52 -0000 1.2 --- dragcontroller.cpp 17 Jun 2007 13:38:32 -0000 1.3 *************** *** 40,44 **** return; } - if (mLinearDrag > 0) { --- 40,43 ---- |
From: Oliver O. <fr...@us...> - 2007-06-17 13:38:48
|
Update of /cvsroot/simspark/simspark/spark/salt In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21072/salt Modified Files: bounds.h defines.h fileclasses.cpp fileclasses.h gmath.h matrix.h path.h rect.h sharedlibrary.cpp sharedlibrary.h tvector.h vector.h Log Message: merge from projectx branch Index: defines.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/salt/defines.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** defines.h 5 Dec 2005 20:56:00 -0000 1.1 --- defines.h 17 Jun 2007 13:38:39 -0000 1.2 *************** *** 1,5 **** /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University --- 1,5 ---- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of simspark Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University *************** *** 30,34 **** #ifdef HAVE_CONFIG_H ! #include <config.h> #endif --- 30,34 ---- #ifdef HAVE_CONFIG_H ! #include <sparkconfig.h> #endif Index: sharedlibrary.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/salt/sharedlibrary.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sharedlibrary.h 22 Jan 2006 12:13:08 -0000 1.2 --- sharedlibrary.h 17 Jun 2007 13:38:39 -0000 1.3 *************** *** 1,5 **** /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University --- 1,5 ---- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of simspark Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University *************** *** 30,37 **** #define SALT_SHAREDLIBRARY_H - #ifdef HAVE_CONFIG_H - #include <config.h> - #endif - #include "defines.h" #include <string> --- 30,33 ---- *************** *** 86,90 **** private: /** a platform dependent handle to the managed library */ ! void *mLibHandle; /** the name of the library */ --- 82,86 ---- private: /** a platform dependent handle to the managed library */ ! void *mLibHandle; /** the name of the library */ Index: fileclasses.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/salt/fileclasses.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** fileclasses.h 15 Mar 2007 07:26:29 -0000 1.2 --- fileclasses.h 17 Jun 2007 13:38:39 -0000 1.3 *************** *** 1,5 **** /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University --- 1,5 ---- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of simspark Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University *************** *** 32,41 **** #define SALT_FILECLASSES_H - // #ifdef HAVE_CONFIG_H - // #include <config.h> - // #endif - #include <cstdio> #include <cstdlib> #ifndef PATH_MAX --- 32,38 ---- #define SALT_FILECLASSES_H #include <cstdio> #include <cstdlib> + #include <string> #ifndef PATH_MAX *************** *** 46,59 **** { - /** Defines the native path separator character for the - platform - */ - static const char* PathSeparator = - #ifdef WIN32 - "\\"; - #else - "/"; - #endif - /** RFile defines an interface and some basic support functions for * classes providing read only file services --- 43,46 ---- *************** *** 64,67 **** --- 51,63 ---- virtual ~RFile() {}; + /** The separator for path names (depends on the platform) + * @return path separator + */ + static std::string Sep(); + /** A (platform specific) "bundle path", i.e. a hint where files of the package might be found. + * @return the bundle path name with a trailing path separator + */ + static std::string BundlePath(); + // a bunch of pure virtual functions which a file must implement Index: gmath.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/salt/gmath.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** gmath.h 15 Mar 2007 07:26:29 -0000 1.3 --- gmath.h 17 Jun 2007 13:38:39 -0000 1.4 *************** *** 1,5 **** /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University --- 1,5 ---- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of simspark Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University *************** *** 27,34 **** #define SALT_GMATH_H - // #ifdef HAVE_CONFIG_H - // #include <config.h> - // #endif - #include "defines.h" #include <cmath> --- 27,30 ---- *************** *** 180,191 **** { while (angle > 180) ! { ! angle -= 360; ! } while (angle < -180) ! { ! angle += 360; ! } return angle; --- 176,187 ---- { while (angle > 180) ! { ! angle -= 360; ! } while (angle < -180) ! { ! angle += 360; ! } return angle; Index: bounds.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/salt/bounds.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** bounds.h 5 Dec 2005 20:56:00 -0000 1.1 --- bounds.h 17 Jun 2007 13:38:39 -0000 1.2 *************** *** 1,5 **** /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University --- 1,5 ---- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of simspark Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University *************** *** 23,30 **** #define SALT_BOUNDS_H - // #ifdef HAVE_CONFIG_H - // #include <config.h> - // #endif - #include "defines.h" #include "matrix.h" --- 23,26 ---- Index: rect.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/salt/rect.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** rect.h 5 Dec 2005 20:56:00 -0000 1.1 --- rect.h 17 Jun 2007 13:38:39 -0000 1.2 *************** *** 1,5 **** /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University --- 1,5 ---- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of simspark Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University *************** *** 23,30 **** #define SALT_RECT_H - #ifdef HAVE_CONFIG_H - #include <config.h> - #endif - #include "defines.h" --- 23,26 ---- Index: vector.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/salt/vector.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** vector.h 15 Mar 2007 07:26:29 -0000 1.2 --- vector.h 17 Jun 2007 13:38:39 -0000 1.3 *************** *** 1,5 **** /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University --- 1,5 ---- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of simspark Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University *************** *** 31,38 **** #define SALT_VECTOR_H - // #ifdef HAVE_CONFIG_H - // #include <config.h> - // #endif - #include "tvector.h" #include <cstdlib> --- 31,34 ---- Index: fileclasses.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/salt/fileclasses.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** fileclasses.cpp 15 Mar 2007 07:26:29 -0000 1.2 --- fileclasses.cpp 17 Jun 2007 13:38:39 -0000 1.3 *************** *** 1,5 **** ! /* -*- mode: c++ -*- ! this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2003 Koblenz University --- 1,5 ---- ! /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of simspark Fri May 9 2003 Copyright (C) 2003 Koblenz University *************** *** 23,26 **** --- 23,34 ---- #include <cstring> + #if HAVE_CONFIG_H + #include <sparkconfig.h> + #endif + + #if HAVE_COREFOUNDATION_COREFOUNDATION_H + #include <CoreFoundation/CoreFoundation.h> + #endif + namespace salt { *************** *** 40,43 **** --- 48,89 ---- using namespace salt; + std::string + RFile::Sep() + { + #ifdef WIN32 + return "\\"; + #else + return "/"; + #endif + } + + std::string + RFile::BundlePath() + { + #if HAVE_COREFOUNDATION_COREFOUNDATION_H + char path[1024]; + CFBundleRef mainBundle = CFBundleGetMainBundle(); + assert(mainBundle); + + CFURLRef mainBundleURL = CFBundleCopyBundleURL(mainBundle); + assert(mainBundleURL); + + CFStringRef cfStringRef = CFURLCopyFileSystemPath( mainBundleURL, kCFURLPOSIXPathStyle); + assert(cfStringRef); + + CFStringGetCString(cfStringRef, path, 1024, kCFStringEncodingASCII); + + CFRelease(mainBundleURL); + CFRelease(cfStringRef); + + return std::string(path) + Sep(); + #else + # ifdef PREFIX + return PREFIX + Sep() + "share" + Sep() + PACKAGE_NAME; + # else + return "." + Sep(); + # endif + #endif + } //------------------------------------------------------------------------------------------------ *************** *** 294,298 **** long size = ftell((FILE*)mHandle); fseek((FILE*)mHandle,pos,SEEK_SET); ! return size; } --- 340,344 ---- long size = ftell((FILE*)mHandle); fseek((FILE*)mHandle,pos,SEEK_SET); ! return size; } Index: matrix.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/salt/matrix.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** matrix.h 15 Jun 2007 08:48:18 -0000 1.2 --- matrix.h 17 Jun 2007 13:38:39 -0000 1.3 *************** *** 1,5 **** /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University --- 1,5 ---- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of simspark Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University *************** *** 23,30 **** #define SALT_MATRIX_H - // #ifdef HAVE_CONFIG_H - // #include <config.h> - // #endif - #include "defines.h" #include "vector.h" --- 23,26 ---- Index: sharedlibrary.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/salt/sharedlibrary.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** sharedlibrary.cpp 15 Mar 2007 07:26:29 -0000 1.4 --- sharedlibrary.cpp 17 Jun 2007 13:38:39 -0000 1.5 *************** *** 1,5 **** /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University --- 1,5 ---- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of simspark Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University *************** *** 21,24 **** --- 21,25 ---- */ #include "sharedlibrary.h" + #include "fileclasses.h" #include <iostream> *************** *** 80,84 **** mLibHandle = ::dlopen((libName + ".so").c_str(), RTLD_LAZY); ! if (mLibHandle == NULL) { std::cerr << "(SharedLibrary) ERROR: dlopen failed for " << libName --- 81,98 ---- mLibHandle = ::dlopen((libName + ".so").c_str(), RTLD_LAZY); ! if (mLibHandle == 0) ! { // we didn't find the plugin, so we try again... ! /* mainly to work with MacOS bundles, so that plugins can be located like this: ! application.app/ ! | ! \- Contents/ ! | ! --MacOS/ < - application lives here - > ! | ! --plugins/ < - plugins live here - > ! */ ! mLibHandle = ::dlopen((RFile::BundlePath() + "Contents/plugins/" + libName + ".so").c_str(), RTLD_LAZY); ! } ! if (mLibHandle == 0) { std::cerr << "(SharedLibrary) ERROR: dlopen failed for " << libName Index: tvector.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/salt/tvector.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tvector.h 5 Dec 2005 20:56:00 -0000 1.1 --- tvector.h 17 Jun 2007 13:38:39 -0000 1.2 *************** *** 1,5 **** /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University --- 1,5 ---- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of simspark Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University *************** *** 34,41 **** #define SALT_TVECTOR_H - // #ifdef HAVE_CONFIG_H - // #include <config.h> - // #endif - #include "defines.h" #include "gmath.h" --- 34,37 ---- Index: path.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/salt/path.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** path.h 5 Dec 2005 20:56:00 -0000 1.1 --- path.h 17 Jun 2007 13:38:39 -0000 1.2 *************** *** 1,5 **** /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University --- 1,5 ---- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- ! this file is part of simspark Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University *************** *** 32,51 **** #ifdef HAVE_CONFIG_H ! # ifdef PACKAGE_BUGREPORT ! # undef PACKAGE_BUGREPORT ! # endif ! # ifdef PACKAGE_NAME ! # undef PACKAGE_NAME ! # endif ! # ifdef PACKAGE_STRING ! # undef PACKAGE_STRING ! # endif ! # ifdef PACKAGE_TARNAME ! # undef PACKAGE_TARNAME ! # endif ! # ifdef PACKAGE_VERSION ! # undef PACKAGE_VERSION ! # endif ! #include "config.h" #endif --- 32,46 ---- #ifdef HAVE_CONFIG_H ! # undef EXTERN ! # undef HAVE_VPRINTF ! # undef PACKAGE ! # undef PACKAGE_BUGREPORT ! # undef PACKAGE_NAME ! # undef PACKAGE_STRING ! # undef PACKAGE_TARNAME ! # undef PACKAGE_VERSION ! # undef PREFIX ! # undef VERSION ! #include <sparkconfig.h> #endif |
From: Oliver O. <fr...@us...> - 2007-06-17 13:38:48
|
Update of /cvsroot/simspark/simspark/spark/zeitgeist/scriptserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21072/zeitgeist/scriptserver Modified Files: .cvsignore scriptserver.cpp scriptserver.h Log Message: merge from projectx branch Index: .cvsignore =================================================================== RCS file: /cvsroot/simspark/simspark/spark/zeitgeist/scriptserver/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** .cvsignore 5 Dec 2005 21:50:02 -0000 1.1 --- .cvsignore 17 Jun 2007 13:38:39 -0000 1.2 *************** *** 2,5 **** --- 2,6 ---- *.lo .deps + .dirstamp .libs Makefile Index: scriptserver.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/zeitgeist/scriptserver/scriptserver.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** scriptserver.cpp 31 Mar 2007 14:20:12 -0000 1.5 --- scriptserver.cpp 17 Jun 2007 13:38:39 -0000 1.6 *************** *** 32,52 **** #include <sys/stat.h> - #undef PREFIX - #undef PACKAGE_NAME - #ifdef HAVE_CONFIG_H ! /* The include search path includes config.h of ruby as well. My system shows a strange behavior ! when resolving the search paths: ! using - include <config.h> - *before* the rubywrapper includes the correct file (our config.h) ! using - include <config.h> - *after* the rubywrapper includes the ruby - config.h ! using the same line before *and* after the rubywrapper includes the correct file before the rubywrapper, ! and the wrong one after.... :-( ! */ ! #ifdef WIN32 ! #include "../../win32/config.h" ! #else ! #include "../config.h" ! #endif ! #endif --- 32,37 ---- #include <sys/stat.h> #ifdef HAVE_CONFIG_H ! #include <sparkconfig.h> #endif *************** *** 264,268 **** rb_define_global_function("dirs", RUBY_METHOD_FUNC(dirs), 0); ! mRelPathPrefix = string("..") + salt::PathSeparator + ".." + salt::PathSeparator; } --- 249,253 ---- rb_define_global_function("dirs", RUBY_METHOD_FUNC(dirs), 0); ! mRelPathPrefix = string("..") + salt::RFile::Sep() + ".." + salt::RFile::Sep(); } *************** *** 285,289 **** return false; } - std::cerr << "Running the script\n"; boost::scoped_array<char> buffer(new char[file->Size() + 1]); file->Read(buffer.get(), file->Size()); --- 270,273 ---- *************** *** 495,499 **** { // run the init script in the sourceDir ! string sourcePath = sourceDir + salt::PathSeparator + name; GetLog()->Debug() << "(ScriptServer) Running " << sourcePath << "... "; std::cerr << "(ScriptServer) Running " << sourcePath << "... "; --- 479,483 ---- { // run the init script in the sourceDir ! string sourcePath = sourceDir + salt::RFile::Sep() + name; GetLog()->Debug() << "(ScriptServer) Running " << sourcePath << "... "; std::cerr << "(ScriptServer) Running " << sourcePath << "... "; *************** *** 508,512 **** { GetLog()->Debug() << "failed (error in script)" << endl; - std::cerr << "failed (error in script)" << endl; return eError; } else --- 492,495 ---- *************** *** 521,525 **** } ! string destPath = destDir + salt::PathSeparator + name; GetLog()->Normal() << "Copying " << sourcePath --- 504,508 ---- } ! string destPath = destDir + salt::RFile::Sep() + name; GetLog()->Normal() << "Copying " << sourcePath *************** *** 556,560 **** } ! dotDir = string(home) + salt::PathSeparator + mDotName; return true; } --- 539,543 ---- } ! dotDir = string(home) + salt::RFile::Sep() + mDotName; return true; } *************** *** 614,629 **** CreateDotDir(dotDir); ! #ifdef WIN32 ! string pkgdatadir = ".\\"; ! #else ! // some macro magic (not at all) ! string pkgdatadir = PREFIX "/share/" PACKAGE_NAME; ! ! std::cerr << "dotDir = " << dotDir << "::"; ! std::cerr << "pkgdatadir = " << pkgdatadir << "::"; ! std::cerr << "filename = " << fileName << '\n'; #endif ! ERunScriptErrorType result = eUninit; if (validDotDir) --- 597,607 ---- CreateDotDir(dotDir); ! // get the (OS specific) path to the script directory ! string pkgdatadir = salt::RFile::BundlePath(); ! #if __APPLE__ ! pkgdatadir += "Contents/Resources/"; #endif ! ERunScriptErrorType result = eNotFound; if (validDotDir) *************** *** 635,640 **** { GetLog()->Debug() << "(ScriptServer) : Ran init script '" ! << dotDir << salt::PathSeparator << fileName << "'\n"; ! std::cerr << "leaving runinitscript (OK)\n"; return true; } --- 613,617 ---- { GetLog()->Debug() << "(ScriptServer) : Ran init script '" ! << dotDir << salt::RFile::Sep() << fileName << "'\n"; return true; } *************** *** 642,655 **** if (result == eNotFound) { - std::cerr << "init script not found " << dotDir << salt::PathSeparator << fileName << "\n"; GetLog()->Debug() << "(ScriptServer) : Did not find init script '" ! << dotDir << salt::PathSeparator << fileName << "'\n"; } else if (result == eError) { - std::cerr << "error in init script\n"; GetLog()->Error() << "(ScriptServer) ERROR: Found error in init script '" ! << dotDir << salt::PathSeparator << fileName << "'\n"; ! std::cerr << "leaving runinitscript (ERROR 1)\n"; return false; } --- 619,629 ---- if (result == eNotFound) { GetLog()->Debug() << "(ScriptServer) : Did not find init script '" ! << dotDir << salt::RFile::Sep() << fileName << "'\n"; } else if (result == eError) { GetLog()->Error() << "(ScriptServer) ERROR: Found error in init script '" ! << dotDir << salt::RFile::Sep() << fileName << "'\n"; return false; } *************** *** 657,692 **** // - std::cerr << "RunInitScriptInternal(" << pkgdatadir << ", " << fileName << ", " - << validDotDir << ", " << dotDir << ") (1)\n"; result = RunInitScriptInternal(pkgdatadir, fileName, validDotDir, dotDir); if (result == eOK) { - std::cerr << "Ran init script from pkgdatadir: " << pkgdatadir << salt::PathSeparator << fileName << "\n"; GetLog()->Debug() << "(ScriptServer) : Ran init script '" ! << pkgdatadir << salt::PathSeparator << fileName << "'\n"; ! std::cerr << "leaving runinitscript (OK 2)\n"; return true; } ! if (result == eNotFound) { GetLog()->Debug() << "(ScriptServer) : Did not find init script '" ! << pkgdatadir << salt::PathSeparator << fileName << "'\n"; } else if (result == eError) { GetLog()->Error() << "(ScriptServer) ERROR: Found error in init script '" ! << pkgdatadir << salt::PathSeparator << fileName << "'\n"; } - std::cerr << "RunInitScriptInternal(" << mRelPathPrefix+relPath << ", " << fileName << ", " - << validDotDir << ", " << dotDir << ") (2)\n"; - result = RunInitScriptInternal(mRelPathPrefix+relPath, fileName, validDotDir, dotDir); ! if (result == eOK) ! std::cerr << "Ran init script OK from : " << mRelPathPrefix+relPath << "\n"; ! else if (result == eNotFound) { std::cerr << "init script not found at " << mRelPathPrefix+relPath << "\n"; --- 631,657 ---- // result = RunInitScriptInternal(pkgdatadir, fileName, validDotDir, dotDir); if (result == eOK) { GetLog()->Debug() << "(ScriptServer) : Ran init script '" ! << pkgdatadir << salt::RFile::Sep() << fileName << "'\n"; return true; } ! if (result == eNotFound) { GetLog()->Debug() << "(ScriptServer) : Did not find init script '" ! << pkgdatadir << salt::RFile::Sep() << fileName << "'\n"; } else if (result == eError) { GetLog()->Error() << "(ScriptServer) ERROR: Found error in init script '" ! << pkgdatadir << salt::RFile::Sep() << fileName << "'\n"; } result = RunInitScriptInternal(mRelPathPrefix+relPath, fileName, validDotDir, dotDir); ! if (result == eNotFound) { std::cerr << "init script not found at " << mRelPathPrefix+relPath << "\n"; *************** *** 698,705 **** std::cerr << "error in init script found at " << mRelPathPrefix+relPath << "\n"; GetLog()->Error() << "(ScriptServer) ERROR: Found error in init script '" ! << mRelPathPrefix+relPath << salt::PathSeparator << fileName << "'\n"; } ! std::cerr << "leaving runinitscript (FINAL)\n"; return (result == eOK); } - --- 663,669 ---- std::cerr << "error in init script found at " << mRelPathPrefix+relPath << "\n"; GetLog()->Error() << "(ScriptServer) ERROR: Found error in init script '" ! << mRelPathPrefix+relPath << salt::RFile::Sep() << fileName << "'\n"; } ! return (result == eOK); } |
From: Oliver O. <fr...@us...> - 2007-06-17 13:38:47
|
Update of /cvsroot/simspark/simspark/spark/spark In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21072/spark Modified Files: .cvsignore spark-config.in spark.cpp spark.h spark.rb Log Message: merge from projectx branch Index: .cvsignore =================================================================== RCS file: /cvsroot/simspark/simspark/spark/spark/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** .cvsignore 19 Dec 2005 20:09:18 -0000 1.1 --- .cvsignore 17 Jun 2007 13:38:39 -0000 1.2 *************** *** 1,6 **** .deps .libs Makefile Makefile.in ! *.la ! *.lo --- 1,8 ---- + *.la + *.lo .deps + .dirstamp .libs Makefile Makefile.in ! spark-config Index: spark.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/spark/spark.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** spark.cpp 15 Mar 2007 07:26:29 -0000 1.4 --- spark.cpp 17 Jun 2007 13:38:39 -0000 1.5 *************** *** 23,27 **** #include <oxygen/oxygen.h> ! #if HAVE_KEROSIN_H #include <kerosin/kerosin.h> #include <kerosin/renderserver/rendercontrol.h> --- 23,27 ---- #include <oxygen/oxygen.h> ! #if HAVE_KEROSIN_KEROSIN_H #include <kerosin/kerosin.h> #include <kerosin/renderserver/rendercontrol.h> *************** *** 42,46 **** mZeitgeist(new Zeitgeist("." PACKAGE_NAME, relPathPrefix)), mOxygen(new Oxygen(*mZeitgeist)) ! #if HAVE_KEROSIN_H , mKerosin(new Kerosin(*mZeitgeist)) #endif --- 42,46 ---- mZeitgeist(new Zeitgeist("." PACKAGE_NAME, relPathPrefix)), mOxygen(new Oxygen(*mZeitgeist)) ! #if HAVE_KEROSIN_KEROSIN_H , mKerosin(new Kerosin(*mZeitgeist)) #endif *************** *** 155,159 **** } ! #if HAVE_KEROSIN_H shared_ptr<InputControl> Spark::GetInputControl() --- 155,159 ---- } ! #if HAVE_KEROSIN_KEROSIN_H shared_ptr<InputControl> Spark::GetInputControl() *************** *** 186,190 **** (mSimulationServer->GetControlNode("RenderControl")); } ! #endif // HAVE_KEROSIN_H shared_ptr<ScriptServer> --- 186,190 ---- (mSimulationServer->GetControlNode("RenderControl")); } ! #endif // HAVE_KEROSIN_KEROSIN_H shared_ptr<ScriptServer> Index: spark-config.in =================================================================== RCS file: /cvsroot/simspark/simspark/spark/spark/spark-config.in,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** spark-config.in 15 Mar 2007 07:26:29 -0000 1.2 --- spark-config.in 17 Jun 2007 13:38:39 -0000 1.3 *************** *** 94,100 **** if test "$echo_libs" = "yes" ; then if test "@debug@" = "true"; then ! libs="-lspark_debug" else ! libs="-lspark" fi echo -L@libdir@/simspark $libs --- 94,100 ---- if test "$echo_libs" = "yes" ; then if test "@debug@" = "true"; then ! libs="-lspark_debug" else ! libs="-lspark" fi echo -L@libdir@/simspark $libs Index: spark.rb =================================================================== RCS file: /cvsroot/simspark/simspark/spark/spark/spark.rb,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** spark.rb 15 Jun 2007 09:26:25 -0000 1.7 --- spark.rb 17 Jun 2007 13:38:39 -0000 1.8 *************** *** 344,348 **** # # setup the GeometryServer ! geometryServer = new('oxygen/GeometryServer', $serverPath+'geometry') # use the ruby scene importer to import scenes --- 344,348 ---- # # setup the GeometryServer ! # geometryServer = new('oxygen/GeometryServer', $serverPath+'geometry') # use the ruby scene importer to import scenes Index: spark.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/spark/spark.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** spark.h 15 Mar 2007 07:26:29 -0000 1.4 --- spark.h 17 Jun 2007 13:38:39 -0000 1.5 *************** *** 22,26 **** #if HAVE_CONFIG_H ! #include <config.h> #endif --- 22,26 ---- #if HAVE_CONFIG_H ! #include <sparkconfig.h> #endif *************** *** 44,48 **** } ! #if HAVE_KEROSIN_H namespace kerosin { --- 44,48 ---- } ! #if HAVE_KEROSIN_KEROSIN_H namespace kerosin { *************** *** 108,112 **** boost::shared_ptr<oxygen::SimulationServer> GetSimulationServer(); ! #if HAVE_KEROSIN_H /** returns the InputServer */ boost::shared_ptr<kerosin::InputServer> GetInputServer(); --- 108,112 ---- boost::shared_ptr<oxygen::SimulationServer> GetSimulationServer(); ! #if HAVE_KEROSIN_KEROSIN_H /** returns the InputServer */ boost::shared_ptr<kerosin::InputServer> GetInputServer(); *************** *** 117,120 **** --- 117,122 ---- /** returns the render control node */ boost::shared_ptr<kerosin::RenderControl> GetRenderControl(); + #else + #warning "Compiling spark with no I/O" #endif *************** *** 127,131 **** boost::shared_ptr<zeitgeist::Zeitgeist> mZeitgeist; boost::shared_ptr<oxygen::Oxygen> mOxygen; ! #if HAVE_KEROSIN_H boost::shared_ptr<kerosin::Kerosin> mKerosin; #endif --- 129,133 ---- boost::shared_ptr<zeitgeist::Zeitgeist> mZeitgeist; boost::shared_ptr<oxygen::Oxygen> mOxygen; ! #if HAVE_KEROSIN_KEROSIN_H boost::shared_ptr<kerosin::Kerosin> mKerosin; #endif |
From: Oliver O. <fr...@us...> - 2007-06-17 13:38:47
|
Update of /cvsroot/simspark/simspark/spark/zeitgeist In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21072/zeitgeist Modified Files: class.h core.cpp object.cpp zeitgeist-config.in zeitgeist.cpp Log Message: merge from projectx branch Index: core.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/zeitgeist/core.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** core.cpp 15 Mar 2007 07:26:31 -0000 1.3 --- core.cpp 17 Jun 2007 13:38:39 -0000 1.4 *************** *** 39,44 **** #include <sstream> ! #ifdef HAVE_CONFIG_H ! #include <config.h> #endif --- 39,44 ---- #include <sstream> ! #if HAVE_CONFIG_H ! #include <sparkconfig.h> #endif *************** *** 163,167 **** void Core::CatchSignal(int sig_num) { - #ifdef __linux__ if (sig_num != SIGSEGV) { --- 163,166 ---- *************** *** 171,174 **** --- 170,174 ---- cerr << "(Core) caught signal " << sig_num << endl; + #ifdef __linux__ // retrieve the name of our executable without access to argc and // argv (this works only with linux) *************** *** 206,213 **** free (strings); cerr << "(Core) exit" << endl; exit(1); - #endif } --- 206,213 ---- free (strings); + #endif cerr << "(Core) exit" << endl; exit(1); } Index: object.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/zeitgeist/object.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** object.cpp 5 Dec 2005 20:59:18 -0000 1.1 --- object.cpp 17 Jun 2007 13:38:39 -0000 1.2 *************** *** 86,89 **** --- 86,90 ---- boost::shared_ptr<Core> Object::GetCore() const { + // if (mClass.get() == 0) std::cerr << "mClass.get() == 0: " << GetName() << '\n'; assert(mClass.get() != NULL); boost::shared_ptr<Core> core = mClass->GetCore(); Index: zeitgeist.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/zeitgeist/zeitgeist.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** zeitgeist.cpp 15 Mar 2007 07:26:31 -0000 1.2 --- zeitgeist.cpp 17 Jun 2007 13:38:39 -0000 1.3 *************** *** 40,44 **** return; } ! mCore->GetScriptServer()->SetInitRelPathPrefix(relPathPrefix); RunInitScript(dotName); --- 40,44 ---- return; } ! mCore->GetScriptServer()->SetInitRelPathPrefix(relPathPrefix); RunInitScript(dotName); Index: zeitgeist-config.in =================================================================== RCS file: /cvsroot/simspark/simspark/spark/zeitgeist/zeitgeist-config.in,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** zeitgeist-config.in 25 Dec 2005 14:55:52 -0000 1.2 --- zeitgeist-config.in 17 Jun 2007 13:38:39 -0000 1.3 *************** *** 99,105 **** if test "$echo_libtool" = "yes" ; then if test "@debug@" = "true"; then ! convlib="libzeitgeist_debug.la" else ! convlib="libzeitgeist.la" fi echo @libdir@/simspark/$convlib --- 99,108 ---- if test "$echo_libtool" = "yes" ; then if test "@debug@" = "true"; then ! convlib="libzeitgeist_debug.la" else ! convlib="libzeitgeist.la" ! fi ! if test `uname -s` = "Darwin"; then ! convlib="$convlib -framework Carbon" fi echo @libdir@/simspark/$convlib Index: class.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/zeitgeist/class.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** class.h 22 Jan 2006 12:14:57 -0000 1.2 --- class.h 17 Jun 2007 13:38:39 -0000 1.3 *************** *** 33,45 **** #ifdef HAVE_CONFIG_H ! #include <config.h> #endif - #ifdef HAVE_HASH_MAP - #include <hash_map> - #else #include <map> - #endif - #include <string> #include <vector> --- 33,40 ---- #ifdef HAVE_CONFIG_H ! #include <sparkconfig.h> #endif #include <map> #include <string> #include <vector> *************** *** 153,161 **** /** defines a mapping from member names to command procedures */ - #ifdef HAVE_HASH_MAP - typedef std::hash_map<std::string, TCmdProc> TCommandMap; - #else typedef std::map<std::string, TCmdProc> TCommandMap; - #endif private: --- 148,152 ---- |
From: Oliver O. <fr...@us...> - 2007-06-17 13:38:45
|
Update of /cvsroot/simspark/simspark/spark/zeitgeist/logserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21072/zeitgeist/logserver Modified Files: .cvsignore Log Message: merge from projectx branch Index: .cvsignore =================================================================== RCS file: /cvsroot/simspark/simspark/spark/zeitgeist/logserver/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** .cvsignore 5 Dec 2005 21:50:00 -0000 1.1 --- .cvsignore 17 Jun 2007 13:38:39 -0000 1.2 *************** *** 2,5 **** --- 2,6 ---- *.lo .deps + .dirstamp .libs Makefile |
Update of /cvsroot/simspark/simspark/spark/plugin/voidmeshimporter In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21072/plugin/voidmeshimporter Added Files: .cvsignore Makefile.am export.cpp voidmeshimporter.cpp voidmeshimporter.h voidmeshimporter_c.cpp Log Message: merge from projectx branch --- NEW FILE: .cvsignore --- *.la *.lo .deps .libs Makefile Makefile.in --- NEW FILE: voidmeshimporter_c.cpp --- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group $Id: voidmeshimporter_c.cpp,v 1.2 2007/06/17 13:38:38 fruit Exp $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "voidmeshimporter.h" void CLASS(VoidMeshImporter)::DefineClass() { DEFINE_BASECLASS(oxygen/MeshImporter); } --- NEW FILE: export.cpp --- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group $Id: export.cpp,v 1.2 2007/06/17 13:38:38 fruit Exp $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "voidmeshimporter.h" #include <zeitgeist/zeitgeist.h> using namespace oxygen; ZEITGEIST_EXPORT_BEGIN() ZEITGEIST_EXPORT(VoidMeshImporter); ZEITGEIST_EXPORT_END() --- NEW FILE: voidmeshimporter.h --- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group $Id: voidmeshimporter.h,v 1.2 2007/06/17 13:38:38 fruit Exp $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef VOIDMESHIMPORTER_H #define VOIDMESHIMPORTER_H #include <oxygen/geometryserver/meshimporter.h> /** \class VoidMeshImporter is a MehsImporter the reads the custom .void format */ class VoidMeshImporter : public oxygen::MeshImporter { public: VoidMeshImporter(); ~VoidMeshImporter(); virtual boost::shared_ptr<oxygen::TriMesh> ImportMesh (const std::string& name,const zeitgeist::ParameterList& parameter); }; DECLARE_CLASS(VoidMeshImporter); #endif // VOIDMESHIMPORTER_H --- NEW FILE: voidmeshimporter.cpp --- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group $Id: voidmeshimporter.cpp,v 1.2 2007/06/17 13:38:38 fruit Exp $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "voidmeshimporter.h" #include <zeitgeist/logserver/logserver.h> #include <zeitgeist/fileserver/fileserver.h> #include <kerosin/sceneserver/helper/NVMeshMender.h> using namespace zeitgeist; using namespace oxygen; using namespace std; using namespace boost; VoidMeshImporter::VoidMeshImporter() { } VoidMeshImporter::~VoidMeshImporter() { } shared_ptr<TriMesh> VoidMeshImporter::ImportMesh (const string& name, const ParameterList& parameter) { // open file shared_ptr<FileServer> fileServer = shared_static_cast<FileServer> (GetCore()->Get("/sys/server/file")); if (fileServer.get() == 0) { GetLog()->Error() << "(VoidMeshImporter) ERROR: cannot find FileServer\n"; return shared_ptr<TriMesh>(); } shared_ptr<salt::RFile> file = fileServer->Open(name); if (file.get() == 0) { GetLog()->Error() << "(VoidMeshImporter) ERROR: cannot open file '" << name << "'\n"; return shared_ptr<TriMesh>(); } NVMeshMender meshmender; NVMeshMender::VAVector input, output; NVMeshMender::VertexAttribute att; char buffer[1024]; int temp; int i; // minimal check whether we're importing a void file string tempBuffer(buffer); if (tempBuffer.find("TotalTriCount") == string::npos) { GetLog()->Normal() << "(VoidMeshImporter) not a .void mesh, aborting.\n"; return shared_ptr<TriMesh>(); } GetLog()->Normal() << "(VoidMeshImporter) Loading " << name << "\n"; file->Gets(buffer, 1024); sscanf(buffer, "TotalTriCount: %d", &temp); GetLog()->Normal() << "(VoidMeshImporter) TotalTriCount: " << temp << "\n"; int vertexCount; file->Gets(buffer, 1024); sscanf(buffer, "VertexCount: %d", &vertexCount); GetLog()->Normal() << "(VoidMeshImporter) VertexCount: " << vertexCount << "\n"; int meshCount; file->Gets(buffer, 1024); sscanf(buffer, "MeshCount: %d", &meshCount); GetLog()->Normal() << "(VoidMeshImporter) MeshCount: " << meshCount << "\n"; file->Gets(buffer, 1024); // load position and texture coordinates of this object NVMeshMender::VertexAttribute position; position.Name_ = "position"; NVMeshMender::VertexAttribute tex0; tex0.Name_ = "tex0"; for (int v = 0; v < vertexCount; ++v) { float x, y, z; file->Gets(buffer, 1024); sscanf(buffer, "%f %f %f", &x, &y, &z); position.floatVector_.push_back(x); position.floatVector_.push_back(y); position.floatVector_.push_back(z); file->Gets(buffer, 1024); sscanf(buffer, "%f %f", &x, &y); tex0.floatVector_.push_back(x); tex0.floatVector_.push_back(y); tex0.floatVector_.push_back(1); } input.push_back(position); input.push_back(tex0); file->Gets(buffer, 1024); // for every mesh in the object NVMeshMender::VertexAttribute accumulatedIndices; vector<NVMeshMender::VertexAttribute> indices; indices.resize(meshCount); NVMeshMender::VertexAttribute material; material.Name_ = "material"; material.intVector_.resize(position.floatVector_.size()); accumulatedIndices.Name_ = "indices"; for (int m = 0; m < meshCount; ++m) { int matId = 0; // skip header file->Gets(buffer, 1024); // material file->Gets(buffer, 1024); sscanf(buffer, " Material: %d", &matId); // face count int faceCount; file->Gets(buffer, 1024); sscanf(buffer, " FaceCount: %d", &faceCount); //printf("FaceCount: %d\n", faceCount); // skip file->Gets(buffer, 1024); indices[m].Name_ = "indices"; for(int f = 0; f < faceCount; ++f) { int a, b, c; file->Gets(buffer, 1024); sscanf(buffer, " %d %d %d", &a, &b, &c); indices[m].intVector_.push_back(a); material.intVector_[3*a] = matId; accumulatedIndices.intVector_.push_back(a); indices[m].intVector_.push_back(b); material.intVector_[3*b] = matId; accumulatedIndices.intVector_.push_back(b); indices[m].intVector_.push_back(c); material.intVector_[3*c] = matId; accumulatedIndices.intVector_.push_back(c); } file->Gets(buffer, 1024); } input.push_back(accumulatedIndices); input.push_back(material); // Read Materials vector<string> materials; while (! file->Eof()) { if (file->Gets(buffer, 1024)>0 && buffer[0] == 'M') { char matName[256]; int dummy; sscanf(buffer, "Material %d: %s", &dummy, matName); GetLog()->Normal() << "(VoidMeshImporter) Material '" << matName << "'\n"; materials.push_back(matName); } } file->Close(); // output att.Name_ = "position"; output.push_back(att); att.Name_ = "tex0"; output.push_back(att); att.Name_ = "normal"; output.push_back(att); att.Name_ = "indices"; output.push_back(att); att.Name_ = "material"; output.push_back(att); // munge shared_ptr<TriMesh> triMesh(new TriMesh()); meshmender.Munge(input, output, 3.141592654f/3.0f, 0, NVMeshMender::FixTangents, NVMeshMender::DontFixCylindricalTexGen, NVMeshMender::WeightNormalsByFaceSize); NVMeshMender::VertexAttribute outIndices; NVMeshMender::VertexAttribute outMaterial; for (i=0; i < (int)output.size(); ++i) { string b = output[i].Name_; if (output[i].Name_ == "position") { vertexCount = output[i].floatVector_.size()/3; shared_array<float> pos(new float[vertexCount * 3]); for (int j = 0; j < (vertexCount*3); ++j) { pos[j] = output[i].floatVector_[j]; } triMesh->SetPos(pos,vertexCount); } if (output[i].Name_ == "tex0") { int size = output[i].floatVector_.size()/3; shared_array<float> texCoords(new float[size * 3]); for (int j = 0; j < (size*3); ++j) { texCoords[j] = output[i].floatVector_[j]; } triMesh->SetTexCoords(texCoords); } if (output[i].Name_ == "normal") { int size = output[i].floatVector_.size()/3; shared_array<float> normal(new float[size * 3]); for (int j = 0; j < (size * 3); ++j) { normal[j] = output[i].floatVector_[j]; } triMesh->SetNormals(normal); } if (output[i].Name_ == "indices") { outIndices = output[i]; } if (output[i].Name_ == "material") { outMaterial = output[i]; } } std::vector<int> faceCount; faceCount.resize(meshCount); for (i = 0; i<meshCount; ++i) { faceCount[i] = 0; } int totalFaceCount = outIndices.intVector_.size()/3; for (i = 0; i < totalFaceCount; ++i) { faceCount[outMaterial.intVector_[outIndices.intVector_[3*i]*3]]++; } for (i = 0; i<meshCount; ++i) { shared_ptr<IndexBuffer> indeces(new IndexBuffer()); indeces->EnsureFit(faceCount[i] * 3); unsigned int* faces = indeces->GetIndex().get(); for (int f = 0; f < totalFaceCount; ++f) { if (outMaterial.intVector_[outIndices.intVector_[3*f]*3]==i) { // add face int triBase = 3*f; indeces->Cache(outIndices.intVector_[triBase]); indeces->Cache(outIndices.intVector_[triBase+1]); indeces->Cache(outIndices.intVector_[triBase+2]); } } triMesh->AddFace(indeces, materials[i]); } return triMesh; } --- NEW FILE: Makefile.am --- pkglib_LTLIBRARIES = voidmeshimporter.la voidmeshimporter_la_SOURCES = export.cpp \ voidmeshimporter.cpp voidmeshimporter_c.cpp voidmeshimporter.h voidmeshimporter_la_LDFLAGS = -module -avoid-version -L${top_srcdir}/utility/sfsexp/ AM_CPPFLAGS = -I${top_srcdir}/lib -I${top_srcdir}/utility @RUBY_CPPFLAGS@ |
From: Oliver O. <fr...@us...> - 2007-06-17 13:38:44
|
Update of /cvsroot/simspark/simspark/spark/test/coretest In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21072/test/coretest Modified Files: main.cpp Log Message: merge from projectx branch Index: main.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/test/coretest/main.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** main.cpp 15 Mar 2007 07:26:30 -0000 1.3 --- main.cpp 17 Jun 2007 13:38:39 -0000 1.4 *************** *** 21,25 **** */ #if HAVE_CONFIG_H ! #include <config.h> #endif --- 21,25 ---- */ #if HAVE_CONFIG_H ! #include <sparkconfig.h> #endif |
From: Oliver O. <fr...@us...> - 2007-06-17 13:38:44
|
Update of /cvsroot/simspark/simspark/spark/zeitgeist/fileserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21072/zeitgeist/fileserver Modified Files: .cvsignore Log Message: merge from projectx branch Index: .cvsignore =================================================================== RCS file: /cvsroot/simspark/simspark/spark/zeitgeist/fileserver/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** .cvsignore 5 Dec 2005 21:50:00 -0000 1.1 --- .cvsignore 17 Jun 2007 13:38:39 -0000 1.2 *************** *** 2,5 **** --- 2,6 ---- *.lo .deps + .dirstamp .libs Makefile |
From: Oliver O. <fr...@us...> - 2007-06-17 13:38:44
|
Update of /cvsroot/simspark/simspark/spark/zeitgeist/randomserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21072/zeitgeist/randomserver Modified Files: .cvsignore Log Message: merge from projectx branch Index: .cvsignore =================================================================== RCS file: /cvsroot/simspark/simspark/spark/zeitgeist/randomserver/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** .cvsignore 5 Dec 2005 21:50:00 -0000 1.1 --- .cvsignore 17 Jun 2007 13:38:39 -0000 1.2 *************** *** 2,5 **** --- 2,6 ---- *.lo .deps + .dirstamp .libs Makefile |