AColor Class Reference

AColor Class Reference

#include <acolor.h>

Class Description

See also
Class Color, Structure BMM_Color_24, Structure BMM_Color_32, Structure BMM_Color_48, Structure BMM_Color_64, Structure BMM_Color_fl, Structure RealPixel.

Description:
This class represents color as four floating point values: r, g, b, and an alpha channel a. Also note the following typedef: typedef AColor RGBA;
+ Inheritance diagram for AColor:

Public Member Functions

 AColor ()
 
 AColor (float R, float G, float B, float A=1.0f)
 
 AColor (double R, double G, double B, double A=1.0)
 
 AColor (int R, int G, int B, int A=0)
 
 AColor (const AColor &c)
 
 AColor (const Color &c, float alph=1.0f)
 
 AColor (DWORD rgb, float alph=1.0f)
 
 AColor (Point4 p)
 
 AColor (float af[4])
 
 AColor (const BMM_Color_24 &c)
 
 AColor (const BMM_Color_32 &c)
 
 AColor (const BMM_Color_48 &c)
 
 AColor (const BMM_Color_64 &c)
 
 AColor (const BMM_Color_fl &c)
 
void Black ()
 
void White ()
 
void ClampMax ()
 
void ClampMin ()
 
void ClampMinMax ()
 
float & operator[] (int i)
 
const float & operator[] (int i) const
 
 operator float * ()
 
 operator const float * () const
 
 operator Color () const
 
 operator BMM_Color_24 ()
 
 operator BMM_Color_32 ()
 
 operator BMM_Color_48 ()
 
 operator BMM_Color_64 ()
 
 operator BMM_Color_fl ()
 
DWORD toRGB ()
 
 operator Point3 ()
 
 operator Point4 ()
 
AColor operator- () const
 
AColor operator+ () const
 
AColoroperator-= (const AColor &)
 
AColoroperator+= (const AColor &)
 
AColoroperator*= (float)
 
AColoroperator/= (float)
 
AColoroperator*= (const AColor &)
 
int operator== (const AColor &p) const
 
int operator!= (const AColor &p) const
 
AColor operator- (const AColor &) const
 
AColor operator+ (const AColor &) const
 
AColor operator/ (const AColor &) const
 
AColor operator* (const AColor &) const
 
AColor operator^ (const AColor &) const
 

Public Attributes

float r
 These values are in the range 0.0 to 1.0. More...
 
float g
 
float b
 
float a
 

Additional Inherited Members

- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 

Constructor & Destructor Documentation

AColor ( )
inline
Remarks
Constructor. The resulting object should be initialized with one of the initialization methods.
41 {}
AColor ( float  R,
float  G,
float  B,
float  A = 1.0f 
)
inline
Remarks
Constructor. Initializes the AColor to the RGBA color values passed.
44 { r = R; g = G; b = B; a = A; }
float r
These values are in the range 0.0 to 1.0.
Definition: acolor.h:36
float a
Definition: acolor.h:36
float g
Definition: acolor.h:36
float b
Definition: acolor.h:36
AColor ( double  R,
double  G,
double  B,
double  A = 1.0 
)
inline
Remarks
Constructor. Initializes the AColor to the RGBA color values passed (cast to float).
47  {
48  r = (float)R; g = (float)G; b = (float)B; a = (float)A; }
float r
These values are in the range 0.0 to 1.0.
Definition: acolor.h:36
float a
Definition: acolor.h:36
float g
Definition: acolor.h:36
float b
Definition: acolor.h:36
AColor ( int  R,
int  G,
int  B,
int  A = 0 
)
inline
Remarks
Constructor. Initializes the AColor to the RGBA color values passed (cast to float).
51  {
52  r = (float)R; g = (float)G; b = (float)B; a = (float)A; }
float r
These values are in the range 0.0 to 1.0.
Definition: acolor.h:36
float a
Definition: acolor.h:36
float g
Definition: acolor.h:36
float b
Definition: acolor.h:36
AColor ( const AColor c)
inline
Remarks
Constructor. Initializes the AColor to the AColor passed.
54 { r = c.r; g = c.g; b = c.b; a = c.a; }
float r
These values are in the range 0.0 to 1.0.
Definition: acolor.h:36
float a
Definition: acolor.h:36
float g
Definition: acolor.h:36
float b
Definition: acolor.h:36
AColor ( const Color c,
float  alph = 1.0f 
)
inline
Remarks
Constructor. Initializes the AColor to the Color passed, optionally specifying an alpha value.
57 { r = c.r; g = c.g; b = c.b; a = alph; }
float r
These values are in the range 0.0 to 1.0.
Definition: acolor.h:36
float g
These values are in the range 0.0 to 1.0.
Definition: color.h:76
float a
Definition: acolor.h:36
float g
Definition: acolor.h:36
float b
These values are in the range 0.0 to 1.0.
Definition: color.h:78
float b
Definition: acolor.h:36
float r
These values are in the range 0.0 to 1.0.
Definition: color.h:74
AColor ( DWORD  rgb,
float  alph = 1.0f 
)
explicit
Remarks
Constructor. Initializes the color to the Windows RGB value, optionally specifying an alpha value.
AColor ( Point4  p)
inline
61 { r = p.x; g = p.y; b = p.z; a = p.w; }
float r
These values are in the range 0.0 to 1.0.
Definition: acolor.h:36
float a
Definition: acolor.h:36
float y
Definition: point4.h:45
float g
Definition: acolor.h:36
float x
Definition: point4.h:45
float z
Definition: point4.h:45
float b
Definition: acolor.h:36
float w
Definition: point4.h:45
AColor ( float  af[4])
inline
Remarks
Constructor. Initializes the color to the value passed.
Parameters:
float af[3]

Specifies the color. r=af[0], g=af[1], b=af[2], a=af[3].
66 { r = af[0]; g = af[1]; b = af[2];a = af[3]; }
float r
These values are in the range 0.0 to 1.0.
Definition: acolor.h:36
float a
Definition: acolor.h:36
float g
Definition: acolor.h:36
float b
Definition: acolor.h:36
AColor ( const BMM_Color_24 c)
inline
Remarks
Constructor. Initializes this AColor from the 24 bit color value passed.
Parameters:
const BMM_Color_24& c

The 24 bit color to initialize from.
71  {
72  r = float(c.r)/255.0f; g = float(c.g)/255.0f; b = float(c.b)/255.0f; a = 1.0f;
73  }
float r
These values are in the range 0.0 to 1.0.
Definition: acolor.h:36
float a
Definition: acolor.h:36
BYTE g
Definition: maxtypes.h:61
float g
Definition: acolor.h:36
BYTE b
Definition: maxtypes.h:61
BYTE r
Definition: maxtypes.h:61
float b
Definition: acolor.h:36
AColor ( const BMM_Color_32 c)
inline
Remarks
Constructor. Initializes this AColor from the 32 bit color value passed.
Parameters:
const BMM_Color_32& c

The 32 bit color to initialize from.
78  {
79  r = float(c.r)/255.0f; g = float(c.g)/255.0f; b = float(c.b)/255.0f; a = float(c.a)/255.0f;
80  }
BYTE g
Definition: maxtypes.h:68
float r
These values are in the range 0.0 to 1.0.
Definition: acolor.h:36
BYTE b
Definition: maxtypes.h:68
float a
Definition: acolor.h:36
float g
Definition: acolor.h:36
BYTE a
Definition: maxtypes.h:68
BYTE r
Definition: maxtypes.h:68
float b
Definition: acolor.h:36
AColor ( const BMM_Color_48 c)
inline
Remarks
Constructor. Initializes this AColor from the 48 bit color value passed.
Parameters:
const BMM_Color_48& c

The 48 bit color to initialize from.
85  {
86  r = float(c.r)/65535.0f; g = float(c.g)/65535.0f; b = float(c.b)/65535.0f; a = 1.0f;
87  }
float r
These values are in the range 0.0 to 1.0.
Definition: acolor.h:36
WORD r
Definition: maxtypes.h:75
WORD g
Definition: maxtypes.h:75
float a
Definition: acolor.h:36
float g
Definition: acolor.h:36
float b
Definition: acolor.h:36
WORD b
Definition: maxtypes.h:75
AColor ( const BMM_Color_64 c)
inline
Remarks
Constructor. Initializes this AColor from the 64 bit color value passed.
Parameters:
const BMM_Color_64& c

The 64 bit color to initialize from.
92  {
93  r = float(c.r)/65535.0f; g = float(c.g)/65535.0f; b = float(c.b)/65535.0f; a = float(c.a)/65535.0f;
94  }
WORD r
Definition: maxtypes.h:82
float r
These values are in the range 0.0 to 1.0.
Definition: acolor.h:36
float a
Definition: acolor.h:36
float g
Definition: acolor.h:36
WORD g
Definition: maxtypes.h:82
WORD a
Definition: maxtypes.h:82
WORD b
Definition: maxtypes.h:82
float b
Definition: acolor.h:36
AColor ( const BMM_Color_fl c)
inline
Remarks
Constructor. Initializes this AColor from the floating point color passed.
Parameters:
const BMM_Color_fl& c

The floating point color to initialize from. No conversion or scaling is done.
100  {
101  r = c.r; g = c.g; b = c.b; a = c.a;
102  }
float g
Definition: maxtypes.h:92
float r
These values are in the range 0.0 to 1.0.
Definition: acolor.h:36
float a
Definition: acolor.h:36
float b
Definition: maxtypes.h:92
float a
Definition: maxtypes.h:92
float g
Definition: acolor.h:36
float r
Storage for the floating point color information.
Definition: maxtypes.h:92
float b
Definition: acolor.h:36

Member Function Documentation

void Black ( )
inline
Remarks
Sets this AColor to black. r = g = b = 0.0f; a= 1.0f
105 { r = g = b = 0.0f; a = 1.0f; }
float r
These values are in the range 0.0 to 1.0.
Definition: acolor.h:36
float a
Definition: acolor.h:36
float g
Definition: acolor.h:36
float b
Definition: acolor.h:36
void White ( )
inline
Remarks
Sets the AColor to white. r = g = b = a = 1.0f
107 { r = g = b = 1.0f; a = 1.0f; }
float r
These values are in the range 0.0 to 1.0.
Definition: acolor.h:36
float a
Definition: acolor.h:36
float g
Definition: acolor.h:36
float b
Definition: acolor.h:36
void ClampMax ( )
Remarks
Makes all the components of the AColor <= 1.0
void ClampMin ( )
Remarks
Makes all the components of the AColor >= 0.0
void ClampMinMax ( )
Remarks
Makes all the components of the AColor fall in the range 0.0 to 1.0.
float& operator[] ( int  i)
inline
Remarks
Access operators.
Parameters:
int i

The index of the component to return.
Returns
0=r, 1=g, 2=b, 3=a.
122 { return (&r)[i]; }
float r
These values are in the range 0.0 to 1.0.
Definition: acolor.h:36
const float& operator[] ( int  i) const
inline
Remarks
Access operators.
Parameters:
int i

The index of the component to return.
Returns
0=r, 1=g, 2=b, 3=a.
129 { return (&r)[i]; }
float r
These values are in the range 0.0 to 1.0.
Definition: acolor.h:36
operator float * ( )
inline
Remarks
Conversion function.

Returns a pointer to the AColor.
134 { return(&r); }
float r
These values are in the range 0.0 to 1.0.
Definition: acolor.h:36
operator const float * ( ) const
inline
135 { return(&r); }
float r
These values are in the range 0.0 to 1.0.
Definition: acolor.h:36
operator Color ( ) const
inline
136 { return Color(r,g,b); }
float r
These values are in the range 0.0 to 1.0.
Definition: acolor.h:36
Definition: color.h:69
float g
Definition: acolor.h:36
float b
Definition: acolor.h:36
operator BMM_Color_24 ( )
inline
Remarks
Converts this AColor to the BMM_Color_24 format.

141  {
142  BMM_Color_24 c;
143  c.r = (BYTE)int(r*255.0f); c.g = (BYTE)int(g*255.0f); c.b = (BYTE)int(b*255.0f);
144  return c;
145  }
float r
These values are in the range 0.0 to 1.0.
Definition: acolor.h:36
BYTE g
Definition: maxtypes.h:61
float g
Definition: acolor.h:36
24 bit color: 8 bits each for Red, Green, and Blue.
Definition: maxtypes.h:59
BYTE b
Definition: maxtypes.h:61
BYTE r
Definition: maxtypes.h:61
float b
Definition: acolor.h:36
operator BMM_Color_32 ( )
inline
Remarks
Converts this AColor to the BMM_Color_32 format.
147  {
148  BMM_Color_32 c;
149  c.r = (BYTE)int(r*255.0f); c.g = (BYTE)int(g*255.0f); c.b = (BYTE)int(b*255.0f); c.a = (BYTE)int(a*255.0f);
150  return c;
151  }
BYTE g
Definition: maxtypes.h:68
float r
These values are in the range 0.0 to 1.0.
Definition: acolor.h:36
BYTE b
Definition: maxtypes.h:68
float a
Definition: acolor.h:36
float g
Definition: acolor.h:36
BYTE a
Definition: maxtypes.h:68
BYTE r
Definition: maxtypes.h:68
32 bit color: 8 bits each for Red, Green, Blue, and Alpha.
Definition: maxtypes.h:66
float b
Definition: acolor.h:36
operator BMM_Color_48 ( )
inline
Remarks
Converts this AColor to the BMM_Color_48 format.
153  {
154  BMM_Color_48 c;
155  c.r = (WORD)int(r*65535.0f); c.g = (WORD)int(g*65535.0f); c.b = (WORD)int(b*65535.0f);
156  return c;
157  }
float r
These values are in the range 0.0 to 1.0.
Definition: acolor.h:36
WORD r
Definition: maxtypes.h:75
WORD g
Definition: maxtypes.h:75
48 bit color: 16 bits each for Red, Green, and Blue.
Definition: maxtypes.h:73
float g
Definition: acolor.h:36
float b
Definition: acolor.h:36
WORD b
Definition: maxtypes.h:75
operator BMM_Color_64 ( )
inline
Remarks
Converts this AColor to the BMM_Color_64 format.
159  {
160  BMM_Color_64 c;
161  c.r = (WORD)int(r*65535.0f); c.g = (WORD)int(g*65535.0f); c.b = (WORD)int(b*65535.0f); c.a = (WORD)int(a*65535.0f);
162  return c;
163  }
WORD r
Definition: maxtypes.h:82
float r
These values are in the range 0.0 to 1.0.
Definition: acolor.h:36
float a
Definition: acolor.h:36
float g
Definition: acolor.h:36
WORD g
Definition: maxtypes.h:82
WORD a
Definition: maxtypes.h:82
WORD b
Definition: maxtypes.h:82
float b
Definition: acolor.h:36
64 bit color: 16 bits each for Red, Green, Blue, and Alpha.
Definition: maxtypes.h:80
operator BMM_Color_fl ( )
inline
Remarks
Converts this AColor to the BMM_Color_fl format.
165  {
166  BMM_Color_fl c;
167  c.r = r; c.g = g; c.b = b; c.a = a;
168  return c;
169  }
float g
Definition: maxtypes.h:92
High Dynamic Range bitmaps make use of this class to store color information using floating point val...
Definition: maxtypes.h:87
float r
These values are in the range 0.0 to 1.0.
Definition: acolor.h:36
float a
Definition: acolor.h:36
float b
Definition: maxtypes.h:92
float a
Definition: maxtypes.h:92
float g
Definition: acolor.h:36
float r
Storage for the floating point color information.
Definition: maxtypes.h:92
float b
Definition: acolor.h:36
DWORD toRGB ( )
inline
Remarks
Convert the AColor to a Windows RGB color. See COLORREF.
Returns
A Windows RGB color.
176 { return RGB(FLto255(r),FLto255(g), FLto255(b)); };
float r
These values are in the range 0.0 to 1.0.
Definition: acolor.h:36
#define FLto255(x)
Definition: color.h:24
float g
Definition: acolor.h:36
float b
Definition: acolor.h:36
operator Point3 ( )
inline
Remarks
Convert the AColor to a Point3.
Returns
A Point3. x=r, y=g, z=b.
181 { return Point3(r,g,b); }
float r
These values are in the range 0.0 to 1.0.
Definition: acolor.h:36
float g
Definition: acolor.h:36
Definition: point3.h:51
float b
Definition: acolor.h:36
operator Point4 ( )
inline
182 { return Point4(r,g,b,a); }
float r
These values are in the range 0.0 to 1.0.
Definition: acolor.h:36
float a
Definition: acolor.h:36
Definition: point4.h:41
float g
Definition: acolor.h:36
float b
Definition: acolor.h:36
AColor operator- ( ) const
inline
Remarks
Unary - operator.
Returns
The Color with the components negated, i.e.

{ return(AColor(-r,-g,-b, -a)); }
188 { return (AColor(-r,-g,-b, -a)); }
float r
These values are in the range 0.0 to 1.0.
Definition: acolor.h:36
AColor()
Definition: acolor.h:41
float a
Definition: acolor.h:36
float g
Definition: acolor.h:36
float b
Definition: acolor.h:36
AColor operator+ ( ) const
inline
Remarks
Unary + operator.
Returns
The AColor itself.
191 { return *this; }
AColor & operator-= ( const AColor c)
inline
Remarks
Subtracts an AColor from this AColor.
Returns
A Color that is the difference between two Colors.
261  {
262  r -= c.r; g -= c.g; b -= c.b; a -= c.a;
263  return *this;
264  }
float r
These values are in the range 0.0 to 1.0.
Definition: acolor.h:36
float a
Definition: acolor.h:36
float g
Definition: acolor.h:36
float b
Definition: acolor.h:36
AColor & operator+= ( const AColor c)
inline
Remarks
Adds an AColor to this AColor.
Returns
An AColor that is the sum of two AColors.
266  {
267  r += c.r; g += c.g; b += c.b; a += c.a;
268  return *this;
269  }
float r
These values are in the range 0.0 to 1.0.
Definition: acolor.h:36
float a
Definition: acolor.h:36
float g
Definition: acolor.h:36
float b
Definition: acolor.h:36
AColor & operator*= ( float  f)
inline
Remarks
Multiplies the components of this AColor by a float.
Returns
An AColor multiplied by a float.
271  {
272  r *= f; g *= f; b *= f; a *= f;
273  return *this;
274  }
float r
These values are in the range 0.0 to 1.0.
Definition: acolor.h:36
float a
Definition: acolor.h:36
float g
Definition: acolor.h:36
float b
Definition: acolor.h:36
AColor & operator/= ( float  f)
inline
Remarks
Divides the components of this AColor by a float.
Returns
An AColor divided by a float.
276  {
277  r /= f; g /= f; b /= f; a /= f;
278  return *this;
279  }
float r
These values are in the range 0.0 to 1.0.
Definition: acolor.h:36
float a
Definition: acolor.h:36
float g
Definition: acolor.h:36
float b
Definition: acolor.h:36
AColor & operator*= ( const AColor c)
inline
Remarks
Performs element-by-element multiplying between two AColors.
Returns
This AColor element-by-element multiplied by another AColor.
281  {
282  r *= c.r; g *= c.g; b *= c.b; a *= c.a;
283  return *this;
284  }
float r
These values are in the range 0.0 to 1.0.
Definition: acolor.h:36
float a
Definition: acolor.h:36
float g
Definition: acolor.h:36
float b
Definition: acolor.h:36
int operator== ( const AColor p) const
inline
Remarks
Test for equality between two AColors.
Returns
Nonzero if the AColors are equal; otherwise 0.
213 { return ((p.r==r)&&(p.g==g)&&(p.b==b)&&(p.a==a)); }
float r
These values are in the range 0.0 to 1.0.
Definition: acolor.h:36
float a
Definition: acolor.h:36
float g
Definition: acolor.h:36
float b
Definition: acolor.h:36
int operator!= ( const AColor p) const
inline
Remarks
Tests for inequality between two AColors.
Returns
Nonzero if the AColors are not equal; otherwise 0.
216 { return ((p.r!=r)||(p.g!=g)||(p.b!=b)||(p.a!=a)); }
float r
These values are in the range 0.0 to 1.0.
Definition: acolor.h:36
float a
Definition: acolor.h:36
float g
Definition: acolor.h:36
float b
Definition: acolor.h:36
AColor operator- ( const AColor c) const
inline
Remarks
Subtracts an AColor from an AColor.
Returns
An AColor that is the difference between two AColors.
286  {
287  return(AColor(r-c.r,g-c.g,b-c.b,a-c.a));
288  }
float r
These values are in the range 0.0 to 1.0.
Definition: acolor.h:36
AColor()
Definition: acolor.h:41
float a
Definition: acolor.h:36
float g
Definition: acolor.h:36
float b
Definition: acolor.h:36
AColor operator+ ( const AColor c) const
inline
Remarks
Adds an AColor to an AColor.
Returns
An AColor that is the difference between two AColors.
290  {
291  return(AColor(r+c.r,g+c.g,b+c.b,a+c.a));
292  }
float r
These values are in the range 0.0 to 1.0.
Definition: acolor.h:36
AColor()
Definition: acolor.h:41
float a
Definition: acolor.h:36
float g
Definition: acolor.h:36
float b
Definition: acolor.h:36
AColor operator/ ( const AColor c) const
inline
Remarks
Divides an AColor by an AColor.
Returns
An AColor divided by an AColor. r/r, g/g, b/b, a/a.
294  {
295  return AColor(r/c.r,g/c.g,b/c.b,a/c.a);
296  }
float r
These values are in the range 0.0 to 1.0.
Definition: acolor.h:36
AColor()
Definition: acolor.h:41
float a
Definition: acolor.h:36
float g
Definition: acolor.h:36
float b
Definition: acolor.h:36
AColor operator* ( const AColor c) const
inline
Remarks
Multiplies an AColor by an AColor.
Returns
An AColor multiplied by an AColor. r*r, g*g, b*b, a*a.
298  {
299  return AColor(r*c.r, g*c.g, b*c.b, a*c.a);
300  }
float r
These values are in the range 0.0 to 1.0.
Definition: acolor.h:36
AColor()
Definition: acolor.h:41
float a
Definition: acolor.h:36
float g
Definition: acolor.h:36
float b
Definition: acolor.h:36
AColor operator^ ( const AColor c) const
inline
Remarks
Cross product of two AColors. The alpha component is not affected by the cross product.
Returns
An AColor that is the cross product of two AColors.
302  {
303  return AColor(g * c.b - b * c.g, b * c.r - r * c.b, r * c.g - g * c.r, c.a);
304  }
float r
These values are in the range 0.0 to 1.0.
Definition: acolor.h:36
AColor()
Definition: acolor.h:41
float a
Definition: acolor.h:36
float g
Definition: acolor.h:36
float b
Definition: acolor.h:36

Member Data Documentation

float r

These values are in the range 0.0 to 1.0.

float g
float b
float a