Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages
imagecubemapmaker.h
Go to the documentation of this file.00001 /* 00002 Copyright (C) 2005 by Jorrit Tyberghein 00003 (C) 2005 by Frank Richter 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License as published by the Free Software Foundation; either 00008 version 2 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Library General Public License for more details. 00014 00015 You should have received a copy of the GNU Library General Public 00016 License along with this library; if not, write to the Free 00017 Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00018 */ 00019 00027 #ifndef __CS_CSGFX_IMAGECUBEMAPMAKER_H__ 00028 #define __CS_CSGFX_IMAGECUBEMAPMAKER_H__ 00029 00030 #include "csextern.h" 00031 #include "csutil/leakguard.h" 00032 #include "imagebase.h" 00033 00039 class CS_CSGFX_EXPORT csImageCubeMapMaker : public csImageBase 00040 { 00041 protected: 00042 csRef<iImage> cubeImages[6]; 00043 bool manualName; 00044 00045 void CheckImage (int index); 00046 void UpdateName (); 00047 public: 00048 SCF_DECLARE_IBASE; 00049 CS_LEAKGUARD_DECLARE (csImageCubeMapMaker); 00050 00052 csImageCubeMapMaker(); 00054 csImageCubeMapMaker (iImage* source); 00059 csImageCubeMapMaker (iImage* posX, iImage* negX, iImage* posY, 00060 iImage* negY, iImage* posZ, iImage* negZ); 00061 00062 virtual ~csImageCubeMapMaker(); 00063 00064 virtual const void *GetImageData (); 00065 virtual int GetWidth () const; 00066 virtual int GetHeight () const; 00068 virtual void SetName (const char *iName); 00076 virtual const char *GetName () const { return fName; } 00077 00078 virtual int GetFormat () const; 00079 virtual const csRGBpixel* GetPalette (); 00080 virtual const uint8* GetAlpha (); 00081 00082 virtual bool HasKeyColor () const { return false; } 00083 virtual void GetKeyColor (int &r, int &g, int &b) const { } 00084 00085 virtual uint HasMipmaps () const; 00086 virtual csRef<iImage> GetMipmap (uint num); 00087 00088 virtual const char* GetRawFormat() const; 00089 virtual csRef<iDataBuffer> GetRawData() const; 00090 virtual csImageType GetImageType() const { return csimgCube; } 00091 virtual uint HasSubImages() const { return 5; } 00092 virtual csRef<iImage> GetSubImage (uint num); 00093 00095 void SetSubImage (uint num, iImage* image); 00102 bool SubImageSet (uint num) 00103 { return ((num >= 0) && (num <= 5) && (cubeImages[num].IsValid())); } 00104 }; 00105 00108 #endif // __CS_CSGFX_IMAGECUBEMAPMAKER_H__
Generated for Crystal Space by doxygen 1.3.9.1