ASGE  3.2.0
Simple Game Framework in GL
ASGE::Colour Struct Reference

#include <Colours.hpp>

Public Member Functions

constexpr Colour (const std::array< float, 3 > &rgb) noexcept
 
constexpr Colour (const float red, const float green, const float blue) noexcept
 

Public Attributes

float r = 1
 
float g = 1
 
float b = 1
 

Detailed Description

RGB Helper.

Used to represent the RGB values of a colour. The range of values here are from 0 to 1, with 1 directly mapping to 255 and 0 mapping to 0.

Definition at line 26 of file Colours.hpp.

Constructor & Destructor Documentation

◆ Colour()

constexpr ASGE::Colour::Colour ( const std::array< float, 3 > &  rgb)
inlineexplicitconstexprnoexcept

Default constructor. The constructor takes an array of 3 floats. These are then mapped on the RGB values inside the struct.

Definition at line 37 of file Colours.hpp.

Member Data Documentation

◆ b

float ASGE::Colour::b = 1

The blue component.

Definition at line 30 of file Colours.hpp.

◆ g

float ASGE::Colour::g = 1

The green component.

Definition at line 29 of file Colours.hpp.

◆ r

float ASGE::Colour::r = 1

The red component.

Definition at line 28 of file Colours.hpp.


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