xmsgrid
1.0
|
Geometry for an unstructured grid. An XmUGrid is defined as a vector of 3d points and a stream of cells. Throughout this interface, we use these terms: More...
Classes | |
class | Impl |
Implementation for XmUGrid. More... | |
Public Member Functions | |
XmUGrid () | |
Constructor. | |
XmUGrid (const XmUGrid &a_xmUGrid) | |
Copy constructor. More... | |
XmUGrid (XmUGrid &&a_xmUGrid) | |
Move constructor. More... | |
~XmUGrid () | |
Destructor. | |
XmUGrid & | operator= (XmUGrid a_xmUGrid) |
Assignment operator. More... | |
void | Swap (XmUGrid &a_xmUGrid) |
Swap data between two XmUGrids. More... | |
bool | GetModified () const |
Returns the modified flag. Gets set when points or cells get changed. More... | |
void | SetUnmodified () |
Resets the modified flag to false. | |
void | SetUseCache (bool a_useCache) |
Turn on or off use of caching to speed up some operations. More... | |
int | GetPointCount () const |
Get the number of points. More... | |
const VecPt3d & | GetLocations () const |
Get vector of UGrid points. More... | |
void | SetLocations (const VecPt3d &a_locations) |
Set UGrid points. More... | |
Pt3d | GetPointLocation (int a_pointIdx) const |
Get the point. More... | |
bool | SetPointLocation (int a_pointIdx, const Pt3d &a_location) |
Set the point. More... | |
Pt3d | GetPointXy0 (int a_pointIdx) const |
Get the X, Y location of a point. More... | |
VecPt3d | GetPointsLocations (const VecInt &a_points) const |
Convert a vector of point indices into a vector of point 3d. More... | |
void | GetExtents (Pt3d &a_min, Pt3d &a_max) const |
Get extents of all points in UGrid. More... | |
int | GetPointAdjacentCellCount (int a_pointIdx) const |
Get the number of cells that use a point. More... | |
VecInt | GetPointAdjacentCells (int a_pointIdx) const |
Get the cells that are associated with the specified point. More... | |
void | GetPointAdjacentCells (int a_pointIdx, VecInt &a_adjacentCells) const |
Get the cells that are associated with the specified point. More... | |
VecInt | GetPointsAdjacentCells (const VecInt &a_points) const |
Gets the common cells from a vector of points. More... | |
void | GetPointsAdjacentCells (const VecInt &a_pointIdxs, VecInt &a_adjacentCellIdxs) const |
Gets the cells adjacent to all of a vector of points. More... | |
void | GetPointsAdjacentCells (int a_pointIdx1, int a_pointIdx2, VecInt &a_adjacentCellIdxs) const |
Gets the cells adjacent to both of the two points. More... | |
bool | IsValidPointChange (int a_changedPtIdx, const Pt3d &a_newPosition) const |
Determine whether adjacent cells are valid after a point is moved. More... | |
int | GetCellCount () const |
Get the number of cells. More... | |
int | GetCellPointCount (int a_cellIdx) const |
Get the number of cell points (including polyhedron). More... | |
VecInt | GetCellPoints (int a_cellIdx) const |
Get the points of a cell (including polyhedron) More... | |
bool | GetCellPoints (int a_cellIdx, VecInt &a_cellPoints) const |
Get the points of a cell. More... | |
void | GetCellLocations (int a_cellIdx, VecPt3d &a_cellLocations) const |
Get locations of cell points. More... | |
XmUGridCellType | GetCellType (int a_cellIdx) const |
Get the number of cells. More... | |
std::vector< int > | GetDimensionCounts () const |
Count all number of the cells with each dimenion (0, 1, 2, 3) More... | |
int | GetCellDimension (int a_cellIdx) const |
Get the dimension of the specified cell. More... | |
void | GetCellExtents (int a_cellIdx, Pt3d &a_min, Pt3d &a_max) const |
Get the extents of the given cell. More... | |
const VecInt & | GetCellstream () const |
Get cell stream vector for the entire UGrid. A cellstream is defined as follows: Polyhedrons: Cell type, number of faces, [num points in face, point numbers (0-based, CCW when looking in)] repeated for each face. Hexahedrons, polygons, quads, triangles etc: Cell type (ElemTypeEnum), number of points, point numbers. Zero-based, CCW, bottom, then top. Not true for pixel or voxel. More... | |
bool | SetCellstream (const VecInt &a_cellstream) |
Set the ugrid cells for the entire UGrid using a cell stream. More... | |
bool | GetCellCellstream (int a_cellIdx, VecInt &a_cellstream) const |
Get cell stream vector for a single cell. More... | |
VecInt | GetCellAdjacentCells (int a_cellIdx) const |
Get the cells neighboring a cell (cells associated with any of it's points) More... | |
void | GetCellAdjacentCells (int a_cellIdx, VecInt &a_cellNeighbors) const |
Get the cells neighboring a cell (cells associated with any of it's points) More... | |
bool | GetCellPlanViewPolygon (int a_cellIdx, VecPt3d &a_polygon) const |
Get a plan view polygon of a specified cell. More... | |
bool | GetCellCentroid (int a_cellIdx, Pt3d &a_centroid) const |
Get the centroid location of a cell. More... | |
int | GetCellEdgeCount (int a_cellIdx) const |
Get the number of edges for a cell. More... | |
XmEdge | GetCellEdge (int a_cellIdx, int a_edgeIdx) const |
Get the points of a cell. More... | |
VecInt | GetCellEdgeAdjacentCells (int a_cellIdx, int a_edgeIdx) const |
Get the index of the adjacent cells (that shares the same cell edge) More... | |
void | GetCellEdgeAdjacentCells (int a_cellIdx, int a_edgeIdx, VecInt &a_adjacentCellIdxs) const |
Get the index of the adjacent cells (that shares the same cell edge) More... | |
int | GetCell2dEdgeAdjacentCell (int a_cellIdx, int a_edgeIdx) const |
Get the index of the adjacent cells (that shares the same cell edge) More... | |
void | GetEdgeAdjacentCells (const XmEdge &a_edge, VecInt &a_adjacentCellIdxs) const |
Get the indices of the adjacent cells (that shares the same cell edge) More... | |
VecInt | GetEdgeAdjacentCells (const XmEdge &a_edge) const |
Get the index of the adjacent cells (that shares the same cell edge) More... | |
std::vector< XmEdge > | GetCellEdges (int a_cellIdx) const |
Get the Edges of a cell. More... | |
void | GetCellEdges (int a_cellIdx, std::vector< XmEdge > &a_edges) const |
Get the Edges of a cell. More... | |
void | GetPointAdjacentPoints (int a_pointIdx, VecInt &a_edgePoints) const |
Given a point gets point indices attached to the point by an edge. More... | |
void | GetPointAdjacentLocations (int a_pointIdx, VecPt3d &a_edgePoints) const |
Given a point gets point locations attached to the point by an edge. More... | |
int | GetCell3dFaceCount (int a_cellIdx) const |
Get the number of cell faces for given cell. More... | |
int | GetCell3dFacePointCount (int a_cellIdx, int a_faceIdx) const |
Get the number of face points for a given cell and face. More... | |
VecInt | GetCell3dFacePoints (int a_cellIdx, int a_faceIdx) const |
Get the cell face for given cell and face index. More... | |
void | GetCell3dFacePoints (int a_cellIdx, int a_faceIdx, VecInt &a_facePtIdxs) const |
Get the cell face for given cell and face index. More... | |
VecInt2d | GetCell3dFacesPoints (int a_cellIdx) const |
Get the faces of a cell. More... | |
int | GetCell3dFaceAdjacentCell (int a_cellIdx, int a_faceIdx) const |
Get the cell face neighbors for given cell and face index. More... | |
bool | GetCell3dFaceAdjacentCell (int a_cellIdx, int a_faceIdx, int &a_neighborCell, int &a_neighborFace) const |
Get the cell face neighbors for given cell and face index. More... | |
XmUGridFaceOrientation | GetCell3dFaceOrientation (int a_cellIdx, int a_faceIdx) const |
Get the orientation of the face of a vertically prismatic cell. More... | |
Static Public Member Functions | |
static std::shared_ptr< XmUGrid > | New (const VecPt3d &a_locations, const VecInt &a_cellstream) |
Create a new XmUGrid. More... | |
static std::shared_ptr< XmUGrid > | New () |
Create a new XmUGrid. More... | |
static bool | IsValidCellstream (const VecInt &a_cellstream) |
Check a cell stream to make sure it's valid. Compares cell type against expected number of points. More... | |
Private Attributes | |
std::unique_ptr< Impl > | m_impl |
implementation | |
Geometry for an unstructured grid. An XmUGrid is defined as a vector of 3d points and a stream of cells. Throughout this interface, we use these terms:
Point or pointIdx refer to an index into the vector of points.
Location refers to the actual 3d coordinates of one or more of those points.
GetCellstream refers to a single flat vector of integers that defines the cells. The cellstream for each cell begins with an integer that defines the cell type. For most cell types, the next integer specifies the number of points in the cell (even though that number never varies for all cells of most types). That is followed by the indices for that number of points. One of the cell types is a polyhedron. It follows the cell type with a count of the faces in the polyhedron. Then for that number of faces, each face is defined by a number of points (ordered counter-clockwise from the outside), followed by that many point indices.
Cell or CellIdx refers to the n-th cell defined in the cell stream. Internally, such an value is used to index into a secondary vector that defines the offsets into the cellstream where that cell begins and ends.
Edge refers to a simple structure that contains a pair of indices to points that are connected by at least one cell's points.
EdgeIdx refers to a particular ordering of the edges of a cell. For each cell type, there is a predefined way of connecting the points of cells of that type to form an Edge. The EdgeIdx is a convenient way to loop through that set of edges on a cell without actually collecting them into a vector.
Dimension refers to the kinds of connectivity a cell type will have. Cells that represent a single point have dimension 0. Those that connect into a curve have dimension 1. Those that connect to form a surface have dimension 2. Those that represent solids have dimension 3. (All of these cell types can exist in 3 dimensional space.)
Functions that just have one word, like GetLocations(), GetCellstream(), or GetExtents() return properties of the entire XmUGrid. Those that return properties of a particular cell will begin with the word "Cell" (and have a_cellIdx as their first argument) and end with type of related objects. For example: GetCellPoints(), GetCellLocations(), GetCellType(), GetCellDimension(), GetCellAdjacentCells(), etc.
Functions that begin with "Point" have a_pointIdx as their first argument return objects relative to that point, such GetPointLocation(), GetPointXy0(), GetPointAdjacentCells(), etc. (One could expect a function like PointEdges() or GetPointAdjacentPoints() to take a_pointIdx as the first argument return a vector of Edges or PointIdxs that connect to that point.)
Functions that return the number of objects in some scope end with the word "Count" preceded by the type of things being counted and optionally a scope. So GetPointCount() and GetCellCount() return the number of points and cells respectively in the XmUGrid, while GetCellPointCount() and GetCellEdgeCount() return the number of points or edges, respectively, in a specified cell.
There is a predefined ordering of faces within the solid cell types, so faceIdx refers to the face in that ordering. Methods containing the words Cell3d or Face are specific to solids (dimension 3 cells).
Some functions begin with two scoping words and take two input index arguments; for example: GetCellEdgeAdjacentCells() or GetCell3dFacePoints().
xms::XmUGrid::XmUGrid | ( | const XmUGrid & | a_xmUGrid | ) |
Copy constructor.
a_xmUGrid | The XmUGrid to copy. |
Definition at line 2903 of file XmUGrid.cpp.
References m_impl.
xms::XmUGrid::XmUGrid | ( | XmUGrid && | a_xmUGrid | ) |
Move constructor.
a_xmUGrid | The XmUGrid to move. |
Definition at line 2912 of file XmUGrid.cpp.
References Swap().
int xms::XmUGrid::GetCell2dEdgeAdjacentCell | ( | int | a_cellIdx, |
int | a_edgeIdx | ||
) | const |
Get the index of the adjacent cells (that shares the same cell edge)
[in] | a_cellIdx | the index of the cell |
[in] | a_edgeIdx | the index of the edge |
Definition at line 3469 of file XmUGrid.cpp.
References m_impl.
int xms::XmUGrid::GetCell3dFaceAdjacentCell | ( | int | a_cellIdx, |
int | a_faceIdx | ||
) | const |
Get the cell face neighbors for given cell and face index.
[in] | a_cellIdx | the index of the cell |
[in] | a_faceIdx | the face index of the cell |
Definition at line 3595 of file XmUGrid.cpp.
References m_impl.
Referenced by xms::XmUGrid::Impl::ConnectedTopOrBottom(), and xms::XmUGrid::Impl::GetCell3dFaceAdjacentCell().
bool xms::XmUGrid::GetCell3dFaceAdjacentCell | ( | int | a_cellIdx, |
int | a_faceIdx, | ||
int & | a_neighborCell, | ||
int & | a_neighborFace | ||
) | const |
Get the cell face neighbors for given cell and face index.
[in] | a_cellIdx | the index of the cell |
[in] | a_faceIdx | the face index of the cell |
[in] | a_neighborCell | the index of the neighboring cell |
[in] | a_neighborFace | the face index of the neighboring cell adjacent to the given face |
Definition at line 3609 of file XmUGrid.cpp.
References m_impl.
int xms::XmUGrid::GetCell3dFaceCount | ( | int | a_cellIdx | ) | const |
Get the number of cell faces for given cell.
[in] | a_cellIdx | the index of the cell |
Definition at line 3541 of file XmUGrid.cpp.
References m_impl.
Referenced by xms::XmUGrid::Impl::GetCell3dFaceAdjacentCell(), xms::XmUGrid::Impl::GetCell3dFaceOrientation(), xms::XmUGrid::Impl::GetCell3dFacesPoints(), xms::XmUGrid::Impl::GetCellXySegments(), and xms::XmUGrid::Impl::VerticalOrientationFromOpposing().
XmUGridFaceOrientation xms::XmUGrid::GetCell3dFaceOrientation | ( | int | a_cellIdx, |
int | a_faceIdx | ||
) | const |
Get the orientation of the face of a vertically prismatic cell.
[in] | a_cellIdx | the index of the cell |
[in] | a_faceIdx | the face index of the cell |
Definition at line 3623 of file XmUGrid.cpp.
References m_impl.
int xms::XmUGrid::GetCell3dFacePointCount | ( | int | a_cellIdx, |
int | a_faceIdx | ||
) | const |
Get the number of face points for a given cell and face.
[in] | a_cellIdx | The cell |
[in] | a_faceIdx | The face |
Definition at line 3551 of file XmUGrid.cpp.
References m_impl.
VecInt xms::XmUGrid::GetCell3dFacePoints | ( | int | a_cellIdx, |
int | a_faceIdx | ||
) | const |
Get the cell face for given cell and face index.
[in] | a_cellIdx | the index of the cell |
[in] | a_faceIdx | the face index of the cell |
Definition at line 3562 of file XmUGrid.cpp.
References m_impl.
Referenced by xms::XmUGrid::Impl::GetCell3dFaceAdjacentCell(), xms::XmUGrid::Impl::GetCell3dFaceAdjacentCellNoCache(), xms::XmUGrid::Impl::GetCell3dFacePoints(), xms::XmUGrid::Impl::GetCell3dFacesPoints(), xms::XmUGrid::Impl::GetCellXySegments(), xms::XmUGrid::Impl::GetFaceXySegments(), xms::XmUGrid::Impl::GetOrientationFromArea(), and xms::XmUGrid::Impl::IsSideFace().
void xms::XmUGrid::GetCell3dFacePoints | ( | int | a_cellIdx, |
int | a_faceIdx, | ||
VecInt & | a_facePtIdxs | ||
) | const |
Get the cell face for given cell and face index.
[in] | a_cellIdx | the index of the cell |
[in] | a_faceIdx | the face index of the cell |
[out] | a_facePtIdxs | a vector of point indices for the face |
Definition at line 3574 of file XmUGrid.cpp.
References m_impl.
VecInt2d xms::XmUGrid::GetCell3dFacesPoints | ( | int | a_cellIdx | ) | const |
Get the faces of a cell.
[in] | a_cellIdx | the cells to whom the faces belong |
Definition at line 3584 of file XmUGrid.cpp.
References m_impl.
Referenced by xms::XmUGrid::Impl::IsCellValidWithPointChange().
VecInt xms::XmUGrid::GetCellAdjacentCells | ( | int | a_cellIdx | ) | const |
Get the cells neighboring a cell (cells associated with any of it's points)
[in] | a_cellIdx | the index of the cell |
Definition at line 3379 of file XmUGrid.cpp.
References m_impl.
Referenced by xms::XmUGrid::Impl::GetCellAdjacentCells(), and xms::XmUGrid::Impl::GetCellEdgeAdjacentCells().
void xms::XmUGrid::GetCellAdjacentCells | ( | int | a_cellIdx, |
VecInt & | a_cellNeighbors | ||
) | const |
Get the cells neighboring a cell (cells associated with any of it's points)
[in] | a_cellIdx | the index of the cell |
[out] | a_cellNeighbors | vector of cell indices |
Definition at line 3389 of file XmUGrid.cpp.
References m_impl.
bool xms::XmUGrid::GetCellCellstream | ( | int | a_cellIdx, |
VecInt & | a_cellstream | ||
) | const |
Get cell stream vector for a single cell.
[in] | a_cellIdx | the index of the cell |
[in] | a_cellstream | The cellstream of the cell |
Definition at line 3369 of file XmUGrid.cpp.
References m_impl.
Referenced by xms::XmUGrid::Impl::GetCell3dFacePointCount(), xms::XmUGrid::Impl::GetCell3dFacePoints(), xms::XmUGrid::Impl::GetCellEdge(), xms::XmUGrid::Impl::GetCellPointCount(), xms::XmUGrid::Impl::GetCellPoints(), and xms::XmUGrid::Impl::GetNumberOfPolyhedronEdges().
bool xms::XmUGrid::GetCellCentroid | ( | int | a_cellIdx, |
Pt3d & | a_centroid | ||
) | const |
Get the centroid location of a cell.
[in] | a_cellIdx | The index of the cell. |
[out] | a_centroid | The location of the cell centroid. |
Definition at line 3412 of file XmUGrid.cpp.
References m_impl.
int xms::XmUGrid::GetCellCount | ( | ) | const |
Get the number of cells.
Definition at line 3248 of file XmUGrid.cpp.
References m_impl.
Referenced by xms::XmUGrid::Impl::CalculateCacheValues(), xms::XmUGrid::Impl::GetDimensionCounts(), and xms::XmUGrid::Impl::IsValidCellIdx().
int xms::XmUGrid::GetCellDimension | ( | int | a_cellIdx | ) | const |
Get the dimension of the specified cell.
[in] | a_cellIdx | the index of the cell |
Definition at line 3319 of file XmUGrid.cpp.
References m_impl.
Referenced by xms::XmUGrid::Impl::GetCell2dEdgeAdjacentCell(), xms::XmUGrid::Impl::GetCellPlanViewPolygon(), xms::XmUGrid::Impl::GetDimensionCounts(), and xms::XmUGrid::Impl::IsCellValidWithPointChange().
XmEdge xms::XmUGrid::GetCellEdge | ( | int | a_cellIdx, |
int | a_edgeIdx | ||
) | const |
Get the points of a cell.
[in] | a_cellIdx | the index of the cell |
[in] | a_edgeIdx | the index of the edge |
Definition at line 3433 of file XmUGrid.cpp.
References m_impl.
Referenced by xms::XmUGrid::Impl::GetCell2dEdgeAdjacentCell(), xms::XmUGrid::Impl::GetCellEdgeAdjacentCells(), xms::XmUGrid::Impl::GetCellEdges(), and xms::XmUGrid::Impl::GetPointAdjacentPoints().
VecInt xms::XmUGrid::GetCellEdgeAdjacentCells | ( | int | a_cellIdx, |
int | a_edgeIdx | ||
) | const |
Get the index of the adjacent cells (that shares the same cell edge)
[in] | a_cellIdx | the index of the cell |
[in] | a_edgeIdx | the index of the edge |
Definition at line 3444 of file XmUGrid.cpp.
References m_impl.
Referenced by xms::XmUGrid::Impl::GetCellEdgeAdjacentCells().
void xms::XmUGrid::GetCellEdgeAdjacentCells | ( | int | a_cellIdx, |
int | a_edgeIdx, | ||
VecInt & | a_adjacentCellIdxs | ||
) | const |
Get the index of the adjacent cells (that shares the same cell edge)
[in] | a_cellIdx | the index of the cell |
[in] | a_edgeIdx | the index of the edge |
[out] | a_adjacentCellIdxs | a vector of cell indices of the adjacent cells |
Definition at line 3456 of file XmUGrid.cpp.
References m_impl.
int xms::XmUGrid::GetCellEdgeCount | ( | int | a_cellIdx | ) | const |
Get the number of edges for a cell.
[in] | a_cellIdx | the index of the cell |
Definition at line 3422 of file XmUGrid.cpp.
References m_impl.
Referenced by xms::XmUGrid::Impl::GetCell2dEdgeAdjacentCell(), xms::XmUGrid::Impl::GetCellEdgeAdjacentCells(), xms::XmUGrid::Impl::GetCellEdges(), and xms::XmUGrid::Impl::GetPointAdjacentPoints().
std::vector< XmEdge > xms::XmUGrid::GetCellEdges | ( | int | a_cellIdx | ) | const |
Get the Edges of a cell.
[in] | a_cellIdx | the cells to whom the edges belong |
Definition at line 3499 of file XmUGrid.cpp.
References m_impl.
Referenced by xms::XmUGrid::Impl::GetCellEdges(), and xms::XmUGrid::Impl::IsCellValidWithPointChange().
void xms::XmUGrid::GetCellEdges | ( | int | a_cellIdx, |
std::vector< XmEdge > & | a_edges | ||
) | const |
Get the Edges of a cell.
[in] | a_cellIdx | the cells to whom the edges belong |
[out] | a_edges | a vector of edges |
Definition at line 3509 of file XmUGrid.cpp.
References m_impl.
Get the extents of the given cell.
[in] | a_cellIdx | The cell index to get the extents of. |
[out] | a_min | The minimum location. |
[out] | a_max | The maximum location. |
Definition at line 3330 of file XmUGrid.cpp.
References m_impl.
void xms::XmUGrid::GetCellLocations | ( | int | a_cellIdx, |
VecPt3d & | a_cellLocations | ||
) | const |
Get locations of cell points.
[in] | a_cellIdx | the index of the cell |
[out] | a_cellLocations | The locations of the cell points |
Definition at line 3289 of file XmUGrid.cpp.
References m_impl.
Referenced by xms::XmUGrid::Impl::GetCellCentroid(), xms::XmUGrid::Impl::GetCellExtents(), and xms::XmUGrid::Impl::GetPlanViewPolygon2d().
bool xms::XmUGrid::GetCellPlanViewPolygon | ( | int | a_cellIdx, |
VecPt3d & | a_polygon | ||
) | const |
Get a plan view polygon of a specified cell.
[in] | a_cellIdx | The index of the cell. |
[out] | a_polygon | Vector of Pt3d that is the plan view polygon. |
Definition at line 3401 of file XmUGrid.cpp.
References m_impl.
Referenced by xms::XmUGrid::Impl::GetCellCentroid().
int xms::XmUGrid::GetCellPointCount | ( | int | a_cellIdx | ) | const |
Get the number of cell points (including polyhedron).
[in] | a_cellIdx | the index of the cell |
Definition at line 3258 of file XmUGrid.cpp.
References m_impl.
VecInt xms::XmUGrid::GetCellPoints | ( | int | a_cellIdx | ) | const |
Get the points of a cell (including polyhedron)
[in] | a_cellIdx | the index of the cell |
Definition at line 3268 of file XmUGrid.cpp.
References m_impl.
Referenced by xms::XmUGrid::Impl::GetCellAdjacentCells(), xms::XmUGrid::Impl::GetCellLocations(), xms::XmUGrid::Impl::GetCellPoints(), and xms::XmUGrid::Impl::GetPlanViewPolygon3d().
bool xms::XmUGrid::GetCellPoints | ( | int | a_cellIdx, |
VecInt & | a_cellPoints | ||
) | const |
Get the points of a cell.
[in] | a_cellIdx | the index of the cell |
[out] | a_cellPoints | the points of the cell |
Definition at line 3279 of file XmUGrid.cpp.
References m_impl.
const VecInt & xms::XmUGrid::GetCellstream | ( | ) | const |
Get cell stream vector for the entire UGrid. A cellstream is defined as follows: Polyhedrons: Cell type, number of faces, [num points in face, point numbers (0-based, CCW when looking in)] repeated for each face. Hexahedrons, polygons, quads, triangles etc: Cell type (ElemTypeEnum), number of points, point numbers. Zero-based, CCW, bottom, then top. Not true for pixel or voxel.
Definition at line 3346 of file XmUGrid.cpp.
References m_impl.
XmUGridCellType xms::XmUGrid::GetCellType | ( | int | a_cellIdx | ) | const |
Get the number of cells.
[in] | a_cellIdx | the index of the cell |
Definition at line 3299 of file XmUGrid.cpp.
References m_impl.
Referenced by xms::XmUGrid::Impl::GetCell3dFaceCountNoCache(), xms::XmUGrid::Impl::GetCell3dFacePointCount(), xms::XmUGrid::Impl::GetCellCellstream(), xms::XmUGrid::Impl::GetCellDimension(), xms::XmUGrid::Impl::GetCellEdgeCount(), xms::XmUGrid::Impl::GetCellPointCount(), and xms::XmUGrid::Impl::GetNumberOfItemsForCell().
std::vector< int > xms::XmUGrid::GetDimensionCounts | ( | ) | const |
Count all number of the cells with each dimenion (0, 1, 2, 3)
Definition at line 3308 of file XmUGrid.cpp.
References m_impl.
void xms::XmUGrid::GetEdgeAdjacentCells | ( | const XmEdge & | a_edge, |
VecInt & | a_adjacentCellIdxs | ||
) | const |
Get the indices of the adjacent cells (that shares the same cell edge)
[in] | a_edge | the edge (a pair of point indices) |
[out] | a_adjacentCellIdxs | a vector of cell indices of the adjacent cells |
Definition at line 3479 of file XmUGrid.cpp.
References m_impl.
Referenced by xms::XmUGrid::Impl::GetEdgeAdjacentCells().
Get the index of the adjacent cells (that shares the same cell edge)
[in] | a_edge | the edge (a pair of point indices) |
Definition at line 3489 of file XmUGrid.cpp.
References m_impl.
Get extents of all points in UGrid.
[out] | a_min | minimum extent of all points |
[out] | a_max | maximum extent of all points |
Definition at line 3161 of file XmUGrid.cpp.
References m_impl.
const VecPt3d & xms::XmUGrid::GetLocations | ( | ) | const |
Get vector of UGrid points.
Definition at line 3101 of file XmUGrid.cpp.
References m_impl.
Referenced by XmUGridUnitTests::testOperators().
bool xms::XmUGrid::GetModified | ( | ) | const |
Returns the modified flag. Gets set when points or cells get changed.
Definition at line 3064 of file XmUGrid.cpp.
References m_impl.
int xms::XmUGrid::GetPointAdjacentCellCount | ( | int | a_pointIdx | ) | const |
Get the number of cells that use a point.
a_pointIdx | The point to check. |
Definition at line 3171 of file XmUGrid.cpp.
References m_impl.
Referenced by xms::XmUGrid::Impl::GetCell2dEdgeAdjacentCell(), and xms::XmUGrid::Impl::GetPointAdjacentCells().
VecInt xms::XmUGrid::GetPointAdjacentCells | ( | int | a_pointIdx | ) | const |
Get the cells that are associated with the specified point.
[in] | a_pointIdx | the index of the point |
Definition at line 3181 of file XmUGrid.cpp.
References m_impl.
Referenced by xms::XmUGrid::Impl::GetCellAdjacentCells(), xms::XmUGrid::Impl::GetPointAdjacentCells(), xms::XmUGrid::Impl::GetPointAdjacentPoints(), xms::XmUGrid::Impl::GetPointsAdjacentCells(), and xms::XmUGrid::Impl::IsValidPointChange().
void xms::XmUGrid::GetPointAdjacentCells | ( | int | a_pointIdx, |
VecInt & | a_adjacentCells | ||
) | const |
Get the cells that are associated with the specified point.
[in] | a_pointIdx | the index of the point |
[out] | a_adjacentCells | a vector of the adjacent cell indices |
Definition at line 3192 of file XmUGrid.cpp.
References m_impl.
void xms::XmUGrid::GetPointAdjacentLocations | ( | int | a_pointIdx, |
VecPt3d & | a_edgePoints | ||
) | const |
Given a point gets point locations attached to the point by an edge.
[in] | a_pointIdx | The point to get attached point from. |
[out] | a_edgePoints | A vector of points attached across edges. |
Definition at line 3529 of file XmUGrid.cpp.
References m_impl.
void xms::XmUGrid::GetPointAdjacentPoints | ( | int | a_pointIdx, |
VecInt & | a_edgePoints | ||
) | const |
Given a point gets point indices attached to the point by an edge.
[in] | a_pointIdx | The point to get adjacent points from. |
[out] | a_edgePoints | The indices of the adjacent points. |
Definition at line 3519 of file XmUGrid.cpp.
References m_impl.
Referenced by xms::XmUGrid::Impl::GetPointAdjacentLocations().
int xms::XmUGrid::GetPointCount | ( | ) | const |
Get the number of points.
Definition at line 3092 of file XmUGrid.cpp.
References m_impl.
Pt3d xms::XmUGrid::GetPointLocation | ( | int | a_pointIdx | ) | const |
Get the point.
[in] | a_pointIdx | the index of the point |
Definition at line 3120 of file XmUGrid.cpp.
References m_impl.
Referenced by xms::XmUGrid::Impl::DoEdgesCrossWithPointChange(), xms::XmUGrid::Impl::GetPlanViewPolygon3d(), xms::XmUGrid::Impl::GetPointsLocations(), xms::XmUGrid::Impl::GetPointXy0(), and xms::XmUGrid::Impl::IsFaceSide().
Gets the common cells from a vector of points.
[in] | a_points | a vector of unique points |
Definition at line 3202 of file XmUGrid.cpp.
References m_impl.
Referenced by xms::XmUGrid::Impl::GetCell3dFaceAdjacentCellNoCache(), xms::XmUGrid::Impl::GetEdgeAdjacentCells(), and xms::XmUGrid::Impl::GetPointsAdjacentCells().
void xms::XmUGrid::GetPointsAdjacentCells | ( | const VecInt & | a_pointIdxs, |
VecInt & | a_adjacentCellIdxs | ||
) | const |
Gets the cells adjacent to all of a vector of points.
[in] | a_pointIdxs | an array of point indices |
[out] | a_adjacentCellIdxs | a vector of cell indices |
Definition at line 3211 of file XmUGrid.cpp.
References m_impl.
void xms::XmUGrid::GetPointsAdjacentCells | ( | int | a_pointIdx1, |
int | a_pointIdx2, | ||
VecInt & | a_adjacentCellIdxs | ||
) | const |
Gets the cells adjacent to both of the two points.
[in] | a_pointIdx1 | first point index |
[in] | a_pointIdx2 | second point index |
[out] | a_adjacentCellIdxs | a vector of cell indices |
Definition at line 3224 of file XmUGrid.cpp.
References m_impl.
Convert a vector of point indices into a vector of point 3d.
[in] | a_points | a vector of point indices |
Definition at line 3151 of file XmUGrid.cpp.
References m_impl.
Referenced by xms::XmUGrid::Impl::GetCellLocations(), and xms::XmUGrid::Impl::GetPointAdjacentLocations().
Pt3d xms::XmUGrid::GetPointXy0 | ( | int | a_pointIdx | ) | const |
Get the X, Y location of a point.
[in] | a_pointIdx | The index of the point. |
Definition at line 3141 of file XmUGrid.cpp.
References m_impl.
Referenced by xms::XmUGrid::Impl::GetFacePointSegments(), xms::XmUGrid::Impl::GetNextFaceColumn(), xms::XmUGrid::Impl::GetOrientationFromArea(), and xms::XmUGrid::Impl::IsSideFace().
|
static |
Check a cell stream to make sure it's valid. Compares cell type against expected number of points.
[in] | a_cellstream | the cell stream to check |
Definition at line 2947 of file XmUGrid.cpp.
Referenced by xms::XmUGrid::Impl::SetCellstream(), and XmUGridUnitTests::testUGridStreams().
bool xms::XmUGrid::IsValidPointChange | ( | int | a_changedPtIdx, |
const Pt3d & | a_newPosition | ||
) | const |
Determine whether adjacent cells are valid after a point is moved.
[in] | a_changedPtIdx | index of the point to be changed |
[in] | a_newPosition | location the point is to be moved to |
Definition at line 3239 of file XmUGrid.cpp.
References m_impl.
|
static |
Create a new XmUGrid.
[in] | a_locations | the UGrid points |
[in] | a_cellstream | the UGrid cell stream |
Definition at line 2885 of file XmUGrid.cpp.
References New().
|
static |
Create a new XmUGrid.
Definition at line 2874 of file XmUGrid.cpp.
References XmUGrid().
Referenced by New(), xms::TEST_XmUBuild3DChevronUgrid(), xms::TEST_XmUBuildHexahedronUgrid(), xms::TEST_XmUBuildPolyhedronUgrid(), xms::TEST_XmUBuildQuadUGrid(), xms::TEST_XmUGrid1Left90Tri(), xms::TEST_XmUGrid2dLinear(), xms::TEST_XmUGrid3dLinear(), xms::TEST_XmUGridHexagonalPolyhedron(), xms::TEST_XmUGridSimpleQuad(), XmUGridUnitTests::testGetCell3dFaceOrientationConcaveCell(), XmUGridUnitTests::testGetCellCellstream(), XmUGridUnitTests::testGetCellDimension(), XmUGridUnitTests::testGetCellPlanViewPolygonMultiSideFace(), XmUGridUnitTests::testGetPointAdjacentCellsSimple(), XmUGridUnitTests::testGetSetPoint(), XmUGridUnitTests::testLargeUGridLinkSpeed(), XmUGridUnitTests::testUGridStreams(), XmUGridUtilsTests::testWriteEmptyUGrid(), and xms::XmReadUGridFromStream().
Assignment operator.
a_xmUGrid | The XmUGrid to copy from. |
Definition at line 2928 of file XmUGrid.cpp.
References Swap().
bool xms::XmUGrid::SetCellstream | ( | const VecInt & | a_cellstream | ) |
Set the ugrid cells for the entire UGrid using a cell stream.
[in] | a_cellstream | The cellstream for the UGrid. |
Definition at line 3357 of file XmUGrid.cpp.
References m_impl.
void xms::XmUGrid::SetLocations | ( | const VecPt3d & | a_locations | ) |
Set UGrid points.
[in] | a_locations | vector of point locations |
Definition at line 3110 of file XmUGrid.cpp.
References m_impl.
bool xms::XmUGrid::SetPointLocation | ( | int | a_pointIdx, |
const Pt3d & | a_location | ||
) |
Set the point.
[in] | a_pointIdx | the index of the point |
[in] | a_location | The new location of the specified point |
Definition at line 3131 of file XmUGrid.cpp.
References m_impl.
void xms::XmUGrid::SetUseCache | ( | bool | a_useCache | ) |
Turn on or off use of caching to speed up some operations.
a_useCache | Flag to determine if caching will be used. |
Definition at line 3081 of file XmUGrid.cpp.
References m_impl.
void xms::XmUGrid::Swap | ( | XmUGrid & | a_xmUGrid | ) |
Swap data between two XmUGrids.
a_xmUGrid | The other XmUGrid. |
Definition at line 2937 of file XmUGrid.cpp.
References m_impl.
Referenced by operator=(), and XmUGrid().