Open3D (C++ API)
|
#include <Octree.h>
Public Member Functions | |
Octree () | |
Octree (const size_t &max_depth) | |
Octree (const size_t &max_depth, const Eigen::Vector3d &origin, const double &size) | |
Octree (const Octree &src_octree) | |
~Octree () override | |
void | Clear () override |
bool | IsEmpty () const override |
Eigen::Vector3d | GetMinBound () const override |
Eigen::Vector3d | GetMaxBound () const override |
Octree & | Transform (const Eigen::Matrix4d &transformation) override |
Octree & | Translate (const Eigen::Vector3d &translation) override |
Octree & | Scale (const double scale, bool center=true) override |
Octree & | Rotate (const Eigen::Vector3d &rotation, bool center=true, RotationType type=RotationType::XYZ) override |
bool | ConvertToJsonValue (Json::Value &value) const override |
bool | ConvertFromJsonValue (const Json::Value &value) override |
void | ConvertFromPointCloud (const geometry::PointCloud &point_cloud, double size_expand=0.01) |
void | InsertPoint (const Eigen::Vector3d &point, const std::function< std::shared_ptr< OctreeLeafNode >()> &f_init, const std::function< void(std::shared_ptr< OctreeLeafNode >)> &f_update) |
Insert point. More... | |
void | Traverse (const std::function< void(const std::shared_ptr< OctreeNode > &, const std::shared_ptr< OctreeNodeInfo > &)> &f) |
void | Traverse (const std::function< void(const std::shared_ptr< OctreeNode > &, const std::shared_ptr< OctreeNodeInfo > &)> &f) const |
std::pair< std::shared_ptr< OctreeLeafNode >, std::shared_ptr< OctreeNodeInfo > > | LocateLeafNode (const Eigen::Vector3d &point) const |
bool | operator== (const Octree &other) const |
Returns true if the Octree is completely the same, used for testing. More... | |
std::shared_ptr< geometry::VoxelGrid > | ToVoxelGrid () const |
Convert to voxel grid. More... | |
void | FromVoxelGrid (const geometry::VoxelGrid &voxel_grid) |
Convert from voxel grid. More... | |
Public Member Functions inherited from open3d::geometry::Geometry3D | |
~Geometry3D () override | |
Public Member Functions inherited from open3d::geometry::Geometry | |
virtual | ~Geometry () |
GeometryType | GetGeometryType () const |
int | Dimension () const |
Public Member Functions inherited from open3d::utility::IJsonConvertible | |
virtual | ~IJsonConvertible () |
Static Public Member Functions | |
static bool | IsPointInBound (const Eigen::Vector3d &point, const Eigen::Vector3d &origin, const double &size) |
Static Public Member Functions inherited from open3d::utility::IJsonConvertible | |
static bool | EigenVector3dFromJsonArray (Eigen::Vector3d &vec, const Json::Value &value) |
static bool | EigenVector3dToJsonArray (const Eigen::Vector3d &vec, Json::Value &value) |
static bool | EigenVector4dFromJsonArray (Eigen::Vector4d &vec, const Json::Value &value) |
static bool | EigenVector4dToJsonArray (const Eigen::Vector4d &vec, Json::Value &value) |
static bool | EigenMatrix3dFromJsonArray (Eigen::Matrix3d &mat, const Json::Value &value) |
static bool | EigenMatrix3dToJsonArray (const Eigen::Matrix3d &mat, Json::Value &value) |
static bool | EigenMatrix4dFromJsonArray (Eigen::Matrix4d &mat, const Json::Value &value) |
static bool | EigenMatrix4dToJsonArray (const Eigen::Matrix4d &mat, Json::Value &value) |
static bool | EigenMatrix4dFromJsonArray (Eigen::Matrix4d_u &mat, const Json::Value &value) |
static bool | EigenMatrix4dToJsonArray (const Eigen::Matrix4d_u &mat, Json::Value &value) |
static bool | EigenMatrix6dFromJsonArray (Eigen::Matrix6d &mat, const Json::Value &value) |
static bool | EigenMatrix6dToJsonArray (const Eigen::Matrix6d &mat, Json::Value &value) |
static bool | EigenMatrix6dFromJsonArray (Eigen::Matrix6d_u &mat, const Json::Value &value) |
static bool | EigenMatrix6dToJsonArray (const Eigen::Matrix6d_u &mat, Json::Value &value) |
Data Fields | |
std::shared_ptr< OctreeNode > | root_node_ = nullptr |
Root of the octree. More... | |
Eigen::Vector3d | origin_ = Eigen::Vector3d(0, 0, 0) |
double | size_ = 0 |
size_t | max_depth_ = 0 |
Additional Inherited Members | |
Public Types inherited from open3d::geometry::Geometry3D | |
enum | RotationType { RotationType::XYZ, RotationType::YZX, RotationType::ZXY, RotationType::XZY, RotationType::ZYX, RotationType::YXZ, RotationType::AxisAngle } |
Public Types inherited from open3d::geometry::Geometry | |
enum | GeometryType { GeometryType::Unspecified = 0, GeometryType::PointCloud = 1, GeometryType::VoxelGrid = 2, GeometryType::Octree = 3, GeometryType::LineSet = 4, GeometryType::TriangleMesh = 5, GeometryType::HalfEdgeTriangleMesh = 6, GeometryType::Image = 7 } |
Protected Member Functions inherited from open3d::geometry::Geometry3D | |
Geometry3D (GeometryType type) | |
Eigen::Matrix3d | GetRotationMatrix (const Eigen::Vector3d &rotation, RotationType type=RotationType::XYZ) const |
Protected Member Functions inherited from open3d::geometry::Geometry | |
Geometry (GeometryType type, int dimension) | |
|
inline |
|
inline |
|
inline |
open3d::geometry::Octree::Octree | ( | const Octree & | src_octree | ) |
|
inlineoverride |
|
overridevirtual |
Implements open3d::geometry::Geometry3D.
|
overridevirtual |
Implements open3d::utility::IJsonConvertible.
void open3d::geometry::Octree::ConvertFromPointCloud | ( | const geometry::PointCloud & | point_cloud, |
double | size_expand = 0.01 |
||
) |
|
overridevirtual |
Implements open3d::utility::IJsonConvertible.
void open3d::geometry::Octree::FromVoxelGrid | ( | const geometry::VoxelGrid & | voxel_grid | ) |
Convert from voxel grid.
|
overridevirtual |
Implements open3d::geometry::Geometry3D.
|
overridevirtual |
Implements open3d::geometry::Geometry3D.
void open3d::geometry::Octree::InsertPoint | ( | const Eigen::Vector3d & | point, |
const std::function< std::shared_ptr< OctreeLeafNode >()> & | f_init, | ||
const std::function< void(std::shared_ptr< OctreeLeafNode >)> & | f_update | ||
) |
Insert point.
|
overridevirtual |
Implements open3d::geometry::Geometry3D.
|
static |
Return true if point within bound, that is, origin <= point < origin + size
std::pair< std::shared_ptr< OctreeLeafNode >, std::shared_ptr< OctreeNodeInfo > > open3d::geometry::Octree::LocateLeafNode | ( | const Eigen::Vector3d & | point | ) | const |
bool open3d::geometry::Octree::operator== | ( | const Octree & | other | ) | const |
Returns true if the Octree is completely the same, used for testing.
|
overridevirtual |
Implements open3d::geometry::Geometry3D.
|
overridevirtual |
Implements open3d::geometry::Geometry3D.
std::shared_ptr< geometry::VoxelGrid > open3d::geometry::Octree::ToVoxelGrid | ( | ) | const |
Convert to voxel grid.
|
overridevirtual |
Implements open3d::geometry::Geometry3D.
|
overridevirtual |
Implements open3d::geometry::Geometry3D.
void open3d::geometry::Octree::Traverse | ( | const std::function< void(const std::shared_ptr< OctreeNode > &, const std::shared_ptr< OctreeNodeInfo > &)> & | f | ) |
DFS traversal of Octree from the root, with callback function called for each node
void open3d::geometry::Octree::Traverse | ( | const std::function< void(const std::shared_ptr< OctreeNode > &, const std::shared_ptr< OctreeNodeInfo > &)> & | f | ) | const |
Const version of Traverse. DFS traversal of Octree from the root, with callback function called for each node
size_t open3d::geometry::Octree::max_depth_ = 0 |
Max depth of octree. The depth is defined as the distance from the deepest leaf node to root. A tree with only the root node has depth 0.
Eigen::Vector3d open3d::geometry::Octree::origin_ = Eigen::Vector3d(0, 0, 0) |
Global min bound (include). A point is within bound iff origin_ <= point < origin_ + size_
std::shared_ptr<OctreeNode> open3d::geometry::Octree::root_node_ = nullptr |
Root of the octree.
double open3d::geometry::Octree::size_ = 0 |
Outer bounding box edge size for the whole octree. A point is within bound iff origin_ <= point < origin_ + size_