2021SC@SDUSC
Geometry3D.h
注释中文部分是源码解读,分析和问题在源码之后
#include <Eigen/Core>
#include <Eigen/Geometry>
#include <vector>
#include "open3d/geometry/Geometry.h"
#include "open3d/utility/Eigen.h"
namespace open3d {
namespace geometry {
class AxisAlignedBoundingBox;
class OrientedBoundingBox;
//三维几何学类class Geometry3D
//三维几何图形的基本几何图形类,三维几何图形的主类,从几何图形基类class Geometry派生所有数据。
class Geometry3D : public Geometry {
public:
//析构函数覆盖
~Geometry3D() override {
}
protected:
//基于GeometryType的对象类型参数化构造函数。
//和第一篇中的enum class GeometryType对应
Geometry3D(GeometryType type) : Geometry(type, 3) {
}
public:
// 清除几何图形中的所有元素
Geometry3D& Clear() override = 0;
// 如果几何体为空,则返回'true'。
bool IsEmpty() const override = 0;
// 返回几何体坐标的最小边界。
virtual Eigen::Vector3d GetMinBound() const = 0;
// 返回几何体坐标的最大边界。
virtual Eigen::Vector3d GetMaxBound() const = 0;
// 返回几何体坐标的中心。
virtual Eigen::Vector3d GetCenter() const = 0