VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions
makVrv::DtMeifConverter Class Reference

Class responsible for converting images into MAK encrypted image files. More...

Classes

struct  CompositeImage
 

Public Types

enum  EffectTextureType { None, NormalMap, Emissive }
 
typedef std::vector
< CompositeImage
ImageList
 

Public Member Functions

 DtMeifConverter ()
 CTOR. More...
 
virtual ~DtMeifConverter ()
 DTOR. More...
 
bool createEncryptedImage (const std::string &filename, const std::string &outputFile, const osgDB::ReaderWriter::Options *options, bool flipOutputImage, EffectTextureType textureType, bool verbose, bool generate_dds)
 Encrypt a image from a file. More...
 
bool createCompressedImage (osg::ref_ptr< osg::Image > &img, const std::string &inputFilename, const std::string &outputFile, bool flipOutputImage, EffectTextureType textureType, bool generateMipMaps, int qualityLevel, bool verbose, bool generate_dds)
 Create a compressed image. More...
 
bool startTBBCompressionTaskIfPossible (osg::Image *image)
 checks to see if there is a thread available for starting a compression task and starts the task if there is More...
 
void resizeImageIfNeeded (osg::ref_ptr< osg::Image > &img)
 
void write_and_compress_dds_data (FILE *file, const struct DDS_HEADER &ddsHeader, unsigned int blockDataSize, unsigned char *blockData)
 
bool compositeImages (const ImageList &files, const std::string &outputFile, int outputWidth, int outputHeight, int cols, int rows, bool forceNoAlpha, bool composeRowsTopToBottom, bool verbose)
 Composite images together, the list of files is in row major order. More...
 
EffectTextureType effectTextureType (const std::string &filename) const
 Return type of effect texture from filename. More...
 
virtual void setupCompressionFormat (osg::ref_ptr< osg::Image > &img, DtMeifConverter::EffectTextureType textureType, osg::ref_ptr< osg::Texture > &texture)
 
void resizeImagePow2 (osg::Image *img, int newW, int newH)
 Resizes the image to the next power of 2. More...
 
bool createBinaryData (unsigned int compressedFormat, osg::ref_ptr< osg::Image > &img, bool mipMaps, int qualityLevel, bool verbose, unsigned int &blockDataSize, unsigned char *&blockData, bool &deleteBlockData, osg::Image::MipmapDataType &mipOffsets)
 Create the raw binary data to write out. More...
 

Static Public Member Functions

static bool convertToRGBA (osg::ref_ptr< osg::Image > &img, unsigned char *&rgbaPixels, bool &deletePixels, bool verbose)
 Convert an image to a buffer of RGBA pixels. More...
 
static bool isPowerOf2 (unsigned int i)
 
static unsigned int nextPowerOf2 (unsigned int i)
 
static unsigned int logBase2 (unsigned int i)
 

Private Member Functions

 DtMeifConverter (const DtMeifConverter &other)
 Copy Constructor not implemented – Copy Not Allowed. More...
 
DtMeifConverteroperator= (const DtMeifConverter &other)
 Assignment Operator Not implemented – Assignment Not Allowed. More...
 

Detailed Description

Class responsible for converting images into MAK encrypted image files.

Member Typedef Documentation

Member Enumeration Documentation

Enumerator
None 
NormalMap 
Emissive 

Constructor & Destructor Documentation

makVrv::DtMeifConverter::DtMeifConverter ( )

CTOR.

virtual makVrv::DtMeifConverter::~DtMeifConverter ( )
virtual

DTOR.

makVrv::DtMeifConverter::DtMeifConverter ( const DtMeifConverter other)
private

Copy Constructor not implemented – Copy Not Allowed.

Member Function Documentation

DtMeifConverter& makVrv::DtMeifConverter::operator= ( const DtMeifConverter other)
private

Assignment Operator Not implemented – Assignment Not Allowed.

bool makVrv::DtMeifConverter::createEncryptedImage ( const std::string &  filename,
const std::string &  outputFile,
const osgDB::ReaderWriter::Options *  options,
bool  flipOutputImage,
EffectTextureType  textureType,
bool  verbose,
bool  generate_dds 
)

Encrypt a image from a file.

options = null means use default behavior (ex. for medftool)

bool makVrv::DtMeifConverter::createCompressedImage ( osg::ref_ptr< osg::Image > &  img,
const std::string &  inputFilename,
const std::string &  outputFile,
bool  flipOutputImage,
EffectTextureType  textureType,
bool  generateMipMaps,
int  qualityLevel,
bool  verbose,
bool  generate_dds 
)

Create a compressed image.

bool makVrv::DtMeifConverter::startTBBCompressionTaskIfPossible ( osg::Image *  image)

checks to see if there is a thread available for starting a compression task and starts the task if there is

void makVrv::DtMeifConverter::resizeImageIfNeeded ( osg::ref_ptr< osg::Image > &  img)
void makVrv::DtMeifConverter::write_and_compress_dds_data ( FILE *  file,
const struct DDS_HEADER &  ddsHeader,
unsigned int  blockDataSize,
unsigned char blockData 
)
bool makVrv::DtMeifConverter::compositeImages ( const ImageList files,
const std::string &  outputFile,
int  outputWidth,
int  outputHeight,
int  cols,
int  rows,
bool  forceNoAlpha,
bool  composeRowsTopToBottom,
bool  verbose 
)

Composite images together, the list of files is in row major order.

static bool makVrv::DtMeifConverter::convertToRGBA ( osg::ref_ptr< osg::Image > &  img,
unsigned char *&  rgbaPixels,
bool deletePixels,
bool  verbose 
)
static

Convert an image to a buffer of RGBA pixels.

EffectTextureType makVrv::DtMeifConverter::effectTextureType ( const std::string &  filename) const

Return type of effect texture from filename.

virtual void makVrv::DtMeifConverter::setupCompressionFormat ( osg::ref_ptr< osg::Image > &  img,
DtMeifConverter::EffectTextureType  textureType,
osg::ref_ptr< osg::Texture > &  texture 
)
virtual
void makVrv::DtMeifConverter::resizeImagePow2 ( osg::Image *  img,
int  newW,
int  newH 
)

Resizes the image to the next power of 2.

bool makVrv::DtMeifConverter::createBinaryData ( unsigned int  compressedFormat,
osg::ref_ptr< osg::Image > &  img,
bool  mipMaps,
int  qualityLevel,
bool  verbose,
unsigned int blockDataSize,
unsigned char *&  blockData,
bool deleteBlockData,
osg::Image::MipmapDataType &  mipOffsets 
)

Create the raw binary data to write out.

static bool makVrv::DtMeifConverter::isPowerOf2 ( unsigned int  i)
inlinestatic
static unsigned int makVrv::DtMeifConverter::nextPowerOf2 ( unsigned int  i)
inlinestatic
static unsigned int makVrv::DtMeifConverter::logBase2 ( unsigned int  i)
inlinestatic

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

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)