Itasca C++ Interface
itripoly.h
Go to the documentation of this file.
1 #pragma once
8 #include "base/src/farray.h"
9 
10 namespace itasca {
11  class IThing;
12  class IGroup;
13 }
14 
15 namespace itascaxd {
16  class IPiece;
17  class IPieceMechanical;
18  class IBody;
19  class IHalfFacet;
20  class IHalfVertex;
21 }
22 
23 namespace pfc {
24  using namespace itasca;
25  using namespace itascaxd;
26 
39  class ITriPoly {
40  public:
42  inline static const TType type_ = 0x4e70b69e;
44  virtual IThing * getIThing()=0;
46  virtual const IThing * getIThing() const=0;
48  virtual ITriPoly * getNextITriPoly()=0;
50  virtual const ITriPoly * getNextITriPoly() const=0;
54  virtual const IHalfFacet * getFirstIHalfFacet() const=0;
56  virtual DExtent3 getExtent() const=0;
57 
59  virtual int getNumberFacets() const=0;
61  virtual void getFacetList(FArray<IHalfFacet *> *ret)=0;
63  virtual void getFacetList(FArray<const IHalfFacet *> *ret) const=0;
64 
66  virtual void removeIHalfFacet(IHalfFacet *fac) =0;
68  virtual IHalfFacet * addFacetFromVertices(DVect verts[dim],QString &error,uint64 id=0,bool ignoreEnd=false,bool allowStar=false)=0;
69 
71  virtual void getVertexList(FArray<IHalfVertex *> *ret)=0;
73  virtual void getVertexList(FArray<const IHalfVertex *> *ret) const=0;
74 
76  virtual DVect getPosition() const = 0;
78  virtual double getVolume() const = 0;
80  virtual void setPosition(const DVect &p) = 0;
81 
83  virtual void rotate(const DVect &rotp,const DVect &axis,const double &w,bool noThrow = false) = 0;
84 
85  };
86 } // namespace pfc
87 // EoF
88 
An array class that attempts to minimize unnecessary heap access.
Definition: farray.h:25
Base class for items that will be stored in containers.
Definition: ithing.h:30
Interface for a facet used in the faceted wall logic. This is the interface for a triangular facet as...
Definition: ihalffacet.h:37
Interface for a TriPoly.
Definition: itripoly.h:39
virtual void removeIHalfFacet(IHalfFacet *fac)=0
Remove the IHalfFacet from the TriPoly.
virtual void getFacetList(FArray< IHalfFacet * > *ret)=0
Return a list of IHalfFacets.
virtual void rotate(const DVect &rotp, const DVect &axis, const double &w, bool noThrow=false)=0
Rotate the wall about the axis axis through the rotation point rotp by the angle w (in radians).
virtual double getVolume() const =0
Return the TriPoly volume.
virtual void getVertexList(FArray< IHalfVertex * > *ret)=0
Return a list of IHalfVertex objects.
virtual const IHalfFacet * getFirstIHalfFacet() const =0
Return the const first IHalfFacet associated with this TriPoly.
virtual int getNumberFacets() const =0
Return the number of IHalfFacets.
virtual void getFacetList(FArray< const IHalfFacet * > *ret) const =0
Return a list of const IHalfFacets.
virtual DVect getPosition() const =0
Return the TriPoly position. This is implementation dependent.
virtual IHalfFacet * addFacetFromVertices(DVect verts[dim], QString &error, uint64 id=0, bool ignoreEnd=false, bool allowStar=false)=0
Add a facet from vertices.
virtual void getVertexList(FArray< const IHalfVertex * > *ret) const =0
Return a list of const IHalfVertex object.
virtual const ITriPoly * getNextITriPoly() const =0
Return the next ITriPoly object in the global list, or 0 if it is the last set.
virtual void setPosition(const DVect &p)=0
Set the TriPoly position to p.
virtual DExtent3 getExtent() const =0
Return the DExtent3 extent of the TriPoly.
virtual IHalfFacet * getFirstIHalfFacet()=0
Return the first IHalfFacet associated with this TriPoly.
virtual const IThing * getIThing() const =0
Return a const IThing interface for this object.
virtual IThing * getIThing()=0
Return an IThing interface for this object.
virtual ITriPoly * getNextITriPoly()=0
Return the next ITriPoly object in the global list, or 0 if it is the last set.
An array class that attempts to minimize unnecessary heap access.
uint32 TType
class type indicator
Definition: basedef.h:46
DVect3 DVect
Vector of doubles, either 2D or 3D.
Definition: dim.h:150
namespace Itasca
Definition: basememory.cpp:10
Itasca Library standard namespace, specific to 2D or 3D.
Definition: icontactmodule.h:4
PFC namespace.
Definition: iballfluid.h:15