21#include "../Octree/Octree.hpp"
24 using namespace hxa7241_graphics;
37 bool isOverlappingCell(
const pair<int, XYZ>& item,
const Vector3f& lowerCorner,
const Vector3f& upperCorner)
const;
38 dword
getSubcellOverlaps(
const pair<int, XYZ>& item,
const Vector3f& lower,
const Vector3f& middle,
const Vector3f& upper)
const;
54 void visitRoot(
const OctreeCell* pRootCell,
const OctreeData& octreeData);
55 void visitBranch(
const OctreeCell* subCells[8],
const OctreeData& octreeData);
56 void visitLeaf(
const Array<
const pair<int, XYZ>*>& items,
const OctreeData& octreeData);
90 void Initialise(
const Vector3f& positionOfLowerCorner,
float sizeOfCube, dword maxItemCountPerCell, dword maxLevelCount)
94 m_pOctree =
new Octree<MESH_ELEMENT>(positionOfLowerCorner, sizeOfCube, maxItemCountPerCell, maxLevelCount);
146 void visitRoot(
const OctreeCell* pRootCell,
const OctreeData& octreeData);
147 void visitBranch(
const OctreeCell* subCells[8],
const OctreeData& octreeData);
148 void visitLeaf(
const Array<const MESH_ELEMENT*>& items,
const OctreeData& octreeData);
Class to assist in storing mesh elements in an octree.
const list< MESH_ELEMENT > & GetElements() const
void Initialise(const Vector3f &positionOfLowerCorner, float sizeOfCube, dword maxItemCountPerCell, dword maxLevelCount)
Octree< MESH_ELEMENT > * m_pOctree
list< MESH_ELEMENT > m_OctreeElements
const Octree< MESH_ELEMENT > * GetOctree() const
list< MESH_ELEMENT > & GetElements()
Octree< MESH_ELEMENT > * GetOctree()
CElementsOctree(const CElementsOctree &CopyMe)
Defines the nodes and elements of a surface or volume mesh.
Octree agent used to add elements to an octree.
dword getSubcellOverlaps(const MESH_ELEMENT &item, const Vector3f &lower, const Vector3f &middle, const Vector3f &upper) const
bool isOverlappingCell(const MESH_ELEMENT &item, const Vector3f &lowerCorner, const Vector3f &upperCorner) const
COctreeAgentElement(CMesh &Mesh)
Octree agent used to add indexed nodes to an octree.
bool isOverlappingCell(const pair< int, XYZ > &item, const Vector3f &lowerCorner, const Vector3f &upperCorner) const
COctreeAgentNode(double dTolerance=0)
dword getSubcellOverlaps(const pair< int, XYZ > &item, const Vector3f &lower, const Vector3f &middle, const Vector3f &upper) const
Octree visitor used to get a list of elements near given line.
pair< bool, bool > m_TrimLine
void visitBranch(const OctreeCell *subCells[8], const OctreeData &octreeData)
list< vector< int > > & m_Elements
COctreeVisitorElementNearLine(const XYZ &P1, const XYZ &P2, list< vector< int > > &Elements, pair< bool, bool > TrimLine)
Get a list of elements that are likely to intersect with the given line.
void visitRoot(const OctreeCell *pRootCell, const OctreeData &octreeData)
void visitLeaf(const Array< const MESH_ELEMENT * > &items, const OctreeData &octreeData)
~COctreeVisitorElementNearLine()
Octree visitor used to merge nodes together within a given tolerance.
void visitBranch(const OctreeCell *subCells[8], const OctreeData &octreeData)
~COctreeVisitorMergeNodes()
double m_dToleranceSquared
void visitRoot(const OctreeCell *pRootCell, const OctreeData &octreeData)
void visitLeaf(const Array< const pair< int, XYZ > * > &items, const OctreeData &octreeData)
vector< vector< int * > > m_NodeElementReferences
set< int > m_DeletedNodes
COctreeVisitorMergeNodes(CMesh &Mesh, double dTolerance=0)
Namespace containing a series of customised math operations not found in the standard c++ library.
Elements of a given, is used in conjunction with COctreeAgentElement.
vector< int > NodeIndices
Struct for representing points in 3D space.