mirror of https://github.com/wpkong/Octree.git
21 changed files with 275 additions and 200 deletions
@ -1,53 +0,0 @@ |
|||
/**
|
|||
* ------------------------------------ |
|||
* @author: Weipeng Kong |
|||
* @date: 2021/11/30 |
|||
* @email: yjxkwp@foxmail.com |
|||
* @site: https://donot.fit
|
|||
* @description: |
|||
* ------------------------------------ |
|||
**/ |
|||
|
|||
#ifndef OCTREE_OCTREESDF_H |
|||
#define OCTREE_OCTREESDF_H |
|||
|
|||
#include "OctreeBase.h" |
|||
|
|||
|
|||
namespace Octree { |
|||
class SDFData; |
|||
|
|||
class OctreeSDFNode; |
|||
|
|||
using sdfdata_sptr = shared_ptr<SDFData>; |
|||
|
|||
using ocsdfnode_sptr = shared_ptr<OctreeSDFNode>; |
|||
using ocsdfnode_wptr = weak_ptr<OctreeSDFNode>; |
|||
using ocsdfnode_ptr = OctreeSDFNode *; |
|||
|
|||
struct OctreeSDFNode : public OctreeNode { |
|||
public: |
|||
sdfdata_sptr sdf; |
|||
|
|||
public: |
|||
explicit OctreeSDFNode(ocnode_ptr father, const AABB &aabb, uint32_t level); |
|||
|
|||
double get_sdf(const Eigen::Vector3d &pos); |
|||
|
|||
ocnode_sptr make_child(const AABB &aabb) override; |
|||
}; |
|||
} |
|||
|
|||
namespace Octree { |
|||
class OctreeSDF : public OctreeBase { |
|||
public: |
|||
explicit OctreeSDF(uint32_t max_level, const AABB &aabb); |
|||
|
|||
ocsdfnode_sptr map_node(const Eigen::Vector3d &pos){return std::static_pointer_cast<OctreeSDFNode>(OctreeBase::map_node(pos));} |
|||
|
|||
ocsdfnode_sptr get_root() const { return std::static_pointer_cast<OctreeSDFNode>(root); } |
|||
}; |
|||
} |
|||
|
|||
|
|||
#endif //OCTREE_OCTREESDF_H
|
@ -1,56 +0,0 @@ |
|||
/**
|
|||
* ------------------------------------ |
|||
* @author: Weipeng Kong |
|||
* @date: 2021/11/30 |
|||
* @email: yjxkwp@foxmail.com |
|||
* @site: https://donot.fit
|
|||
* @description: |
|||
* ------------------------------------ |
|||
**/ |
|||
|
|||
#ifndef OCTREE_OCTREEUDF_H |
|||
#define OCTREE_OCTREEUDF_H |
|||
|
|||
|
|||
|
|||
#include "OctreeBase.h" |
|||
|
|||
|
|||
namespace Octree { |
|||
class UDFData; |
|||
|
|||
class OctreeUDFNode; |
|||
|
|||
using udfdata_sptr = shared_ptr<UDFData>; |
|||
|
|||
using ocudfnode_sptr = shared_ptr<OctreeUDFNode>; |
|||
using ocudfnode_wptr = weak_ptr<OctreeUDFNode>; |
|||
using ocudfnode_ptr = OctreeUDFNode *; |
|||
|
|||
struct OctreeUDFNode : public OctreeNode { |
|||
public: |
|||
udfdata_sptr udf; |
|||
|
|||
public: |
|||
explicit OctreeUDFNode(ocnode_ptr father, const AABB &aabb, uint32_t level); |
|||
|
|||
double get_udf(const Eigen::Vector3d &pos); |
|||
|
|||
ocnode_sptr make_child(const AABB &aabb) override; |
|||
}; |
|||
} |
|||
|
|||
namespace Octree { |
|||
class OctreeUDF : public OctreeBase { |
|||
public: |
|||
explicit OctreeUDF(uint32_t max_level, const AABB &aabb); |
|||
|
|||
ocudfnode_sptr map_node(const Eigen::Vector3d &pos) { return std::static_pointer_cast<OctreeUDFNode>(OctreeBase::map_node(pos)); } |
|||
|
|||
ocudfnode_sptr get_root() const { return std::static_pointer_cast<OctreeUDFNode>(root); } |
|||
}; |
|||
} |
|||
|
|||
|
|||
|
|||
#endif //OCTREE_OCTREEUDF_H
|
@ -0,0 +1,56 @@ |
|||
/**
|
|||
* ------------------------------------ |
|||
* @author: Weipeng Kong |
|||
* @date: 2021/11/30 |
|||
* @email: yjxkwp@foxmail.com |
|||
* @site: https://donot.fit
|
|||
* @description: |
|||
* ------------------------------------ |
|||
**/ |
|||
|
|||
#ifndef OCTREE_SDFOCTREE_H |
|||
#define OCTREE_SDFOCTREE_H |
|||
|
|||
#include "BaseOctree.h" |
|||
|
|||
|
|||
namespace Octree { |
|||
class SDFData; |
|||
|
|||
class SDFOctreeNode; |
|||
|
|||
using sdfdata_sptr = shared_ptr<SDFData>; |
|||
using ocsdfnode_sptr = shared_ptr<SDFOctreeNode>; |
|||
using ocsdfnode_wptr = weak_ptr<SDFOctreeNode>; |
|||
using ocsdfnode_ptr = SDFOctreeNode *; |
|||
|
|||
struct SDFOctreeNode : public OctreeNode { |
|||
public: |
|||
sdfdata_sptr sdf; |
|||
|
|||
public: |
|||
explicit SDFOctreeNode(ocnode_ptr father, const AABB &aabb, uint32_t level); |
|||
|
|||
double get_sdf(const Eigen::Vector3d &pos); |
|||
|
|||
ocnode_sptr make_child(const AABB &aabb) override; |
|||
}; |
|||
} |
|||
|
|||
namespace Octree { |
|||
class SDFOctree : public BaseOctree { |
|||
public: |
|||
explicit SDFOctree(uint32_t max_level, const AABB &aabb); |
|||
|
|||
ocsdfnode_sptr map_node(const Eigen::Vector3d &pos) { |
|||
return std::static_pointer_cast<SDFOctreeNode>(BaseOctree::map_node(pos)); |
|||
} |
|||
|
|||
ocsdfnode_sptr get_root() const { |
|||
return std::static_pointer_cast<SDFOctreeNode>(root); |
|||
} |
|||
}; |
|||
} |
|||
|
|||
|
|||
#endif //OCTREE_SDFOCTREE_H
|
@ -0,0 +1,57 @@ |
|||
/**
|
|||
* ------------------------------------ |
|||
* @author: Weipeng Kong |
|||
* @date: 2021/11/30 |
|||
* @email: yjxkwp@foxmail.com |
|||
* @site: https://donot.fit
|
|||
* @description: |
|||
* ------------------------------------ |
|||
**/ |
|||
|
|||
#ifndef OCTREE_UDFOCTREE_H |
|||
#define OCTREE_UDFOCTREE_H |
|||
|
|||
|
|||
#include "BaseOctree.h" |
|||
|
|||
|
|||
namespace Octree { |
|||
class UDFData; |
|||
|
|||
class UDFOctreeNode; |
|||
|
|||
using udfdata_sptr = shared_ptr<UDFData>; |
|||
using ocudfnode_sptr = shared_ptr<UDFOctreeNode>; |
|||
using ocudfnode_wptr = weak_ptr<UDFOctreeNode>; |
|||
using ocudfnode_ptr = UDFOctreeNode *; |
|||
|
|||
struct UDFOctreeNode : public OctreeNode { |
|||
public: |
|||
udfdata_sptr udf; |
|||
|
|||
public: |
|||
explicit UDFOctreeNode(ocnode_ptr father, const AABB &aabb, uint32_t level); |
|||
|
|||
double get_udf(const Eigen::Vector3d &pos); |
|||
|
|||
ocnode_sptr make_child(const AABB &aabb) override; |
|||
}; |
|||
} |
|||
|
|||
namespace Octree { |
|||
class UDFOctree : public BaseOctree { |
|||
public: |
|||
explicit UDFOctree(uint32_t max_level, const AABB &aabb); |
|||
|
|||
ocudfnode_sptr map_node(const Eigen::Vector3d &pos) { |
|||
return std::static_pointer_cast<UDFOctreeNode>(BaseOctree::map_node(pos)); |
|||
} |
|||
|
|||
ocudfnode_sptr get_root() const { |
|||
return std::static_pointer_cast<UDFOctreeNode>(root); |
|||
} |
|||
}; |
|||
} |
|||
|
|||
|
|||
#endif //OCTREE_UDFOCTREE_H
|
Loading…
Reference in new issue