open3D源码分析第三篇

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
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值