![]() |
VR-Forces 4.2 Class Documentation
|

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. | |
| trpgTexture & | operator= (const trpgTexture &) |
| int | operator== (const trpgTexture &) const |
Public Member Functions inherited from trpgReadWriteable | |
| trpgReadWriteable () | |
| const char * | getErrMess () 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) | |
| char * | name |
| 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< int > | storageSize |
| Sizes of each level. | |
| std::vector< int > | levelOffset |
| 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 |
| trpgTexture::trpgTexture | ( | void | ) |
| trpgTexture::trpgTexture | ( | const trpgTexture & | ) |
| trpgTexture::~trpgTexture | ( | void | ) |
| 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 |
Retrieve the image mode for this texture. See ImageMode for details.
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.
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.
|
virtual |
Resets the contents back to empty.
Implements trpgReadWriteable.
|
virtual |
|
virtual |
Reads this class from a read buffer.
Reimplemented from trpgReadWriteable.
Reimplemented in trpgTexture1_0.
|
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 |
|
protected |
calculate the mip level sizes
|
protected |
Mode for this texture. See ImageMode for details.
|
protected |
Type of texture (only valid if ImageMode is Local or Template)
|
protected |
The name really only has meaning for External or Global textures.
|
protected |
|
protected |
The size values are used only if this is a Local or Template image.
|
protected |
|
protected |
Whether or not there are mipmap levels.
|
protected |
Number of mipmap levels, 0 if not present.
|
protected |
Number of layers (for RGBX)
|
protected |
Sizes of each level.
This is important for compressed textures in particular, which may have random sizes. Used only for Local textures.
|
protected |
Offset of each level.
|
protected |
Address is used only for Local textures.