OpenImageIO::TextureOptions Class Reference

#include <texture.h>

List of all members.

Public Types

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

Public Member Functions

 TextureOptions ()
 TextureOptions (bool)

Static Public Member Functions

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

Public Attributes

int firstchannel
 First channel of the lookup.
int nchannels
 Number of channels to look up.
Wrap swrap
 Wrap mode in the s direction.
Wrap twrap
 Wrap mode in the t direction.
MipMode mipmode
 Mip mode.
InterpMode interpmode
 Interpolation mode.
int anisotropic
 Maximum anisotropic ratio.
bool conservative_filter
 True == over-blur rather than alias.
VaryingRef< float > sblur
VaryingRef< float > tblur
 Blur amount.
VaryingRef< float > swidth
VaryingRef< float > twidth
 Multiplier for derivatives.
VaryingRef< float > bias
 Bias.
VaryingRef< float > fill
 Fill value for missing channels.
VaryingRef< int > samples
 Number of samples.
float * dresultds
 Gradient of the result along s (if not NULL).
float * dresultdt
 Gradient of the result along t (if not NULL).
Wrap zwrap
 Wrap mode in the z direction.
VaryingRef< float > zblur
 Blur amount in the z direction.
VaryingRef< float > zwidth
 Multiplier for derivatives in z direction.

Friends

class OpenImageIO::pvt::TextureSystemImpl

Detailed Description

Encapsulate all the options needed for texture lookups. Making these options all separate parameters to the texture API routines is very ugly and also a big pain whenever we think of new options to add. So instead we collect all those little options into one structure that can just be passed by reference to the texture API routines.


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 maxifying, else bilinear.

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.

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.

WrapLast 

Mark the end -- don't use this!


Constructor & Destructor Documentation

OpenImageIO::TextureOptions::TextureOptions (  ) 

Create a TextureOptions with all fields initialized to reasonable defaults.

OpenImageIO::TextureOptions::TextureOptions ( bool   ) 

Special private ctr that makes a canonical default TextureOptions. For use internal to libtexture. Users, don't call this! Though, there is no harm. It's just not as efficient as the default ctr that memcpy's a canonical pre-constructed default.


Member Function Documentation

static Wrap OpenImageIO::TextureOptions::decode_wrapmode ( const char *  name  )  [static]

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

static void OpenImageIO::TextureOptions::parse_wrapmodes ( const char *  wrapmodes,
TextureOptions::Wrap swrapcode,
TextureOptions::Wrap twrapcode 
) [static]

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.


Member Data Documentation

Maximum anisotropic ratio.

Bias.

True == over-blur rather than alias.

Gradient of the result along s (if not NULL).

Gradient of the result along t (if not NULL).

Fill value for missing channels.

First channel of the lookup.

Interpolation mode.

Mip mode.

Number of channels to look up.

Number of samples.

Wrap mode in the s direction.

Blur amount.

Multiplier for derivatives.

Wrap mode in the t direction.

Blur amount in the z direction.

Multiplier for derivatives in z direction.

Wrap mode in the z direction.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Tue Oct 27 06:30:41 2009 for OpenImageIO by  doxygen 1.6.1