Itasca C++ Interface
Loading...
Searching...
No Matches
igeomset.h
Go to the documentation of this file.
1#pragma once
2// igeomset.h
3
4#include "shared/interface/signal.h"
5#include "igeomimportexport.h"
11namespace itasca {
12 class IThing;
13 class IContainer;
14}
15
16namespace itascaxd {
17 using namespace itasca;
18
19 class IGeomPoint;
20 class IGeomEdge;
21 class IGeomPoly;
22 class GeomBase;
23
27 class IGeomSet {
28 public:
30 inline static const TType type_ = 0x4c815bd0;
31
32 virtual const GeomBase *getGeomBase() const=0;
33
35 virtual IThing * getIThing()=0;
37 virtual const IThing * getIThing() const=0;
39 virtual IGeomSet * getNext()=0;
41 virtual const IGeomSet *getNext() const=0;
42
44 virtual IString getName() const=0;
47 virtual uint getGeometryCode() const=0;
49 virtual uint getGroupCode() const=0;
51 virtual uint getExtraCode() const=0;
52
55 virtual IGeomPoint * createPoint(const DVect3 &pos,uint64 id=0)=0;
59 virtual const IGeomPoint *getFirstPoint() const=0;
61 virtual IGeomPoint * findPointWithID(uint64 id)=0;
63 virtual const IGeomPoint *findPointWithID(uint64 id) const=0;
66 virtual IGeomPoint * findClosestPoint(const DVect &pos,const double &radius=limits<double>::max())=0;
70 virtual const IContainer *getPointContainer() const=0;
71
76 virtual IGeomEdge * createEdge(IGeomPoint *end1,IGeomPoint *end2)=0;
78 virtual IGeomEdge * getFirstEdge()=0;
80 virtual const IGeomEdge * getFirstEdge() const=0;
82 virtual IGeomEdge * findEdgeWithID(uint64 id)=0;
84 virtual const IGeomEdge * findEdgeWithID(uint64 id) const=0;
87 virtual IGeomEdge * findClosestEdge(const DVect &pos,const double &radius=limits<double>::max())=0;
90 virtual const IGeomEdge * findClosestEdge(const DVect &pos,const double &radius=limits<double>::max()) const=0;
92 virtual IGeomEdge * findMatchingEdge(const IGeomPoint *end1,const IGeomPoint *end2)=0;
94 virtual const IGeomEdge * findMatchingEdge(const IGeomPoint *end1,const IGeomPoint *end2) const=0;
98 virtual const IContainer *getEdgeContainer() const=0;
99
103 virtual IGeomPoly * createPoly()=0;
105 virtual IGeomPoly * getFirstPoly()=0;
107 virtual const IGeomPoly * getFirstPoly() const=0;
109 virtual IGeomPoly * findPolyWithID(uint64 id)=0;
111 virtual const IGeomPoly * findPolyWithID(uint64 id) const=0;
114 virtual IGeomPoly * findClosestPoly(const DVect &pos,const double &radius=limits<double>::max())=0;
117 virtual const IGeomPoly * findClosestPoly(const DVect &pos,const double &radius=limits<double>::max()) const=0;
122 virtual IGeomEdge * addNodeToPoly(IGeomPoly *poly,IGeomPoint *point)=0;
125 virtual IGeomEdge * closePoly(IGeomPoly *poly)=0;
129 virtual const IContainer *getPolyContainer() const=0;
131 virtual shared::Signal<const IThing *,const IContainer *> *getPointMovedSignal() const=0;
133 virtual shared::Signal<const IThing *,const IContainer *> *getEdgeMovedSignal() const=0;
135 virtual shared::Signal<const IThing *,const IContainer *> *getPolyMovedSignal() const=0;
136
137 virtual QPair<DVect,bool> findClosestPointOnSet(const DVect &pos,bool polysOnly,double radius=limits<double>::max()) const=0;
138 virtual double findDistanceOnSetFromRay(const DVect &pos, const DVect &ray) const = 0;
139
146#ifdef THREED
149 virtual bool checkClosedVolume()=0;
150#endif
159 virtual QList<const IThing *> marqueeDeepSelect(bool perspective, const FArray<DVect>& nearSelRect,
160 const FArray<DVect>& farSelRect, const DVect& selectionDirection, TType objType)const=0;
162 virtual void listObjectAlongLine(const DVect &beg, const DVect &e,double radius, FArray<const IGeomPoint *> *retPoints,
163 FArray<QPair<const IGeomEdge *, DVect>> *retEdges,
164 FArray<QPair<const IGeomPoly *, DVect>> *intersectPolyPoints, const double tolerance)const =0;
168 virtual void listObjectAlongCone(const DVect &origin, const DVect &beginning,
169 const double &angle, FArray<const IGeomPoint *> *retPoints,
170 FArray<QPair<const IGeomEdge *, DVect>> *retEdges,
171 FArray<QPair<const IGeomPoly *, DVect>> *intersectPolyPoints, bool *nonPlanarPolyDetected,
172 double tolerance, const double *depth=0) const = 0;
177 virtual void listObjectAlongCylinder(const DVect &origin, const DVect &beginning, const double &radius,
178 FArray<const IGeomPoint *> *retPoints, FArray<QPair<const IGeomEdge *, DVect>> *retEdges,
179 FArray<QPair<const IGeomPoly *, DVect>> *intersectPolyPoints,
180 double tolerance, const double *depth=0) const = 0;
181 // returns true if at least a point is shared (no check for valid pointers)
182 virtual bool sharePoint(const IGeomEdge *edge1, const IGeomEdge *edge2, const IGeomPoint **shared=0) const = 0;
183 // returns true if the geometry is planar within a tolereance
184 virtual bool isPlanar(double tolerance = 1e-6) const = 0;
185
186 };
187} // namespace itascaxd
188// EoF
An array class that attempts to minimize unnecessary heap access.
Definition farray.h:25
Definition istring.h:14
Definition idef.h:50
Interface for containers of IThings.
Definition icontainer.h:21
Definition igeomimportexport.h:102
Base class for items that will be stored in containers.
Definition ithing.h:30
Interface for a user-defined geometric edge, defined as the line between two IGeomPoint objects.
Definition igeomedge.h:24
Interface for a user-defined geometric point.
Definition igeompoint.h:18
A class representing a single closed polygon made up of a list of edges.
Definition igeompoly.h:23
A container for a single "set" of geometric elements. A geometric set is a named collection of geomet...
Definition igeomset.h:27
virtual QList< const IGeomEdge * > getVertexConnectedMesh(const IGeomEdge *edge) const =0
Return a list of all of those edges in the current set that are vertex connected with /a edge.
virtual IGeomPoint * getFirstPoint()=0
Returns the first IGeomPoint of all those contained in the set. Call IGeomPoint::getNextPoint() to tr...
virtual shared::Signal< const IThing *, const IContainer * > * getEdgeMovedSignal() const =0
Returns a signal that gets called every time an edge is moved.
virtual IGeomPoint * findClosestPoint(const DVect &pos, const double &radius=limits< double >::max())=0
virtual QList< const IThing * > marqueeDeepSelect(bool perspective, const FArray< DVect > &nearSelRect, const FArray< DVect > &farSelRect, const DVect &selectionDirection, TType objType) const =0
virtual QList< const IGeomPoly * > getEdgeConnectedMesh(const IGeomPoly *poly) const =0
Return a list of all of those polygons in the current set that are edge connected with /a poly.
virtual IGeomEdge * findMatchingEdge(const IGeomPoint *end1, const IGeomPoint *end2)=0
Searches for an existing edge data structure with nodes matching end1 and end2 (either way).
virtual IThing * getIThing()=0
Return an IThing interface for this object.
virtual const IThing * getIThing() const =0
Return a const IThing interface for this object.
virtual IGeomPoly * findPolyWithID(uint64 id)=0
Find the IGeomPoly with ID number matching id. This search will take less than linear time....
virtual void listObjectAlongCylinder(const DVect &origin, const DVect &beginning, const double &radius, FArray< const IGeomPoint * > *retPoints, FArray< QPair< const IGeomEdge *, DVect > > *retEdges, FArray< QPair< const IGeomPoly *, DVect > > *intersectPolyPoints, double tolerance, const double *depth=0) const =0
virtual IGeomEdge * findEdgeWithID(uint64 id)=0
Find the IGeomEdge with ID number matching id. This search will take less than linear time....
virtual const IGeomSet * getNext() const =0
Return the next IGeomSet object in the global list, or 0 if it is the last set.
virtual uint getGeometryCode() const =0
virtual IContainer * getPointContainer()=0
Returns an IContainer interface pointer for the container of all IGeomPoint objects.
virtual uint getExtraCode() const =0
Returns a notification code (see INoticeManager) indicating a possible extra variable change on some ...
virtual IGeomEdge * closePoly(IGeomPoly *poly)=0
virtual const IGeomPoint * findPointWithID(uint64 id) const =0
Find the IGeomPoint with ID number matching id. This search will take less than linear time....
virtual IContainer * getEdgeContainer()=0
Returns an IContainer interface pointer for the container of all IGeomEdge objects.
virtual IString getName() const =0
Returns the name associated with the geometry set.
virtual IGeomPoly * getFirstPoly()=0
Returns the first IGeomPoly object of all those contained in the set. Call IGeomPoly::getNextPoly to ...
virtual const IGeomPoly * getFirstPoly() const =0
Returns the first IGeomPoly object of all those contained in the set. Call IGeomPoly::getNextPoly to ...
virtual IGeomEdge * createEdge(IGeomPoint *end1, IGeomPoint *end2)=0
virtual const IGeomEdge * findMatchingEdge(const IGeomPoint *end1, const IGeomPoint *end2) const =0
Searches for an existing edge data structure with nodes matching end1 and end2 (either way).
virtual const IGeomEdge * getFirstEdge() const =0
Returns the first IGeomEdge object of all those contained in the set. Call IGeomEdge::getNextEdge to ...
virtual shared::Signal< const IThing *, const IContainer * > * getPolyMovedSignal() const =0
Returns a signal that gets called every time a polygon is moved.
virtual uint getGroupCode() const =0
Returns a notification code (see INoticeManager) indicating that a group assignemnt on some element o...
virtual void listObjectAlongLine(const DVect &beg, const DVect &e, double radius, FArray< const IGeomPoint * > *retPoints, FArray< QPair< const IGeomEdge *, DVect > > *retEdges, FArray< QPair< const IGeomPoly *, DVect > > *intersectPolyPoints, const double tolerance) const =0
returns a list of objects along the line. All objects returned will be sorted by the distance from th...
virtual const IGeomEdge * findEdgeWithID(uint64 id) const =0
Find the IGeomEdge with ID number matching id. This search will take less than linear time....
virtual IGeomPoint * createPoint(const DVect3 &pos, uint64 id=0)=0
virtual const IContainer * getEdgeContainer() const =0
Returns an IContainer interface pointer for the container of all IGeomEdge objects.
static const TType type_
The type identification number for this class, for use in convert_cast() and convert_getcast().
Definition igeomset.h:30
virtual IGeomEdge * getFirstEdge()=0
Returns the first IGeomEdge object of all those contained in the set. Call IGeomEdge::getNextEdge to ...
virtual const IGeomEdge * findClosestEdge(const DVect &pos, const double &radius=limits< double >::max()) const =0
virtual IGeomPoint * findPointWithID(uint64 id)=0
Find the IGeomPoint with ID number matching id. This search will take less than linear time....
virtual const IGeomPoly * findClosestPoly(const DVect &pos, const double &radius=limits< double >::max()) const =0
virtual void exportData(IGeometryImportData *)=0
export itself ( polygos, edges end points : coordinates, groupsID) to IGeometryImportData
virtual void listObjectAlongCone(const DVect &origin, const DVect &beginning, const double &angle, FArray< const IGeomPoint * > *retPoints, FArray< QPair< const IGeomEdge *, DVect > > *retEdges, FArray< QPair< const IGeomPoly *, DVect > > *intersectPolyPoints, bool *nonPlanarPolyDetected, double tolerance, const double *depth=0) const =0
virtual shared::Signal< const IThing *, const IContainer * > * getPointMovedSignal() const =0
Returns a signal that gets called every time a point is moved.
virtual const IGeomPoly * findPolyWithID(uint64 id) const =0
Find the IGeomPoly with ID number matching id. This search will take less than linear time....
virtual IGeomSet * getNext()=0
Return the next IGeomSet object in the global list, or 0 if it is the last set.
virtual const IContainer * getPolyContainer() const =0
Returns an IContainer interface pointer for the container of all IGeomPoly objects.
virtual IGeomEdge * findClosestEdge(const DVect &pos, const double &radius=limits< double >::max())=0
virtual const IGeomPoint * getFirstPoint() const =0
Returns the first IGeomPoint of all those contained in the set. Call IGeomPoint::getNextPoint() to tr...
virtual IContainer * getPolyContainer()=0
Returns an IContainer interface pointer for the container of all IGeomPoly objects.
virtual IGeomPoly * createPoly()=0
virtual IGeomPoly * findClosestPoly(const DVect &pos, const double &radius=limits< double >::max())=0
virtual const IContainer * getPointContainer() const =0
Returns an IContainer interface pointer for the container of all IGeomPoint objects.
virtual IGeomEdge * addNodeToPoly(IGeomPoly *poly, IGeomPoint *point)=0
debug checked shorthand for std::numeric_limits<T>::
Definition limit.h:25
uint32 TType
class type indicator
Definition basedef.h:46
DVect3 DVect
Vector of doubles, either 2D or 3D.
Definition dim.h:154
Interface for geometric objects export-imports.
namespace Itasca
Definition basememory.cpp:10
Itasca Library standard namespace, specific to 2D or 3D.
Definition icontactmodule.h:4