CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
OdTrVisTextureManager Class Reference

#include <TrVisTexture.h>

Classes

struct  ChannelMapping
 

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, const OdTrVisTexture *pTexture, OdUInt32 nNewAlign=0, const OdTrVisTexture *pPalette=NULL)
 
static OdTrVisTexturePtr convert (OdTrVisTexture *pTextureTo, const OdTrVisTexture *pTextureFrom, Resampler method=kNearest)
 
static void cropTexture (OdTrVisTexture *pTexture, OdUInt32 nPosX, OdUInt32 nPosY, OdUInt32 nWidth, OdUInt32 nHeight, OdUInt32 nNewAlign=0)
 
static OdTrVisTexturePtr crop (const OdTrVisTexture *pTexture, OdUInt32 nPosX, OdUInt32 nPosY, OdUInt32 nWidth, OdUInt32 nHeight, OdUInt32 nNewAlign=0)
 
static void negateTexture (OdTrVisTexture *pTexture)
 
static OdTrVisTexturePtr negate (const OdTrVisTexture *pTexture)
 
static void grayscaleTexture (OdTrVisTexture *pTexture, OdUInt32 nApplyComponent=7)
 
static OdTrVisTexturePtr grayscale (const OdTrVisTexture *pTexture, OdUInt32 nApplyComponent=7)
 
static void blurTexture (OdTrVisTexture *pTexture, OdUInt32 nSizeKernel=3, float fKernelMultiplier=1.0f)
 
static OdTrVisTexturePtr blur (const OdTrVisTexture *pTexture, OdUInt32 nSizeKernel=3, float fKernelMultiplier=1.0f)
 
static void sphereMapTexture (OdTrVisTexture *pTexture, const OdTrVisTexture *pRightTexture, const OdTrVisTexture *pLeftTexture, const OdTrVisTexture *pTopTexture, const OdTrVisTexture *pBottomTexture, const OdTrVisTexture *pFrontTexture, const OdTrVisTexture *pBackTexture, int antiAliasLevel=1, bool bSineCorrection=false)
 
static OdTrVisTexturePtr sphereMap (const OdTrVisTexture *pRightTexture, const OdTrVisTexture *pLeftTexture, const OdTrVisTexture *pTopTexture, const OdTrVisTexture *pBottomTexture, const OdTrVisTexture *pFrontTexture, const OdTrVisTexture *pBackTexture, int antiAliasLevel=1, bool bSineCorrection=false)
 
static void remapTextureChannels (OdTrVisTexture *pTexture, const ChannelMapping &redMap=ChannelMapping(1.0f), const ChannelMapping &greenMap=ChannelMapping(0.0f, 1.0f), const ChannelMapping &blueMap=ChannelMapping(0.0f, 0.0f, 1.0f), const ChannelMapping &alphaMap=ChannelMapping(0.0f, 0.0f, 0.0f, 1.0f))
 
static OdTrVisTexturePtr mapChannels (const OdTrVisTexture *pTexture, const ChannelMapping &redMap=ChannelMapping(1.0f), const ChannelMapping &greenMap=ChannelMapping(0.0f, 1.0f), const ChannelMapping &blueMap=ChannelMapping(0.0f, 0.0f, 1.0f), const ChannelMapping &alphaMap=ChannelMapping(0.0f, 0.0f, 0.0f, 1.0f))
 
static OdTrVisTexturePtr clone (const OdTrVisTexture *pTexture)
 
static OdTrVisTexturePtr resample (Resampler method, OdUInt32 newWidth, OdUInt32 newHeight, const OdTrVisTexture *pTexture)
 
static OdTrVisTexturePtr convertAndResample (OdTrVisTexture::Format fmt, Resampler method, OdUInt32 newWidth, OdUInt32 newHeight, const OdTrVisTexture *pTexture, OdUInt32 nNewAlign=0, const OdTrVisTexture *pPalette=NULL)
 
static OdTrVisTexturePtr resamplePow2 (Resampler method, bool bRequirePow2, const 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, const void *buffer, Resampler method, const OdTrVisTexture *pPalette=NULL)
 
static OdTrVisTexturePtr createPow2TextureFrom (OdTrVisTexture::Format fmt, bool bRequirePow2, OdUInt32 nMaxSize, OdUInt32 nAlign, OdTrVisTexture::Format bufferFmt, OdUInt32 bufferWidth, OdUInt32 bufferHeight, OdUInt32 bufferAlign, const void *buffer, Resampler method, const OdTrVisTexture *pPalette=NULL)
 
static OdTrVisTexturePtr createTextureFrom (OdTrVisTexture::Format fmt, OdUInt32 nWidth, OdUInt32 nHeight, OdUInt32 nAlign, const void *buffer, const OdTrVisTexture *pPalette=NULL, bool bOwnExistBuffer=false)
 
static bool pow2ResampleDimensions (OdUInt32 &nResultWidth, OdUInt32 &nResultHeight, OdUInt32 nInWidth, OdUInt32 nInHeight, bool bRequirePow2, OdUInt32 nMaxSize)
 
static bool save (const OdTrVisTexture *pTexture, const OdString &fileName)
 

Detailed Description

This class manage Texture operations

Definition at line 218 of file TrVisTexture.h.

Member Enumeration Documentation

◆ Resampler

Enumerator
kNearest 
kBilinear 

Definition at line 221 of file TrVisTexture.h.

Member Function Documentation

◆ blur()

static OdTrVisTexturePtr OdTrVisTextureManager::blur ( const OdTrVisTexture * pTexture,
OdUInt32 nSizeKernel = 3,
float fKernelMultiplier = 1.0f )
static

Creates new blurred texture

◆ blurTexture()

static void OdTrVisTextureManager::blurTexture ( OdTrVisTexture * pTexture,
OdUInt32 nSizeKernel = 3,
float fKernelMultiplier = 1.0f )
static

Apply gaussian blur to existing texture data

◆ clone()

static OdTrVisTexturePtr OdTrVisTextureManager::clone ( const OdTrVisTexture * pTexture)
static

Creates clone of specified texture

◆ 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,
const OdTrVisTexture * pTexture,
OdUInt32 nNewAlign = 0,
const 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,
const OdTrVisTexture * pTexture,
OdUInt32 nNewAlign = 0,
const 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,
const void * buffer,
Resampler method,
const 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,
const void * buffer,
const OdTrVisTexture * pPalette = NULL,
bool bOwnExistBuffer = false )
static

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

◆ createTextureFrom() [2/2]

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

Creates textures from buffer

◆ crop()

static OdTrVisTexturePtr OdTrVisTextureManager::crop ( const OdTrVisTexture * pTexture,
OdUInt32 nPosX,
OdUInt32 nPosY,
OdUInt32 nWidth,
OdUInt32 nHeight,
OdUInt32 nNewAlign = 0 )
static

Creates new texture from cropped existing texture

◆ cropTexture()

static void OdTrVisTextureManager::cropTexture ( OdTrVisTexture * pTexture,
OdUInt32 nPosX,
OdUInt32 nPosY,
OdUInt32 nWidth,
OdUInt32 nHeight,
OdUInt32 nNewAlign = 0 )
static

Crops existing texture

◆ grayscale()

static OdTrVisTexturePtr OdTrVisTextureManager::grayscale ( const OdTrVisTexture * pTexture,
OdUInt32 nApplyComponent = 7 )
static

Creates new texture with grayscale data from existing texture data

◆ grayscaleTexture()

static void OdTrVisTextureManager::grayscaleTexture ( OdTrVisTexture * pTexture,
OdUInt32 nApplyComponent = 7 )
static

Compute grayscale for existing texture

◆ mapChannels()

static OdTrVisTexturePtr OdTrVisTextureManager::mapChannels ( const OdTrVisTexture * pTexture,
const ChannelMapping & redMap = ChannelMapping(1.0f),
const ChannelMapping & greenMap = ChannelMapping(0.0f, 1.0f),
const ChannelMapping & blueMap = ChannelMapping(0.0f, 0.0f, 1.0f),
const ChannelMapping & alphaMap = ChannelMapping(0.0f, 0.0f, 0.0f, 1.0f) )
static

Creates new texture with remapped color channels data from existing texture data

◆ negate()

static OdTrVisTexturePtr OdTrVisTextureManager::negate ( const OdTrVisTexture * pTexture)
static

Creates new texture with negated existing texture data

◆ negateTexture()

static void OdTrVisTextureManager::negateTexture ( OdTrVisTexture * pTexture)
static

Negates existing texture

◆ pow2ResampleDimensions()

static bool OdTrVisTextureManager::pow2ResampleDimensions ( OdUInt32 & nResultWidth,
OdUInt32 & nResultHeight,
OdUInt32 nInWidth,
OdUInt32 nInHeight,
bool bRequirePow2,
OdUInt32 nMaxSize )
static

Compute resampled texture dimensions.

◆ remapTextureChannels()

static void OdTrVisTextureManager::remapTextureChannels ( OdTrVisTexture * pTexture,
const ChannelMapping & redMap = ChannelMapping(1.0f),
const ChannelMapping & greenMap = ChannelMapping(0.0f, 1.0f),
const ChannelMapping & blueMap = ChannelMapping(0.0f, 0.0f, 1.0f),
const ChannelMapping & alphaMap = ChannelMapping(0.0f, 0.0f, 0.0f, 1.0f) )
static

Modifies color channels mapping in exist texture

◆ resample()

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

Resamples existing texture

◆ resamplePow2()

static OdTrVisTexturePtr OdTrVisTextureManager::resamplePow2 ( Resampler method,
bool bRequirePow2,
const 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 ( const OdTrVisTexture * pTexture,
const OdString & fileName )
static

Saves texture in file

◆ sphereMap()

static OdTrVisTexturePtr OdTrVisTextureManager::sphereMap ( const OdTrVisTexture * pRightTexture,
const OdTrVisTexture * pLeftTexture,
const OdTrVisTexture * pTopTexture,
const OdTrVisTexture * pBottomTexture,
const OdTrVisTexture * pFrontTexture,
const OdTrVisTexture * pBackTexture,
int antiAliasLevel = 1,
bool bSineCorrection = false )
static

Creates new texture containing generated spherical map (input texture formats must be same)

◆ sphereMapTexture()

static void OdTrVisTextureManager::sphereMapTexture ( OdTrVisTexture * pTexture,
const OdTrVisTexture * pRightTexture,
const OdTrVisTexture * pLeftTexture,
const OdTrVisTexture * pTopTexture,
const OdTrVisTexture * pBottomTexture,
const OdTrVisTexture * pFrontTexture,
const OdTrVisTexture * pBackTexture,
int antiAliasLevel = 1,
bool bSineCorrection = false )
static

Generate spherical map into existing texture (input texture formats must be same)


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