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

Vertex manipulator to set vertex color to one of two values depending on a given threshold. More...

#include <SVertexManipulator.h>

Inheritance diagram for irr::scene::SVertexColorThresholdManipulator:
irr::scene::IVertexManipulator

Public Member Functions

 SVertexColorThresholdManipulator (u8 threshold, video::SColor low, video::SColor high)
 
void operator() (video::S3DVertex &vertex) const
 

Detailed Description

Vertex manipulator to set vertex color to one of two values depending on a given threshold.

If average of the color value is >Threshold the High color is chosen, else Low.

Definition at line 63 of file SVertexManipulator.h.

Constructor & Destructor Documentation

◆ SVertexColorThresholdManipulator()

irr::scene::SVertexColorThresholdManipulator::SVertexColorThresholdManipulator ( u8  threshold,
video::SColor  low,
video::SColor  high 
)
inline

Definition at line 66 of file SVertexManipulator.h.

67  : Threshold(threshold), Low(low), High(high) {}

Member Function Documentation

◆ operator()()

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

Definition at line 68 of file SVertexManipulator.h.

69  {
70  vertex.Color = ((u8)vertex.Color.getAverage()>Threshold)?High:Low;
71  }
unsigned char u8
8 bit unsigned variable.
Definition: irrTypes.h:22

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