8 #ifndef IMPDISPLAY_COLORED_H
9 #define IMPDISPLAY_COLORED_H
11 #include <IMP/display/display_config.h>
17 IMPDISPLAY_BEGIN_NAMESPACE
26 m->
add_attribute(get_color_keys()[0], pi, c.get_red(),
false);
27 m->
add_attribute(get_color_keys()[1], pi, c.get_green(),
false);
28 m->
add_attribute(get_color_keys()[2], pi, c.get_blue(),
false);
32 void set_color(
const Color &c) {
41 Color get_color()
const {
67 IMPDISPLAY_END_NAMESPACE
The base class for decorators.
ParticleIndex get_particle_index() const
Returns the particle index decorated by this decorator.
#define IMP_DECORATOR_SETUP_1(Name, FirstArgumentType, first_argument_name)
Model * get_model() const
Returns the Model containing the particle.
Class for storing model, its restraints, constraints, and particles.
std::string get_particle_name(ParticleIndex pi)
Get the name of a particle.
void add_attribute(TypeKey attribute_key, ParticleIndex particle, Type value)
add particle atribute with the specied key and initial value
Helper macros for implementing Decorators.
void set_attribute(TypeKey attribute_key, ParticleIndex particle, Type value)
set the value of particle attribute with the specified key
Interface to specialized Particle types (e.g. atoms)
#define IMP_DECORATOR_METHODS(Name, Parent)
#define IMP_USAGE_CHECK(expr, message)
A runtime test for incorrect usage of a class or method.
#define IMP_DECORATORS(Name, PluralName, Parent)
Define the types for storing sets of decorators.
bool get_has_attribute(TypeKey attribute_key, ParticleIndex particle) const
return true if particle has attribute with the specified key