Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
PbTetrahedronMesh3D.h
1/*=======================================================================
2 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4 *** ***
5 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8 *** ***
9 *** RESTRICTED RIGHTS LEGEND ***
10 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15 *** ***
16 *** COPYRIGHT (C) 1996-2014 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : VSG (MMM YYYY)
22**=======================================================================*/
23
24#ifndef _PB_TETRAHEDRONMESH3D_
25#define _PB_TETRAHEDRONMESH3D_
26
27#include <MeshViz/3Ddata/PbIndexedMesh3D.h>
28
30
59
60
61 public:
62
66 PbTetrahedronMesh3D(SbBool isDataDuplicate=TRUE) ;
67
72
77 PbTetrahedronMesh3D(int num_nodes, const float *x_nod, const float *y_nod, const float *z_nod,
78 int num_tetrahedrons, const int *tetrahedron_index,
79 SbBool is_data_duplicate=TRUE) ;
80
85
90
94 friend int operator ==(const PbTetrahedronMesh3D &m1, const PbTetrahedronMesh3D &m2);
95
99 friend int operator !=(const PbTetrahedronMesh3D &m1, const PbTetrahedronMesh3D &m2)
100 { return !(m1 == m2); }
101
105 virtual void setGeometry(int num_nodes, const float *x_nod, const float *y_nod, const float *z_nod,
106 int num_tetrahedrons, const int *tetrahedron_index);
107
114 virtual void getGeometry(int &num_nodes, const float *&x_nod, const float *&y_nod, const float *&z_nod,
115 int &num_tetrahedrons, const int *&tetrahedron_index) const;
116
121 virtual void getNodesOwnerCellsInd(const PbArrayOfInt &nod_indices, PbArrayOfInt &owner_cells) const;
122
129 virtual const PbCell *getCell(int cell_index) const;
130
131#if 1 SoDEPRECATED
139 virtual void getGeometry(int &num_nodes, const float *&x_nod, const float *&y_nod, const float *&z_nod,
140 int &num_tetrahedrons, const int **&tetrahedron_index) const;
141
142#endif
144 /*----------------------------------------------------------------------------*/
145 private:
146
147 float getLongestEdgeLength();
148 // get the length of the longest edge of the mesh
149
150 void meshCrossSection(PoMeshCrossSection *cross_section) const ;
151 void mesh3DVec(PoMesh3DVec *mesh_vec) const ;
152
153 // find the mesh's cell that contain the point, given (optianal) an adjacent cell.
154 // returns also the weight of the point in the found cell
155 // be carefull : this is a naive method, prefer inherited method findContainingCell
156 const PbCell* findContainingCellNaive(const SbVec3f &point, float tolerance, SbVec3f &pcoord, const PbCell *adjacent_cell) ;
157 const PbCell* findContainingCellNaive(const SbVec3f &point, float tolerance, SbVec3f &pcoord) ;
158
159 void print(FILE *fp) const;
160
161 // get a cell, but this cell has'nt coordinate specified
162 virtual const PbCell *getTopoCell(int cell_index) const;
163
164 private:
165 void updateCellBoundingBox() const;
166 void updateOwnerCellsList() const;
167
168 private:
169 void copy(const PbTetrahedronMesh3D &mesh) ;
170 void destroy();
171
172 mutable PbTetrahedronCell *m_tetrahedron;
173};
174
175/*---------------------------------------------------------------------------*/
176
177#endif /* _PB_TETRAHEDRONMESH3D_ */
178
179
180
181
182
183
184
DTEXT Dynamic array of int .
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Defines an abstract cell...
Definition PbCell.h:49
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Defines a volume mesh of...
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Defines an tetrahedron c...
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Defines a mesh of tetrah...
friend int operator!=(const PbTetrahedronMesh3D &m1, const PbTetrahedronMesh3D &m2)
Inequality comparison operator.
virtual SoDEPRECATED void getGeometry(int &num_nodes, const float *&x_nod, const float *&y_nod, const float *&z_nod, int &num_tetrahedrons, const int **&tetrahedron_index) const
Gets the current mesh geometry.
virtual void getNodesOwnerCellsInd(const PbArrayOfInt &nod_indices, PbArrayOfInt &owner_cells) const
Gets the list of index of cells that own the list of node "nod_indices" (for example nod_indices can ...
PbTetrahedronMesh3D(const PbTetrahedronMesh3D &mesh)
Copy constructor.
PbTetrahedronMesh3D(SbBool isDataDuplicate=TRUE)
Constructor of a default simple mesh.
virtual const PbCell * getCell(int cell_index) const
Gets the cell which index is cell_index.
friend int operator==(const PbTetrahedronMesh3D &m1, const PbTetrahedronMesh3D &m2)
Equality comparison operator.
~PbTetrahedronMesh3D()
Destructor.
virtual void getGeometry(int &num_nodes, const float *&x_nod, const float *&y_nod, const float *&z_nod, int &num_tetrahedrons, const int *&tetrahedron_index) const
Gets the current mesh geometry.
PbTetrahedronMesh3D & operator=(const PbTetrahedronMesh3D &mesh)
Assignment operator.
virtual void setGeometry(int num_nodes, const float *x_nod, const float *y_nod, const float *z_nod, int num_tetrahedrons, const int *tetrahedron_index)
Sets a new geometry.
PbTetrahedronMesh3D(int num_nodes, const float *x_nod, const float *y_nod, const float *z_nod, int num_tetrahedrons, const int *tetrahedron_index, SbBool is_data_duplicate=TRUE)
Constructor of a volume mesh.
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Representation of vector...
Definition PoMesh3DVec.h:95
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Representation of cross ...
3D vector class.
Definition SbVec.h:932
int SbBool
Boolean type.
Definition SbBase.h:87