|
VLTIF
CS426FinalProject
|
#include <Enumerations.h>
Public Member Functions | |
| Enumerations () | |
| Enumerations (const Enumerations &orig) | |
| virtual | ~Enumerations () |
| Vec3b | Scalar2Vec (const Scalar &scal) |
Static Public Member Functions | |
| static Scalar | color_interp (Scalar const &cA, Scalar const &cB, const double val, const double addon=0) |
| static string | bool2string (const bool &val) |
Public Attributes | |
| Scalar | RED |
| Scalar | GREEN |
| Scalar | BLUE |
Definition at line 22 of file Enumerations.h.
| Enumerations::Enumerations | ( | ) |
| Enumerations::Enumerations | ( | const Enumerations & | orig | ) |
Definition at line 18 of file Enumerations.cpp.
{
}
| Enumerations::~Enumerations | ( | ) | [virtual] |
Definition at line 21 of file Enumerations.cpp.
{
}
| static string Enumerations::bool2string | ( | const bool & | val | ) | [inline, static] |
Convert a boolean value to string
| val | Boolean value |
Definition at line 58 of file Enumerations.h.
Referenced by Parser::write_configuration().
{
if( val == true)
return "true";
else
return false;
}
| static Scalar Enumerations::color_interp | ( | Scalar const & | cA, |
| Scalar const & | cB, | ||
| const double | val, | ||
| const double | addon = 0 |
||
| ) | [inline, static] |
Interpolate between two Scalar Colors
| cA | Color A |
| cB | Color B |
| val | Value to interpolate by |
| addon | - weight for translation (default = 0). This will add if > 0.5, subtract if < 0.5 |
Definition at line 42 of file Enumerations.h.
Referenced by compute_point_density(), and main().
{
double nval = val;
if( nval > 0.5 ) nval = std::min( nval + addon, 1.0);
else if( nval < 0.5 ) nval = std::max( nval - addon, 0.0);
Scalar out( (1-nval)*cA[0] + nval*cB[0], (1-nval)*cA[1] + nval*cB[1], (1-nval)*cA[2] + nval*cB[2]);
return out;
}
| Vec3b Enumerations::Scalar2Vec | ( | const Scalar & | scal | ) | [inline] |
Definition at line 28 of file Enumerations.h.
Referenced by compute_point_density().
{
return Vec3b(scal[0], scal[1], scal[2]);
}
| Scalar Enumerations::BLUE |
Definition at line 67 of file Enumerations.h.
Referenced by Enumerations().
| Scalar Enumerations::GREEN |
Definition at line 66 of file Enumerations.h.
Referenced by Enumerations().
| Scalar Enumerations::RED |
Definition at line 65 of file Enumerations.h.
Referenced by Enumerations().