1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#ifndef Geometry_CommonTopologies_SurfaceDeformationFactory_H
#define Geometry_CommonTopologies_SurfaceDeformationFactory_H
/// SurfaceDeformationFactory
///
/// Factory for concrete implementations of SurfaceDeformation
///
/// \author : Gero Flucke
/// date : October 2010
#include <vector>
#include <string>
class SurfaceDeformation;
namespace SurfaceDeformationFactory {
enum Type {
// rigid body has no deformations! kRigidBody = 0,
kBowedSurface = 1, // BowedSurfaceDeformation
kTwoBowedSurfaces, // TwoBowedSurfacesDeformation
kNoDeformations // To please compilers
};
/// convert string to 'Type' - exception if string is not known
Type surfaceDeformationType(const std::string &typeString);
std::string surfaceDeformationTypeName(const Type &type);
/// Create an instance of the concrete implementations of
/// the 'SurfaceDeformation' interface
/// First argument 'type' must match one of the enums defined above
/// and the size of 'params' must match the expectation of the
/// concrete type (exception otherwise).
SurfaceDeformation *create(int type, const std::vector<double> ¶ms);
SurfaceDeformation *create(const std::vector<double> ¶ms);
} // namespace SurfaceDeformationFactory
#endif
|