File indexing completed on 2025-01-18 10:03:47
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #ifndef _Graphic3d_CubeMap_HeaderFile
0016 #define _Graphic3d_CubeMap_HeaderFile
0017
0018 #include <Graphic3d_CubeMapOrder.hxx>
0019 #include <Graphic3d_TextureMap.hxx>
0020
0021
0022
0023 class Graphic3d_CubeMap : public Graphic3d_TextureMap
0024 {
0025 DEFINE_STANDARD_RTTIEXT(Graphic3d_CubeMap, Graphic3d_TextureMap)
0026 public:
0027
0028
0029 Standard_EXPORT Graphic3d_CubeMap (const TCollection_AsciiString& theFileName,
0030 Standard_Boolean theToGenerateMipmaps = Standard_False);
0031
0032
0033 Standard_EXPORT Graphic3d_CubeMap (const Handle(Image_PixMap)& thePixmap = Handle(Image_PixMap)(),
0034 Standard_Boolean theToGenerateMipmaps = Standard_False);
0035
0036
0037 Standard_Boolean More() const { return !myEndIsReached; }
0038
0039
0040 Graphic3d_CubeMapSide CurrentSide() const { return myCurrentSide; }
0041
0042
0043
0044 void Next()
0045 {
0046 if (!myEndIsReached && myCurrentSide == Graphic3d_CMS_NEG_Z)
0047 {
0048 myEndIsReached = true;
0049 }
0050 else
0051 {
0052 myCurrentSide = Graphic3d_CubeMapSide (myCurrentSide + 1);
0053 }
0054 }
0055
0056
0057 void SetZInversion (Standard_Boolean theZIsInverted)
0058 {
0059 myZIsInverted = theZIsInverted;
0060 }
0061
0062
0063 Standard_Boolean ZIsInverted() const
0064 {
0065 return myZIsInverted;
0066 }
0067
0068
0069 Standard_Boolean HasMipmaps() const { return myHasMipmaps; }
0070
0071
0072 void SetMipmapsGeneration (Standard_Boolean theToGenerateMipmaps) { myHasMipmaps = theToGenerateMipmaps; }
0073
0074
0075
0076 virtual Handle(Image_CompressedPixMap) CompressedValue (const Handle(Image_SupportedFormats)& theSupported) = 0;
0077
0078
0079
0080 virtual Handle(Image_PixMap) Value (const Handle(Image_SupportedFormats)& theSupported) = 0;
0081
0082
0083 Graphic3d_CubeMap& Reset()
0084 {
0085 myCurrentSide = Graphic3d_CMS_POS_X;
0086 myEndIsReached = false;
0087 return *this;
0088 }
0089
0090
0091 Standard_EXPORT virtual ~Graphic3d_CubeMap();
0092
0093 protected:
0094
0095 Graphic3d_CubeMapSide myCurrentSide;
0096 Standard_Boolean myEndIsReached;
0097 Standard_Boolean myZIsInverted;
0098
0099 };
0100
0101 DEFINE_STANDARD_HANDLE(Graphic3d_CubeMap, Graphic3d_TextureMap)
0102
0103 #endif