5#ifndef __S_MATERIAL_LAYER_H_INCLUDED__
6#define __S_MATERIAL_LAYER_H_INCLUDED__
37 static const char*
const aTextureClampNames[] = {
38 "texture_clamp_repeat",
39 "texture_clamp_clamp",
40 "texture_clamp_clamp_to_edge",
41 "texture_clamp_clamp_to_border",
42 "texture_clamp_mirror",
43 "texture_clamp_mirror_clamp",
44 "texture_clamp_mirror_clamp_to_edge",
45 "texture_clamp_mirror_clamp_to_border", 0};
75 MatrixAllocator.destruct(TextureMatrix);
76 MatrixAllocator.deallocate(TextureMatrix);
91 if (other.TextureMatrix)
92 *TextureMatrix = *other.TextureMatrix;
95 MatrixAllocator.destruct(TextureMatrix);
96 MatrixAllocator.deallocate(TextureMatrix);
102 if (other.TextureMatrix)
104 TextureMatrix = MatrixAllocator.allocate(1);
105 MatrixAllocator.construct(TextureMatrix,*other.TextureMatrix);
126 TextureMatrix = MatrixAllocator.allocate(1);
129 return *TextureMatrix;
137 return *TextureMatrix;
148 TextureMatrix = MatrixAllocator.allocate(1);
149 MatrixAllocator.construct(TextureMatrix,mat);
152 *TextureMatrix = mat;
171 different |= (TextureMatrix != b.TextureMatrix) &&
172 TextureMatrix && b.TextureMatrix &&
173 (*TextureMatrix != *(b.TextureMatrix));
181 {
return !(b!=*
this); }
4x4 matrix. Mostly used as transformation matrix for 3d calculations.
Axis aligned bounding box in 3d dimensional space.
Interface of a Video Driver dependent Texture.
Struct for holding parameters for a material renderer.
Struct for holding material parameters which exist per texture layer.
bool operator==(const SMaterialLayer &b) const
Equality operator.
void setTextureMatrix(const core::matrix4 &mat)
Sets the texture transformation matrix to mat.
bool operator!=(const SMaterialLayer &b) const
Inequality operator.
~SMaterialLayer()
Destructor.
s8 LODBias
Bias for the mipmap choosing decision.
const core::matrix4 & getTextureMatrix() const
Gets the immutable texture transformation matrix.
SMaterialLayer & operator=(const SMaterialLayer &other)
Assignment operator.
bool BilinearFilter
Is bilinear filtering enabled? Default: true.
SMaterialLayer()
Default constructor.
core::matrix4 & getTextureMatrix()
Gets the texture transformation matrix.
bool TrilinearFilter
Is trilinear filtering enabled? Default: false.
u8 AnisotropicFilter
Is anisotropic filtering enabled? Default: 0, disabled.
ITexture * Texture
Texture.
u8 TextureWrapU
Texture Clamp Mode.
SMaterialLayer(const SMaterialLayer &other)
Copy constructor.
IRRLICHT_API const matrix4 IdentityMatrix
global const identity matrix
E_TEXTURE_CLAMP
Texture coord clamp mode outside [0.0, 1.0].
@ ETC_REPEAT
Texture repeats.
@ ETC_CLAMP
Texture is clamped to the last pixel.
@ ETC_CLAMP_TO_BORDER
Texture is clamped to the border pixel (if exists)
@ ETC_MIRROR_CLAMP_TO_BORDER
Texture is mirrored once and then clamped to border.
@ ETC_MIRROR
Texture is alternatingly mirrored (0..1..0..1..0..)
@ ETC_MIRROR_CLAMP_TO_EDGE
Texture is mirrored once and then clamped to edge.
@ ETC_MIRROR_CLAMP
Texture is mirrored once and then clamped (0..1..0)
@ ETC_CLAMP_TO_EDGE
Texture is clamped to the edge pixel.
Everything in the Irrlicht Engine can be found in this namespace.
unsigned char u8
8 bit unsigned variable.
signed char s8
8 bit signed variable.