MaterialX 1.39.1
Loading...
Searching...
No Matches
ImageSamplingProperties Class Reference

Interface to describe sampling properties for images. More...

#include <ImageHandler.h>

Public Types

enum class  AddressMode : int {
  UNSPECIFIED = -1 , CONSTANT = 0 , CLAMP = 1 , PERIODIC = 2 ,
  MIRROR = 3
}
 Address mode options. More...
 
enum class  FilterType : int { UNSPECIFIED = -1 , CLOSEST = 0 , LINEAR = 1 , CUBIC = 2 }
 Filter type options. More...
 

Public Member Functions

void setProperties (const string &fileNameUniform, const VariableBlock &uniformBlock)
 Set the properties based on data in a uniform block. More...
 
bool operator== (const ImageSamplingProperties &r) const
 

Public Attributes

AddressMode uaddressMode = AddressMode::UNSPECIFIED
 Address mode in U.
 
AddressMode vaddressMode = AddressMode::UNSPECIFIED
 Address mode in V.
 
FilterType filterType = FilterType::UNSPECIFIED
 Filter type.
 
bool enableMipmaps = true
 Enable mipmaps.
 
Color4 defaultColor = { 0.0f, 0.0f, 0.0f, 1.0f }
 Default color. More...
 

Detailed Description

Interface to describe sampling properties for images.

Member Enumeration Documentation

◆ AddressMode

enum class AddressMode : int
strong

Address mode options.

Matches enumerations allowed for image address modes, except UNSPECIFIED which indicates no explicit mode was defined.

◆ FilterType

enum class FilterType : int
strong

Filter type options.

Matches enumerations allowed for image filter types, except UNSPECIFIED which indicates no explicit type was defined.

Member Function Documentation

◆ setProperties()

void setProperties ( const string &  fileNameUniform,
const VariableBlock uniformBlock 
)

Set the properties based on data in a uniform block.

Parameters
fileNameUniformName of the file name uniform. Used to find corresponding sampler data in the uniform block
uniformBlockBlock containing sampler uniforms

Member Data Documentation

◆ defaultColor

Color4 defaultColor = { 0.0f, 0.0f, 0.0f, 1.0f }

Default color.

Corresponds to the "default" value on the image node definition.


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