73 void setGeometry(
int num_x,
int num_y,
const float *x,
const float *
y);
81 void setGeometry(
int num_x,
int num_y,
const float *x,
const float *
y,
const float *z);
88 void getGeometry(
int &num_x,
int &num_y,
const float* &x,
const float* &
y)
const;
96 void getGeometry(
int &num_x,
int &num_y,
const float* &x,
const float* &
y,
const float* &z)
const;
111 void getDim(
int &num_x,
int &num_y)
const { num_x = numX; num_y = numY;};
140 int * getCellNodeIds(
int i,
int j)
const;
141 int * getCellNodeIds(
int cell_index)
const;
142 virtual SbVec3f getFirstCellNormal()
const;
144 void print(FILE *fp)
const;
148 virtual void updateCellBoundingBox()
const;
151 void setDim(
int num_x,
int num_y);
152 virtual void setXYGeometry(
int num_x,
int num_y,
const float *x,
const float *
y)=0;
153 virtual void getXYGeometry(
const float* &x,
const float* &
y)
const=0;
154 void setZCoordMatrix(
int num_x,
int num_y,
const float *z);
160 mutable int m_cellNodeIds[4];
174 j = nod_index % numY;
175 i = (nod_index-j) / numY;
182 j = cell_index % (numY-1);
183 i = (cell_index-j) / (numY-1);
188PbGrid2D::setDim(
int num_x,
int num_y)
192 numMeshNodes = numX * numY;
193 if (num_x > 1 && num_y > 1)
194 m_numMeshCells = (numX-1) * (numY-1);
201PbGrid2D::getCellNodeIds(
int cell_index)
const
205 return getCellNodeIds(i,j);
209PbGrid2D::getCellNodeIds(
int i,
int j)
const
211 m_cellNodeIds[0] = i*numY+j;
212 m_cellNodeIds[1] = (i+1)*numY+j;
213 m_cellNodeIds[2] = (i+1)*numY+j+1;
214 m_cellNodeIds[3] = i*numY+j+1;
215 return m_cellNodeIds;
#define TRUE
Possible value of SbBool.
DTEXT Dynamic array of int .
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Defines an abstract grid...
virtual void getAdjacentCellsIndByNode(int cell_index, PbArrayOfInt &adjacent_cells) const
Gets the list of index of cells that are adjacent (by a node) to cell_index.
PbGrid2D(SbBool is_data_duplicate=TRUE)
Constructor.
PbGrid2D(const PbGrid2D &mesh)
Copy constructor.
void setGeometry(int num_x, int num_y, const float *x, const float *y)
Defines a 2D surface mesh geometry.
void getCellIndices(int cell_index, int &i, int &j) const
Calculates indices i,j that verify cell_index = i*(num_y-1) + j.
virtual void getAdjacentCellsIndByFacet(int cell_index, PbArrayOfInt &adjacent_cells) const
Gets the list of index of cells that are adjacent (by an edge) to cell_index.
void getDim(int &num_x, int &num_y) const
Gets the dimensions num_x, num_y of the grid.
virtual void getNodeOwnerCellsInd(int nod_index, PbArrayOfInt &owner_cells) const
Gets the list of index of cells that own the node "nod_index".
virtual SbVec3f getNodeCoord(int i, int j) const =0
Gets the coordinates of a node defined by its i,j indices on the grid.
virtual SbVec3f getNodeCoord(int nod_index) const =0
Gets the coordinates of a node defined by its index.
void setGeometry(int num_x, int num_y, const float *x, const float *y, const float *z)
Defines a 3D surface mesh geometry.
PbGrid2D & operator=(const PbGrid2D &mesh)
Assignment operator.
void getGeometry(int &num_x, int &num_y, const float *&x, const float *&y, const float *&z) const
Gets the mesh 3D geometry.
void getGeometry(int &num_x, int &num_y, const float *&x, const float *&y) const
Gets the mesh 2D geometry.
void getNodeIndices(int nod_index, int &i, int &j) const
Calculates indices i,j that verify nod_index = i*num_y + j.
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Defines an abstract surf...