Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

cybbackgroundc.h

Go to the documentation of this file.
00001 /*
00002 Copyright (C) 1999  Carsten Winkelholz
00003 
00004 Malte Weiß, 26.07.2002: Node fully implemented.
00005             29.07.2002: Added texture functions. Dynamic handling improved.
00006 
00007 Address:  FGAN Forschungsgesellschaft fr Angewandte Naturwissenschaften e. V.
00008       Neuenahrer Str. 20
00009       D - 53343 Wachtberg
00010       
00011 Email:    winkelholz@fgan.de
00012 
00013 This program is free software; you can redistribute it and/or
00014 modify it under the terms of the GNU General Public License
00015 as published by the Free Software Foundation; either version 2
00016 of the License, or (at your option) any later version.
00017 
00018 This program is distributed in the hope that it will be useful,
00019 but WITHOUT ANY WARRANTY; without even the implied warranty of
00020 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00021 GNU General Public License for more details.
00022 
00023 You should have received a copy of the GNU General Public License
00024 along with this program; if not, write to the Free Software
00025 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00026 */
00027 
00028 #ifndef CYBBACKGROUND_HC
00029 #define CYBBACKGROUND_HC
00030 
00031 #include "oaw/ctk/cybnodec.h"
00032 #include "oaw/ctk/cybwrlfields.h"
00033 #include "oaw/ctk/cybtexturemanagerc.h"
00034 
00035 // Texture index values
00036 
00037 #define  TEX_BACK    0
00038 #define  TEX_BOTTOM  1
00039 #define  TEX_FRONT   2
00040 #define  TEX_LEFT    3
00041 #define  TEX_RIGHT   4
00042 #define  TEX_TOP     5
00043 
00044 // Class definition
00045 #include "../oawconfig.h"
00046 
00047 OAW_BEGIN_NAMESPACE
00048 
00049 class OAW_DLLMAPPING CybBackgroundC : public CybNodeC
00050 {
00051 public:
00052   CybBackgroundC(CybWorldC*);
00053   CybBackgroundC(const CybBackgroundC&);
00054   CybBackgroundC& operator = (const CybBackgroundC&);
00055   virtual void CreateNewCopy(CybNodeC* pNode);
00056   virtual ~CybBackgroundC();
00057 
00058   virtual void FinishInit();
00059   virtual void SetEvent(long, const void*, BaseI*);
00060   virtual long GetFieldEventID(const char*);
00061   virtual long GetFieldDataType(long);
00062   virtual short GetFieldData(long,void* data);
00063 
00064   virtual void ToChannel(CybChannelC*, long) {}
00065   virtual void Render(CybChannelC*, long) {}
00066 
00067 protected:
00068   void         SendIsBoundOutEvents(SFBool b);
00069   virtual void LoadVRML(char*& iter, const char* iterEnd,long& znr);
00070 
00071 protected:
00072   virtual void LoadTextures();
00073   virtual void UnloadTextures();
00074   virtual void PrepareRender() {}
00075 
00076 public:
00077   // Background properties
00078   MFFloat  m_mfGroundAngle;     // Ground angles
00079   MFColor  m_mvGroundColor;     // Ground colors
00080   MFString m_msBackUrl;         // Background image back
00081   MFString m_msBottomUrl;       // - bottom
00082   MFString m_msFrontUrl;        // - front
00083   MFString m_msLeftUrl;         // - left
00084   MFString m_msRightUrl;        // - right
00085   MFString m_msTopUrl;          // - top
00086   MFFloat  m_mfSkyAngle;        // Sky angles
00087   MFColor  m_mvSkyColor;        // Sky colors
00088 
00089   SFBool   m_bUpdateRender;     // Must render data be updated?
00090 
00091   // Textures for background cube
00092   TEXTURE    m_pTextures[6];
00093 
00094   // Key list
00095   static char VRMLKeyStrList[][30];
00096 };
00097 
00098 OAW_END_NAMESPACE
00099 
00100 #endif
00101 
00102 
00103 
00104 

Generated on Tue Jul 29 14:24:09 2003 for Open ActiveWrl by doxygen1.3-rc2