Itasca C++ Interface
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Attributes | List of all members
body::IBodyBlock Class Referenceabstract

Interface to provide acces to BodyBlock. More...

#include <ibodyblock.h>

Public Types

enum  blockType { Hexahedron =1 , Tetrahedron , Wedge , Default }
 Type of block enumeration ({Hexahedron=1, Tetrahedron, Wedge, Default}). Default usually means Hexahedron.
 
enum  blockValidState {
  WrongTopologyFaceAttachment =-7 , WrongNumberOfNodes , IntersectWithOthers , HasConcaveFaces ,
  SelfIntersections , NegativeOrZeroVolume , BadDegeneracy , AFaceHasAttachedBlocksFromOneSide ,
  Contained , ValidBlock , ValidButNotAttached , DefaultState
}
 Type of valid state.
 

Public Member Functions

virtual const IThinggetIThing () const =0
 returns a const IThing pointer
 
virtual IThinggetIThing ()=0
 returns a IThing pointer
 
virtual uint32 getSize () const =0
 Returns the number of faces associated with this block. 6-for hexahedron, 5-wedge block, 4-for tetrahedron.
 
virtual uint32 getSizeEdges () const =0
 Returns the number of edges associated with this block. 12-for hexahedron, 9-wedge block, 6-for tetrahedron.
 
virtual uint32 getSizePoints () const =0
 Returns the number of points associated with this block. 8-for hexahedron, 6-wedge block, 4-for tetrahedron.
 
virtual IGeomPolygetFace (uint32 index)=0
 Returns the face at index index in the list of faces associated with the block. Will return 0 if index >= getSize().
 
virtual const IGeomPolygetFace (uint32 index) const =0
 Returns the face at index index in the list of faces associated with the block. Will return 0 if index >= getSize().
 
virtual const IGeomEdgegetEdge (const uint32 index) const =0
 Returns the edge at index index in the list of edges associated with the block. Will return 0 if index >= getSizeEdges().
 
virtual IGeomEdgegetEdge (uint32 index)=0
 Returns the edge at index index in the list of edges associated with the block. Will return 0 if index >= getSizeEdges().
 
virtual const IGeomPointgetPoint (uint32 index) const =0
 Returns the point at index index in the list of edges associated with the block. Will return 0 if index >= getSizePonts().
 
virtual IGeomPointgetPoint (uint32 index)=0
 Returns the point at index index in the list of edges associated with the block. Will return 0 if index >= getSizePonts().
 
virtual bool isValid () const =0
 Checks the validity of the block - the block must form fully closed convex volume.
 
virtual DVect getCentroid () const =0
 Returns the centroid, calculated as the average of the point positions.
 
virtual double getArea () const =0
 Returns the area of the block (sum of faces areas), assuming the block is valid.
 
virtual double getVolume (double tol=1.0e-9) const =0
 Returns volume of the block: for hexahedron block with nonplanar faces uses exact formula from trilinear/bilinear interpolation of the volume of the block.
 
virtual blockValidState getValidState () const =0
 Returns validState flag.
 
virtual QString getValidStateString () const =0
 Return validState string message.
 
virtual void getEdgesOrder (FArray< QPair< uint32, uint32 > > &edgesOrder) const =0
 Place into edgesOrder Array of pairs of point indicies, each of the pair correspondes to an edge between two points.
 
virtual void getFacesOrder (FArray< FArray< uint32 > > &facesOrder) const =0
 Place ino facesOrder array of array of point indicies, each of array of point indicies correspond to points of the face.
 
virtual bool isIn (const DVect &v, const double &tolerance=1e-7) const =0
 
virtual DVect getClosestPoint (const DVect &v) const =0
 Returns the closest point to /a v.
 
virtual uint32 getMultiplier () const =0
 Return block multiplier, 1=default, 2,3,4...
 
virtual void setMultiplier (uint32 m)=0
 Set block multiplier, 1=default, 2,3,4...
 
virtual bool getGUIselect () const =0
 return GUI specific select flag
 
virtual void setGUIselect (bool flag) const =0
 set GUI specific select flag
 
virtual bool getOKdegeneracyFlag () const =0
 return "degenerecy OK flag" relevant for zoning wedges and tetrahedrons (for hexahedron is always true – zoning possible)
 
virtual void setOKdegeneracyFlag (bool OK) const =0
 sets "degenerecy OK flag" relevant for zoning wedges and tetrahedrons (for hexahedron is always true – zoning possible)
 
virtual const IGeomPolygetTheOpositeFace (const IGeomPoly *face) const =0
 

Static Public Attributes

static const TType type_ =0x53a34354
 The type identification number for this class, for use in convert_cast() and convert_getcast().
 

Detailed Description

Interface to provide acces to BodyBlock.

Member Function Documentation

◆ getTheOpositeFace()

virtual const IGeomPoly * body::IBodyBlock::getTheOpositeFace ( const IGeomPoly * face) const
pure virtual

Returns the oposite face of the block – this is the face that does not share edges or points accros the block with supplied face. Returns zero if supplied face is not part of the block or the block is tetrahedra or the block is wedge and supplied face is quad face.

◆ isIn()

virtual bool body::IBodyBlock::isIn ( const DVect & v,
const double & tolerance = 1e-7 ) const
pure virtual

Returns true if the point v, is inside Block, check by projection of the point on each face plane and checking if it is inside each face on (if provided) is filled with the projected point. tolerance is used to determine if the projected point is inside or outside.


The documentation for this class was generated from the following file: