| Bsoft 2.0.5 Bernard's software package

Functions | Variables
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"`

Go to the source code of this file.

## 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_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: 20111106

Definition in file model_color.cpp.

## Function Documentation

## ◆ model_color_by_density()

int model_color_by_density | ( | Bmodel * | model | ) |

Colors model components by density.

Parameters

  *model | model to color.

Returns
  int 0.

      Color assignments are:
          density = 0     blue
          density = 0.5   green
          density = 1     red

Definition at line 118 of file model_color.cpp.

## ◆ model_color_by_fom()

int model_color_by_fom | ( | Bmodel * | model | ) |

Colors model components by fom.

Parameters

  *model | model to color.

Returns
  int 0.

      Color assignments are:
          FOM = 0     blue
          FOM = 0.5   green
          FOM = 1     red

Definition at line 159 of file model_color.cpp.

## ◆ model_color_by_order()

int model_color_by_order | ( | Bmodel * | model | ) |

Colors model components in order from red to blue.

Parameters

  *model | model to color.

Returns
  int 0.

Definition at line 82 of file model_color.cpp.

## ◆ model_color_chiral_vertices()

int model_color_chiral_vertices | ( | Bmodel * | model | ) |

Colors model vertices as a function of chirality.

Parameters

  *model | model to color.

Returns
  int number of chiral vertices.

      Chiral vertices are colored blue for + and red for - handedness.

Definition at line 259 of file model_color.cpp.

## ◆ model_color_curvature()

int model_color_curvature | ( | Bmodel * | model | ) |

Colors model vertices and links as a function of curvature.

Parameters

  *model | model to color.

Returns
  int 0.

Definition at line 228 of file model_color.cpp.

## ◆ model_color_selected()

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

Colors selected model components.

Parameters

  *model | model to color.
  color | 4-value color vector ([0,1]).

Returns
  int 0.

Definition at line 55 of file model_color.cpp.

## ◆ model_color_selected_types()

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

Colors model components by fom.

Parameters

  *model | model to color.
  rgba | RGBA color.

Returns
  int 0.

      Color assignments are:
          FOM = 0     blue
          FOM = 0.5   green
          FOM = 1     red

Definition at line 201 of file model_color.cpp.

## ◆ model_color_uniformly()

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

Colors model components uniformly.

Parameters

  *model | model to color.
  color | 4-value color vector ([0,1]).

Returns
  int 0.

      Both selected and non-selected elements are colored.

Definition at line 29 of file model_color.cpp.

## Variable Documentation

## ◆ verbose

int verbose