2
Copyright (c) 2008-2009 NetAllied Systems GmbH
4
This file is part of COLLADAStreamWriter.
6
Licensed under the MIT Open Source License,
7
for details please see LICENSE file or the website
8
http://www.opensource.org/licenses/mit-license.php
11
#ifndef __COLLADASTREAMWRITER_COLOR_H__
12
#define __COLLADASTREAMWRITER_COLOR_H__
14
#include "COLLADASWPrerequisites.h"
33
Color ( double r, double g, double b, double a, String sid="" )
34
: mR ( r ), mG ( g ), mB ( b ), mA ( a ), mSid ( sid ) {}
36
/** Creates a color with opacity 1.*/
37
Color ( double r, double g, double b, String sid="" )
38
: mR ( r ), mG ( g ), mB ( b ), mA ( 1 ), mSid ( sid ) {}
40
/** Creates an invalid color*/
42
: mR ( -1 ), mG ( -1 ), mB ( -1 ), mA ( -1 ), mSid ( "" ) {}
44
/** Sets the values of color*/
45
void set ( double r, double g, double b, double a, String sid="" );
47
/** Return true if the color is valid, false otherwise*/
50
/** Returns the red component*/
56
/** Returns the green component*/
57
double getGreen() const
62
/** Returns the blue component*/
63
double getBlue() const
68
/** Returns the alpha component*/
69
double getAlpha() const
74
/** A white color object*/
75
static const Color WHITE;
77
/** A black color object*/
78
static const Color BLACK;
82
} //namespace COLLADASW
85
#endif //__COLLADASTREAMWRITER_COLOR_H__