libmoldeo (Moldeo 1.0 Core)
1.0
libmoldeo is the group of objects and functions that executes the basic operations of Moldeo 1.0 Platform.
|
Go to the source code of this file.
Functions | |
LIBMOLDEO_API MOfloat | morand () |
LIBMOLDEO_API MOint | moRand (MOint n) |
LIBMOLDEO_API void | HSVtoRGB (short iInHue, short iInSaturation, short iInValue, float *piRed, float *piGreen, float *piBlue) |
moText | moGetVersionStr () |
Devuelve la versión de libmoldeo. More... | |
void | moColor4f (float r, float g, float b, float a) |
void | moNormal3f (float x, float y, float z) |
void | moColor3f (float r, float g, float b) |
LIBMOLDEO_API void HSVtoRGB | ( | short | iInHue, |
short | iInSaturation, | ||
short | iInValue, | ||
float * | piRed, | ||
float * | piGreen, | ||
float * | piBlue | ||
) |
Definition at line 51 of file moTypes.cpp.
void moColor3f | ( | float | r, |
float | g, | ||
float | b | ||
) |
Definition at line 173 of file moTypes.cpp.
void moColor4f | ( | float | r, |
float | g, | ||
float | b, | ||
float | a | ||
) |
Definition at line 165 of file moTypes.cpp.
moText moGetVersionStr | ( | ) |
Devuelve la versión de libmoldeo.
RGB are from 0..1, H is from 0..360, SV from 0..1 double maxC = b; if (maxC < g) maxC = g; if (maxC < r) maxC = r; double minC = b; if (minC > g) minC = g; if (minC > r) minC = r;
double delta = maxC - minC;
double V = maxC; double S = 0; double H = 0;
if (delta == 0) { H = 0; S = 0; } else { S = delta / maxC; double dR = 60*(maxC - r)/delta + 180; double dG = 60*(maxC - g)/delta + 180; double dB = 60*(maxC - b)/delta + 180; if (r == maxC) H = dB - dG; else if (g == maxC) H = 120 + dR - dB; else H = 240 + dG - dR; }
if (H<0) H+=360; if (H>=360) H-=360;
Definition at line 159 of file moTypes.cpp.
void moNormal3f | ( | float | x, |
float | y, | ||
float | z | ||
) |
Definition at line 169 of file moTypes.cpp.
LIBMOLDEO_API MOfloat morand | ( | ) |
devuelve un valor con distribucion uniforme 0..1 value entre 0 y 1
Definition at line 36 of file moTypes.cpp.
LIBMOLDEO_API MOint moRand | ( | MOint | n | ) |
Definition at line 41 of file moTypes.cpp.