HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TextureOptions Class Reference

#include <texture.h>

Public Types

enum  Wrap {
  WrapDefault, WrapBlack, WrapClamp, WrapPeriodic,
  WrapMirror, WrapPeriodicPow2, WrapPeriodicSharedBorder, WrapLast
}
 
enum  MipMode {
  MipModeDefault, MipModeNoMIP, MipModeOneLevel, MipModeTrilinear,
  MipModeAniso
}
 
enum  InterpMode { InterpClosest, InterpBilinear, InterpBicubic, InterpSmartBicubic }
 

Public Member Functions

 TextureOptions ()
 
 TextureOptions (const TextureOpt &opt)
 

Static Public Member Functions

static Wrap decode_wrapmode (const char *name)
 
static Wrap decode_wrapmode (ustring name)
 
static void parse_wrapmodes (const char *wrapmodes, TextureOptions::Wrap &swrapcode, TextureOptions::Wrap &twrapcode)
 

Public Attributes

int firstchannel
 First channel of the lookup. More...
 
int subimage
 Subimage or face ID. More...
 
ustring subimagename
 Subimage name. More...
 
Wrap swrap
 Wrap mode in the s direction. More...
 
Wrap twrap
 Wrap mode in the t direction. More...
 
MipMode mipmode
 Mip mode. More...
 
InterpMode interpmode
 Interpolation mode. More...
 
int anisotropic
 Maximum anisotropic ratio. More...
 
bool conservative_filter
 True == over-blur rather than alias. More...
 
VaryingRef< floatsblur
 
VaryingRef< floattblur
 Blur amount. More...
 
VaryingRef< floatswidth
 
VaryingRef< floattwidth
 Multiplier for derivatives. More...
 
VaryingRef< floattime
 Time. More...
 
VaryingRef< floatbias
 Bias. More...
 
VaryingRef< floatfill
 Fill value for missing channels. More...
 
VaryingRef< floatmissingcolor
 Color for missing texture. More...
 
VaryingRef< intsamples
 Number of samples. More...
 
Wrap rwrap
 Wrap mode in the r direction. More...
 
VaryingRef< floatrblur
 Blur amount in the r direction. More...
 
VaryingRef< floatrwidth
 Multiplier for derivatives in r direction. More...
 

Friends

class pvt::TextureSystemImpl
 
class TextureOpt
 

Detailed Description

Definition at line 335 of file texture.h.

Member Enumeration Documentation

Interp mode determines how we sample within a mipmap level

Enumerator
InterpClosest 

Force closest texel.

InterpBilinear 

Force bilinear lookup within a mip level.

InterpBicubic 

Force cubic lookup within a mip level.

InterpSmartBicubic 

Bicubic when magnifying, else bilinear.

Definition at line 362 of file texture.h.

Mip mode determines if/how we use mipmaps

Enumerator
MipModeDefault 

Default high-quality lookup.

MipModeNoMIP 

Just use highest-res image, no MIP mapping.

MipModeOneLevel 

Use just one mipmap level.

MipModeTrilinear 

Use two MIPmap levels (trilinear)

MipModeAniso 

Use two MIPmap levels w/ anisotropic.

Definition at line 352 of file texture.h.

Wrap mode describes what happens when texture coordinates describe a value outside the usual [0,1] range where a texture is defined.

Enumerator
WrapDefault 

Use the default found in the file.

WrapBlack 

Black outside [0..1].

WrapClamp 

Clamp to [0..1].

WrapPeriodic 

Periodic mod 1.

WrapMirror 

Mirror the image.

WrapPeriodicPow2 

Periodic, but only for powers of 2!!!

WrapPeriodicSharedBorder 

Periodic with shared border (env)

WrapLast 

Mark the end – don't use this!

Definition at line 339 of file texture.h.

Constructor & Destructor Documentation

TextureOptions::TextureOptions ( )

Create a TextureOptions with all fields initialized to reasonable defaults.

TextureOptions::TextureOptions ( const TextureOpt opt)

Convert a TextureOpt for one point into a TextureOptions with uniform values.

Member Function Documentation

static Wrap TextureOptions::decode_wrapmode ( const char *  name)
inlinestatic

Utility: Return the Wrap enum corresponding to a wrap name: "default", "black", "clamp", "periodic", "mirror".

Definition at line 406 of file texture.h.

static Wrap TextureOptions::decode_wrapmode ( ustring  name)
inlinestatic

Definition at line 410 of file texture.h.

static void TextureOptions::parse_wrapmodes ( const char *  wrapmodes,
TextureOptions::Wrap swrapcode,
TextureOptions::Wrap twrapcode 
)
inlinestatic

Utility: Parse a single wrap mode (e.g., "periodic") or a comma-separated wrap modes string (e.g., "black,clamp") into separate Wrap enums for s and t.

Definition at line 418 of file texture.h.

Friends And Related Function Documentation

friend class pvt::TextureSystemImpl
friend

Definition at line 429 of file texture.h.

friend class TextureOpt
friend

Definition at line 430 of file texture.h.

Member Data Documentation

int TextureOptions::anisotropic

Maximum anisotropic ratio.

Definition at line 387 of file texture.h.

VaryingRef<float> TextureOptions::bias

Bias.

Definition at line 394 of file texture.h.

bool TextureOptions::conservative_filter

True == over-blur rather than alias.

Definition at line 388 of file texture.h.

VaryingRef<float> TextureOptions::fill

Fill value for missing channels.

Definition at line 395 of file texture.h.

int TextureOptions::firstchannel

First channel of the lookup.

Definition at line 380 of file texture.h.

InterpMode TextureOptions::interpmode

Interpolation mode.

Definition at line 386 of file texture.h.

MipMode TextureOptions::mipmode

Mip mode.

Definition at line 385 of file texture.h.

VaryingRef<float> TextureOptions::missingcolor

Color for missing texture.

Definition at line 396 of file texture.h.

VaryingRef<float> TextureOptions::rblur

Blur amount in the r direction.

Definition at line 401 of file texture.h.

VaryingRef<float> TextureOptions::rwidth

Multiplier for derivatives in r direction.

Definition at line 402 of file texture.h.

Wrap TextureOptions::rwrap

Wrap mode in the r direction.

Definition at line 400 of file texture.h.

VaryingRef<int> TextureOptions::samples

Number of samples.

Definition at line 397 of file texture.h.

VaryingRef<float> TextureOptions::sblur

Definition at line 391 of file texture.h.

int TextureOptions::subimage

Subimage or face ID.

Definition at line 381 of file texture.h.

ustring TextureOptions::subimagename

Subimage name.

Definition at line 382 of file texture.h.

VaryingRef<float> TextureOptions::swidth

Definition at line 392 of file texture.h.

Wrap TextureOptions::swrap

Wrap mode in the s direction.

Definition at line 383 of file texture.h.

VaryingRef<float> TextureOptions::tblur

Blur amount.

Definition at line 391 of file texture.h.

VaryingRef<float> TextureOptions::time

Time.

Definition at line 393 of file texture.h.

VaryingRef<float> TextureOptions::twidth

Multiplier for derivatives.

Definition at line 392 of file texture.h.

Wrap TextureOptions::twrap

Wrap mode in the t direction.

Definition at line 384 of file texture.h.


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