#pragma once #include namespace internal { // local: plane x=0 struct plane_t final : subface { static constexpr uint64_t max_degree = 1; static constexpr equation_system_type eq_sys_type = equation_system_type::implicit; std::function fetch_sdf_evaluator() const override; std::function fetch_sdf_grad_evaluator() const override; // u: planar local x-axis // v: planar local y-axis std::function fetch_point_by_param_evaluator() const override; std::function fetch_curve_constraint_evaluator(parameter_u_t constraint_var_type, double u) const override; std::function fetch_curve_constraint_evaluator(parameter_v_t constraint_var_type, double v) const override; std::function fetch_solver_evaluator() const override; }; struct plane_paired_model_matrix { internal::paired_model_matrix *data{}; }; } // namespace internal namespace detail { template <> struct hasher { size_t operator()(const internal::plane_paired_model_matrix &block) const { Eigen::Vector4d character_row = block.data->world_to_local.matrix().row(0); return XXH3_64bits(character_row.data(), sizeof(Eigen::Vector4d)); } }; template <> struct default_elem_ctor { internal::plane_t operator()(const internal::plane_paired_model_matrix &k) const { internal::plane_t res{}; res.model_matrices = const_cast(k.data); return res; } }; } // namespace detail