extract explicit mesh with topology information from implicit surfaces with boolean operations, and do surface/volume integrating on them.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

36 lines
890 B

#pragma once
#include <base/subface.hpp>
#include <primitive_descriptor.h>
namespace internal
{
// local: cone face x^2+y^2-z^2=0(z<=0)
struct cone_face_t final : subface {
};
} // namespace internal
namespace detail
{
// Q' = M^{-T}QM^{-1}
// Q = {
// 1, 0, 0, 0
// 0, 1, 0, 0
// 0, 0, -1, 0
// 0, 0, 0, 0
// }
const Eigen::Vector4d cone_std_diag{1, 1, -1, 0};
template <>
inline size_t hasher<internal::cone_face_t>::operator()(const internal::cone_face_t& subface) const
{
return hash_funcs(get_quadrics_character(cone_std_diag, subface));
}
template <>
inline bool eq_compare<internal::cone_face_t>::operator()(const internal::cone_face_t& lhs,
const internal::cone_face_t& rhs) const
{
return eq_funcs(get_quadrics_character(cone_std_diag, lhs), get_quadrics_character(cone_std_diag, rhs));
}
} // namespace detail