Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

renderserver.h

Go to the documentation of this file.
00001 /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*-
00002 
00003    this file is part of rcssserver3D
00004    Fri May 9 2003
00005    Copyright (C) 2002,2003 Koblenz University
00006    Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group
00007    $Id: renderserver.h,v 1.9 2004/04/12 08:32:04 rollmark Exp $
00008 
00009    This program is free software; you can redistribute it and/or modify
00010    it under the terms of the GNU General Public License as published by
00011    the Free Software Foundation; version 2 of the License.
00012 
00013    This program is distributed in the hope that it will be useful,
00014    but WITHOUT ANY WARRANTY; without even the implied warranty of
00015    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016    GNU General Public License for more details.
00017 
00018    You should have received a copy of the GNU General Public License
00019    along with this program; if not, write to the Free Software
00020    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00021 
00022    You should have received a copy of the GNU General Public License
00023    along with this program; if not, write to the Free Software
00024    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00025 
00026    RenderServer
00027 
00028    NOTE:
00029 
00030    HISTORY:
00031        25.08.03 - MR
00032        - Initial version
00033 
00034    TODO:
00035 
00036    TOFIX:
00037 */
00038 #ifndef KEROSIN_RENDERSERVER_H
00039 #define KEROSIN_RENDERSERVER_H
00040 
00041 #include <salt/frustum.h>
00042 #include <zeitgeist/class.h>
00043 #include <zeitgeist/leaf.h>
00044 
00045 namespace oxygen
00046 {
00047     class Scene;
00048     class SceneServer;
00049     class Camera;
00050     class BaseNode;
00051 }
00052 
00053 namespace kerosin
00054 {
00055     class OpenGLServer;
00056 
00057 class RenderServer : public zeitgeist::Leaf
00058 {
00059     //
00060     // Functions
00061     //
00062 public:
00063     RenderServer();
00064     ~RenderServer();
00065 
00067     void Render();
00068 
00070     void RenderFancyLighting(const salt::Frustum& frustum,
00071                              boost::shared_ptr<oxygen::Camera>& camera,
00072                              TLeafList& myLights, TLeafList& allMeshes,
00073                              TLeafList& visibleMeshes);
00074 
00075 protected:
00077     bool RenderServer::GetActiveScene();
00078 
00080     virtual void OnLink();
00081 
00083     virtual void OnUnlink();
00084 
00088     void RenderScene(boost::shared_ptr<oxygen::BaseNode> node);
00089 
00092     void BindCamera(boost::shared_ptr<oxygen::Camera>& camera);
00093 
00094     //
00095     // Members
00096     //
00097 protected:
00099     boost::shared_ptr<oxygen::Scene> mActiveScene;
00100 
00102     boost::shared_ptr<oxygen::SceneServer> mSceneServer;
00103 
00105     boost::shared_ptr<kerosin::OpenGLServer> mOpenGLServer;
00106 
00107     unsigned int mAmbientVP;
00108 };
00109 
00110 DECLARE_CLASS(RenderServer);
00111 
00112 } //namespace kerosin
00113 
00114 #endif // KEROSIN_RENDERSERVER_H

Generated on Thu Apr 6 15:25:39 2006 for rcssserver3d by  doxygen 1.4.4