8 #ifndef IMPDISPLAY_PARTICLE_GEOMETRY_H
9 #define IMPDISPLAY_PARTICLE_GEOMETRY_H
11 #include <IMP/display/display_config.h>
19 IMPDISPLAY_BEGIN_NAMESPACE
25 IMP::Pointer<Particle> p_;
29 bool get_has_color()
const {
30 return Geometry::get_has_color()
31 || Colored::particle_is_instance(p_);
34 Color get_color()
const {
35 if (Geometry::get_has_color()) {
36 return Geometry::get_color();
56 IMP::OwnerPointer<SingletonContainer> sc_;
73 IMP::Pointer<Particle> p0_, p1_;
77 bool get_has_color()
const {
78 return Geometry::get_has_color()
79 || Colored::particle_is_instance(p0_)
80 || Colored::particle_is_instance(p1_);
83 Color get_color()
const {
84 if (Geometry::get_has_color()) {
85 return Geometry::get_color();
86 }
else if (Colored::particle_is_instance(p0_))
87 return Colored(p0_).get_color();
88 else return Colored(p1_).get_color();
104 IMP::OwnerPointer<PairContainer> sc_;
117 IMPDISPLAY_END_NAMESPACE