15 #ifndef __IPSDKGEOMETRY_POLYGONWITHHOLES2D_H__ 16 #define __IPSDKGEOMETRY_POLYGONWITHHOLES2D_H__ 20 #pragma warning (push) 21 #pragma warning (disable : 4251) 23 #include <IPSDKGeometry/Entity/2d/BaseTypedGeometryEntity2d.h> 24 #include <IPSDKGeometry/Entity/2d/Polygon/Polygon2d.h> 28 #include <boost/enable_shared_from_this.hpp> 29 #include <boost/shared_ptr.hpp> 30 #include <boost/weak_ptr.hpp> 41 public boost::enable_shared_from_this<PolygonWithHoles2d<T> >
116 inline ipUInt32 getNbExteriorPoints()
const;
119 inline const PolygonType& getExteriorPolygon()
const;
125 inline bool hasHoles()
const;
143 void clearPolygonHoles();
163 template <
typename T>
167 return g_coordinateSystem2dType;
170 template <
typename T>
174 return g_entity2dType;
177 template <
typename T>
181 return _exteriorPolygon.getPolygon2dType();
184 template <
typename T>
188 return _pParent.lock();
191 template <
typename T>
198 template <
typename T>
202 return _exteriorPolygon;
205 template <
typename T>
209 return _exteriorPolygon;
212 template <
typename T>
213 IPSDK_FORCEINLINE
bool 216 return _exteriorPolygon.isEmpty();
219 template <
typename T>
223 return _exteriorPolygon.getNbPoints();
226 template <
typename T>
233 template <
typename T>
237 return _polygonHoles;
240 template <
typename T>
241 IPSDK_FORCEINLINE
bool 244 if (_polygonHoles.empty() ==
true)
250 template <
typename T>
254 return static_cast<ipUInt32>(_polygonHoles.size());
257 template <
typename T>
261 return _polygonHoles.begin();
264 template <
typename T>
268 return _polygonHoles.end();
277 #pragma warning (pop) 279 #endif // __IPSDKGEOMETRY_POLYGONWITHHOLES2D_H__ Defines the IPSDK_FORCEINLINE.
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
eEntity2dType getEntity2dType() const
method allowing to retrieve entity 2d type
Definition: PolygonWithHoles2d.h:172
boost::shared_ptr< PolygonWithHolesType > PolygonWithHolesPtr
shared pointer to polygon with holes
Definition: PolygonWithHoles2d.h:61
ePolygon2dType
Enumerate describing polygon type.
Definition: Polygon2dTypes.h:34
Predefined types for neighborhood 2d management.
const PolygonConstColl & getPolygonHoles() const
get interior polygon holes
Definition: PolygonWithHoles2d.h:228
Closed polygon potentially associated to interior polygonal holes.
Definition: PolygonWithHoles2d.h:40
eCoordinateSystem2dType
Enumerate describing coordinate system 2d type.
Definition: GeometryEntity2dTypes.h:76
bool isEmpty() const
method allowing to check whether polygon is empty
Definition: PolygonWithHoles2d.h:214
Basic operators used for polygon with holes 2d management.
boost::shared_ptr< const PolygonWithHolesType > PolygonWithHolesConstPtr
shared pointer to const polygon with holes
Definition: PolygonWithHoles2d.h:64
boost::weak_ptr< const PolygonWithHolesType > PolygonWithHolesConstWeakPtr
weak pointer to polygon with holes
Definition: PolygonWithHoles2d.h:67
Polygon with holes.
Definition: GeometryEntity2dTypes.h:50
eCoordinateSystem2dType getCoordinateSystem2dType() const
method allowing to retrieve coordinate system 2d type
Definition: PolygonWithHoles2d.h:165
#define IPSDKGEOMETRY_API
Import/Export macro for library IPSDKGeometry.
Definition: IPSDKGeometryExports.h:25
Base class for typed 3d geometry entities.
Definition: BaseTypedGeometryEntity2d.h:27
PolygonWithHolesConstWeakPtr _pParent
parent polygon associated to instance
Definition: PolygonWithHoles2d.h:151
#define IPSDK_DECLARE_GEOMETRY_ENTITY_2D(libraryName, className)
Macro allowing to declare a geometry entity 2d.
Definition: GeometryEntity2dHdrMacros.h:131
Polygon2d< T > PolygonType
polygon type associated to object
Definition: PolygonWithHoles2d.h:55
PolygonWithHoles2d< T > PolygonWithHolesType
polygon with holes type associated to object
Definition: PolygonWithHoles2d.h:58
void setParent(const PolygonWithHolesConstPtr &pParent)
set parent polygon of instance
Definition: PolygonWithHoles2d.h:193
HoleIterator endHole()
iterator used to parse polygon holes
Definition: PolygonWithHoles2d.h:266
std::vector< PolygonWithHolesConstPtr > PolygonConstColl
collection of const polygons
Definition: PolygonWithHoles2d.h:70
Closed polygon associated to an ordered collection of 2d points.
Definition: Polygon2d.h:38
HoleIterator beginHole()
iterator used to parse polygon holes
Definition: PolygonWithHoles2d.h:259
const ePolygon2dType & getPolygon2dType() const
retrieve polygon 2d type
Definition: PolygonWithHoles2d.h:179
ipUInt32 getNbExteriorPoints() const
retrieve number of exterior points
Definition: PolygonWithHoles2d.h:221
PolygonColl _polygonHoles
collection of interior polygon holes
Definition: PolygonWithHoles2d.h:157
eEntity2dType
Enumerate describing entity 2d type.
Definition: GeometryEntity2dTypes.h:38
PolygonColl::iterator HoleIterator
iterator to collection of polygons
Definition: PolygonWithHoles2d.h:76
ipUInt32 getNbHoles() const
method allowing to retrieve number of holes associated to polygon
Definition: PolygonWithHoles2d.h:252
PolygonType _exteriorPolygon
exterior polygon
Definition: PolygonWithHoles2d.h:154
const PolygonType & getExteriorPolygon() const
get exterior polygon associated to object
Definition: PolygonWithHoles2d.h:200
PolygonWithHolesConstPtr getParent() const
retrieve parent polygon of instance
Definition: PolygonWithHoles2d.h:186
boost::enable_if< typename boost::mpl::and_< typename boost::is_same< boost::mpl::int_< AttributeType::g_attributeType >, boost::mpl::int_< eAttributeType::eAT_DataItem > >::type, typename boost::is_same< boost::mpl::int_< LeafCollType::g_itemType >, boost::mpl::int_< eDataItemType::eDIT_LeafColl > >::type >::type, RulePtr >::type isEmpty(const boost::shared_ptr< AttributeType > &pAttribute)
functions allowing to check that a leaf collection is empty
Definition: LeafCollSizeRuleOperators.h:65
std::vector< PolygonWithHolesPtr > PolygonColl
collection of polygons
Definition: PolygonWithHoles2d.h:73
Cartesian coordinate system.
Definition: GeometryEntity2dTypes.h:78
bool hasHoles() const
method allowing to check whether polygon has holes
Definition: PolygonWithHoles2d.h:242
uint32_t ipUInt32
Base types definition.
Definition: BaseTypes.h:53