Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::CA::Binary_RGB_Mapper< State > Struct Template Reference

Default binary RGB mapper. More...

#include <ca-io.H>

Collaboration diagram for Aleph::CA::Binary_RGB_Mapper< State >:
[legend]

Public Member Functions

RGB8 operator() (const State &v) const
 Map a cell to RGB.
 

Public Attributes

State dead {}
 state considered dead
 
RGB8 dead_colour {255, 255, 255}
 colour for dead cells
 
RGB8 alive_colour {0, 0, 0}
 colour for live cells
 

Detailed Description

template<typename State>
struct Aleph::CA::Binary_RGB_Mapper< State >

Default binary RGB mapper.

Cells equal to dead use dead_colour; every other state uses alive_colour.

Template Parameters
Statecell state type.

Definition at line 244 of file ca-io.H.

Member Function Documentation

◆ operator()()

template<typename State >
RGB8 Aleph::CA::Binary_RGB_Mapper< State >::operator() ( const State &  v) const
inline

Map a cell to RGB.

Parameters
[in]vcell value.
Returns
RGB byte triplet.

Definition at line 254 of file ca-io.H.

References Aleph::CA::Binary_RGB_Mapper< State >::alive_colour, Aleph::CA::Binary_RGB_Mapper< State >::dead, and Aleph::CA::Binary_RGB_Mapper< State >::dead_colour.

Member Data Documentation

◆ alive_colour

template<typename State >
RGB8 Aleph::CA::Binary_RGB_Mapper< State >::alive_colour {0, 0, 0}

colour for live cells

Definition at line 248 of file ca-io.H.

Referenced by Aleph::CA::Binary_RGB_Mapper< State >::operator()().

◆ dead

template<typename State >
State Aleph::CA::Binary_RGB_Mapper< State >::dead {}

state considered dead

Definition at line 246 of file ca-io.H.

Referenced by Aleph::CA::Binary_RGB_Mapper< State >::operator()().

◆ dead_colour

template<typename State >
RGB8 Aleph::CA::Binary_RGB_Mapper< State >::dead_colour {255, 255, 255}

colour for dead cells

Definition at line 247 of file ca-io.H.

Referenced by Aleph::CA::Binary_RGB_Mapper< State >::operator()().


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