zMol
A viewer for molecular data using OpenGL and ambient occlusion
Public Member Functions
zmol::colors Class Reference

#include <colors.hpp>

List of all members.

Public Member Functions

 colors ()
cml::vector3f const & get_color (std::string const &p_name) const
cml::vector3f get_chain_color (std::string const &p_chain_id) const

Detailed Description

Utility class to get a color for a given element name or chain ID.


Constructor & Destructor Documentation

zmol::colors::colors ( )

Constructor. Initializes internal color tables.


Member Function Documentation

cml::vector3f zmol::colors::get_chain_color ( std::string const &  p_chain_id) const

Returns an RGB triplet for the given chain ID. Channel values range from 0.0 to 1.0.

Parameters:
p_chain_idChain ID
Returns:
Associated color, or white (1.0,1.0,1.0) if no such color was found.
cml::vector3f const & zmol::colors::get_color ( std::string const &  p_name) const

Returns an RGB triplet for the given element name. Channel values range from 0.0 to 1.0.

Parameters:
p_nameElement name
Returns:
Associated color, or white (1.0,1.0,1.0) if no such color was found.