mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-23 14:44:19 -06:00
TriangleSelector - some memory optimization.
Don't store traingle normal, but reference the source triangle, which stores its normal.
This commit is contained in:
parent
74ab3e108e
commit
6bade1b24a
5 changed files with 49 additions and 59 deletions
|
@ -154,8 +154,9 @@ public:
|
|||
push_geometry(float(x), float(y), float(z), float(nx), float(ny), float(nz));
|
||||
}
|
||||
|
||||
inline void push_geometry(const Vec3d& p, const Vec3d& n) {
|
||||
push_geometry(p(0), p(1), p(2), n(0), n(1), n(2));
|
||||
template<typename Derived, typename Derived2>
|
||||
inline void push_geometry(const Eigen::MatrixBase<Derived>& p, const Eigen::MatrixBase<Derived2>& n) {
|
||||
push_geometry(float(p(0)), float(p(1)), float(p(2)), float(n(0)), float(n(1)), float(n(2)));
|
||||
}
|
||||
|
||||
inline void push_triangle(int idx1, int idx2, int idx3) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue