#pragma once
#include
namespace internal
{
// local: cylinder face x^2+y^2-1=0
// u: planar angle from x-axis to z-axis
// v: depth/height from xz-plane to y-axis
struct cylinder_face_t final : subface {
};
} // namespace internal
namespace detail
{
// Q' = M^{-T}QM^{-1}
// Q = {
// 1, 0, 0, 0
// 0, 1, 0, 0
// 0, 0, 0, 0
// 0, 0, 0, -1
// }
const Eigen::Vector4d cylinder_std_diag{1, 1, 0, -1};
template <>
inline size_t hasher::operator()(const internal::cylinder_face_t& subface) const
{
return hash_funcs(get_quadrics_character(cylinder_std_diag, subface));
}
template <>
inline bool eq_compare::operator()(const internal::cylinder_face_t& lhs,
const internal::cylinder_face_t& rhs) const
{
return eq_funcs(get_quadrics_character(cylinder_std_diag, lhs), get_quadrics_character(cylinder_std_diag, rhs));
}
} // namespace detail