5 #ifndef __S_VERTEX_MANIPULATOR_H_INCLUDED__
6 #define __S_VERTEX_MANIPULATOR_H_INCLUDED__
67 video::SColor high) : Threshold(threshold), Low(low), High(high) {}
194 Color(color), Factor(factor) {}
209 Color1(color1), Color2(color2), Factor(factor) {}
225 template <
typename VType>
228 vertex.Pos *= Factor;
242 template <
typename VType>
245 vertex.Pos += vertex.Normal*Factor;
256 template <
typename VType>
277 template <
typename VType>
281 vertex.TCoords *= Factor;
void operator()(VType &vertex) const
REALINLINE s32 round32(f32 x)
void setBlue(u32 b)
Sets the blue component of the Color.
core::vector2d< f32 > TCoords2
Second set of texture coordinates.
void operator()(video::S3DVertex &vertex) const
void operator()(video::S3DVertex &vertex) const
float f32
32 bit floating point variable.
void transformVect(vector3df &vect) const
Transforms the vector by this matrix.
void operator()(video::S3DVertex &vertex) const
SVertexColorBrightnessManipulator(s32 amount)
Vertex manipulator which interpolates the color values.
void setRed(u32 r)
Sets the red component of the Color.
u32 getGreen() const
Returns the green component of the color.
Vertex manipulator which adjusts the brightness by a gamma operation.
void operator()(video::S3DVertex &vertex) const
void operator()(video::S3DVertex &vertex) const
void operator()(VType &vertex) const
Vertex manipulator which desaturates the color values.
Vertex manipulator which invertes the RGB values.
f32 getLuminance() const
Get luminance of the color in the range [0,255].
SVertexColorSetManipulator(video::SColor color)
Vertex manipulator which interpolates the color values.
Vertex manipulator to set vertex color to one of two values depending on a given threshold.
SVertexPositionScaleManipulator(const core::vector3df &factor)
void operator()(video::S3DVertex &vertex) const
Vertex manipulator which scales the position of the vertex.
Vertex manipulator which desaturates the color values.
void operator()(video::S3DVertex &vertex) const
void setAlpha(u32 a)
Sets the alpha component of the Color.
Vertex manipulator which adjusts the brightness by the given amount.
unsigned char u8
8 bit unsigned variable.
SVertexColorGammaManipulator(f32 gamma)
void operator()(video::S3DVertex &vertex) const
f32 getLightness() const
Get lightness of the color in the range [0,255].
SVertexTCoordsScaleManipulator(const core::vector2df &factor, u32 uvSet=1)
void operator()(video::S3DVertex &vertex) const
Vertex manipulator which adjusts the contrast by the given factor and brightness by a signed amount...
Vertex with two texture coordinates.
void operator()(video::S3DVertex &vertex) const
SVertexColorInterpolateQuadraticManipulator(video::SColor color1, video::SColor color2, f32 factor)
signed int s32
32 bit signed variable.
void operator()(VType &vertex) const
void operator()(video::S3DVertex &vertex) const
SVertexColorScaleManipulator(f32 factor)
SVertexColorSetAlphaManipulator(u32 alpha)
unsigned int u32
32 bit unsigned variable.
Interface for vertex manipulators.
u32 getRed() const
Returns the red component of the color.
Vertex manipulator which scales the color values.
SColor getInterpolated(const SColor &other, f32 d) const
Interpolates the color with a f32 value to another color.
Vertex manipulator which adjusts the contrast by the given factor.
Vertex manipulator to set the alpha value of the vertex color to a fixed value.
u32 getBlue() const
Returns the blue component of the color.
standard vertex used by the Irrlicht engine.
void operator()(video::S3DVertex &vertex) const
void setGreen(u32 g)
Sets the green component of the Color.
void operator()(video::S3DVertex &vertex) const
SVertexColorContrastBrightnessManipulator(f32 factor, s32 amount)
SVertexColorContrastManipulator(f32 factor)
Vertex manipulator which scales the TCoords of the vertex.
SVertexColorInterpolateLinearManipulator(video::SColor color, f32 factor)
Class representing a 32 bit ARGB color.
Vertex manipulator which desaturates the color values.
4x4 matrix. Mostly used as transformation matrix for 3d calculations.
SVertexColorThresholdManipulator(u8 threshold, video::SColor low, video::SColor high)
u32 getAverage() const
Get average intensity of the color in the range [0,255].
SColor getInterpolated_quadratic(const SColor &c1, const SColor &c2, f32 d) const
Returns interpolated color. ( quadratic )
SVertexPositionScaleAlongNormalsManipulator(const core::vector3df &factor)
void operator()(video::S3DVertex2TCoords &vertex) const
Vertex manipulator to set color to a fixed color for all vertices.
core::vector2d< f32 > TCoords
Texture coordinates.
void operator()(video::S3DVertex &vertex) const
const T clamp(const T &value, const T &low, const T &high)
clamps a value between low and high
Vertex manipulator which scales the position of the vertex along the normals.