Itasca C++ Interface
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
iextrudeblock.h
1 #pragma once
2 // iextrudeblock.h
3 
5 
6 namespace itasca {
7  class IThing;
8 }
9 namespace itascaxd {
10  class IGeomPoly;
11 }
12 
13 namespace extruder {
14  using namespace itasca;
15  using namespace itascaxd;
16 
17  class IExtrudeEdge;
18 
21  class IExtrudeBlock {
22  public:
24  inline static const TType type_ = 0x4cb610e7;
25 
27  virtual const IThing * getIThing() const=0;
29  virtual IThing * getIThing()=0;
31  virtual const IGeomPoly *getIGeomPoly() const=0;
33  virtual IGeomPoly * getIGeomPoly()=0;
34 
36  virtual quint32 getMultiplier() const=0;
38  virtual void setMultiplier(quint32 m)=0;
40  virtual UVect2 getZones() const=0;
42  virtual DVect getDiscretizedLocation(const IVect2 &index) const=0;
44  virtual DVect getParametricLocation(const double &mu1, const double &mu2) const=0;
46  virtual DVect getCentroid() const=0;
47 
49  virtual quint32 getOppositeEdge(quint32 index) const=0;
50  // Assuming point v falls inside the poly, then returns the internal ratio that point represents on the set of opposite edges.
51  // x() is the ratio for edges 0 and 2. y() is the ratio for edges 1 and 3.
52  // If the poly is triangular, the x() and y() is for 0, 1 and edge 2 depends on how the triangle distributes edge dependencies.
54  // virtual DVect2 getInternalRatio(const DVect &v,const double &tolerance=limits<float>::epsilon()) const=0;
55 
57  virtual DVect2 computeGridParameter(DVect p) const=0;
59  virtual DVect computeSplitEdgePosition(DVect2 f, int side) const=0;
60 
62  virtual bool isPointInside(DVect pos)=0;
63 
65  virtual IExtrudeBlock* getNeighborBlock(int index)=0;
66 
67  // test zone quality
69  void countZoneQuality(int statecount[]) const; // summary: zone states by type: 0=ok, 1=aspect ratio, 2=overlay1, 3=overlay2, 4=inverted/twisted
71  bool anyBadZones(bool engine);
72  // Iterate list of bad zones
74  virtual void resetSearchBadZones(int *i, int *j) const = 0;
76  // engine bool specifies if the call is originating from the engine, and polling should happen - otherwise polling is suppressed.
77  virtual bool nextSearchBadZone(int *i, int *j, int *ty, DVect *p1 ,DVect *p2, DVect *p3, DVect *p4,bool engine) const = 0; // false=search completed, return bad zone ccw points p1..p4
78  };
79 } // namespace f3
80 // EoF
namespace Itasca
Definition: basememory.cpp:9
Base class for items that will be stored in containers.
Definition: ithing.h:31
Interface for LinkType<> objects, POD that contain both the pointer to the next object and an index f...
A class representing a single closed polygon made up of a list of edges.
Definition: igeompoly.h:23
unsigned int TType
class type indicator
Definition: basedef.h:41
Interface for IExtrudeEdge objects.
Definition: iextrudeblock.h:21
Itasca Library standard namespace, specific to 2D or 3D.
Definition: icontactmodule.h:4
DVect3 DVect
Vector of doubles, either 2D or 3D.
Definition: dim.h:145