3ds Max C++ API Reference
Loading...
Searching...
No Matches
BMM_Color_fl Struct Reference

High Dynamic Range bitmaps make use of this class to store color information using floating point values. More...

#include <maxcolors.h>

Public Member Functions

constexpr BMM_Color_fl (float vr=0.0f, float vg=0.0f, float vb=0.0f, float va=0.0f)
 
 operator float * ()
 
 operator const float * () const
 

Static Public Member Functions

static uint16_t clipColor (float c)
 

Public Attributes

float r
 Storage for the floating point color information.
 
float g
 
float b
 
float a
 

Detailed Description

High Dynamic Range bitmaps make use of this class to store color information using floating point values.

See also
Class Bitmap, Class BitmapStorage, Class BitmapManager, Working with Bitmaps.

Constructor & Destructor Documentation

◆ BMM_Color_fl()

constexpr BMM_Color_fl ( float  vr = 0.0f,
float  vg = 0.0f,
float  vb = 0.0f,
float  va = 0.0f 
)
inlineconstexpr
120 : r(vr)
121 , g(vg)
122 , b(vb)
123 , a(va)
124 {
125 }
float r
Storage for the floating point color information.
Definition: maxcolors.h:128
float a
Definition: maxcolors.h:128
float b
Definition: maxcolors.h:128
float g
Definition: maxcolors.h:128

Member Function Documentation

◆ operator float *()

operator float * ( )
inline
Remarks
Returns the address of the floating point values.
132 {
133 return &r;
134 }

◆ operator const float *()

operator const float * ( ) const
inline
Remarks
Returns the address of the floating point values.
137 {
138 return &r;
139 }

◆ clipColor()

static uint16_t clipColor ( float  c)
inlinestatic
Remarks
Returns the specified color c clipped (limited to) the range 0 to 65535.
143 {
144 return c <= 0.0f ? 0 : c >= 1.0f ? 65535 : static_cast<uint16_t>(c * 65535.0);
145 }

Member Data Documentation

◆ r

float r

Storage for the floating point color information.

◆ g

float g

◆ b

float b

◆ a

float a