OpenImageIO
|
#include <texture.h>
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 | |
TextureOpt () | |
TextureOpt (const TextureOptions &opt, int index) | |
Static Public Member Functions | |
static Wrap | decode_wrapmode (const char *name) |
static Wrap | decode_wrapmode (ustring name) |
static void | parse_wrapmodes (const char *wrapmodes, TextureOpt::Wrap &swrapcode, TextureOpt::Wrap &twrapcode) |
Public Attributes | |
int | nchannels |
Number of channels to look up. | |
int | firstchannel |
First channel of the lookup. | |
int | subimage |
Subimage or face ID. | |
ustring | subimagename |
Subimage name. | |
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. | |
float | sblur |
float | tblur |
Blur amount. | |
float | swidth |
float | twidth |
Multiplier for derivatives. | |
float | fill |
Fill value for missing channels. | |
const float * | missingcolor |
Color for missing texture. | |
float * | dresultds |
Deriv of the result along s (if not NULL) | |
float * | dresultdt |
Deriv of the result along t (if not NULL) | |
float | time |
Time (for time-dependent texture lookups) | |
float | bias |
Bias for shadows. | |
int | samples |
Number of samples for shadows. | |
Wrap | rwrap |
Wrap mode in the r direction. | |
float | rblur |
Blur amount in the r direction. | |
float | rwidth |
Multiplier for derivatives in r direction. | |
float * | dresultdr |
Deriv of the result along r (if not NULL) | |
Friends | |
class | pvt::TextureSystemImpl |
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.
enum TextureOpt::MipMode |
enum TextureOpt::Wrap |
Wrap mode describes what happens when texture coordinates describe a value outside the usual [0,1] range where a texture is defined.
|
inline |
Create a TextureOpt with all fields initialized to reasonable defaults.
TextureOpt::TextureOpt | ( | const TextureOptions & | opt, |
int | index | ||
) |
Convert a TextureOptions for one index into a TextureOpt.
|
static |
Utility: Return the Wrap enum corresponding to a wrap name: "default", "black", "clamp", "periodic", "mirror".
|
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.
int TextureOpt::anisotropic |
Maximum anisotropic ratio.
float TextureOpt::bias |
Bias for shadows.
bool TextureOpt::conservative_filter |
True == over-blur rather than alias.
float* TextureOpt::dresultdr |
Deriv of the result along r (if not NULL)
float* TextureOpt::dresultds |
Deriv of the result along s (if not NULL)
float* TextureOpt::dresultdt |
Deriv of the result along t (if not NULL)
float TextureOpt::fill |
Fill value for missing channels.
int TextureOpt::firstchannel |
First channel of the lookup.
InterpMode TextureOpt::interpmode |
Interpolation mode.
MipMode TextureOpt::mipmode |
Mip mode.
const float* TextureOpt::missingcolor |
Color for missing texture.
int TextureOpt::nchannels |
Number of channels to look up.
float TextureOpt::rblur |
Blur amount in the r direction.
float TextureOpt::rwidth |
Multiplier for derivatives in r direction.
Wrap TextureOpt::rwrap |
Wrap mode in the r direction.
int TextureOpt::samples |
Number of samples for shadows.
int TextureOpt::subimage |
Subimage or face ID.
ustring TextureOpt::subimagename |
Subimage name.
Wrap TextureOpt::swrap |
Wrap mode in the s direction.
float TextureOpt::tblur |
Blur amount.
float TextureOpt::time |
Time (for time-dependent texture lookups)
float TextureOpt::twidth |
Multiplier for derivatives.
Wrap TextureOpt::twrap |
Wrap mode in the t direction.