Property API clean to smooth the task of generating wrappers.

This commit is contained in:
Robert Osfield
2004-12-17 01:06:33 +00:00
parent 4383655fcd
commit a0ba625cb0
39 changed files with 253 additions and 229 deletions

View File

@@ -224,20 +224,28 @@ class SG_EXPORT Image : public Object
};
/** Send offsets into data. It is assumed that first mipmap offset (index 0) is 0.*/
inline void setMipmapData(const MipmapDataType& mipmapDataVector)
inline void setMipmapLevels(const MipmapDataType& mipmapDataVector) { _mipmapData = mipmapDataVector; }
inline const MipmapDataType& getMipmapLevels() const { return _mipmapData; }
inline unsigned int getMipmapOffset(unsigned int mipmapLevel) const
{
_mipmapData = mipmapDataVector;
};
inline unsigned char* getMipmapData(unsigned int mipmapNumber) const
{
if(mipmapNumber == 0)
return _data;
else if(mipmapNumber < getNumMipmapLevels())
return _data + _mipmapData[mipmapNumber-1];
return 0L;
if(mipmapLevel == 0)
return 0;
else if (mipmapLevel < getNumMipmapLevels())
return _mipmapData[mipmapLevel-1];
return 0;
};
inline unsigned char* getMipmapData(unsigned int mipmapLevel)
{
return _data+getMipmapOffset(mipmapLevel);
}
inline const unsigned char* getMipmapData(unsigned int mipmapLevel) const
{
return _data+getMipmapOffset(mipmapLevel);
}
/** Return true if this image is translucent - i.e. it has alpha values that are less 1.0 (when normalized). */
bool isImageTranslucent() const;