Property API clean to smooth the task of generating wrappers.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user