IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
GeometryTransform3dSrcMacros.h
Go to the documentation of this file.
1 // GeometryTransform3dSrcMacros.h:
3 // -------------------------------
4 //
14 
15 #ifndef __IPSDKGEOMETRY_GEOMETRYTRANSFORM3DSRCMACROS_H__
16 #define __IPSDKGEOMETRY_GEOMETRYTRANSFORM3DSRCMACROS_H__
17 
19 #include <IPSDKGeometry/Entity/3d/Point/Point3d.h>
20 #include <IPSDKGeometry/Entity/3d/Vector/Vector3d.h>
21 #include <IPSDKGeometry/Entity/3d/BoundingBox/BoundingBox3d.h>
22 #include <IPSDKGeometry/Entity/3d/PointCloud/PointCloud3d.h>
23 #include <IPSDKGeometry/Entity/3d/Sphere/Sphere3d.h>
24 #include <IPSDKGeometry/Entity/3d/Triangle/Triangle3d.h>
25 #include <IPSDKGeometry/Entity/3d/Ellipsoid/Ellipsoid3d.h>
26 #include <IPSDKGeometry/Entity/3d/Cube/Cube3d.h>
27 #include <IPSDKGeometry/Entity/3d/Cuboid/Cuboid3d.h>
28 #include <IPSDKGeometry/Entity/3d/Mesh/Mesh3d.h>
29 #include <IPSDKGeometry/Entity/3d/MeshWithHoles/MeshWithHoles3d.h>
30 #include <IPSDKGeometry/Entity/3d/Shape/Shape3d.h>
31 #include <IPSDKGeometry/Entity/3d/Segment/Segment3d.h>
32 
35 
38 #define IPSDK_IMPLEMENT_GEOMETRY_TRANSFORM_3D(libraryName, namespaceSeq, className, version) \
39  IPSDK_IMPLEMENT_SERIAL_WITH_COPY(libraryName, namespaceSeq, className, version) \
40  bool className::applyInSitu(BaseGeometryEntity3d& entity) const \
41  { \
42  return entity.visitInSitu(*this); \
43  } \
44  GeometryEntity3dPtr className::apply(const BaseGeometryEntity3d& entity) const \
45  { \
46  return entity.visitNonInSitu(*this); \
47  }
48 
51 #define IPSDK_IMPLEMENT_INSITU_GEOMETRY_TRANSFORM_3D(libraryName, namespaceSeq, className, version) \
52  IPSDK_IMPLEMENT_SERIAL_WITH_COPY(libraryName, namespaceSeq, className, version) \
53  bool className::applyInSitu(BaseGeometryEntity3d& entity) const \
54  { \
55  return entity.visitInSitu(*this); \
56  } \
57  GeometryEntity3dPtr className::apply(const BaseGeometryEntity3d& entity) const \
58  { \
59  GeometryEntity3dPtr pResultEntity(static_cast<BaseGeometryEntity3d*>(entity.duplicate())); \
60  if (applyInSitu(*pResultEntity) == true) \
61  return pResultEntity; \
62  else \
63  return GeometryEntity3dPtr(); \
64  }
65 
68 
71 #define IPSDK_REGISTER_INSITU_GEOMETRY_TRANSFORM_3D_MACRO(r, classInfo, type) \
72  template IPSDKGEOMETRY_API bool \
73  BOOST_PP_SEQ_ELEM(0, classInfo)::processInSitu<type>( \
74  BOOST_PP_SEQ_ELEM(1, classInfo)<type>&) const;
75 
78 #define IPSDK_REGISTER_INSITU_GEOMETRY_TRANSFORM_3D(className, entityType, typeSeq) \
79  BOOST_PP_SEQ_FOR_EACH(IPSDK_REGISTER_INSITU_GEOMETRY_TRANSFORM_3D_MACRO, \
80  (className)(entityType), typeSeq);
81 
84 
87 #define IPSDK_REGISTER_NONINSITU_GEOMETRY_TRANSFORM_3D_MACRO(r, classInfo, type) \
88  template IPSDKGEOMETRY_API GeometryEntity3dPtr \
89  BOOST_PP_SEQ_ELEM(0, classInfo)::process<type>( \
90  const BOOST_PP_SEQ_ELEM(1, classInfo)<type>&) const;
91 
94 #define IPSDK_REGISTER_NONINSITU_GEOMETRY_TRANSFORM_3D(className, entityType, typeSeq) \
95  BOOST_PP_SEQ_FOR_EACH(IPSDK_REGISTER_NONINSITU_GEOMETRY_TRANSFORM_3D_MACRO, \
96  (className)(entityType), typeSeq);
97 
100 
101 #endif // __IPSDKGEOMETRY_GEOMETRYTRANSFORM3DSRCMACROS_H__
Source part of macros set for class serialization.