Om
1.0.0
A universal framework for multimedia simulation
|
A class that specifies how texture should be magnified or reduced in size. More...
#include <omGraphicsTextureFilter.h>
Public Types | |
enum | Enum { NEAREST, LINEAR, BILINEAR, TRILINEAR, UNDEFINED } |
An enum type which represents the different texture filtering types. More... | |
Public Member Functions | |
TextureFilter () | |
Create a new UNDEFINED texture filter. More... | |
TextureFilter (Enum newType) | |
Create a new texture filter with the specified filter type and default anisotropy of 1.0. More... | |
TextureFilter (Enum newType, Float newAnisotropy) | |
Create a new texture filter with the specified filter type and anisotropy. More... | |
operator Enum () const | |
Convert this texture filter to an enum value. More... | |
Float | getAnisotropy () const |
Get the maximum level of anisotropy which this texture filter should use. More... | |
void | setAnisotropy (Float newAnisotropy) |
Set the maximum level of anisotropy which this texture filter should use. More... | |
String | toString () const |
Return a string representation of the texture filter. More... | |
operator String () const | |
Convert this texture filter into a string representation. More... | |
Static Public Member Functions | |
static Float | getMaxAnisotropy () |
Return the maximum texture filter anisotropy allowed by the graphics implementation. More... | |
A class that specifies how texture should be magnified or reduced in size.
This class allows the user to specify the basic filter type used to decrease or increase the size of a texture, as well as a floating-point anisotropy level. This anisotropy level indicates how much anisotropic filtering can be done.
An enum type which represents the different texture filtering types.
Enumerator | |
---|---|
NEAREST |
A nearest-neighbor filter type. The closest texel is chosen without any interpolation. This filter type is generally undesireable because it will produce blocky artifacts when used to enlarge a texture and will produce texture 'sparkling' when used to reduce a texture's size. |
LINEAR |
A linear filter type. The final texel is computed from a linear interpolation of the nearest texels. This filter type produces smooth texel interpolation when used for texture magnification. This filter type is undesirable for texture minification because it produces 'sparkling' artifacts because no mip-maps are used. |
BILINEAR |
A linear filter type. The final texel is computed from a linear interpolation of the nearest texels in the nearest mipmap level. This filter type should not be used for texture magnification, use LINEAR instead. This filter type produces better results for texture minification than LINEAR, but still produces artifacts where mip-map levels change. |
TRILINEAR |
A linear filter type. The final texel is computed from a linear interpolation of the nearest texels in the nearest two mipmap levels. This filter type should not be used for texture magnification, use LINEAR instead. This filter type produces better results for texture minification than LINEAR or BILINEAR. Texture mip-map levels are smoothly interpolated between, resulting in the smoothest kind of texture filtering. |
UNDEFINED |
An undefined type of textuer filtering. |
|
inline |
Create a new UNDEFINED texture filter.
|
inline |
Create a new texture filter with the specified filter type and default anisotropy of 1.0.
Create a new texture filter with the specified filter type and anisotropy.
|
inline |
Convert this texture filter to an enum value.
|
inline |
Get the maximum level of anisotropy which this texture filter should use.
|
inline |
Set the maximum level of anisotropy which this texture filter should use.
|
static |
Return the maximum texture filter anisotropy allowed by the graphics implementation.
String om::graphics::textures::TextureFilter::toString | ( | ) | const |
Return a string representation of the texture filter.
|
inline |
Convert this texture filter into a string representation.