提交 e2e719e4 编写于 作者: 肥鼠路易's avatar 肥鼠路易

上传新文件

上级 6e6d6feb
#ifndef PLANE_PLANAR_H
#define PLANE_PLANAR_H
# include <mylib/commen_include.h>
class Plane{
public: //public 修饰的成员变量和函数可以在类的内部和外部访问
EIGEN_MAKE_ALIGNED_OPERATOR_NEW;
/* typedef std::shared_ptr<Plane> Ptr;
Plane(){}
Plane(Eigen::Vector3d normal, double dis): normal_(normal), dis_(dis){
HesseToHomogenous(normal_, dis_, homo_para_);
}
Plane(Eigen::Vector4d home_para):homo_para_(home_para){
HomogeneousToHesse(homo_para_, normal_, dis_);
};*/
// 创建立平面上的点
void createPlanePoints();
// popular Hesse notation formed by a unit normal vector n and the orthogonal distance to the origin d.
void HomogeneousToHesse(const Eigen::Vector4d &homo_para, Eigen::Vector3d &norm, double &dis);
// 只要我们是标准化的,正规化的,我们就可以使用n_norm = 1.从Hesse形式转变为面的齐次形式
void HesseToHomogenous(const Eigen::Vector3d &norm,const double &dis, Eigen::Vector4d &homo_para);
// 这里是平面的四元数表达法,只需要把Hesse形式进行一个小小的变形就可以得到单位四元数化的平面参数化形式,几何意义不明确
Eigen::Quaterniond HesseToQuaternion(Eigen::Vector3d norm,double d);
// 我们把Hesse单位法向量看成是一个单位圆球上的一点,可以把平面用球坐标参数化
Eigen::Vector3d SpherToHesse(const double &phi_,const double &theta,const double &dis_s);
private:// 修饰的成员变量和函数只可以在类的内部访问
//unsigned long id_;
/* Eigen::Vector3d normal_;
normal_ << 1, 1, 1;
double dis_ = 1.0; // hessian form, n^T * pt = d
int num_points_ = 100;
VecVector3d plane_points_;*/
Eigen::Vector4d homo_para_; // homogeneous parameters
Eigen::Vector3d normal_;
double dis_; // hessian form, n^T * pt = d
int num_points_ = 100;
VecVector3d plane_points_;
//std::vector<int> frame_ids_; // the index of the frame that observes this plane.
};
#endif //PLANE_PLANAR_H
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册