Bsoft 2.1.4
Bernard's software package
model_color.cpp File Reference

Functions to color models. More...

#include "rwmodel.h"
#include "model_poly.h"
#include "model_shell.h"
#include "model_views.h"
#include "model_util.h"
#include "Color.h"
#include "utilities.h"

Functions

int model_color_uniformly (Bmodel *model, RGBA< float > color)
 Colors model components uniformly. More...
 
int model_color_selected (Bmodel *model, RGBA< float > color)
 Colors selected model components. More...
 
int model_color_by_order (Bmodel *model)
 Colors model components in order from red to blue. More...
 
int model_color_by_density (Bmodel *model)
 Colors model components by density. More...
 
int model_color_by_fom (Bmodel *model)
 Colors model components by fom. More...
 
int model_color_by_selection (Bmodel *model)
 Colors model components by the selection number. More...
 
int model_color_selected_types (Bmodel *model, RGBA< float > rgba)
 Colors model components by fom. More...
 
int model_color_curvature (Bmodel *model)
 Colors model vertices and links as a function of curvature. More...
 
int model_color_chiral_vertices (Bmodel *model)
 Colors model vertices as a function of chirality. More...
 

Variables

int verbose
 

Detailed Description

Functions to color models.

Author
Bernard Heymann
Date
Created: 20080206
Modified: 20210319

Function Documentation

◆ model_color_by_density()

int model_color_by_density ( Bmodel model)

Colors model components by density.

Parameters
*modelmodel to color.
Returns
int 0.
Color assignments are:
    density = 0     blue
    density = 0.5   green
    density = 1     red

◆ model_color_by_fom()

int model_color_by_fom ( Bmodel model)

Colors model components by fom.

Parameters
*modelmodel to color.
Returns
int 0.
Color assignments are:
    FOM = 0     blue
    FOM = 0.5   green
    FOM = 1     red

◆ model_color_by_order()

int model_color_by_order ( Bmodel model)

Colors model components in order from red to blue.

Parameters
*modelmodel to color.
Returns
int 0.

◆ model_color_by_selection()

int model_color_by_selection ( Bmodel model)

Colors model components by the selection number.

Parameters
*modelmodel to color.
Returns
int 0.
Color assignments are:
    FOM = 0     blue
    FOM = 0.5   green
    FOM = 1     red

◆ model_color_chiral_vertices()

int model_color_chiral_vertices ( Bmodel model)

Colors model vertices as a function of chirality.

Parameters
*modelmodel to color.
Returns
int number of chiral vertices.
Chiral vertices are colored blue for + and red for - handedness.

◆ model_color_curvature()

int model_color_curvature ( Bmodel model)

Colors model vertices and links as a function of curvature.

Parameters
*modelmodel to color.
Returns
int 0.

◆ model_color_selected()

int model_color_selected ( Bmodel model,
RGBA< float >  color 
)

Colors selected model components.

Parameters
*modelmodel to color.
color4-value color vector ([0,1]).
Returns
int 0.

◆ model_color_selected_types()

int model_color_selected_types ( Bmodel model,
RGBA< float >  rgba 
)

Colors model components by fom.

Parameters
*modelmodel to color.
rgbaRGBA color.
Returns
int 0.
Color assignments are:
    FOM = 0     blue
    FOM = 0.5   green
    FOM = 1     red

◆ model_color_uniformly()

int model_color_uniformly ( Bmodel model,
RGBA< float >  color 
)

Colors model components uniformly.

Parameters
*modelmodel to color.
color4-value color vector ([0,1]).
Returns
int 0.
Both selected and non-selected elements are colored.

Variable Documentation

◆ verbose

int verbose
extern