xmsgrid  1.0
xms::XmUGrid::Impl Class Reference

Implementation for XmUGrid. More...

Public Member Functions

 Impl ()=default
 Default constructor.
 
 Impl (const Impl &)=default
 Default copy constructor.
 
Imploperator= (const Impl &a_xmUGrid)=default
 Default ssignment operator. 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. More...
 
int GetPointCount () const
 Get the number of points. More...
 
const VecPt3dGetLocations () 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 int *a_pointIdxs, int a_numpointIdxs, VecInt &a_commonCellIdxs) const
 Gets the common cells from a vector of points. More...
 
void GetPointsAdjacentCells (const VecInt &a_pointIdxs, VecInt &a_commonCellIdxs) 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 cell type of a specified cell. More...
 
std::vector< int > GetDimensionCounts () const
 Count all number of the cells with each dimension (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 VecIntGetCellstream () const
 Get cell stream vector for the entire UGrid. 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< XmEdgeGetCellEdges (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...
 
XmUGridFaceOrientation FaceOrientation (int a_cellIdx, int a_faceIdx) const
 Find the orientation of a given 3D cell face. More...
 
XmUGridFaceOrientation VerticalOrientationFromOpposing (int a_cellIdx, int a_faceIdx) const
 Find vertical orientation of a given 3D cell face from opposing face. More...
 
bool IsSideFace (int a_cellIdx, int a_faceIdx) const
 Determines if a cell face is a vertical side face. More...
 
XmUGridFaceOrientation ConnectedTopOrBottom (int a_cellIdx, int a_faceIdx) const
 Determine face orientation by using cell index of connected face. Top face is connected to lower index, bottom face to higher index. More...
 
XmUGridFaceOrientation GetOrientationFromArea (int a_cellIdx, int a_faceIdx) const
 Determine top or bottom face orientation using area. Since faces are ordered CCW looking in, the top face area is positive and the bottom negative. More...
 

Private Types

enum  XmUGridCacheHolder { NEEDS_CALCULATION = -2 }
 Constant for when a cached integer item needs to be calculated. More...
 

Private Member Functions

void UpdateLinks ()
 Update internal links to navigate between associated points and cells.
 
void UpdateCellLinks ()
 Update internal link from cells to cell stream index.
 
void UpdatePointLinks ()
 Update internal links from points to associated cells.
 
void SetModified ()
 Sets the modified flag to true.
 
bool IsCellValidWithPointChange (int a_cellIdx, int a_changedPtIdx, const Pt3d &a_newPosition) const
 Determine whether a cell is valid after a point is moved. More...
 
bool IsValidCellIdx (int a_cellIdx) const
 Determine if a cell index is valid. More...
 
int GetNumberOfItemsForCell (int a_cellIdx) const
 Get number of items given cell. For polyhedron number of items is number of faces. For other cell types it is number of points. More...
 
void GetCellCellstream (int a_cellIdx, const int **a_start, int &a_length) const
 Internal function to get start of cell stream for an individual cell. Returns nullptr and zero length for invalid cell index. More...
 
int GetNumberOfPolyhedronEdges (int a_cellIdx) const
 Get the number of edges for a polyhedron cell. More...
 
bool GetPlanViewPolygon2d (int a_cellIdx, VecPt3d &a_polygon) const
 Get a plan view polygon of a specified 2D cell. More...
 
bool GetPlanViewPolygon3d (int a_cellIdx, VecPt3d &a_polygon) const
 Get a plan view polygon of a specified 3D cell. More...
 
bool IsFaceSide (const VecInt &a_facePts) const
 Get whether the cell face is of a side orientation. Only works for plan view prismatic cells. More...
 
bool GetCellXySegments (int cellIdx, VecPt3d &a_segments) const
 Get the XY segments of a cell. More...
 
void GetEdgesOfFace (const VecInt &a_face, std::vector< XmEdge > &a_edges) const
 Get the edges of a cell given a face. More...
 
bool DoEdgesCrossWithPointChange (int a_changedPtIdx, const Pt3d &a_newPosition, const std::vector< XmEdge > &a_edges) const
 Gets whether or not edges cross with a point change. More...
 
void GetExtentsFromPoints (const VecPt3d &a_locations, Pt3d &a_min, Pt3d &a_max) const
 Function to get the extents from a list of points. Will be removed after geometry library is built. More...
 
bool GetFaceXySegments (int a_cellIdx, int a_faceIdx, VecPt3d &a_segments) const
 Get the Xy locations of Face Points. More...
 
void CalculateCacheValues () const
 Calculate cached values for faster lookup.
 
void ClearCacheValues ()
 Clear cached so they will be recalculated.
 
int GetCell3dFaceCountNoCache (int a_cellIdx) const
 Get the number of cell faces for given cell. More...
 
int GetCell3dFaceAdjacentCellNoCache (int a_cellIdx, int a_faceIdx) const
 Get the cell face neighbors for given cell and face index. More...
 
XmUGridFaceOrientation GetCell3dFaceOrientationNoCache (int a_cellIdx, int a_faceIdx) const
 Get the orientation of the face of a vertically prismatic cell. More...
 
bool GetNextFaceColumn (const VecInt &a_facePoints, int a_starti, int &a_columnBegin, int &a_columnEnd) const
 Get next vertical column of points with equal x/y values for side face. More...
 
void GetFacePointSegments (const VecInt &a_facePts, int a_columnBegin, int a_columnEnd, VecPt3d &a_segments) const
 Get plan view segments of face points. More...
 
XmUGridFaceOrientation FaceOrientationWithFail (int a_cellIdx, int a_faceIdx) const
 Find the orientation of a given 3D cell face. Check first for side face, then top or bottom based on connected face, or top or bottom based on area calculation. More...
 

Static Private Member Functions

static int DimensionFromCellType (XmUGridCellType a_cellType)
 Get the dimension given the cell type (0d, 1d, 2d, or 3d). More...
 
static void GetUniquePointsFromPolyhedronCellstream (const VecInt &a_cellstream, int a_numCellItems, int &a_currIdx, VecInt &a_uniqueGetCellPoints, VecInt &a_pointLastUsedIdx)
 Get the unique points in a flat set. More...
 
static bool GetUniquePointsFromPolyhedronSingleCellstream (const VecInt &a_cellstream, VecInt &a_cellPoints)
 Get the unique points for cell stream of a single polyhedron cell. More...
 
static void GetUniqueEdgesFromPolyhedronCellstream (const int *a_start, int &a_length, boost::container::flat_set< XmEdge > &a_cellEdges, int &a_currIdx)
 Get the unique edges in a flat set for a given polyhedron. More...
 

Private Attributes

VecPt3d m_locations
 UGrid point locations.
 
VecInt m_cellstream
 UGrid cell stream. More...
 
VecInt m_cellIdxToStreamIdx
 Indexes for each cell in the cell stream.
 
VecInt m_pointsToCells
 
VecInt m_pointIdxToPointsToCells
 
bool m_modified = false
 Has UGrid been modified since last SetUnmodified call?
 
bool m_useCache = true
 Are we using caching for some calls?
 
VecInt m_numberOfFaces
 Cache for number of cell faces.
 
VecInt m_cellFaceOffset
 Cache for offset to m_faceOrientation and m_faceNeighbor.
 
VecInt m_faceOrientation
 For vertically prismatic cell is face top, side, bottom.
 
VecInt m_faceNeighbor
 Cache for Face neighbor.
 
VecInt m_cellDimensionCounts
 Cache for cell dimension counts.
 

Detailed Description

Implementation for XmUGrid.

Implementation for XmUGrid which provides geometry for an unstructured grid.

Definition at line 50 of file XmUGrid.cpp.

Member Enumeration Documentation

◆ XmUGridCacheHolder

Constant for when a cached integer item needs to be calculated.

Enumerator
NEEDS_CALCULATION 

Cached value needs to be calculated.

Definition at line 213 of file XmUGrid.cpp.

Member Function Documentation

◆ ConnectedTopOrBottom()

XmUGridFaceOrientation xms::XmUGrid::Impl::ConnectedTopOrBottom ( int  a_cellIdx,
int  a_faceIdx 
) const

Determine face orientation by using cell index of connected face. Top face is connected to lower index, bottom face to higher index.

Parameters
[in]a_cellIdxThe cell index.
[in]a_faceIdxThe face index.
Returns
The orientation of the face (TOP, BOTTOM, UNKNOWN).

Definition at line 2773 of file XmUGrid.cpp.

References xms::XmUGrid::GetCell3dFaceAdjacentCell(), and XM_NONE.

◆ DimensionFromCellType()

int xms::XmUGrid::Impl::DimensionFromCellType ( XmUGridCellType  a_cellType)
staticprivate

Get the dimension given the cell type (0d, 1d, 2d, or 3d).

Parameters
[in]a_cellTypethe cell type
Returns
the dimension of the cell type

Definition at line 2067 of file XmUGrid.cpp.

◆ DoEdgesCrossWithPointChange()

bool xms::XmUGrid::Impl::DoEdgesCrossWithPointChange ( int  a_changedPtIdx,
const Pt3d a_newPosition,
const std::vector< XmEdge > &  a_edges 
) const
private

Gets whether or not edges cross with a point change.

Parameters
[out]a_edgesThe edges to check
[in]a_changedPtIdxindex of the point to be changed
[in]a_newPositionlocation the point is to be moved to
Returns
whether the edges cross

Definition at line 1281 of file XmUGrid.cpp.

References xms::XmUGrid::GetPointLocation(), and xms::gmLinesCross().

◆ FaceOrientation()

XmUGridFaceOrientation xms::XmUGrid::Impl::FaceOrientation ( int  a_cellIdx,
int  a_faceIdx 
) const

Find the orientation of a given 3D cell face.

Parameters
[in]a_cellIdxThe cell index.
[in]a_faceIdxThe face index.
Returns
The orientation of the face (TOP, BOTTOM, SIDE, UNKNOWN).

Definition at line 1872 of file XmUGrid.cpp.

References XM_ASSERT.

◆ FaceOrientationWithFail()

XmUGridFaceOrientation xms::XmUGrid::Impl::FaceOrientationWithFail ( int  a_cellIdx,
int  a_faceIdx 
) const
private

Find the orientation of a given 3D cell face. Check first for side face, then top or bottom based on connected face, or top or bottom based on area calculation.

Parameters
[in]a_cellIdxThe cell index.
[in]a_faceIdxThe face index.
Returns
The orientation of the face (TOP, BOTTOM, SIDE, UNKNOWN).

Definition at line 2678 of file XmUGrid.cpp.

◆ GetCell2dEdgeAdjacentCell()

int xms::XmUGrid::Impl::GetCell2dEdgeAdjacentCell ( int  a_cellIdx,
int  a_edgeIdx 
) const

Get the index of the adjacent cells (that shares the same cell edge)

Parameters
[in]a_cellIdxthe index of the cell
[in]a_edgeIdxthe index of the edge
Returns
index of the adjacent cell (or -1 if none).

Definition at line 1472 of file XmUGrid.cpp.

References xms::XmUGrid::GetCellDimension(), xms::XmUGrid::GetCellEdge(), xms::XmUGrid::GetCellEdgeCount(), xms::XmEdge::GetFirst(), xms::XmUGrid::GetPointAdjacentCellCount(), and xms::XmEdge::IsEquivalent().

◆ GetCell3dFaceAdjacentCell() [1/2]

int xms::XmUGrid::Impl::GetCell3dFaceAdjacentCell ( int  a_cellIdx,
int  a_faceIdx 
) const

Get the cell face neighbors for given cell and face index.

Parameters
[in]a_cellIdxthe index of the cell
[in]a_faceIdxthe face index of the cell
Returns
a cell index of the neighbor

Definition at line 1744 of file XmUGrid.cpp.

References xms::XmUGrid::GetCell3dFaceCount().

◆ GetCell3dFaceAdjacentCell() [2/2]

bool xms::XmUGrid::Impl::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.

Parameters
[in]a_cellIdxthe index of the cell
[in]a_faceIdxthe face index of the cell
[in]a_neighborCellthe index of the neighboring cell
[in]a_neighborFacethe face index of the neighboring cell adjacent to the given face
Returns
a cell index of the neighbor

Definition at line 1785 of file XmUGrid.cpp.

References xms::XmUGrid::GetCell3dFaceAdjacentCell(), xms::XmUGrid::GetCell3dFaceCount(), and xms::XmUGrid::GetCell3dFacePoints().

◆ GetCell3dFaceAdjacentCellNoCache()

int xms::XmUGrid::Impl::GetCell3dFaceAdjacentCellNoCache ( int  a_cellIdx,
int  a_faceIdx 
) const
private

Get the cell face neighbors for given cell and face index.

Parameters
[in]a_cellIdxthe index of the cell
[in]a_faceIdxthe face index of the cell
Returns
a cell index of the neighbor

Definition at line 2546 of file XmUGrid.cpp.

References xms::XmUGrid::GetCell3dFacePoints(), and xms::XmUGrid::GetPointsAdjacentCells().

◆ GetCell3dFaceCount()

int xms::XmUGrid::Impl::GetCell3dFaceCount ( int  a_cellIdx) const

Get the number of cell faces for given cell.

Parameters
[in]a_cellIdxthe index of the cell
Returns
the count of cell faces

Definition at line 1596 of file XmUGrid.cpp.

◆ GetCell3dFaceCountNoCache()

int xms::XmUGrid::Impl::GetCell3dFaceCountNoCache ( int  a_cellIdx) const
private

Get the number of cell faces for given cell.

Parameters
[in]a_cellIdxthe index of the cell
Returns
the count of cell faces

Definition at line 2518 of file XmUGrid.cpp.

References xms::XmUGrid::GetCellType().

◆ GetCell3dFaceOrientation()

XmUGridFaceOrientation xms::XmUGrid::Impl::GetCell3dFaceOrientation ( int  a_cellIdx,
int  a_faceIdx 
) const

Get the orientation of the face of a vertically prismatic cell.

Parameters
[in]a_cellIdxthe index of the cell
[in]a_faceIdxthe face index of the cell
Returns
The orientation of the face (TOP, BOTTOM, SIDE, UNKNOWN).

Definition at line 1834 of file XmUGrid.cpp.

References xms::XmUGrid::GetCell3dFaceCount().

◆ GetCell3dFaceOrientationNoCache()

XmUGridFaceOrientation xms::XmUGrid::Impl::GetCell3dFaceOrientationNoCache ( int  a_cellIdx,
int  a_faceIdx 
) const
private

Get the orientation of the face of a vertically prismatic cell.

Parameters
[in]a_cellIdxthe index of the cell
[in]a_faceIdxthe face index of the cell
Returns
The orientation of the face (TOP, BOTTOM, SIDE, UNKNOWN).

Definition at line 2573 of file XmUGrid.cpp.

◆ GetCell3dFacePointCount()

int xms::XmUGrid::Impl::GetCell3dFacePointCount ( int  a_cellIdx,
int  a_faceIdx 
) const

Get the number of face points for a given cell and face.

Parameters
[in]a_cellIdxThe cell
[in]a_faceIdxThe face
Returns
The number of face points or -1 if invalid face or cell index.

Definition at line 1616 of file XmUGrid.cpp.

References xms::XmUGrid::GetCellCellstream(), and xms::XmUGrid::GetCellType().

◆ GetCell3dFacePoints() [1/2]

VecInt xms::XmUGrid::Impl::GetCell3dFacePoints ( int  a_cellIdx,
int  a_faceIdx 
) const

Get the cell face for given cell and face index.

Parameters
[in]a_cellIdxthe index of the cell
[in]a_faceIdxthe face index of the cell
Returns
a vector of point indices for the face index of the cell

Definition at line 1663 of file XmUGrid.cpp.

References xms::XmUGrid::GetCell3dFacePoints().

◆ GetCell3dFacePoints() [2/2]

void xms::XmUGrid::Impl::GetCell3dFacePoints ( int  a_cellIdx,
int  a_faceIdx,
VecInt a_facePtIdxs 
) const

Get the cell face for given cell and face index.

Parameters
[in]a_cellIdxthe index of the cell
[in]a_faceIdxthe face index of the cell
[out]a_facePtIdxsa vector of point indices for the face

Definition at line 1675 of file XmUGrid.cpp.

References xms::XmUGrid::GetCellCellstream().

◆ GetCell3dFacesPoints()

VecInt2d xms::XmUGrid::Impl::GetCell3dFacesPoints ( int  a_cellIdx) const

Get the faces of a cell.

Parameters
[in]a_cellIdxthe cells to whom the faces belong
Returns
a vector of faces, which is a vector of point indices

Definition at line 1727 of file XmUGrid.cpp.

References xms::XmUGrid::GetCell3dFaceCount(), and xms::XmUGrid::GetCell3dFacePoints().

◆ GetCellAdjacentCells() [1/2]

VecInt xms::XmUGrid::Impl::GetCellAdjacentCells ( int  a_cellIdx) const

Get the cells neighboring a cell (cells associated with any of it's points)

Parameters
[in]a_cellIdxthe index of the cell
Returns
vector of cell indices

Definition at line 1091 of file XmUGrid.cpp.

References xms::XmUGrid::GetCellAdjacentCells().

◆ GetCellAdjacentCells() [2/2]

void xms::XmUGrid::Impl::GetCellAdjacentCells ( int  a_cellIdx,
VecInt a_cellNeighbors 
) const

Get the cells neighboring a cell (cells associated with any of it's points)

Parameters
[in]a_cellIdxthe index of the cell
[out]a_cellNeighborsvector of cell indices

Definition at line 1102 of file XmUGrid.cpp.

References xms::XmUGrid::GetCellPoints(), and xms::XmUGrid::GetPointAdjacentCells().

◆ GetCellCellstream() [1/2]

bool xms::XmUGrid::Impl::GetCellCellstream ( int  a_cellIdx,
VecInt a_cellstream 
) const

Get cell stream vector for a single cell.

Parameters
[in]a_cellIdxthe index of the cell
[in]a_cellstreamThe cellstream of the cell
See also
SetCellstream for more detail on cell stream definitions.
Returns
whether it was successfull or not

Definition at line 1073 of file XmUGrid.cpp.

◆ GetCellCellstream() [2/2]

void xms::XmUGrid::Impl::GetCellCellstream ( int  a_cellIdx,
const int **  a_start,
int &  a_length 
) const
private

Internal function to get start of cell stream for an individual cell. Returns nullptr and zero length for invalid cell index.

Parameters
[in]a_cellIdxthe index of the cell
[out]a_startpointer to the start of the stream for the cell
[out]a_lengththe length of the stream for the cell

Definition at line 2193 of file XmUGrid.cpp.

References xms::XmUGrid::GetCellType().

◆ GetCellCentroid()

bool xms::XmUGrid::Impl::GetCellCentroid ( int  a_cellIdx,
Pt3d a_centroid 
) const

Get the centroid location of a cell.

Parameters
[in]a_cellIdxThe index of the cell.
[out]a_centroidThe location of the cell centroid.
Returns
False if the cell index does not exist.

Definition at line 1157 of file XmUGrid.cpp.

References xms::XmUGrid::GetCellLocations(), xms::XmUGrid::GetCellPlanViewPolygon(), and xms::gmComputePolygonCentroid().

◆ GetCellCount()

int xms::XmUGrid::Impl::GetCellCount ( ) const

Get the number of cells.

Returns
the number of cells

Definition at line 852 of file XmUGrid.cpp.

◆ GetCellDimension()

int xms::XmUGrid::Impl::GetCellDimension ( int  a_cellIdx) const

Get the dimension of the specified cell.

Parameters
[in]a_cellIdxthe index of the cell
Returns
the dimension of the cells or -1 if invalid index or invalid dimension

Definition at line 1012 of file XmUGrid.cpp.

References xms::XmUGrid::GetCellType().

◆ GetCellEdge()

XmEdge xms::XmUGrid::Impl::GetCellEdge ( int  a_cellIdx,
int  a_edgeIdx 
) const

Get the points of a cell.

Parameters
[in]a_cellIdxthe index of the cell
[in]a_edgeIdxthe index of the edge
Returns
a standard pair of point indices (which is an edge)

Definition at line 1360 of file XmUGrid.cpp.

References xms::XmUGrid::GetCellCellstream(), xms::XmEdge::GetFirst(), and xms::XmEdge::GetSecond().

◆ GetCellEdgeAdjacentCells() [1/2]

VecInt xms::XmUGrid::Impl::GetCellEdgeAdjacentCells ( int  a_cellIdx,
int  a_edgeIdx 
) const

Get the index of the adjacent cells (that shares the same cell edge)

Parameters
[in]a_cellIdxthe index of the cell
[in]a_edgeIdxthe index of the edge
Returns
a vector of cell indices of the adjacent cells

Definition at line 1423 of file XmUGrid.cpp.

References xms::XmUGrid::GetCellEdgeAdjacentCells().

◆ GetCellEdgeAdjacentCells() [2/2]

void xms::XmUGrid::Impl::GetCellEdgeAdjacentCells ( int  a_cellIdx,
int  a_edgeIdx,
VecInt a_adjacentCellIdxs 
) const

Get the index of the adjacent cells (that shares the same cell edge)

Parameters
[in]a_cellIdxthe index of the cell
[in]a_edgeIdxthe index of the edge
[out]a_adjacentCellIdxsa vector of cell indices of the adjacent cells

Definition at line 1436 of file XmUGrid.cpp.

References xms::XmUGrid::GetCellAdjacentCells(), xms::XmUGrid::GetCellEdge(), xms::XmUGrid::GetCellEdgeCount(), and xms::XmEdge::IsEquivalent().

◆ GetCellEdgeCount()

int xms::XmUGrid::Impl::GetCellEdgeCount ( int  a_cellIdx) const

Get the number of edges for a cell.

Parameters
[in]a_cellIdxthe index of the cell
Returns
the count of cell edges

Definition at line 1320 of file XmUGrid.cpp.

References xms::XmUGrid::GetCellType(), and XM_ASSERT.

◆ GetCellEdges() [1/2]

std::vector< XmEdge > xms::XmUGrid::Impl::GetCellEdges ( int  a_cellIdx) const

Get the Edges of a cell.

Parameters
[in]a_cellIdxthe cells to whom the edges belong
Returns
a vector of edges

Definition at line 1524 of file XmUGrid.cpp.

References xms::XmUGrid::GetCellEdges().

◆ GetCellEdges() [2/2]

void xms::XmUGrid::Impl::GetCellEdges ( int  a_cellIdx,
std::vector< XmEdge > &  a_edges 
) const

Get the Edges of a cell.

Parameters
[in]a_cellIdxthe cells to whom the edges belong
[out]a_edgesa vector of edges (organized in std::pairs)

Definition at line 1535 of file XmUGrid.cpp.

References xms::XmUGrid::GetCellEdge(), and xms::XmUGrid::GetCellEdgeCount().

◆ GetCellExtents()

void xms::XmUGrid::Impl::GetCellExtents ( int  a_cellIdx,
Pt3d a_min,
Pt3d a_max 
) const

Get the extents of the given cell.

Parameters
[in]a_cellIdxThe cell index to get the extents of.
[out]a_minThe minimum location.
[out]a_maxThe maximum location.

Definition at line 1023 of file XmUGrid.cpp.

References xms::XmUGrid::GetCellLocations().

◆ GetCellLocations()

void xms::XmUGrid::Impl::GetCellLocations ( int  a_cellIdx,
VecPt3d a_cellLocations 
) const

Get locations of cell points.

Parameters
[in]a_cellIdxthe index of the cell
[out]a_cellLocationsThe locations of the cell points

Definition at line 948 of file XmUGrid.cpp.

References xms::XmUGrid::GetCellPoints(), and xms::XmUGrid::GetPointsLocations().

◆ GetCellPlanViewPolygon()

bool xms::XmUGrid::Impl::GetCellPlanViewPolygon ( int  a_cellIdx,
VecPt3d a_polygon 
) const

Get a plan view polygon of a specified cell.

Parameters
[in]a_cellIdxThe index of the cell.
[out]a_polygonVector of Pt3d that is the plan view polygon.
Returns
False if the cell index does not exist or if the cell is not 2 or 3 dimensional.

Definition at line 1137 of file XmUGrid.cpp.

References xms::XmUGrid::GetCellDimension().

◆ GetCellPointCount()

int xms::XmUGrid::Impl::GetCellPointCount ( int  a_cellIdx) const

Get the number of cell points (including polyhedron).

Parameters
[in]a_cellIdxthe index of the cell
Returns
a vector of point indices

Definition at line 864 of file XmUGrid.cpp.

References xms::XmUGrid::GetCellCellstream(), and xms::XmUGrid::GetCellType().

◆ GetCellPoints() [1/2]

VecInt xms::XmUGrid::Impl::GetCellPoints ( int  a_cellIdx) const

Get the points of a cell (including polyhedron)

Parameters
[in]a_cellIdxthe index of the cell
Returns
a vector of point indices

Definition at line 901 of file XmUGrid.cpp.

References xms::XmUGrid::GetCellPoints().

◆ GetCellPoints() [2/2]

bool xms::XmUGrid::Impl::GetCellPoints ( int  a_cellIdx,
VecInt a_cellPoints 
) const

Get the points of a cell.

Parameters
[in]a_cellIdxthe index of the cell
[out]a_cellPointsthe points of the cell
Returns
if the cell index is valid

Definition at line 913 of file XmUGrid.cpp.

References xms::XmUGrid::GetCellCellstream(), and XM_ENSURE_TRUE_NO_ASSERT.

◆ GetCellstream()

const VecInt & xms::XmUGrid::Impl::GetCellstream ( ) const

Get cell stream vector for the entire UGrid.

Returns
constant reference to the cell stream vector

Definition at line 1034 of file XmUGrid.cpp.

◆ GetCellType()

XmUGridCellType xms::XmUGrid::Impl::GetCellType ( int  a_cellIdx) const

Get the cell type of a specified cell.

Parameters
[in]a_cellIdxthe index of the cell
Returns
The type of the specified cell or -1 if invalid.

Definition at line 959 of file XmUGrid.cpp.

◆ GetCellXySegments()

bool xms::XmUGrid::Impl::GetCellXySegments ( int  a_cellIdx,
VecPt3d a_segments 
) const
private

Get the XY segments of a cell.

Parameters
[in]a_cellIdxthe index of the cell
[out]a_segmentsThe XY segments of a cell
Returns
whether the collected segments form a valid polygon

Definition at line 2418 of file XmUGrid.cpp.

References xms::XmUGrid::GetCell3dFaceCount(), and xms::XmUGrid::GetCell3dFacePoints().

◆ GetDimensionCounts()

std::vector< int > xms::XmUGrid::Impl::GetDimensionCounts ( ) const

Count all number of the cells with each dimension (0, 1, 2, 3)

Returns
the count of dimensions of all of the cells of the ugrid

Definition at line 983 of file XmUGrid.cpp.

References xms::XmUGrid::GetCellCount(), and xms::XmUGrid::GetCellDimension().

◆ GetEdgeAdjacentCells() [1/2]

void xms::XmUGrid::Impl::GetEdgeAdjacentCells ( const XmEdge a_edge,
VecInt a_adjacentCellIdxs 
) const

Get the indices of the adjacent cells (that shares the same cell edge)

Parameters
[in]a_edgethe edge (a pair of point indices)
[out]a_adjacentCellIdxsa vector of cell indices of the adjacent cells

Definition at line 1503 of file XmUGrid.cpp.

References xms::XmEdge::GetFirst(), xms::XmUGrid::GetPointsAdjacentCells(), and xms::XmEdge::GetSecond().

◆ GetEdgeAdjacentCells() [2/2]

VecInt xms::XmUGrid::Impl::GetEdgeAdjacentCells ( const XmEdge a_edge) const

Get the index of the adjacent cells (that shares the same cell edge)

Parameters
[in]a_edgethe edge (a pair of point indices)
Returns
a vector of cell indices of the adjacent cells

Definition at line 1513 of file XmUGrid.cpp.

References xms::XmUGrid::GetEdgeAdjacentCells().

◆ GetEdgesOfFace()

void xms::XmUGrid::Impl::GetEdgesOfFace ( const VecInt a_face,
std::vector< XmEdge > &  a_edges 
) const
private

Get the edges of a cell given a face.

Parameters
[in]a_facea vector of point indices of a face
[out]a_edgesa vector of point indices of an edge

Definition at line 1263 of file XmUGrid.cpp.

◆ GetExtents()

void xms::XmUGrid::Impl::GetExtents ( Pt3d a_min,
Pt3d a_max 
) const

Get extents of all points in UGrid.

Parameters
[out]a_minminimum extent of all points
[out]a_maxmaximum extent of all points

Definition at line 727 of file XmUGrid.cpp.

◆ GetExtentsFromPoints()

void xms::XmUGrid::Impl::GetExtentsFromPoints ( const VecPt3d a_locations,
Pt3d a_min,
Pt3d a_max 
) const
private

Function to get the extents from a list of points. Will be removed after geometry library is built.

Parameters
[in]a_locationsThe point locations to get the extents of.
[out]a_minMinimum point location.
[out]a_maxMaximum point location.

Definition at line 2443 of file XmUGrid.cpp.

References xms::gmAddToExtents(), xms::Pt3< T >::x, xms::Pt3< T >::y, and xms::Pt3< T >::z.

◆ GetFacePointSegments()

void xms::XmUGrid::Impl::GetFacePointSegments ( const VecInt a_facePts,
int  a_columnBegin,
int  a_columnEnd,
VecPt3d a_segments 
) const
private

Get plan view segments of face points.

Parameters
[in]a_facePtsThe face point indices.
[in]a_columnBeginThe the first point of a vertical column.
[in]a_columnEndThe last point of a vertical column.
[out]a_segmentsThe face point segments.

Definition at line 2654 of file XmUGrid.cpp.

References xms::XmUGrid::GetPointXy0().

◆ GetFaceXySegments()

bool xms::XmUGrid::Impl::GetFaceXySegments ( int  a_cellIdx,
int  a_faceIdx,
VecPt3d a_segments 
) const
private

Get the Xy locations of Face Points.

Parameters
[in]a_cellIdxThe index of the cells whose face points are wanted.
[in]a_faceIdxThe index of the face whose points are wanted.
[out]a_segmentsThe points of the face segments
Returns
true if successful.

Definition at line 2460 of file XmUGrid.cpp.

References xms::XmUGrid::GetCell3dFacePoints().

◆ GetLocations()

const VecPt3d & xms::XmUGrid::Impl::GetLocations ( ) const

Get vector of UGrid points.

Returns
constant reference to vector of points

Definition at line 654 of file XmUGrid.cpp.

◆ GetModified()

bool xms::XmUGrid::Impl::GetModified ( ) const

Returns the modified flag. Gets set when points or cells get changed.

Returns
the modified flag

Definition at line 614 of file XmUGrid.cpp.

References m_modified.

◆ GetNextFaceColumn()

bool xms::XmUGrid::Impl::GetNextFaceColumn ( const VecInt a_facePoints,
int  a_starti,
int &  a_columnBegin,
int &  a_columnEnd 
) const
private

Get next vertical column of points with equal x/y values for side face.

Parameters
[in]a_facePointsThe face point indices.
[in]a_startiThe starting index into a_facePoints.
[out]a_columnBeginThe first index of the column of points.
[out]a_columnEndThe last index of the column of points.
Returns
True if succeeded in getting next face column.

Definition at line 2588 of file XmUGrid.cpp.

References xms::XmUGrid::GetPointXy0().

◆ GetNumberOfItemsForCell()

int xms::XmUGrid::Impl::GetNumberOfItemsForCell ( int  a_cellIdx) const
private

Get number of items given cell. For polyhedron number of items is number of faces. For other cell types it is number of points.

Parameters
[in]a_cellIdxthe index of the cell
Returns
the number of faces for polyhedron or number of points.

Definition at line 2167 of file XmUGrid.cpp.

References xms::XmUGrid::GetCellType().

◆ GetNumberOfPolyhedronEdges()

int xms::XmUGrid::Impl::GetNumberOfPolyhedronEdges ( int  a_cellIdx) const
private

Get the number of edges for a polyhedron cell.

Parameters
[in]a_cellIdxthe index of the cell
Returns
the number of edges

Definition at line 2214 of file XmUGrid.cpp.

References xms::XmUGrid::GetCellCellstream().

◆ GetOrientationFromArea()

XmUGridFaceOrientation xms::XmUGrid::Impl::GetOrientationFromArea ( int  a_cellIdx,
int  a_faceIdx 
) const

Determine top or bottom face orientation using area. Since faces are ordered CCW looking in, the top face area is positive and the bottom negative.

Parameters
[in]a_cellIdxThe cell index.
[in]a_faceIdxThe face index.
Returns
The orientation of the face (TOP, BOTTOM, UNKNOWN).

Definition at line 2790 of file XmUGrid.cpp.

References xms::XmUGrid::GetCell3dFacePoints(), xms::XmUGrid::GetPointXy0(), and xms::gmPolygonArea().

◆ GetPlanViewPolygon2d()

bool xms::XmUGrid::Impl::GetPlanViewPolygon2d ( int  a_cellIdx,
VecPt3d a_polygon 
) const
private

Get a plan view polygon of a specified 2D cell.

Parameters
[in]a_cellIdxthe index of the cell
[out]a_polygonvector of Pt3d that is the plan view polygon
Returns
whether the operation was successful

Definition at line 2349 of file XmUGrid.cpp.

References xms::XmUGrid::GetCellLocations().

◆ GetPlanViewPolygon3d()

bool xms::XmUGrid::Impl::GetPlanViewPolygon3d ( int  a_cellIdx,
VecPt3d a_polygon 
) const
private

Get a plan view polygon of a specified 3D cell.

Parameters
[in]a_cellIdxthe index of the cell
[out]a_polygonvector of Pt3d that is the plan view polygon
Returns
whether the operation was successful

Definition at line 2364 of file XmUGrid.cpp.

References xms::XmUGrid::GetCellPoints(), xms::XmUGrid::GetPointLocation(), and xms::gmGetConvexHull().

◆ GetPointAdjacentCellCount()

int xms::XmUGrid::Impl::GetPointAdjacentCellCount ( int  a_pointIdx) const

Get the number of cells that use a point.

Parameters
a_pointIdxThe point to check.
Returns
The number of cells that use the point.

Definition at line 737 of file XmUGrid.cpp.

◆ GetPointAdjacentCells() [1/2]

VecInt xms::XmUGrid::Impl::GetPointAdjacentCells ( int  a_pointIdx) const

Get the cells that are associated with the specified point.

Parameters
[in]a_pointIdxthe index of the point
Returns
a vector of the cell indices associated with this point

Definition at line 750 of file XmUGrid.cpp.

References xms::XmUGrid::GetPointAdjacentCells().

◆ GetPointAdjacentCells() [2/2]

void xms::XmUGrid::Impl::GetPointAdjacentCells ( int  a_pointIdx,
VecInt a_adjacentCells 
) const

Get the cells that are associated with the specified point.

Parameters
[in]a_pointIdxthe index of the point
[out]a_adjacentCellsa vector of the adjacent cell indices
Returns
a vector of the cell indices associated with this point

Definition at line 762 of file XmUGrid.cpp.

References xms::XmUGrid::GetPointAdjacentCellCount().

◆ GetPointAdjacentLocations()

void xms::XmUGrid::Impl::GetPointAdjacentLocations ( int  a_pointIdx,
VecPt3d a_edgePoints 
) const

Given a point gets point locations attached to the point by an edge.

Parameters
[in]a_pointIdxThe point to get attached point from.
[out]a_edgePointsA vector of points attached across edges.

Definition at line 1583 of file XmUGrid.cpp.

References xms::XmUGrid::GetPointAdjacentPoints(), and xms::XmUGrid::GetPointsLocations().

◆ GetPointAdjacentPoints()

void xms::XmUGrid::Impl::GetPointAdjacentPoints ( int  a_pointIdx,
VecInt a_edgePoints 
) const

Given a point gets point indices attached to the point by an edge.

Parameters
[in]a_pointIdxThe point to get adjacent points from.
[out]a_edgePointsThe indices of the adjacent points.

Definition at line 1550 of file XmUGrid.cpp.

References xms::XmUGrid::GetCellEdge(), xms::XmUGrid::GetCellEdgeCount(), xms::XmEdge::GetFirst(), xms::XmUGrid::GetPointAdjacentCells(), and xms::XmEdge::GetSecond().

◆ GetPointCount()

int xms::XmUGrid::Impl::GetPointCount ( ) const

Get the number of points.

Returns
the number of points

Definition at line 646 of file XmUGrid.cpp.

◆ GetPointLocation()

Pt3d xms::XmUGrid::Impl::GetPointLocation ( int  a_pointIdx) const

Get the point.

Parameters
[in]a_pointIdxthe index of the point
Returns
the point or an initialize point if the index is invalid

Definition at line 672 of file XmUGrid.cpp.

◆ GetPointsAdjacentCells() [1/4]

VecInt xms::XmUGrid::Impl::GetPointsAdjacentCells ( const VecInt a_points) const

Gets the common cells from a vector of points.

Parameters
[in]a_pointsa vector of unique points
Returns
a vector of cell indices

Definition at line 776 of file XmUGrid.cpp.

References xms::XmUGrid::GetPointsAdjacentCells().

◆ GetPointsAdjacentCells() [2/4]

void xms::XmUGrid::Impl::GetPointsAdjacentCells ( const int *  a_pointIdxs,
int  a_numPointIdxs,
VecInt a_commonCellIdxs 
) const

Gets the common cells from a vector of points.

Parameters
[in]a_pointIdxsan array of point indices
[in]a_numPointIdxsnumber of points in array
[out]a_commonCellIdxsa vector of cell indices

Definition at line 789 of file XmUGrid.cpp.

References xms::XmUGrid::GetPointAdjacentCells().

◆ GetPointsAdjacentCells() [3/4]

void xms::XmUGrid::Impl::GetPointsAdjacentCells ( const VecInt a_pointIdxs,
VecInt a_adjacentCellIdxs 
) const

Gets the cells adjacent to all of a vector of points.

Parameters
[in]a_pointIdxsa vector of unique points
[out]a_adjacentCellIdxsa vector of cell indices

Definition at line 828 of file XmUGrid.cpp.

References xms::XmUGrid::GetPointsAdjacentCells().

◆ GetPointsAdjacentCells() [4/4]

void xms::XmUGrid::Impl::GetPointsAdjacentCells ( int  a_pointIdx1,
int  a_pointIdx2,
VecInt a_adjacentCellIdxs 
) const

Gets the cells adjacent to both of the two points.

Parameters
[in]a_pointIdx1first point index
[in]a_pointIdx2second point index
[out]a_adjacentCellIdxsa vector of cell indices

Definition at line 840 of file XmUGrid.cpp.

References xms::XmUGrid::GetPointsAdjacentCells().

◆ GetPointsLocations()

VecPt3d xms::XmUGrid::Impl::GetPointsLocations ( const VecInt a_points) const

Convert a vector of point indices into a vector of point 3d.

Parameters
[in]a_pointsa vector of point indices
Returns
vector of point 3d

Definition at line 712 of file XmUGrid.cpp.

References xms::XmUGrid::GetPointLocation().

◆ GetPointXy0()

Pt3d xms::XmUGrid::Impl::GetPointXy0 ( int  a_pointIdx) const

Get the X, Y location of a point.

Parameters
[in]a_pointIdxThe index of the point.
Returns
The location of the point with Z set to 0.0.

Definition at line 700 of file XmUGrid.cpp.

References xms::XmUGrid::GetPointLocation(), and xms::Pt3< T >::z.

◆ GetUniqueEdgesFromPolyhedronCellstream()

void xms::XmUGrid::Impl::GetUniqueEdgesFromPolyhedronCellstream ( const int *  a_start,
int &  a_length,
boost::container::flat_set< XmEdge > &  a_cellEdges,
int &  a_currIdx 
)
staticprivate

Get the unique edges in a flat set for a given polyhedron.

Parameters
[in]a_startthe UGrid cell stream (integer pointer)
[in]a_lengththe length of the cell stream
[in]a_cellEdgesUnique cell edges of the polyhedron
[in]a_currIdxthe index of the cell stream; this should reference the number of points in the first face. This variable will be updated to the cell type of the next cell.
Note
: This function does NOT verify cellstream size!! This function needs to be efficient!

Definition at line 2316 of file XmUGrid.cpp.

◆ GetUniquePointsFromPolyhedronCellstream()

void xms::XmUGrid::Impl::GetUniquePointsFromPolyhedronCellstream ( const VecInt a_cellstream,
int  a_numCellItems,
int &  a_currIdx,
VecInt a_uniqueGetCellPoints,
VecInt a_pointLastUsedIdx 
)
staticprivate

Get the unique points in a flat set.

Parameters
[in]a_cellstreamthe UGrid cell stream
[in]a_numCellItemsthe number of cell faces in the polyhedron
[in]a_currIdxthe index of the cell stream; this should reference the number of points in the first face. This variable will be updated to the cell type of the next cell.
[out]a_uniqueGetCellPointsthe unique points of the polyhedron
[out]a_pointLastUsedIdxa list of integers representing when a point was last found while reading the stream.
Note
: This function does NOT verify cellstream size!! This function needs to be efficient!

Definition at line 2244 of file XmUGrid.cpp.

◆ GetUniquePointsFromPolyhedronSingleCellstream()

bool xms::XmUGrid::Impl::GetUniquePointsFromPolyhedronSingleCellstream ( const VecInt a_cellstream,
VecInt a_cellPoints 
)
staticprivate

Get the unique points for cell stream of a single polyhedron cell.

Parameters
[in]a_cellstreama single cell stream that is a polyhedron type
[out]a_cellPointsthe points of the cell
Returns
false if invalid stream

Definition at line 2273 of file XmUGrid.cpp.

◆ IsCellValidWithPointChange()

bool xms::XmUGrid::Impl::IsCellValidWithPointChange ( int  a_cellIdx,
int  a_changedPtIdx,
const Pt3d a_newPosition 
) const
private

Determine whether a cell is valid after a point is moved.

Parameters
[in]a_cellIdxthe index of the cell
[in]a_changedPtIdxindex of the point to be changed
[in]a_newPositionlocation the point is to be moved to
Returns
whether the cell is valid

Definition at line 1190 of file XmUGrid.cpp.

References xms::XmUGrid::GetCell3dFacesPoints(), xms::XmUGrid::GetCellDimension(), and xms::XmUGrid::GetCellEdges().

◆ IsFaceSide()

bool xms::XmUGrid::Impl::IsFaceSide ( const VecInt a_facePts) const
private

Get whether the cell face is of a side orientation. Only works for plan view prismatic cells.

Parameters
[in]a_facePtsthe points in the face
Returns
whether the face is a Side

Definition at line 2394 of file XmUGrid.cpp.

References xms::XmUGrid::GetPointLocation(), xms::Pt3< T >::x, and xms::Pt3< T >::y.

◆ IsSideFace()

bool xms::XmUGrid::Impl::IsSideFace ( int  a_cellIdx,
int  a_faceIdx 
) const

Determines if a cell face is a vertical side face.

Parameters
[in]a_cellIdxThe cell index.
[in]a_faceIdxThe face index.
Returns
True if the face is a vertical side face (points with same X and Y).

Definition at line 2744 of file XmUGrid.cpp.

References xms::XmUGrid::GetCell3dFacePoints(), and xms::XmUGrid::GetPointXy0().

◆ IsValidCellIdx()

bool xms::XmUGrid::Impl::IsValidCellIdx ( int  a_cellIdx) const
private

Determine if a cell index is valid.

Parameters
[in]a_cellIdxthe index of the cell
Returns
True if the cell index is valid.

Definition at line 1230 of file XmUGrid.cpp.

References xms::XmUGrid::GetCellCount().

◆ IsValidPointChange()

bool xms::XmUGrid::Impl::IsValidPointChange ( int  a_changedPtIdx,
const Pt3d a_newPosition 
) const

Determine whether adjacent cells are valid after a point is moved.

Parameters
[in]a_changedPtIdxindex of the point to be changed
[in]a_newPositionlocation the point is to be moved to
Returns
whether the change is valid

Definition at line 1240 of file XmUGrid.cpp.

References xms::XmUGrid::GetPointAdjacentCells().

◆ operator=()

Impl& xms::XmUGrid::Impl::operator= ( const Impl a_xmUGrid)
default

Default ssignment operator.

Parameters
a_xmUGridThe XmUGrid to copy from.
Returns
The reference to this.

◆ SetCellstream()

bool xms::XmUGrid::Impl::SetCellstream ( const VecInt a_cellstream)

Set the ugrid cells for the entire UGrid using a cell stream.

Parameters
[in]a_cellstreamcells defined as follows: Hexahedrons, polygons, quads, triangles etc: Cell type (ElemTypeEnum), number of points, point numbers. Generally 0-based, CCW, bottom, then top. Not true for pixel or voxel. Polyhedrons: Cell type, number of faces, [num points in face, point numbers (0-based, CCW when looking in)] repeated for each face.
Returns
if successfully set

Definition at line 1051 of file XmUGrid.cpp.

References xmlog::error, xms::XmUGrid::IsValidCellstream(), and XM_LOG.

◆ SetLocations()

void xms::XmUGrid::Impl::SetLocations ( const VecPt3d a_locations)

Set UGrid points.

Parameters
[in]a_locationsvector of point locations

Definition at line 662 of file XmUGrid.cpp.

◆ SetPointLocation()

bool xms::XmUGrid::Impl::SetPointLocation ( int  a_pointIdx,
const Pt3d a_location 
)

Set the point.

Parameters
[in]a_pointIdxthe index of the point
[in]a_locationThe new location of the specified point
Returns
whether the point was successfully set

Definition at line 684 of file XmUGrid.cpp.

◆ SetUseCache()

void xms::XmUGrid::Impl::SetUseCache ( bool  a_useCache)

Turn on or off use of caching.

Parameters
a_useCacheFlag to determine if caching will be used.

Definition at line 637 of file XmUGrid.cpp.

◆ VerticalOrientationFromOpposing()

XmUGridFaceOrientation xms::XmUGrid::Impl::VerticalOrientationFromOpposing ( int  a_cellIdx,
int  a_faceIdx 
) const

Find vertical orientation of a given 3D cell face from opposing face.

Parameters
[in]a_cellIdxThe cell index.
[in]a_faceIdxThe face index.
Returns
The orientation of the face (TOP, BOTTOM, UNKNOWN).

Definition at line 2704 of file XmUGrid.cpp.

References xms::XmUGrid::GetCell3dFaceCount().

Member Data Documentation

◆ m_cellstream

VecInt xms::XmUGrid::Impl::m_cellstream
private

UGrid cell stream.

See also
SetCellstream, GetCellstream

Definition at line 218 of file XmUGrid.cpp.

◆ m_pointIdxToPointsToCells

VecInt xms::XmUGrid::Impl::m_pointIdxToPointsToCells
private

Indexes for each point in array of points cells

Definition at line 222 of file XmUGrid.cpp.

◆ m_pointsToCells

VecInt xms::XmUGrid::Impl::m_pointsToCells
private

Array of points cells (goes from pointIdx to list of cells)

Definition at line 220 of file XmUGrid.cpp.


The documentation for this class was generated from the following file: