2#pragma warning(disable : 4251)
11class __declspec(dllexport) EntityMeshTetTriangle
14 EntityMeshTetTriangle() {};
15 virtual ~EntityMeshTetTriangle() {};
17 void setNumberOfNodes(
int n) { assert(
nodes.empty());
nodes.resize(n); }
18 int getNumberOfNodes(
void) {
return (
int)
nodes.size(); }
20 void setNode(
int i,
size_t n) { assert(i < (
int)
nodes.size());
nodes[i] = n;};
21 size_t getNode(
int i) { assert(i < (
int)
nodes.size());
return nodes[i]; };
24 std::vector<size_t>
nodes;
27class __declspec(dllexport) EntityMeshTetFace :
public EntityBase
30 EntityMeshTetFace(
ot::UID ID, EntityBase *parent, EntityObserver *obs, ModelState *ms, ClassFactoryHandler* factory,
const std::string &owner);
31 virtual ~EntityMeshTetFace() {};
33 void setNumberTriangles(
size_t nT) {
triangles.resize(nT); setModified(); };
34 size_t getNumberTriangles(
void) {
return triangles.size(); };
36 EntityMeshTetTriangle &getTriangle(
size_t n) { assert(n <
triangles.size());
return triangles[n]; };
38 void setBoundingBox(
const BoundingBox &box) { boundingBox = box; setModified(); };
40 virtual bool getEntityBox(
double &xmin,
double &xmax,
double &ymin,
double &ymax,
double &zmin,
double &zmax);
42 void setSurfaceId(
int id) { surfaceId = id; setModified(); };
43 int getSurfaceId(
void) {
return surfaceId; };
45 void addAnnotation(
bool orientationForward,
ot::UID id) {faceAnnotationIDs.push_back(std::make_pair(orientationForward,
id)); setModified();};
46 size_t getNumberAnnotations(
void) {
return faceAnnotationIDs.size(); };
47 void getAnnotation(
int index,
bool &orientationForward,
ot::UID &annotationEntityID) { orientationForward = faceAnnotationIDs[index].first; annotationEntityID = faceAnnotationIDs[index].second; };
49 virtual std::string getClassName(
void) {
return "EntityMeshTetFace"; };
51 virtual entityType getEntityType(
void)
override {
return DATA; };
54 virtual int getSchemaVersion(
void) {
return 1; };
55 virtual void AddStorageData(bsoncxx::builder::basic::document &storage);
56 virtual void readSpecificDataFromDataBase(bsoncxx::document::view &doc_view, std::map<ot::UID, EntityBase *> &entityMap)
override;
58 bsoncxx::document::value getBSON(std::vector<EntityMeshTetTriangle> &triangles);
59 bsoncxx::document::value getBSON(std::vector<std::pair<bool, ot::UID>> &faceAnnotationIDs);
60 void readBSON(bsoncxx::document::view &trianglesObj, std::vector<EntityMeshTetTriangle> &triangles);
61 void readBSON(bsoncxx::document::view &annotationObj, std::vector<std::pair<bool, ot::UID>> &faceAnnotationIDs);
64 std::vector<EntityMeshTetTriangle>
triangles;
65 std::vector<std::pair<bool, ot::UID>> faceAnnotationIDs;
66 BoundingBox boundingBox;
@ nodes
Definition MonitorSettings.h:17
EntityBrep double std::vector< Geometry::Node > std::list< Geometry::Triangle > & triangles
Definition GeometryOperations.h:22
BoundingBox getBoundingBox(std::list< EntityGeometry * > &geometryEntities)
Definition GeometryOperations.cpp:230
unsigned long UID
Unique identifier (32 bit unsigned integer)
Definition CoreTypes.h:27