5#ifndef __S_MATERIAL_LAYER_H_INCLUDED__
6#define __S_MATERIAL_LAYER_H_INCLUDED__
9#include "irrAllocator.h"
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);
111 TextureWrapV = other.TextureWrapV;
116 BorderColor = other.BorderColor;
127 TextureMatrix = MatrixAllocator.allocate(1);
130 return *TextureMatrix;
138 return *TextureMatrix;
149 TextureMatrix = MatrixAllocator.allocate(1);
150 MatrixAllocator.construct(TextureMatrix,mat);
153 *TextureMatrix = mat;
164 TextureWrapV != b.TextureWrapV ||
172 different |= (TextureMatrix != b.TextureMatrix) &&
173 TextureMatrix && b.TextureMatrix &&
174 (*TextureMatrix != *(b.TextureMatrix));
182 {
return !(b!=*
this); }
219 friend class SMaterial;
Very simple allocator implementation, containers using it can be used across dll boundaries.
Definition irrAllocator.h:26
Interface of a Video Driver dependent Texture.
Definition ITexture.h:119
Class representing a color with four floats.
Definition SColor.h:542
bool operator==(const SMaterialLayer &b) const
Equality operator.
Definition SMaterialLayer.h:181
void setTextureMatrix(const core::matrix4 &mat)
Sets the texture transformation matrix to mat.
Definition SMaterialLayer.h:145
bool operator!=(const SMaterialLayer &b) const
Inequality operator.
Definition SMaterialLayer.h:159
~SMaterialLayer()
Destructor.
Definition SMaterialLayer.h:73
s8 LODBias
Bias for the mipmap choosing decision.
Definition SMaterialLayer.h:214
const core::matrix4 & getTextureMatrix() const
Gets the immutable texture transformation matrix.
Definition SMaterialLayer.h:135
SMaterialLayer & operator=(const SMaterialLayer &other)
Assignment operator.
Definition SMaterialLayer.h:82
bool BilinearFilter
Is bilinear filtering enabled? Default: true.
Definition SMaterialLayer.h:193
SMaterialLayer()
Default constructor.
Definition SMaterialLayer.h:52
core::matrix4 & getTextureMatrix()
Gets the texture transformation matrix.
Definition SMaterialLayer.h:123
bool TrilinearFilter
Is trilinear filtering enabled? Default: false.
Definition SMaterialLayer.h:198
u8 AnisotropicFilter
Is anisotropic filtering enabled? Default: 0, disabled.
Definition SMaterialLayer.h:207
ITexture * Texture
Texture.
Definition SMaterialLayer.h:185
u8 TextureWrapU
Texture Clamp Mode.
Definition SMaterialLayer.h:189
SMaterialLayer(const SMaterialLayer &other)
Copy constructor.
Definition SMaterialLayer.h:65
CMatrix4< f32 > matrix4
Typedef for f32 matrix.
Definition matrix4.h:2241
IRRLICHT_API const matrix4 IdentityMatrix
global const identity matrix
The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done ...
Definition EDriverFeatures.h:11
E_TEXTURE_CLAMP
Texture coord clamp mode outside [0.0, 1.0].
Definition SMaterialLayer.h:19
@ ETC_REPEAT
Texture repeats.
Definition SMaterialLayer.h:21
@ ETC_CLAMP
Texture is clamped to the last pixel.
Definition SMaterialLayer.h:23
@ ETC_CLAMP_TO_BORDER
Texture is clamped to the border pixel (if exists).
Definition SMaterialLayer.h:27
@ ETC_MIRROR_CLAMP_TO_BORDER
Texture is mirrored once and then clamped to border.
Definition SMaterialLayer.h:35
@ ETC_MIRROR
Texture is alternatingly mirrored (0..1..0..1..0..).
Definition SMaterialLayer.h:29
@ ETC_MIRROR_CLAMP_TO_EDGE
Texture is mirrored once and then clamped to edge.
Definition SMaterialLayer.h:33
@ ETC_MIRROR_CLAMP
Texture is mirrored once and then clamped (0..1..0).
Definition SMaterialLayer.h:31
@ ETC_CLAMP_TO_EDGE
Texture is clamped to the edge pixel.
Definition SMaterialLayer.h:25
Everything in the Irrlicht Engine can be found in this namespace.
Definition Skylicht.h:33
unsigned char u8
8 bit unsigned variable.
Definition irrTypes.h:18
signed char s8
8 bit signed variable.
Definition irrTypes.h:26