#include <rgba.h>
Nevrax France
Definition at line 462 of file rgba.h.
Public Member Functions | |
CRGBAF (CRGBA c) | |
CRGBAF (float _r, float _g, float _b, float _a=1.f) | |
CRGBAF () | |
Default constructor. do nothing. | |
void | normalize () |
CRGBAF | operator * (float f) const |
CRGBAF | operator * (const CRGBAF &c) const |
CRGBAF & | operator *= (float f) |
CRGBAF & | operator *= (const CRGBAF &c) |
operator CRGBA () const | |
CRGBAF | operator+ (const CRGBAF &c) const |
CRGBAF & | operator+= (const CRGBAF &c) |
CRGBAF | operator- (const CRGBAF &c) const |
CRGBAF & | operator-= (const CRGBAF &c) |
CRGBAF | operator/ (float f) const |
CRGBAF & | operator/= (float f) |
void | serial (class NLMISC::IStream &f) |
void | set (float r, float g, float b, float a) |
Data Fields | |
float | A |
Alpha componant. | |
float | B |
Blue componant. | |
float | G |
Green componant. | |
float | R |
Red componant. |
|
Default constructor. do nothing.
Definition at line 466 of file rgba.h. Referenced by operator *(), operator+(), operator-(), and operator/().
00467 {} |
|
Constructor.
Definition at line 476 of file rgba.h.
|
|
Constructor with a CRGBA.
Definition at line 488 of file rgba.h. References NLMISC::CRGBA::A, NLMISC::CRGBA::B, NLMISC::CRGBA::G, and NLMISC::CRGBA::R.
|
|
Normalize component between [0.f,1.f] Definition at line 511 of file rgba.h.
|
|
Mul float operator. Mul each component by f.
Definition at line 554 of file rgba.h. References CRGBAF().
00555 { 00556 return CRGBAF (R*f, G*f, B*f, A*f); 00557 } |
|
Mul operator. Mul components.
Definition at line 544 of file rgba.h. References A, B, CRGBAF(), G, and R.
00545 { 00546 return CRGBAF (R*c.R, G*c.G, B*c.B, A*c.A); 00547 } |
|
Mul float operator. Multiplate each component by f.
Definition at line 616 of file rgba.h.
|
|
Mul operator. Multiplate each component.
Definition at line 602 of file rgba.h.
|
|
Cast operator to CRGBA. Definition at line 499 of file rgba.h. References uint8.
|
|
Add operator. Sum components.
Definition at line 524 of file rgba.h. References A, B, CRGBAF(), G, and R.
00525 { 00526 return CRGBAF (R+c.R, G+c.G, B+c.B, A+c.A); 00527 } |
|
Add operator. Add each component.
Definition at line 574 of file rgba.h.
|
|
Sub operator. Substract components.
Definition at line 534 of file rgba.h. References A, B, CRGBAF(), G, and R.
00535 { 00536 return CRGBAF (R-c.R, G-c.G, B-c.B, A-c.A); 00537 } |
|
Sub operator. Substract each component.
Definition at line 588 of file rgba.h.
|
|
Div float operator. Div each component by f.
Definition at line 564 of file rgba.h. References CRGBAF().
00565 { 00566 return CRGBAF (R/f, G/f, B/f, A/f); 00567 } |
|
Div float operator. Divide each component by f.
Definition at line 630 of file rgba.h.
|
|
Serialisation.
Definition at line 725 of file rgba.cpp.
00726 { 00727 f.serial (R); 00728 f.serial (G); 00729 f.serial (B); 00730 f.serial (A); 00731 } |
|
Set colors.
Definition at line 733 of file rgba.cpp. References r.
|
|
Alpha componant.
Definition at line 661 of file rgba.h. Referenced by NL3D::CMRMBuilder::buildMeshBuildMrm(), NL3D::CRenderTrav::changeVPLightSetupMaterial(), NL3D::CPatch::generateTileVegetable(), NLMISC::CBitmap::getColor(), NL3D::CRenderTrav::getStrongestLightIndex(), NLMISC::operator *(), operator *(), operator *=(), operator+(), operator+=(), operator-(), operator-=(), NL3D::CMeshMorpher::update(), and NL3D::CMeshMorpher::updateSkinned(). |
|
|
|