Itasca C++ Interface
Loading...
Searching...
No Matches
iextrudeblock.h
1#pragma once
2// iextrudeblock.h
3
5
6namespace itasca {
7 class IThing;
8}
9namespace itascaxd {
10 class IGeomPoly;
11}
12
13namespace extruder {
14 using namespace itasca;
15 using namespace itascaxd;
16
17 class IExtrudeEdge;
18
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 uint32 getMultiplier() const=0;
38 virtual void setMultiplier(uint32 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 uint32 getOppositeEdge(uint32 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
Interface for IExtrudeEdge objects.
Definition iextrudeblock.h:21
static const TType type_
The type identification number for this class, for use in convert_cast() and convert_getcast().
Definition iextrudeblock.h:24
virtual void resetSearchBadZones(int *i, int *j) const =0
Initialize search for warning or bad zones, pass in loop variables i,j.
virtual DVect getDiscretizedLocation(const IVect2 &index) const =0
Return x,y position of indexed gridpoint.
virtual uint32 getMultiplier() const =0
Return block multiplier, 1=default, 2,3,4...
virtual DVect2 computeGridParameter(DVect p) const =0
Compute u,v parametric position of given point inside block.
virtual const IThing * getIThing() const =0
Return a const IThing interface for this object.
bool anyBadZones(bool engine)
Return true if any bad zones.
virtual uint32 getOppositeEdge(uint32 index) const =0
Return (index+1)%4 for opposite edge of quads, trouble for triangles!
void countZoneQuality(int statecount[]) const
test warning/bad zones, return counts
virtual UVect2 getZones() const =0
Return block zoning sizes.
virtual bool nextSearchBadZone(int *i, int *j, int *ty, DVect *p1, DVect *p2, DVect *p3, DVect *p4, bool engine) const =0
Get next bad zone, and increment i,j loop variables, return false if done.
virtual DVect computeSplitEdgePosition(DVect2 f, int side) const =0
compute split parameter for edge on indexed side of block
virtual DVect getCentroid() const =0
Return center as defined by parametrization (0.5,0.5)
virtual DVect getParametricLocation(const double &mu1, const double &mu2) const =0
Return x,y position of parametrized location, mu1=0-1, mu2=0-1.
virtual IExtrudeBlock * getNeighborBlock(int index)=0
Return neighboring block on indexed edge, if any.
virtual const IGeomPoly * getIGeomPoly() const =0
Return a const IGeomPoly interface for this object.
virtual IGeomPoly * getIGeomPoly()=0
Return a IGeomPoly interface for this object.
virtual IThing * getIThing()=0
Return an IThing interface for this object.
virtual bool isPointInside(DVect pos)=0
Return true if point interior to block.
virtual void setMultiplier(uint32 m)=0
Set block multiplier, 1=default, 2,3,4...
Base class for items that will be stored in containers.
Definition ithing.h:30
A class representing a single closed polygon made up of a list of edges.
Definition igeompoly.h:23
uint32 TType
class type indicator
Definition basedef.h:46
DVect3 DVect
Vector of doubles, either 2D or 3D.
Definition dim.h:154
Interface for LinkType<> objects, POD that contain both the pointer to the next object and an index f...
namespace Itasca
Definition basememory.cpp:10
Itasca Library standard namespace, specific to 2D or 3D.
Definition icontactmodule.h:4