arsa  2.7
Public Member Functions | List of all members
irr::scene::SVertexColorBrightnessManipulator Class Reference

Vertex manipulator which adjusts the brightness by the given amount. More...

#include <SVertexManipulator.h>

Inheritance diagram for irr::scene::SVertexColorBrightnessManipulator:
irr::scene::IVertexManipulator

Public Member Functions

 SVertexColorBrightnessManipulator (s32 amount)
 
void operator() (video::S3DVertex &vertex) const
 

Detailed Description

Vertex manipulator which adjusts the brightness by the given amount.

A positive value increases brightness, a negative value darkens the colors.

Definition at line 79 of file SVertexManipulator.h.

Constructor & Destructor Documentation

◆ SVertexColorBrightnessManipulator()

irr::scene::SVertexColorBrightnessManipulator::SVertexColorBrightnessManipulator ( s32  amount)
inline

Definition at line 82 of file SVertexManipulator.h.

82 : Amount(amount) {}

Member Function Documentation

◆ operator()()

void irr::scene::SVertexColorBrightnessManipulator::operator() ( video::S3DVertex vertex) const
inline

Definition at line 83 of file SVertexManipulator.h.

84  {
85  vertex.Color.setRed(core::clamp(vertex.Color.getRed()+Amount, 0u, 255u));
86  vertex.Color.setGreen(core::clamp(vertex.Color.getGreen()+Amount, 0u, 255u));
87  vertex.Color.setBlue(core::clamp(vertex.Color.getBlue()+Amount, 0u, 255u));
88  }
const T clamp(const T &value, const T &low, const T &high)
clamps a value between low and high
Definition: irrMath.h:167

The documentation for this class was generated from the following file: