RSMesh 1.0.0
一个曲面重构的系统,输入为点云,输出为obj,stl等主流格式的网格文件,使用的方法为径向基函数插值,采取了并行优化、Intel-MKL等优化措施,支持百万级别的点云
载入中...
搜索中...
未找到
orthonormalize.h
1//
2// Created by RainSure on 2023/11/10.
3//
4
5#ifndef RSMESH_ORTHONORMALIZE_H
6#define RSMESH_ORTHONORMALIZE_H
7
8#include "Eigen/Core"
9#include "types.h"
10
11namespace rsmesh {
12 namespace common {
13 template <class Derived>
14 void orthonormalize_cols(Eigen::MatrixBase<Derived>& m) {
15
16 auto n = m.cols();
17 for(index_t i = 0; i < n; i ++) {
18 m.col(i) /= m.col(i).norm();
19 for(index_t j = i + 1; j < n; j ++) {
20 m.col(j) -= m.col(i).dot(m.col(j)) * m.col(j);
21 }
22 }
23 }
24 }
25}
26
27#endif //RSMESH_ORTHONORMALIZE_H
本系统的主命名空间,包含了common, examples, fmm, geometry, numeric, point_cloud等子命名空间