CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
OdTrVisTexture Class Referenceabstract

#include <TrVisTexture.h>

Inheritance diagram for OdTrVisTexture:
OdRxObject

Classes

union  TextureColor
 
struct  TextureColorContext
 

Public Types

enum  Format {
  kRed , kAlpha , kRG , kRGB ,
  kRGBA , kBGR , kBGRA , kPalette ,
  kStencil8 , kDepth16 , kDepth24Stencil8 , kDepth32 ,
  kR16 , kRG16 , kRGBA16 , kAlpha16 ,
  kFloatR , kFloatRG , kFloatRGBA , kHalfFloatR ,
  kHalfFloatRG , kHalfFloatRGBA , kRSNorm , kAlphaSNorm ,
  kRGSNorm , kRGBASNorm , kR16SNorm , kAlpha16SNorm ,
  kRG16SNorm , kRGBA16SNorm , kFormatCount
}
 

Public Member Functions

virtual ~OdTrVisTexture ()
 
OdUInt32 getTextureWidth () const
 
OdUInt32 getTextureHeight () const
 
OdUInt32 getScanlineLength () const
 
OdUInt32 getDataAlignment () const
 
const OdUInt8textureData () const
 
OdUInt8textureData ()
 
virtual OdUInt32 subDivLimit () const =0
 
virtual bool isFPImage () const =0
 
virtual void getColor (OdUInt32 nX, OdUInt32 nY, TextureColor &color) const =0
 
virtual void setColor (OdUInt32 nX, OdUInt32 nY, const TextureColor &color)=0
 
virtual void getScanline (OdUInt32 startLine, OdUInt32 linesCount, TextureColor *pScanline) const
 
virtual void setScanline (OdUInt32 startLine, OdUInt32 linesCount, const TextureColor *pScanline)
 
virtual void setPalette (const OdTrVisTexture *pTexture)=0
 
virtual OdTrVisTexturepalette ()=0
 
virtual const OdTrVisTexturepalette () const =0
 
virtual bool isSmoothResampleSupported () const =0
 
virtual Format format () const =0
 
virtual OdUInt32 pixelSize () const =0
 
virtual TextureColor getMaxValues () const =0
 
virtual TextureColor getMinValues () const
 
virtual void beginEditing ()=0
 
virtual void endEditing ()=0
 
- Public Member Functions inherited from OdRxObject
 ODRX_HEAP_OPERATORS ()
 
 OdRxObject ()
 
virtual ~OdRxObject ()
 
virtual OdRxObjectqueryX (const OdRxClass *pClass) const
 
virtual OdRxObjectx (const OdRxClass *pClass) const
 
virtual OdRxClassisA () const
 
virtual void addRef ()=0
 
virtual void release ()=0
 
virtual long numRefs () const
 
bool isKindOf (const OdRxClass *pClass) const
 
virtual OdRxObjectPtr clone () const
 
virtual void copyFrom (const OdRxObject *pSource)
 
virtual OdRx::Ordering comparedTo (const OdRxObject *pOther) const
 
virtual bool isEqualTo (const OdRxObject *pOther) const
 

Static Public Member Functions

static void prepareTextureColors (TextureColor *colors, OdUInt32 size, const TextureColorContext &context)
 
- Static Public Member Functions inherited from OdRxObject
static OdRxObjectPtr cast (const OdRxObject *pointer)
 
static OdRxClassdesc ()
 

Protected Member Functions

 OdTrVisTexture ()
 

Protected Attributes

OdUInt32 m_nWidth
 
OdUInt32 m_nHeight
 
OdUInt32 m_nAlignment
 
OdUInt32 m_nScanLength
 
voidm_pTextureData
 

Detailed Description

This interface is a common texture interface

Definition at line 36 of file TrVisTexture.h.

Member Enumeration Documentation

◆ Format

Supported image formats

Enumerator
kRed 
kAlpha 
kRG 
kRGB 
kRGBA 
kBGR 
kBGRA 
kPalette 
kStencil8 
kDepth16 
kDepth24Stencil8 
kDepth32 
kR16 
kRG16 
kRGBA16 
kAlpha16 
kFloatR 
kFloatRG 
kFloatRGBA 
kHalfFloatR 
kHalfFloatRG 
kHalfFloatRGBA 
kRSNorm 
kAlphaSNorm 
kRGSNorm 
kRGBASNorm 
kR16SNorm 
kAlpha16SNorm 
kRG16SNorm 
kRGBA16SNorm 
kFormatCount 

Definition at line 49 of file TrVisTexture.h.

Constructor & Destructor Documentation

◆ OdTrVisTexture()

OdTrVisTexture::OdTrVisTexture ( )
protected

◆ ~OdTrVisTexture()

virtual OdTrVisTexture::~OdTrVisTexture ( )
virtual

Member Function Documentation

◆ beginEditing()

virtual void OdTrVisTexture::beginEditing ( )
pure virtual

Sometimes image have to be preprocessed befor we can call setColor or setScanline (Palette or compressed images, for example)

◆ endEditing()

virtual void OdTrVisTexture::endEditing ( )
pure virtual

◆ format()

virtual Format OdTrVisTexture::format ( ) const
pure virtual

◆ getColor()

virtual void OdTrVisTexture::getColor ( OdUInt32  nX,
OdUInt32  nY,
TextureColor color 
) const
pure virtual

◆ getDataAlignment()

OdUInt32 OdTrVisTexture::getDataAlignment ( ) const
inline

Definition at line 133 of file TrVisTexture.h.

◆ getMaxValues()

virtual TextureColor OdTrVisTexture::getMaxValues ( ) const
pure virtual

Since different format may have different color value intervals (0-255, -1.f - 1.f) we need this function to obtain maxs

◆ getMinValues()

virtual TextureColor OdTrVisTexture::getMinValues ( ) const
virtual

Since different format may have different color value intervals (0-255, -1.f - 1.f) we need this function to obtain mins

◆ getScanline()

virtual void OdTrVisTexture::getScanline ( OdUInt32  startLine,
OdUInt32  linesCount,
TextureColor pScanline 
) const
inlinevirtual

Definition at line 150 of file TrVisTexture.h.

◆ getScanlineLength()

OdUInt32 OdTrVisTexture::getScanlineLength ( ) const
inline

Definition at line 132 of file TrVisTexture.h.

◆ getTextureHeight()

OdUInt32 OdTrVisTexture::getTextureHeight ( ) const
inline

Definition at line 131 of file TrVisTexture.h.

◆ getTextureWidth()

OdUInt32 OdTrVisTexture::getTextureWidth ( ) const
inline

Definition at line 130 of file TrVisTexture.h.

◆ isFPImage()

virtual bool OdTrVisTexture::isFPImage ( ) const
pure virtual

◆ isSmoothResampleSupported()

virtual bool OdTrVisTexture::isSmoothResampleSupported ( ) const
pure virtual

◆ palette() [1/2]

virtual const OdTrVisTexture * OdTrVisTexture::palette ( ) const
pure virtual

◆ palette() [2/2]

virtual OdTrVisTexture * OdTrVisTexture::palette ( )
pure virtual

◆ pixelSize()

virtual OdUInt32 OdTrVisTexture::pixelSize ( ) const
pure virtual

Returns length of single pixel in bytes.

◆ prepareTextureColors()

static void OdTrVisTexture::prepareTextureColors ( TextureColor colors,
OdUInt32  size,
const TextureColorContext context 
)
static

This function converts TextureColors from one format to another (OdUInt8-based to float-based, etc) using TextureColorContext

◆ setColor()

virtual void OdTrVisTexture::setColor ( OdUInt32  nX,
OdUInt32  nY,
const TextureColor color 
)
pure virtual

◆ setPalette()

virtual void OdTrVisTexture::setPalette ( const OdTrVisTexture pTexture)
pure virtual

◆ setScanline()

virtual void OdTrVisTexture::setScanline ( OdUInt32  startLine,
OdUInt32  linesCount,
const TextureColor pScanline 
)
inlinevirtual

Definition at line 162 of file TrVisTexture.h.

◆ subDivLimit()

virtual OdUInt32 OdTrVisTexture::subDivLimit ( ) const
pure virtual

◆ textureData() [1/2]

OdUInt8 * OdTrVisTexture::textureData ( )
inline

Definition at line 136 of file TrVisTexture.h.

◆ textureData() [2/2]

const OdUInt8 * OdTrVisTexture::textureData ( ) const
inline

Definition at line 135 of file TrVisTexture.h.

Member Data Documentation

◆ m_nAlignment

OdUInt32 OdTrVisTexture::m_nAlignment
protected

Definition at line 40 of file TrVisTexture.h.

◆ m_nHeight

OdUInt32 OdTrVisTexture::m_nHeight
protected

Definition at line 39 of file TrVisTexture.h.

◆ m_nScanLength

OdUInt32 OdTrVisTexture::m_nScanLength
protected

Definition at line 40 of file TrVisTexture.h.

◆ m_nWidth

OdUInt32 OdTrVisTexture::m_nWidth
protected

Definition at line 39 of file TrVisTexture.h.

◆ m_pTextureData

void* OdTrVisTexture::m_pTextureData
protected

Definition at line 41 of file TrVisTexture.h.


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