IMP
2.0.1
The Integrative Modeling Platform
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
GeometryProcessor.h
Go to the documentation of this file.
1
/**
2
* \file IMP/display/GeometryProcessor.h
3
* \brief Implement GeometryProcessor
4
*
5
* Copyright 2007-2013 IMP Inventors. All rights reserved.
6
*/
7
8
#ifndef IMPDISPLAY_GEOMETRY_PROCESSOR_H
9
#define IMPDISPLAY_GEOMETRY_PROCESSOR_H
10
11
#include <IMP/display/display_config.h>
12
#include "
declare_Geometry.h
"
13
#include "
primitive_geometries.h
"
14
15
IMPDISPLAY_BEGIN_NAMESPACE
16
17
//! Provide a standard geometry processing framework.
18
/** This class is designed to be used as a mixin, so
19
inherit from this and overload various process methods
20
as needed.
21
*/
22
class
IMPDISPLAYEXPORT
GeometryProcessor
23
{
24
protected
:
25
~
GeometryProcessor
(){}
26
27
virtual
bool
handle_sphere(
SphereGeometry
*,
28
Color
, std::string) {
29
return
false
;
30
}
31
virtual
bool
handle_cylinder(
CylinderGeometry
*,
32
Color
, std::string) {
33
return
false
;
34
}
35
virtual
bool
handle_point(
PointGeometry
*,
36
Color
, std::string) {
37
return
false
;
38
}
39
virtual
bool
handle_segment(
SegmentGeometry
*,
40
Color
, std::string) {
41
return
false
;
42
}
43
virtual
bool
handle_polygon(
PolygonGeometry
*,
44
Color
, std::string) {
45
return
false
;
46
}
47
virtual
bool
handle_triangle(
TriangleGeometry
*,
48
Color
, std::string) {
49
return
false
;
50
}
51
virtual
bool
handle_surface_mesh(
SurfaceMeshGeometry
*,
52
Color
, std::string) {
53
return
false
;
54
}
55
virtual
bool
handle_label(
LabelGeometry
*,
56
Color
, std::string) {
57
return
false
;
58
}
59
virtual
bool
handle_ellipsoid(
EllipsoidGeometry
*,
60
Color
, std::string) {
61
return
false
;
62
}
63
virtual
bool
handle_bounding_box(
BoundingBoxGeometry
*,
Color
,
64
std::string) {
65
return
false
;
66
}
67
virtual
bool
handle_anything(
Geometry
*,
Color
, std::string) {
68
return
false
;
69
}
70
void
handle_geometry (
Geometry
* g);
71
private
:
72
void
handle_geometry_internal(
Geometry
* g,
bool
has_color,
73
Color
c,
74
std::string);
75
};
76
#ifndef IMP_DOXYGEN
77
typedef
base::Vector<GeometryProcessor>
GeometryProcessors;
78
#endif
79
IMPDISPLAY_END_NAMESPACE
80
81
#endif
/* IMPDISPLAY_GEOMETRY_PROCESSOR_H */