5#ifndef S_VERTEX_MANIPULATOR_HPP_INCLUDED
6#define S_VERTEX_MANIPULATOR_HPP_INCLUDED
8#include <duckcpp/core/engine/matrix4.hpp>
9#include <duckcpp/core/engine/S3DVertex.hpp>
10#include <duckcpp/core/engine/SColor.hpp>
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 transformVect(vector3df &vect) const
Transforms the vector by this matrix.
Definition matrix4.hpp:1224
void rotateVect(vector3df &vect) const
Transform (rotate/scale) a vector by the rotation part of this matrix.
Definition matrix4.hpp:1188
2d vector template class with lots of operators and methods.
Definition vector2d.hpp:22
3d vector template class with lots of operators and methods.
Definition vector3d.hpp:32
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
dcpp::nub::vector2df TCoords2
Second set of texture coordinates.
Definition S3DVertex.hpp:153
standard vertex used by the Duckcpp engine.
Definition S3DVertex.hpp:45
dcpp::nub::vector2df TCoords
Texture coordinates.
Definition S3DVertex.hpp:70
SColor Color
Color.
Definition S3DVertex.hpp:67
Class representing a 32 bit ARGB color.
Definition SColor.hpp:317
void setGreen(dcpp::uint32_kt g)
Sets the green component of the Color.
Definition SColor.hpp:384
dcpp::float32_kt getLuminance() const
Get luminance of the color in the range [0,255].
Definition SColor.hpp:360
void setBlue(dcpp::uint32_kt b)
Sets the blue component of the Color.
Definition SColor.hpp:389
dcpp::float32_kt getLightness() const
Get lightness of the color in the range [0,255].
Definition SColor.hpp:354
void setRed(dcpp::uint32_kt r)
Sets the red component of the Color.
Definition SColor.hpp:379
dcpp::uint32_kt getGreen() const
Returns the green component of the color.
Definition SColor.hpp:346
SColor getInterpolated(const SColor &other, dcpp::float32_kt d) const
Interpolates the color with a dcpp::float32_kt value to another color.
Definition SColor.hpp:455
void setAlpha(dcpp::uint32_kt a)
Sets the alpha component of the Color.
Definition SColor.hpp:374
dcpp::uint32_kt getRed() const
Returns the red component of the color.
Definition SColor.hpp:341
dcpp::uint32_kt getBlue() const
Returns the blue component of the color.
Definition SColor.hpp:351
dcpp::uint32_kt 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, dcpp::float32_kt d) const
Returns interpolated color. ( quadratic )
Definition SColor.hpp:469
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 Duckcpp 1.6, position2d is a synonym for vector2d.
Definition shared_device.hpp:34
unsigned char uint8_kt
8 bit unsigned variable.
Definition irrTypes.hpp:24
unsigned int uint32_kt
32 bit unsigned variable.
Definition irrTypes.hpp:64
float float32_kt
32 bit floating point variable.
Definition irrTypes.hpp:108
signed int int32_kt
32 bit signed variable.
Definition irrTypes.hpp:72