Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
SoDDSImageRW Class Reference

VSG extension Class for decoding a DDS raster image. More...

#include <Inventor/image/SoDDSImageRW.h>

+ Inheritance diagram for SoDDSImageRW:

Public Member Functions

virtual SoType getTypeId () const
 Returns the type identifier for this specific instance.
 
 SoDDSImageRW ()
 Constructor.
 
virtual ~SoDDSImageRW ()
 Destructor.
 
virtual SbBool open (SoRasterImageIO *rasterImageIO, OpenMode openMode)
 Opens the reader/writer in the specified open mode.
 
virtual SbBool write (SbRasterImage *rasterImage, unsigned int xPos=0, unsigned int yPos=0)
 Writes and encodes the given data in the specific format.
 
virtual SbBool read (SbRasterImage *rasterImage, SbBool infoOnly=FALSE)
 Reads, decodes, and fills the rasterImage object.
 
virtual SbBool isMultipleBufferInverted () const
 Specifies the write direction when using multiple buffers.
 
virtual SoRasterImageRW::WriteCapability getWriteCapability () const
 Returns the write capability of the raster format.
 
virtual SoRasterImageRW::ReadCapability getReadCapability () const
 Returns the read capability of the raster format.
 
- Public Member Functions inherited from SoRasterImageRW
virtual ~SoRasterImageRW ()
 Destructor.
 
virtual void close ()
 Closes the reader/writer.
 
virtual SbBool checkRead (SoRasterImageFile *imageFile)
 Checks if the specified file can be read.
 
virtual SbBool writeHeader (const SbVec2i32 &size)
 Writes and encodes the header for this specific format.
 
virtual SbBool writeFooter ()
 Writes and encodes the footer for this specific format.
 
virtual SbBool readRegion (SbRasterImage *rasterImage, const SbBox2i32 &region)
 Read the specified region of current open image into rasterImage.
 
virtual SbStringgetSuffixes (int &numSuffixes) const
 Returns the list of file suffixes supported.
 
virtual void enableMultipleWriting (SbBool state)
 Enable writing image with multiple calls to write method.
 
virtual SbBool isMultipleWritingEnabled () const
 Returns TRUE if multiple buffer writing is enabled.
 
virtual SoDEPRECATED SbBool writeHeader (SbVec2i32 &size)
 Writes and encodes the header for this specific format.
 
virtual SoDEPRECATED SbBool writeHeader (SbVec2s &size)
 Writes and encodes the header for this specific format.
 

Static Public Member Functions

static SoType getClassTypeId ()
 Returns the type identifier for this class.
 
- Static Public Member Functions inherited from SoRasterImageRW
static SoType getClassTypeId ()
 Returns the type identifier for this class.
 

Additional Inherited Members

- Public Types inherited from SoRasterImageRW
enum  WriteCapability {
  WRITE_SCANLINES ,
  WRITE_FULL_IMAGE ,
  WRITE_UNAVAILABLE
}
 Write Capability enumeration values. More...
 
enum  ReadCapability {
  READ_AVAILABLE ,
  READ_UNAVAILABLE
}
 Read Capability enumeration values. More...
 
enum  OpenMode {
  OPEN_READ ,
  OPEN_WRITE
}
 open Mode enumeration values. More...
 

Detailed Description

VSG extension Class for decoding a DDS raster image.

This class is used for decoding a DDS (DirectDraw Surface) raster image.

DDS files are faster to load and use less memory than other image file formats, because the compressed data is sent directly to the graphics device (no decompression is done on the CPU).

Formats:
This class is able to read DDS files compressed with DXT1 with 1-bit Alpha, DXT3, and DXT5 compression. The other formats which can be contained by a DDS file (e.g. DXT2 and DXT4) are not currently supported.

Mipmaps:
This format can also embed mipmaps (levels of resolution), but all levels (from higher resolution to a 1*1 pixel image) are not necessarily required. The SoComplexity::textureQuality field has no effect on mipmap generation if the DDS file already embeds mipmaps.

NOTE: File encoding and writing is not currently supported.

See SoRasterImageRW for more information and code examples.

SEE ALSO

SoRasterImageFile, SoRasterImageRW, SbRasterImage, SoComplexity

Definition at line 67 of file SoDDSImageRW.h.

Constructor & Destructor Documentation

◆ SoDDSImageRW()

SoDDSImageRW::SoDDSImageRW ( )

Constructor.

◆ ~SoDDSImageRW()

virtual SoDDSImageRW::~SoDDSImageRW ( )
virtual

Destructor.

Member Function Documentation

◆ getClassTypeId()

static SoType SoDDSImageRW::getClassTypeId ( )
static

Returns the type identifier for this class.


◆ getReadCapability()

virtual SoRasterImageRW::ReadCapability SoDDSImageRW::getReadCapability ( ) const
virtual

Returns the read capability of the raster format.

Reimplemented from SoRasterImageRW.

◆ getTypeId()

virtual SoType SoDDSImageRW::getTypeId ( ) const
virtual

Returns the type identifier for this specific instance.

Implements SoRasterImageRW.

◆ getWriteCapability()

virtual SoRasterImageRW::WriteCapability SoDDSImageRW::getWriteCapability ( ) const
virtual

Returns the write capability of the raster format.

Reimplemented from SoRasterImageRW.

◆ isMultipleBufferInverted()

virtual SbBool SoDDSImageRW::isMultipleBufferInverted ( ) const
virtual

Specifies the write direction when using multiple buffers.

Returns FALSE if buffers are written from top to bottom. Returns TRUE if buffers are written from bottom to top.

Reimplemented from SoRasterImageRW.

◆ open()

virtual SbBool SoDDSImageRW::open ( SoRasterImageIO rasterImageIO,
OpenMode  openMode 
)
virtual

Opens the reader/writer in the specified open mode.

Reimplemented from SoRasterImageRW.

◆ read()

virtual SbBool SoDDSImageRW::read ( SbRasterImage rasterImage,
SbBool  infoOnly = FALSE 
)
virtual

Reads, decodes, and fills the rasterImage object.

If infoOnly is TRUE, then the buffer will not be read, the parameter rasterImage will be set with raster size and raster number of components, the buffer will be NULL.

Implements SoRasterImageRW.

◆ write()

virtual SbBool SoDDSImageRW::write ( SbRasterImage rasterImage,
unsigned int  xPos = 0,
unsigned int  yPos = 0 
)
virtual

Writes and encodes the given data in the specific format.


Not currently supported for this format.

Implements SoRasterImageRW.


The documentation for this class was generated from the following file: