CFx SDK Documentation  2023 SP0
Public Types | Static Public Member Functions | List of all members
OdTrVisTextureManager Class Reference

#include <TrVisTexture.h>

Public Types

enum  Resampler { kNearest , kBilinear }
 

Static Public Member Functions

static OdTrVisTexturePtr createTexture (OdTrVisTexture::Format fmt, OdUInt32 nWidth, OdUInt32 nHeight, OdUInt32 nAlign=4)
 
static OdTrVisTexturePtr convert (OdTrVisTexture::Format fmt, OdTrVisTexture *pTexture, OdUInt32 nNewAlign=0, OdTrVisTexture *pPalette=NULL)
 
static OdTrVisTexturePtr convert (OdTrVisTexture *pTextureTo, const OdTrVisTexture *pTextureFrom, Resampler method=kNearest)
 
static OdTrVisTexturePtr resample (Resampler method, OdUInt32 newWidth, OdUInt32 newHeight, OdTrVisTexture *pTexture)
 
static OdTrVisTexturePtr convertAndResample (OdTrVisTexture::Format fmt, Resampler method, OdUInt32 newWidth, OdUInt32 newHeight, OdTrVisTexture *pTexture, OdUInt32 nNewAlign=0, OdTrVisTexture *pPalette=NULL)
 
static OdTrVisTexturePtr resamplePow2 (Resampler method, bool bRequirePow2, OdTrVisTexture *pTexture, OdUInt32 nMaxSize)
 
static OdTrVisTexturePtr createTextureFrom (OdTrVisTexture::Format fmt, OdUInt32 nWidth, OdUInt32 nHeight, OdUInt32 nAlign, OdTrVisTexture::Format bufferFmt, OdUInt32 bufferWidth, OdUInt32 bufferHeight, OdUInt32 bufferAlign, void *buffer, Resampler method, OdTrVisTexture *pPalette=NULL)
 
static OdTrVisTexturePtr createPow2TextureFrom (OdTrVisTexture::Format fmt, bool bRequirePow2, OdUInt32 nMaxSize, OdUInt32 nAlign, OdTrVisTexture::Format bufferFmt, OdUInt32 bufferWidth, OdUInt32 bufferHeight, OdUInt32 bufferAlign, void *buffer, Resampler method, OdTrVisTexture *pPalette=NULL)
 
static OdTrVisTexturePtr createTextureFrom (OdTrVisTexture::Format fmt, OdUInt32 nWidth, OdUInt32 nHeight, OdUInt32 nAlign, void *buffer, OdTrVisTexture *pPalette=NULL, bool bOwnExistBuffer=false)
 
static bool save (OdTrVisTexture *pTexture, const OdString &fileName)
 

Detailed Description

This class manage Texture operations

Definition at line 175 of file TrVisTexture.h.

Member Enumeration Documentation

◆ Resampler

Enumerator
kNearest 
kBilinear 

Definition at line 178 of file TrVisTexture.h.

Member Function Documentation

◆ convert() [1/2]

static OdTrVisTexturePtr OdTrVisTextureManager::convert ( OdTrVisTexture pTextureTo,
const OdTrVisTexture pTextureFrom,
Resampler  method = kNearest 
)
static

Converts existing texture to the another texture format

◆ convert() [2/2]

static OdTrVisTexturePtr OdTrVisTextureManager::convert ( OdTrVisTexture::Format  fmt,
OdTrVisTexture pTexture,
OdUInt32  nNewAlign = 0,
OdTrVisTexture pPalette = NULL 
)
static

Converts existing texture to the another format (or data alignment)

◆ convertAndResample()

static OdTrVisTexturePtr OdTrVisTextureManager::convertAndResample ( OdTrVisTexture::Format  fmt,
Resampler  method,
OdUInt32  newWidth,
OdUInt32  newHeight,
OdTrVisTexture pTexture,
OdUInt32  nNewAlign = 0,
OdTrVisTexture pPalette = NULL 
)
static

Converts and resamples existing texture

◆ createPow2TextureFrom()

static OdTrVisTexturePtr OdTrVisTextureManager::createPow2TextureFrom ( OdTrVisTexture::Format  fmt,
bool  bRequirePow2,
OdUInt32  nMaxSize,
OdUInt32  nAlign,
OdTrVisTexture::Format  bufferFmt,
OdUInt32  bufferWidth,
OdUInt32  bufferHeight,
OdUInt32  bufferAlign,
void buffer,
Resampler  method,
OdTrVisTexture pPalette = NULL 
)
static

Creates pow2 textures from buffer

◆ createTexture()

static OdTrVisTexturePtr OdTrVisTextureManager::createTexture ( OdTrVisTexture::Format  fmt,
OdUInt32  nWidth,
OdUInt32  nHeight,
OdUInt32  nAlign = 4 
)
static

Creates empty texture

◆ createTextureFrom() [1/2]

static OdTrVisTexturePtr OdTrVisTextureManager::createTextureFrom ( OdTrVisTexture::Format  fmt,
OdUInt32  nWidth,
OdUInt32  nHeight,
OdUInt32  nAlign,
OdTrVisTexture::Format  bufferFmt,
OdUInt32  bufferWidth,
OdUInt32  bufferHeight,
OdUInt32  bufferAlign,
void buffer,
Resampler  method,
OdTrVisTexture pPalette = NULL 
)
static

Creates textures from buffer

◆ createTextureFrom() [2/2]

static OdTrVisTexturePtr OdTrVisTextureManager::createTextureFrom ( OdTrVisTexture::Format  fmt,
OdUInt32  nWidth,
OdUInt32  nHeight,
OdUInt32  nAlign,
void buffer,
OdTrVisTexture pPalette = NULL,
bool  bOwnExistBuffer = false 
)
static

Creates texture from buffer with the same sizes, format and data alignment

◆ resample()

static OdTrVisTexturePtr OdTrVisTextureManager::resample ( Resampler  method,
OdUInt32  newWidth,
OdUInt32  newHeight,
OdTrVisTexture pTexture 
)
static

Resamples existing texture

◆ resamplePow2()

static OdTrVisTexturePtr OdTrVisTextureManager::resamplePow2 ( Resampler  method,
bool  bRequirePow2,
OdTrVisTexture pTexture,
OdUInt32  nMaxSize 
)
static

Resample texture so its width and height becomes the power of 2 (if need). Width and height are limited by nMaxSize

◆ save()

static bool OdTrVisTextureManager::save ( OdTrVisTexture pTexture,
const OdString fileName 
)
static

Saves texture in file


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