5#ifndef S_VERTEX_MANIPULATOR_HPP_INCLUDED
6#define S_VERTEX_MANIPULATOR_HPP_INCLUDED
8#include <nirtcpp/core/engine/matrix4.hpp>
9#include <nirtcpp/core/engine/S3DVertex.hpp>
10#include <nirtcpp/core/engine/SColor.hpp>
68 video::SColor high) : Threshold(threshold), Low(low), High(high) {}
195 Color(color), Factor(factor) {}
210 Color1(color1), Color2(color2), Factor(factor) {}
226 template <
typename VType>
227 void operator()(VType& vertex)
const
229 vertex.Pos *= Factor;
243 template <
typename VType>
244 void operator()(VType& vertex)
const
246 vertex.Pos += vertex.Normal*Factor;
257 template <
typename VType>
258 void operator()(VType& vertex)
const
271 template <
typename VType>
272 void operator()(VType& vertex)
const
285 template <
typename VType>
286 void operator()(VType& vertex)
const
299 template <
typename VType>
300 void operator()(VType& vertex)
const
302 vertex.Normal.normalize();
318 template <
typename VType>
319 void operator()(VType& vertex)
const
322 vertex.TCoords *= Factor;
4x4 matrix. Mostly used as transformation matrix for 3d calculations.
Definition matrix4.hpp:49
void rotateVect(vector3df &vect) const
Transform (rotate/scale) a vector by the rotation part of this matrix.
Definition matrix4.hpp:1188
void transformVect(vector3df &vect) const
Transforms the vector by this matrix.
Definition matrix4.hpp:1224
Interface for vertex manipulators.
Definition SVertexManipulator.hpp:25
Vertex manipulator which adjusts the brightness by the given amount.
Definition SVertexManipulator.hpp:81
Vertex manipulator which adjusts the contrast by the given factor and brightness by a signed amount.
Definition SVertexManipulator.hpp:112
Vertex manipulator which adjusts the contrast by the given factor.
Definition SVertexManipulator.hpp:96
Vertex manipulator which desaturates the color values.
Definition SVertexManipulator.hpp:172
Vertex manipulator which desaturates the color values.
Definition SVertexManipulator.hpp:162
Vertex manipulator which desaturates the color values.
Definition SVertexManipulator.hpp:182
Vertex manipulator which adjusts the brightness by a gamma operation.
Definition SVertexManipulator.hpp:128
Vertex manipulator which interpolates the color values.
Definition SVertexManipulator.hpp:192
Vertex manipulator which interpolates the color values.
Definition SVertexManipulator.hpp:207
Vertex manipulator which inverts the RGB values.
Definition SVertexManipulator.hpp:53
Vertex manipulator which scales the color values.
Definition SVertexManipulator.hpp:147
Vertex manipulator to set the alpha value of the vertex color to a fixed value.
Definition SVertexManipulator.hpp:41
Vertex manipulator to set color to a fixed color for all vertices.
Definition SVertexManipulator.hpp:29
Vertex manipulator to set vertex color to one of two values depending on a given threshold.
Definition SVertexManipulator.hpp:65
Vertex manipulator which transforms the normal of the vertex with the rotate/scale part of the given ...
Definition SVertexManipulator.hpp:282
Vertex manipulator which normalizes the normal of the vertex.
Definition SVertexManipulator.hpp:296
Vertex manipulator which scales the position of the vertex along the normals.
Definition SVertexManipulator.hpp:240
Vertex manipulator which scales the position of the vertex.
Definition SVertexManipulator.hpp:223
Vertex manipulator which scales the TCoords of the vertex.
Definition SVertexManipulator.hpp:308
Vertex with two texture coordinates.
Definition S3DVertex.hpp:116
core::vector2d< f32 > TCoords2
Second set of texture coordinates.
Definition S3DVertex.hpp:153
standard vertex used by the Nirtcpp engine.
Definition S3DVertex.hpp:45
SColor Color
Color.
Definition S3DVertex.hpp:67
core::vector2d< f32 > TCoords
Texture coordinates.
Definition S3DVertex.hpp:70
Class representing a 32 bit ARGB color.
Definition SColor.hpp:317
f32 getLightness() const
Get lightness of the color in the range [0,255].
Definition SColor.hpp:354
u32 getAverage() const
Get average intensity of the color in the range [0,255].
Definition SColor.hpp:366
SColor getInterpolated_quadratic(const SColor &c1, const SColor &c2, f32 d) const
Returns interpolated color. ( quadratic )
Definition SColor.hpp:469
f32 getLuminance() const
Get luminance of the color in the range [0,255].
Definition SColor.hpp:360
u32 getGreen() const
Returns the green component of the color.
Definition SColor.hpp:346
SColor getInterpolated(const SColor &other, f32 d) const
Interpolates the color with a f32 value to another color.
Definition SColor.hpp:455
u32 getRed() const
Returns the red component of the color.
Definition SColor.hpp:341
u32 getBlue() const
Returns the blue component of the color.
Definition SColor.hpp:351
void setRed(u32 r)
Sets the red component of the Color.
Definition SColor.hpp:379
void setAlpha(u32 a)
Sets the alpha component of the Color.
Definition SColor.hpp:374
void setGreen(u32 g)
Sets the green component of the Color.
Definition SColor.hpp:384
void setBlue(u32 b)
Sets the blue component of the Color.
Definition SColor.hpp:389
const T clamp(const T &value, const T &low, const T &high)
clamps a value between low and high
Definition irrMath.hpp:164
As of Nirtcpp 1.6, position2d is a synonym for vector2d.
Definition vector3d.hpp:11
signed int s32
32 bit signed variable.
Definition irrTypes.hpp:72
unsigned char u8
8 bit unsigned variable.
Definition irrTypes.hpp:24
unsigned int u32
32 bit unsigned variable.
Definition irrTypes.hpp:64
float f32
32 bit floating point variable.
Definition irrTypes.hpp:110