27#include <Inventor/SbBox.h>
28#include <Inventor/SbLinear.h>
29#include <Inventor/SbString.h>
30#include <Inventor/STL/set>
32#include <MeshViz/nodes/PoMeshProperty.h>
33#include <MeshViz/graph/PbBase.h>
34#include <MeshViz/misc/PbArrayOfInt.h>
421 virtual void setCoordinates(
const float *x_nod,
const float *y_nod,
const float *z_nod);
434 virtual void getCoordinates(
const float* &xnod,
const float* &ynod,
const float* &znod,
435 int &size_xnod,
int &size_ynod,
int &size_znod)
const;
445 virtual float getLongestEdgeLength();
446 virtual void print(FILE *fp)
const;
447 void printInfo()
const {print(stdout);};
448 virtual SbBool isEmpty()
const;
450 virtual const PbCell *getTopoCell(
int cell_index)
const;
452 uint32_t getGeometryId()
const {
return m_geometryId; }
453 uint32_t getTopologyId()
const {
return m_topologyId; }
454 uint32_t getFltDataSetId(
int index)
const;
455 uint32_t getVecDataSetId(
int index)
const;
456 uint32_t getStrDataSetId(
int index)
const;
460 virtual void updateBoundingBox()
const=0;
461 virtual void updateCellBoundingBox()
const;
464 void updateGeometryId();
465 void updateTopologyId();
466 void updateFltDataId(uint32_t &
id);
467 void updateVecDataId(uint32_t &
id);
468 void updateStrDataId(uint32_t &
id);
475 SbBool m_longestEdgeLengthIsUpdated;
476 float m_longestEdgeLength;
478 mutable SbBox3f m_meshBoundingBox;
484 mutable SbBool m_meshBoundingBoxIsUpdated;
485 mutable SbBool m_cellBoundingBoxIsUpdated;
486 mutable SbBox3f m_smallestCellBoundingBox;
487 mutable SbBox3f m_biggestCellBoundingBox;
488 mutable int m_smallestCellInd;
489 mutable int m_biggestCellInd;
494 uint32_t m_geometryId;
495 uint32_t m_topologyId;
498 static uint32_t sm_nextGeometryId;
499 static uint32_t sm_nextTopologyId;
500 static uint32_t sm_nextFltDataId;
501 static uint32_t sm_nextVecDataId;
502 static uint32_t sm_nextStrDataId;
506 void copy(
const PbMesh &mesh) ;
514{
return numMeshNodes; }
518{
return m_numMeshCells; }
524 return m_meshBoundingBox;
536PbMesh::getTopoCell(
int)
const
DTEXT Dynamic array of int .
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Abstract class for all b...
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Defines an abstract cell...
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Defines an abstract mesh...
virtual const SbVec3f * getVecsSet(int set_index) const
Gets a set of vector values.
virtual SbBox3f getSmallestCellBox(int &cell_index) const
Gets the smallest cell's bounding box, returns also the index of this cell.
virtual SbBool removeStringsSet(int set_index)
Remove a set of string values.
virtual void getAdjacentCellsIndByNode(int cell_index, PbArrayOfInt &adjacent_cells) const
Gets the list of indices of cells that are adjacent (by a node) to cell_index.
void addValuesSet(int set_index, const float *val, DataBinding binding, const SbString &set_name="")
Adds a set of scalar values that can be located either at nodes or at cells.
virtual const SbString * getValuesSetName(int set_index) const
Gets the name associated to a scalar values set.
virtual SbBool getMinValuesSet(int set_index, float &min) const
Gets the min of a set of scalars.
virtual const SbString * getStringsSet(int set_index) const
Gets a set of string values.
int getNumNodes() const
Gets the number of nodes in the mesh.
virtual float getArea() const =0
Gets the area of the mesh.
@ PER_CELL
The data set contains one data value per cell.
@ PER_NODE
The data set contains one data value per node.
virtual void addVecsSet(int set_index, const SbVec3f *val, const SbString &set_name="")
Adds a set of vector values .
int getNumCells() const
Gets the number of cells in the mesh.
virtual SbBool getMaxValuesSet(int set_index, float &max) const
Gets the max of a set of scalars.
virtual SbBool getMaxVecsSet(int set_index, float &max) const
Gets the max module of a set of vectors.
virtual const PbCell * findContainingCell(const SbVec3f &point, float tolerance, SbVec3f &pcoord, const PbCell *adjacent_cell) const
PbMesh(SbBool is_data_duplicated=TRUE)
Constructor.
virtual int getNumValuesSet() const
Gets the number of set of scalar values.
SbBool isDataDuplicated() const
Returns TRUE if mesh's data are duplicated, FALSE otherwise.
virtual const PbCell * getCell(int cell_index) const =0
Gets the cell with index cell_index.
virtual const PbCell * findContainingCell(const SbVec3f &point, float tolerance, SbVec3f &pcoord) const
Find the cell that contains the point.
virtual void removeAllValuesSet()
Remove all sets of scalar values.
virtual void getAdjacentCellsIndByFacet(int cell_index, PbArrayOfInt &adjacent_cells) const
Gets the list of indices of cells that are adjacent (by a facet) to cell_index.
PbMesh(const PbMesh &mesh)
Copy constructor.
virtual void getCoordinates(const float *&xnod, const float *&ynod, const float *&znod, int &size_xnod, int &size_ynod, int &size_znod) const
Get the current coordinates of the nodes of this mesh.
DataBinding getValuesBinding(int set_index) const
Gets the binding of the scalar value set.
PbMesh & operator=(const PbMesh &mesh)
Assignment operator.
virtual SbBox3f getBiggestCellBox(int &cell_index) const
Gets the biggest cell's bounding box, returns also the index of this cell.
SbBox3f getBoundingBox() const
Gets the bounding box of the mesh.
virtual const SbString * getVecsSetName(int set_index) const
Gets the name associated to a vec values set.
virtual SbVec3f getNodeCoord(int nod_index) const =0
Gets the coordinates of a node.
virtual void addValuesSet(int set_index, const float *val, const SbString &set_name="")
Adds a set of scalar values.
virtual int getNumStringsSet() const
Gets the number of set of string values.
virtual void removeAllVecsSet()
Remove all sets of vector values.
virtual void removeAllStringsSet()
Remove all sets of strings values.
virtual const float * getValuesSet(int set_index) const
Gets a set of scalar values.
virtual void setCoordinates(const float *x_nod, const float *y_nod, const float *z_nod)
Set new node coordinates without modifying the mesh topology.
virtual void getNodeOwnerCellsInd(int nod_index, PbArrayOfInt &owner_cells) const =0
Gets the list of indices of cells that own the node "nod_index".
virtual SbBool removeVecsSet(int set_index)
Remove a set of vector values.
virtual void addStringsSet(int set_index, const SbString *val, const SbString &set_name="")
Adds a set of string values .
virtual float getVolume() const =0
Gets the volume of the mesh.
virtual int getNumVecsSet() const
Gets the number of set of vector values.
virtual const SbString * getStringsSetName(int set_index) const
Gets the name associated to a string values set.
virtual void getNodesOwnerCellsInd(const PbArrayOfInt &nod_indices, PbArrayOfInt &owner_cells) const
Gets the list of indices of cells that own the list of nodes "nod_indices".
virtual SbBool removeValuesSet(int set_index)
Remove a set of scalar values.
virtual SbBool getMinVecsSet(int set_index, float &min) const
Gets the min module of a set of vectors.
@ PER_NODE
The data set contains one data value per node.
@ PER_CELL
The data set contains one data value per cell.
Class for smart character strings.