VR-Forces 4.3 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
trpgTexture Class Reference
Inheritance diagram for trpgTexture:
Inheritance graph
[legend]

Public Types

enum  ImageMode { External, Local, Global, Template }
enum  ImageType {
  trpg_RGB8, trpg_RGBA8, trpg_INT8, trpg_INTA8,
  trpg_FXT1, trpg_Filler, trpg_RGBX, trpg_Unknown,
  trpg_DDS, trpg_DXT1, trpg_DXT3, trpg_DXT5,
  trpg_MCM5, trpg_MCM6R, trpg_MCM6A, trpg_MCM7RA,
  trpg_MCM7AR
}

Public Member Functions

 trpgTexture (void)
 trpgTexture (const trpgTexture &)
 ~trpgTexture (void)
void SetName (const char *)
 Set the texture name.
bool GetName (char *retStr, int strLen) const
void SetNumTile (int)
void AddTile (void)
bool GetNumTile (int &) const
bool GetImageMode (ImageMode &) const
 Retrieve the image mode for this texture. See ImageMode for details.
bool GetImageType (ImageType &) const
 Retrieve the image type for this texture.
bool GetImageSize (trpg2iPoint &) const
 Retrieve the size of this image. Valid only for Local and Template textures.
bool GetImageAddr (trpgwAppAddress &) const
 Get the location of a Local image.
bool GetImageDepth (int32 &depth) const
 Figure out the image depth from the type.
bool GetIsMipmap (bool &) const
 Determine whether this image (must be Local or Template) has all its mipmaps.
void SetImageMode (ImageMode)
 Set the image mode of this texture. Used by writers only.
void SetImageType (ImageType)
 Set the image type of this texture. See GetImageType for details.
void SetImageSize (const trpg2iPoint &)
 Set the image size of this texture. See GetImageSize for details.
void SetImageAddr (const trpgwAppAddress &)
 Set the image location (For Local images only)
void SetIsMipmap (bool)
 Set whether or not this is a full set of mipmaps.
void SetNumMipmap (int)
 Set the storage sizes for all mipmap levels void SetStorageSizes(vector<int> &);.
void SetNumLayer (int)
 Set the number of layers used in an RGBX image.
bool GetNumLayer (int &) const
 Get the number of layers used in an RGBX image.
int32 CalcNumMipmaps () const
int32 CalcTotalSize () const
 Calculate the total size of this texture.
int32 MipLevelSize (int miplevel)
 Returns the size of a given mip level.
int32 MipLevelOffset (int miplevel)
 Returns the offset of the mip level in the whole texture data buffer.
bool isValid (void) const
 Validity check.
void Reset (void)
 Resets the contents back to empty.
bool Write (trpgWriteBuffer &)
 Writes this class to a write buffer.
bool Read (trpgReadBuffer &)
 Reads this class from a read buffer.
bool Print (trpgPrintBuffer &) const
 Prints this class to a print buffer.
trpgTextureoperator= (const trpgTexture &)
int operator== (const trpgTexture &) const
- Public Member Functions inherited from trpgReadWriteable
 trpgReadWriteable ()
const chargetErrMess () const
- Public Member Functions inherited from trpgCheckable
 trpgCheckable (void)
virtual ~trpgCheckable (void)
virtual TeAttrHdl GetHandle () const
virtual void SetHandle (TeAttrHdl hdl)

Protected Member Functions

void CalcMipLevelSizes ()
 calculate the mip level sizes

Protected Attributes

ImageMode mode
 Mode for this texture. See ImageMode for details.
ImageType type
 Type of texture (only valid if ImageMode is Local or Template)
charname
 The name really only has meaning for External or Global textures.
int useCount
int sizeX
 The size values are used only if this is a Local or Template image.
int sizeY
bool isMipmap
 Whether or not there are mipmap levels.
int numMipMap
 Number of mipmap levels, 0 if not present.
int numLayer
 Number of layers (for RGBX)
std::vector< intstorageSize
 Sizes of each level.
std::vector< intlevelOffset
 Offset of each level.
trpgwAppAddress addr
 Address is used only for Local textures.
- Protected Attributes inherited from trpgReadWriteable
char errMess [512]
- Protected Attributes inherited from trpgCheckable
bool valid
TeAttrHdl handle
bool writeHandle

Member Enumeration Documentation

Enumerator:
External 
Local 
Global 
Template 
Enumerator:
trpg_RGB8 
trpg_RGBA8 
trpg_INT8 
trpg_INTA8 
trpg_FXT1 
trpg_Filler 
trpg_RGBX 

This is not a texture format. It's here to keep the numbering consistent.

trpg_Unknown 

MCM no longer.

trpg_DDS 
trpg_DXT1 
trpg_DXT3 
trpg_DXT5 
trpg_MCM5 

This is a bit ugly, but we can't change the size of the texture record without breaking existing readers.

So there will be multiple MCM types to indicate the number of bands and the nature of the extra channels, if any

trpg_MCM6R 
trpg_MCM6A 
trpg_MCM7RA 
trpg_MCM7AR 

Constructor & Destructor Documentation

trpgTexture::trpgTexture ( void  )
trpgTexture::trpgTexture ( const trpgTexture )
trpgTexture::~trpgTexture ( void  )

Member Function Documentation

void trpgTexture::SetName ( const char )

Set the texture name.

bool trpgTexture::GetName ( char retStr,
int  strLen 
) const
void trpgTexture::SetNumTile ( int  )
void trpgTexture::AddTile ( void  )
bool trpgTexture::GetNumTile ( int ) const
bool trpgTexture::GetImageMode ( ImageMode ) const

Retrieve the image mode for this texture. See ImageMode for details.

bool trpgTexture::GetImageType ( ImageType ) const

Retrieve the image type for this texture.

See ImageType for details. This method is only used if ImageMode is Local or Template

bool trpgTexture::GetImageSize ( trpg2iPoint ) const

Retrieve the size of this image. Valid only for Local and Template textures.

bool trpgTexture::GetImageAddr ( trpgwAppAddress ) const

Get the location of a Local image.

bool trpgTexture::GetImageDepth ( int32 depth) const

Figure out the image depth from the type.

bool trpgTexture::GetIsMipmap ( bool ) const

Determine whether this image (must be Local or Template) has all its mipmaps.

void trpgTexture::SetImageMode ( ImageMode  )

Set the image mode of this texture. Used by writers only.

void trpgTexture::SetImageType ( ImageType  )

Set the image type of this texture. See GetImageType for details.

void trpgTexture::SetImageSize ( const trpg2iPoint )

Set the image size of this texture. See GetImageSize for details.

void trpgTexture::SetImageAddr ( const trpgwAppAddress )

Set the image location (For Local images only)

void trpgTexture::SetIsMipmap ( bool  )

Set whether or not this is a full set of mipmaps.

void trpgTexture::SetNumMipmap ( int  )

Set the storage sizes for all mipmap levels void SetStorageSizes(vector<int> &);.

Get the storage sizes for all mipmap levels. bool GetStorageSizes(const vector<int> *) const; Set the number of mipmap levels

void trpgTexture::SetNumLayer ( int  )

Set the number of layers used in an RGBX image.

bool trpgTexture::GetNumLayer ( int ) const

Get the number of layers used in an RGBX image.

RGBX images are typically for sensors and contain arbitrary data which is not visual.

int32 trpgTexture::CalcNumMipmaps ( ) const
int32 trpgTexture::CalcTotalSize ( ) const

Calculate the total size of this texture.

int32 trpgTexture::MipLevelSize ( int  miplevel)

Returns the size of a given mip level.

int32 trpgTexture::MipLevelOffset ( int  miplevel)

Returns the offset of the mip level in the whole texture data buffer.

bool trpgTexture::isValid ( void  ) const

Validity check.

Reimplemented from trpgCheckable.

void trpgTexture::Reset ( void  )
virtual

Resets the contents back to empty.

Implements trpgReadWriteable.

bool trpgTexture::Write ( trpgWriteBuffer )
virtual

Writes this class to a write buffer.

Implements trpgReadWriteable.

Reimplemented in trpgTexture1_0.

bool trpgTexture::Read ( trpgReadBuffer )
virtual

Reads this class from a read buffer.

Reimplemented from trpgReadWriteable.

Reimplemented in trpgTexture1_0.

bool trpgTexture::Print ( trpgPrintBuffer ) const
virtual

Prints this class to a print buffer.

Reimplemented from trpgReadWriteable.

trpgTexture& trpgTexture::operator= ( const trpgTexture )

Reimplemented in trpgTexture1_0.

int trpgTexture::operator== ( const trpgTexture ) const
void trpgTexture::CalcMipLevelSizes ( )
protected

calculate the mip level sizes

Member Data Documentation

ImageMode trpgTexture::mode
protected

Mode for this texture. See ImageMode for details.

ImageType trpgTexture::type
protected

Type of texture (only valid if ImageMode is Local or Template)

char* trpgTexture::name
protected

The name really only has meaning for External or Global textures.

int trpgTexture::useCount
protected
int trpgTexture::sizeX
protected

The size values are used only if this is a Local or Template image.

int trpgTexture::sizeY
protected
bool trpgTexture::isMipmap
protected

Whether or not there are mipmap levels.

int trpgTexture::numMipMap
protected

Number of mipmap levels, 0 if not present.

int trpgTexture::numLayer
protected

Number of layers (for RGBX)

std::vector<int> trpgTexture::storageSize
protected

Sizes of each level.

This is important for compressed textures in particular, which may have random sizes. Used only for Local textures.

std::vector<int> trpgTexture::levelOffset
protected

Offset of each level.

trpgwAppAddress trpgTexture::addr
protected

Address is used only for Local textures.


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

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)