|
Antiprism 0.23
|
Holder for element colours. More...
#include <col_geom.h>

Public Member Functions | |
| void | set_v_col (int idx, col_val col) |
| Set a vertex colour. | |
| col_val | get_v_col (int idx) const |
| Get a vertex colour. | |
| void | set_e_col (int idx, col_val col) |
| Set an edge colour. | |
| col_val | get_e_col (int idx) const |
| Get an edge colour. | |
| void | set_f_col (int idx, col_val col) |
| Set a face colour. | |
| col_val | get_f_col (int idx) const |
| Get a face colour. | |
| void | clear_v_cols () |
| Clear all the vertex colours. | |
| void | clear_e_cols () |
| Clear all the face colours. | |
| void | clear_f_cols () |
| Clear all the edge colours. | |
| void | clear_cols () |
| Clear all the colours. | |
| const map< int, col_val > & | vert_cols () const |
| Read access to vertex colours. | |
| map< int, col_val > & | raw_vert_cols () |
| Write access to vertex colours. | |
| const map< int, col_val > & | edge_cols () const |
| Read access to edge colours. | |
| map< int, col_val > & | raw_edge_cols () |
| Write access to edge colours. | |
| const map< int, col_val > & | face_cols () const |
| Read access to face colours. | |
| map< int, col_val > & | raw_face_cols () |
| Write access to face colours. | |
Static Public Member Functions | |
| static void | set_col (map< int, col_val > &elem, int idx, col_val col) |
| Set a colour in an element-index-to-colour map. | |
| static col_val | get_col (const map< int, col_val > &elem, int idx) |
| Get a colour from an element-index-to-colour map. | |
Protected Member Functions | |
| void | append (const col_geom &geom, int v_size, int e_size, int f_size) |
| Append a geometry colour holder. | |
| void | remap_vert_cols (const map< int, int > &chg_map) |
| Map the vertex colours to different index numbers. | |
| void | remap_edge_cols (const map< int, int > &chg_map) |
| Map the edge colours to different index numbers. | |
| void | remap_face_cols (const map< int, int > &chg_map) |
| Map the face colours to different index numbers. | |
Holder for element colours.
| void col_geom::append | ( | const col_geom & | geom, |
| int | v_size, | ||
| int | e_size, | ||
| int | f_size | ||
| ) | [protected] |
Append a geometry colour holder.
| geom | geometry colour holder to append. |
| v_size | number of vertices in geometry associated with geom. |
| e_size | number of edges in geometry associated with geom. |
| f_size | number of faces in geometry associated with geomi. |
| const map< int, col_val > & col_geom::edge_cols | ( | ) | const [inline] |
Read access to edge colours.
| const map< int, col_val > & col_geom::face_cols | ( | ) | const [inline] |
Read access to face colours.
Get a colour from an element-index-to-colour map.
| elem | element-index-to-colour map |
| idx | element index to get the colour for |
| col_val col_geom::get_e_col | ( | int | idx | ) | const [inline] |
Get an edge colour.
| idx | the edge index number. |
| col_val col_geom::get_f_col | ( | int | idx | ) | const [inline] |
Get a face colour.
| idx | the face index number. |
| col_val col_geom::get_v_col | ( | int | idx | ) | const [inline] |
Get a vertex colour.
| idx | the vertex index number. |
| map< int, col_val > & col_geom::raw_edge_cols | ( | ) | [inline] |
Write access to edge colours.
| map< int, col_val > & col_geom::raw_face_cols | ( | ) | [inline] |
Write access to face colours.
| map< int, col_val > & col_geom::raw_vert_cols | ( | ) | [inline] |
Write access to vertex colours.
| void col_geom::remap_edge_cols | ( | const map< int, int > & | chg_map | ) | [inline, protected] |
Map the edge colours to different index numbers.
Used to maintain colors when index numbers are changed. This can happen after deletions.
| chg_map | a map of old index numbers to new index numbers. if the new index number is -1 then the element index has been deleted so the colour is deleted. |
| void col_geom::remap_face_cols | ( | const map< int, int > & | chg_map | ) | [inline, protected] |
Map the face colours to different index numbers.
Used to maintain colors when index numbers are changed. This can happen after deletions.
| chg_map | a map of old index numbers to new index numbers. if the new index number is -1 then the element index has been deleted so the colour is deleted. |
| void col_geom::remap_vert_cols | ( | const map< int, int > & | chg_map | ) | [inline, protected] |
Map the vertex colours to different index numbers.
Used to maintain colors when index numbers are changed. This can happen after deletions.
| chg_map | a map of old index numbers to new index numbers. if the new index number is -1 then the element index has been deleted so the colour is deleted. |
Set a colour in an element-index-to-colour map.
| elem | element-index-to-colour map |
| idx | element index |
| col | colour to set |
| void col_geom::set_e_col | ( | int | idx, |
| col_val | col | ||
| ) | [inline] |
Set an edge colour.
| idx | the edge index number. |
| col | the colour to set. |
| void col_geom::set_f_col | ( | int | idx, |
| col_val | col | ||
| ) | [inline] |
Set a face colour.
| idx | the face index number. |
| col | the colour to set. |
| void col_geom::set_v_col | ( | int | idx, |
| col_val | col | ||
| ) | [inline] |
Set a vertex colour.
| idx | the vertex index number. |
| col | the colour to set. |
| const map< int, col_val > & col_geom::vert_cols | ( | ) | const [inline] |
Read access to vertex colours.
1.7.3