3ds Max C++ API Reference
acolor.h File Reference
#include "GeomExport.h"
#include "maxheap.h"
#include "maxtypes.h"
#include "point3.h"
#include "point4.h"
#include "color.h"
#include <wingdi.h>

Classes

class  AColor
 

Typedefs

typedef AColor RGBA
 

Functions

int MaxComponent (const AColor &)
 
int MinComponent (const AColor &)
 
AColor operator* (float f, const AColor &a)
 
AColor operator* (const AColor &a, float f)
 
AColor CompOver (const AColor &fg, const AColor &bg)
 
static float Intens (const AColor &c)
 

Typedef Documentation

◆ RGBA

typedef AColor RGBA

Function Documentation

◆ MaxComponent()

int MaxComponent ( const AColor )
Remarks
Returns the index of the component with the maximum absolute value.
Parameters:
const AColor&

The color to check.
Returns
The index of the component with the maximum absolute value. r=0, g=1, b=2, a=3.

◆ MinComponent()

int MinComponent ( const AColor )
Remarks
Returns the index of the component with the minimum absolute value.
Parameters:
const AColor&

The color to check.
Returns
The index of the component with the minimum absolute value. r=0, g=1, b=2, a=3.

◆ operator*() [1/2]

AColor operator* ( float  f,
const AColor a 
)
inline
Remarks
Multiplies each component of an AColor by a float.
Returns
An AColor with each component multiplied by a float.
448 {
449  return (AColor(a.r * f, a.g * f, a.b * f, a.a * f));
450 }
Definition: acolor.h:32
float r
These values are in the range 0.0 to 1.0.
Definition: acolor.h:37
float a
Definition: acolor.h:40
float b
Definition: acolor.h:39
float g
Definition: acolor.h:38

◆ operator*() [2/2]

AColor operator* ( const AColor a,
float  f 
)
inline
Remarks
Multiplies each component of an AColor by a float.
Returns
An AColor with each component multiplied by a float.
455 {
456  return (AColor(a.r * f, a.g * f, a.b * f, a.a * f));
457 }

◆ CompOver()

AColor CompOver ( const AColor fg,
const AColor bg 
)
inline
Remarks
Composite fg over bg, assuming associated alpha, i.e. pre-multiplied alpha for both fg and bg

This is: fg + (1.0f-fg.a)*bg
Parameters:
const AColor &fg

Specifies the foreground color to composite.

const AColor& bg

Specifies the background color to composite over.
Returns
The resulting AColor.
471 {
472  return fg + (1.0f - fg.a) * bg;
473 }

◆ Intens()

static float Intens ( const AColor c)
inlinestatic
478 {
479  return (c.r + c.g + c.b) / 3.0f;
480 }