10 typedef unsigned long long int OcKey;
11 typedef unsigned short Level;
13 typedef typename ::dyno::TAlignedBox3D<Real>
AABB;
109 template<
typename TDataType>
113 typedef typename TDataType::Real
Real;
114 typedef typename TDataType::Coord
Coord;
DYN_FUNC OctreeNode(OcKey key)
DYN_FUNC OcKey key() const
DYN_FUNC bool operator==(const OcKey k) const
DYN_FUNC OctreeNode leastCommonAncestor(const OctreeNode &) const
DYN_FUNC OctreeNode(Level l, OcIndex x, OcIndex y, OcIndex z)
DYN_FUNC int getFirstChildIndex()
DYN_FUNC Level level() const
DYN_FUNC void setDataSize(int n)
DYN_FUNC bool isContainedIn(const OctreeNode &) const
DYN_FUNC bool isContainedStrictlyIn(const OctreeNode &) const
DYN_FUNC bool operator>(const OctreeNode &) const
DYN_FUNC int getStartIndex()
DYN_FUNC bool operator>=(const OctreeNode &) const
Octree will be traversed in the post-ordered fashion.
DYN_FUNC int getDataIndex()
DYN_FUNC bool operator!=(const OcKey k) const
DYN_FUNC void setDataIndex(int id)
DYN_FUNC bool operator<(const OctreeNode &) const
DYN_FUNC void setFirstChildIndex(int id)
DYN_FUNC int getDataSize()
DYN_FUNC void setStartIndex(int id)
DYN_FUNC void getCoord(Level &l, OcIndex &x, OcIndex &y, OcIndex &z)
DYN_FUNC bool operator<=(const OctreeNode &) const
GPU_FUNC int requestIntersectionNumberFromLevel(const AABB box, int level)
DArray< int > duplicates_count
GPU_FUNC void reqeustIntersectionIdsFromBottom(int *ids, const AABB box, AABB *data)
void construct(const DArray< AABB > &aabb)
DArray< OctreeNode > m_post_ordered_nodes
GPU_FUNC int requestIntersectionNumberFromBottom(const AABB box, AABB *data)
void release()
Call release() to release allocated memory explicitly, do not call this function from the decontructo...
void printPostOrderedTree()
CPU_FUNC OctreeNode queryNode(Level l, OcIndex x, OcIndex y, OcIndex z)
void construct(const DArray< OctreeNode > &nodes)
GPU_FUNC void reqeustIntersectionIds(int *ids, int &shift, const OcKey key, const Level l)
GPU_FUNC Level requestLevelNumber(const AABB box)
DArray< OctreeNode > nonRepeatNodes_cpy
DArray< OctreeNode > m_all_nodes
GPU_FUNC void reqeustIntersectionIds(int *ids, const AABB box)
GPU_FUNC int requestIntersectionNumber(const OcKey key, const Level l)
int m_level_max
levels are numbered from 0 to m_level_max;
GPU_FUNC void reqeustIntersectionIds(int *ids, int &shift, const OcKey key, const Level l, const AABB box, AABB *data)
GPU_FUNC int requestIntersectionNumber(const OcKey key, const Level l, const AABB box, AABB *data)
GPU_FUNC int requestIntersectionNumber(const AABB box)
void setSpace(Coord lo, Real h, Real L)
GPU_FUNC int requestIntersectionNumberFromLevel(const AABB box, AABB *data, int level)
GPU_FUNC void reqeustIntersectionIdsFromLevel(int *ids, const AABB box, int level)
void construct(const DArray< Coord > &points, Real radius)
GPU_FUNC void reqeustIntersectionIdsFromBottom(int *ids, const AABB box)
DArray< OctreeNode > aux_nodes
DArray< OctreeNode > node_buffer
GPU_FUNC void reqeustIntersectionIdsFromLevel(int *ids, const AABB box, AABB *data, int level)
GPU_FUNC int requestIntersectionNumberFromBottom(const AABB box)
This is an implementation of AdditiveCCD based on peridyno.
Array< T, DeviceType::GPU > DArray
static DYN_FUNC void RecoverFromMortonCode(OcKey key, OcIndex &x, OcIndex &y, OcIndex &z)
::dyno::TAlignedBox3D< Real > AABB
static DYN_FUNC OcKey CalculateMortonCode(OcIndex x, OcIndex y, OcIndex z)
unsigned long long int OcKey
DYN_FUNC bool operator()(const OctreeNode &A, const OctreeNode &B)