Open Inventor Release 2024.2.1
 
Loading...
Searching...
No Matches
PbHexahedronMesh3D.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_HEXAHEDRONMESH3D_
25#define _PB_HEXAHEDRONMESH3D_
26
27#include <MeshViz/3Ddata/PbIndexedMesh3D.h>
28
30
59
60
61 public:
62
66 PbHexahedronMesh3D(SbBool isDataDuplicate=TRUE) ;
67
72
77 PbHexahedronMesh3D(int num_nodes, const float *x_nod, const float *y_nod, const float *z_nod,
78 int num_hexahedrons, const int *hexahedron_index,
79 SbBool is_data_duplicate=TRUE) ;
80
85
90
94 friend int operator ==(const PbHexahedronMesh3D &m1, const PbHexahedronMesh3D &m2);
95
99 friend int operator !=(const PbHexahedronMesh3D &m1, const PbHexahedronMesh3D &m2)
100 { return !(m1 == m2); }
101
105 void setGeometry(int num_nodes, const float *x_nod, const float *y_nod, const float *z_nod,
106 int num_hexahedrons, const int *hexahedron_index);
107
114 void getGeometry(int &num_nodes, const float *&x_nod, const float *&y_nod, const float *&z_nod,
115 int &num_hexahedrons, const int *&hexahedron_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 /*----------------------------------------------------------------------------*/
132
133#if 1 SoDEPRECATED
141 void getGeometry(int &num_nodes, const float *&x_nod, const float *&y_nod, const float *&z_nod,
142 int &num_hexahedrons, const int **&hexahedron_index) const;
143
144#endif
146 private:
147
148 float getLongestEdgeLength();
149 // get the length of the longest edge of the mesh
150
151 void meshCrossSection(PoMeshCrossSection *cross_section) const ;
152
153 void mesh3DVec(PoMesh3DVec *mesh_vec) const ;
154 void print(FILE *fp) const;
155
156 // get a cell, but this cell has'nt coordinate specified
157 virtual const PbCell *getTopoCell(int cell_index) const;
158
159 private:
160 void updateCellBoundingBox() const;
161 void updateOwnerCellsList() const;
162
163 private:
164 void copy(const PbHexahedronMesh3D &mesh) ;
165 void destroy();
166
167 mutable PbHexahedronCell *m_hexahedron;
168} ;
169
170/*---------------------------------------------------------------------------*/
171
172#endif /* _PB_HEXAHEDRONMESH3D_ */
173
174
175
176
177
178
179
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 an hexahedron ce...
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Defines a mesh of hexahe...
SoDEPRECATED void getGeometry(int &num_nodes, const float *&x_nod, const float *&y_nod, const float *&z_nod, int &num_hexahedrons, const int **&hexahedron_index) const
Gets the current mesh geometry.
~PbHexahedronMesh3D()
Destructor.
PbHexahedronMesh3D(int num_nodes, const float *x_nod, const float *y_nod, const float *z_nod, int num_hexahedrons, const int *hexahedron_index, SbBool is_data_duplicate=TRUE)
Constructor of a volume mesh.
friend int operator==(const PbHexahedronMesh3D &m1, const PbHexahedronMesh3D &m2)
Equality comparison operator.
PbHexahedronMesh3D(SbBool isDataDuplicate=TRUE)
Constructor of a default simple mesh.
void getGeometry(int &num_nodes, const float *&x_nod, const float *&y_nod, const float *&z_nod, int &num_hexahedrons, const int *&hexahedron_index) const
Gets the current mesh geometry.
virtual const PbCell * getCell(int cell_index) const
Gets the cell which index is cell_index.
PbHexahedronMesh3D & operator=(const PbHexahedronMesh3D &mesh)
Assignment operator.
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 ...
void setGeometry(int num_nodes, const float *x_nod, const float *y_nod, const float *z_nod, int num_hexahedrons, const int *hexahedron_index)
Sets a new geometry.
friend int operator!=(const PbHexahedronMesh3D &m1, const PbHexahedronMesh3D &m2)
Inequality comparison operator.
PbHexahedronMesh3D(const PbHexahedronMesh3D &mesh)
Copy constructor.
<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> Representation of vector...
Definition PoMesh3DVec.h:95
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Representation of cross ...
int SbBool
Boolean type.
Definition SbBase.h:87