Dura2D  v0.1.0
An educational 2D game physics library
Loading...
Searching...
No Matches
d2Color Struct Reference

#include <d2Draw.h>

Public Member Functions

 d2Color ()=default
 
 d2Color (float rIn, float gIn, float bIn, float aIn=1.0f)
 
void Set (float rIn, float gIn, float bIn, float aIn=1.0f)
 
d2Color operator* (const float &f) const
 
d2Coloroperator*= (const float &f)
 
d2Color operator/ (const float &f) const
 
d2Coloroperator/= (const float &f)
 

Public Attributes

float r {}
 
float g {}
 
float b {}
 
float a {1.0f}
 

Detailed Description

Color for debug drawing. Each value is in the range [0,1].

Constructor & Destructor Documentation

◆ d2Color() [1/2]

d2Color::d2Color ( )
default

◆ d2Color() [2/2]

d2Color::d2Color ( float rIn,
float gIn,
float bIn,
float aIn = 1.0f )
inline

Member Function Documentation

◆ operator*()

d2Color d2Color::operator* ( const float & f) const
inline

◆ operator*=()

d2Color & d2Color::operator*= ( const float & f)
inline

◆ operator/()

d2Color d2Color::operator/ ( const float & f) const
inline

◆ operator/=()

d2Color & d2Color::operator/= ( const float & f)
inline

◆ Set()

void d2Color::Set ( float rIn,
float gIn,
float bIn,
float aIn = 1.0f )
inline

Member Data Documentation

◆ a

float d2Color::a {1.0f}

◆ b

float d2Color::b {}

◆ g

float d2Color::g {}

◆ r

float d2Color::r {}

The documentation for this struct was generated from the following file: