24#ifndef _SBRASTERIMAGE_
25#define _SBRASTERIMAGE_
37#pragma warning(disable:4251)
352 void setNumMipmaps(
int nmm) {m_numMipmaps = nmm;};
360 void setCompressedInternalFormat(uint8_t intFormat) {m_compressedInternalFormat = intFormat;};
361 uint8_t getCompressedInternalFormat()
const
363 return m_compressedInternalFormat;
382 int getDataTypeSizeInBytes()
const;
395 mutable unsigned char* m_buffer;
406 uint8_t m_compressedInternalFormat;
DataType
Supported Data type.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Class encapsulat...
SbBool removeAlphaChannel()
Removes the Alpha channel from the current raster image.
SoBufferObject * getBufferObject() const
Returns the pixel buffer of the raster image.
void setSize(const SbVec2s &size)
Sets the raster image size in pixels.
@ COPY
Open Inventor will make a copy of the data (default).
@ NO_COPY_AND_DELETE
Passed buffer used, SbRasterImage will delete.
@ NO_COPY_AND_FREE
Passed buffer used, SbRasterImage will free.
@ NO_COPY
Passed buffer used , user will delete .
int getComponentsSize() const
Returns the size in bytes of each pixel in the image.
SoDEPRECATED SbRasterImage(const SbVec2i32 &size, Components components, const unsigned char *bytes, CopyPolicy copy=COPY)
Constructor that initializes with a large image.
SbRasterImage()
Constructor that creates an empty image.
CopyPolicy getCopyPolicy() const
Returns the current buffer copy policy.
void setBuffer(SoBufferObject *bufferObject)
Sets the pixel buffer of the raster image.
void setComponents(SbRasterImage::Components comp)
Sets the number of components in each pixel of the raster image.
Components
Components type.
@ RGB
Number of components 3 (RGB) (default).
@ UNKNOWN
Unknown number of components.
@ LUMINANCE
Number of components 1 (luminance).
@ RGBE
Number of components 4 (RGBE).
@ RGB_TRANSPARENCY
Number of components 4 (RGB + transparency).
@ LUMINANCE_TRANSPARENCY
Number of components 2 (luminance + transparency).
virtual ~SbRasterImage()
Destructor.
SbRasterImage::Components getComponents() const
Returns the number of components of each pixel as an enum.
SoDEPRECATED SbRasterImage(const SbVec2s &size, Components components, const unsigned char *bytes, CopyPolicy copy=COPY)
Constructor that initializes with an image.
SbVec2i32 getSize_i32() const
Returns the raster image size in pixels for large images.
SoDEPRECATED unsigned char * getBuffer() const
Returns the pixel buffer of the raster image.
int getComponentsCount() const
Returns the number of components of each pixel.
SbVec2s getSize() const
Returns the raster image size in pixels.
SoDEPRECATED void setBuffer(unsigned char *buffer, CopyPolicy copy=COPY)
Sets the pixel buffer of the raster image.
SbRasterImage(const SbVec2i32 &size, Components components, SoBufferObject *bufferObject)
Constructor that initializes with an image.
void setSize_i32(const SbVec2i32 &size)
Sets the raster image size in pixels.
int getNumMipmaps()
Returns the number of mipmaps contained by the buffer.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Abstract base cl...
Smart pointer for any class inheriting SoRefCounter.