#pragma once
#include "./parallel.h"
#include "./sparse.h"
#include "./utils.h"
#include "./vec.h"
namespace manifold {
inline vec3 SafeNormalize(vec3 v) { … }
inline double MaxEpsilon(double minEpsilon, const Box& bBox) { … }
inline int NextHalfedge(int current) { … }
inline mat3 NormalTransform(const mat3x4& transform) { … }
inline mat2x3 GetAxisAlignedProjection(vec3 normal) { … }
inline vec3 GetBarycentric(const vec3& v, const mat3& triPos,
double tolerance) { … }
struct Halfedge { … };
struct Barycentric { … };
struct TriRef { … };
struct TmpEdge { … };
Vec<TmpEdge> inline CreateTmpEdges(const Vec<Halfedge>& halfedge) { … }
template <const bool inverted>
struct ReindexEdge { … };
#ifdef MANIFOLD_DEBUG
inline std::ostream& operator<<(std::ostream& stream, const Halfedge& edge) {
return stream << "startVert = " << edge.startVert
<< ", endVert = " << edge.endVert
<< ", pairedHalfedge = " << edge.pairedHalfedge;
}
inline std::ostream& operator<<(std::ostream& stream, const Barycentric& bary) {
return stream << "tri = " << bary.tri << ", uvw = " << bary.uvw;
}
inline std::ostream& operator<<(std::ostream& stream, const TriRef& ref) {
return stream << "meshID: " << ref.meshID
<< ", originalID: " << ref.originalID << ", tri: " << ref.tri
<< ", faceID: " << ref.faceID;
}
#endif
}