Structure to compute the intersection between a mesh and a grid (to compute fast distances)
More...
#include <GridAndMeshIntersection.h>
|
| GridAndMeshIntersection () |
| Default constructor.
|
|
virtual | ~GridAndMeshIntersection () |
| Destructor.
|
|
void | clear () |
| Clears the structure.
|
|
bool | isInitialized () const |
| Returns whether the structure is initialized or not.
|
|
bool | computeMeshIntersection (GenericIndexedMesh *mesh, const CCVector3 &minGridBB, const CCVector3 &maxGridBB, PointCoordinateType cellSize, GenericProgressCallback *progressCb=nullptr) |
| Initializes the structure with a mesh.
|
|
bool | initDistanceTransformWithMesh (GenericIndexedMesh *mesh, const CCVector3 &minGridBB, const CCVector3 &maxGridBB, const CCVector3 &minFilledBB, const CCVector3 &maxFilledBB, PointCoordinateType cellSize, GenericProgressCallback *progressCb=nullptr) |
| Initializes the structure with a mesh.
|
|
Tuple3i | computeCellPos (const CCVector3 &P) const |
| Computes the (grid) cell position that contains a given point.
|
|
void | computeCellCenter (const Tuple3i &cellPos, CCVector3 ¢er) const |
| Computes the center of a given (grid) cell. More...
|
|
const GenericIndexedMesh * | mesh () const |
| Returns the associated mesh (if any)
|
|
const SaitoSquaredDistanceTransform * | distanceTransform () const |
| Returns the distance transform (if any)
|
|
unsigned | distanceTransformValue (const Tuple3i &cellPos, bool isLocalCellPos) const |
| Returns the distance transform value (if any)
|
|
PointCoordinateType | cellSize () const |
| Returns the virtual grid cell size.
|
|
Tuple3i | toLocal (const Tuple3i &cellPos) const |
| Converts a global cell position to a local one.
|
|
const TriangleList * | trianglesInCell (const Tuple3i &cellPos, bool isLocalCellPos) const |
| Returns the list of triangles intersecting a given cell.
|
|
void | computeSignedDistToBoundaries (const Tuple3i &cellPos, Tuple3i &distToLowerBorder, Tuple3i &distToUpperBorder) const |
| Computes the distances between a given cell and the inner grid boundaries.
|
|
|
GenericIndexedMesh * | m_mesh |
| Mesh.
|
|
SaitoSquaredDistanceTransform * | m_distanceTransform |
| Distance transform.
|
|
CCVector3 | m_minGridBB |
| Virtual grid bounding-box (min corner)
|
|
CCVector3 | m_maxGridBB |
| Virtual grid bounding-box (max corner)
|
|
Tuple3i | m_minFillIndexes |
| Virtual grid occupancy of the mesh (minimum indexes for each dimension)
|
|
Tuple3i | m_maxFillIndexes |
| Virtual grid occupancy of the mesh (maximum indexes for each dimension)
|
|
PointCoordinateType | m_cellSize |
| Virtual grid cell size.
|
|
Grid3D< TriangleList * > | m_perCellTriangleList |
| Grid of TriangleList items. More...
|
|
bool | m_initialized |
| Whether the structure is properly initialized.
|
|
Structure to compute the intersection between a mesh and a grid (to compute fast distances)
◆ computeCellCenter()
void CCCoreLib::GridAndMeshIntersection::computeCellCenter |
( |
const Tuple3i & |
cellPos, |
|
|
CCVector3 & |
center |
|
) |
| const |
|
inline |
Computes the center of a given (grid) cell.
- Parameters
-
cellPos | the (grid) cell position |
center | the computed center |
◆ m_perCellTriangleList
Grid3D<TriangleList*> CCCoreLib::GridAndMeshIntersection::m_perCellTriangleList |
|
protected |
Grid of TriangleList items.
- Warning
- : may be smaller than the 'virtual grid' (see m_minFillIndexes and m_maxFillIndexes)
The documentation for this class was generated from the following files:
- GridAndMeshIntersection.h
- GridAndMeshIntersection.cpp