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.

29 lines
765 B

#pragma once
#include <base/subface.hpp>
namespace internal
{
// local: a sphere with center at (0, 0, 0) and radius 1
// u: planar angle from x-axis to z-axis
// v: polar angle from xz-plane to y-axis
5 days ago
// EDIT: recap v from [-pi/2, pi/2] to [0, pi]
struct sphere_face_t final : subface {
};
} // namespace internal
namespace detail
{
template <>
struct hasher<internal::sphere_face_t> {
5 days ago
size_t operator()(const internal::sphere_face_t& subface) const { return hash_funcs(subface.local_to_world); }
};
template <>
struct eq_compare<internal::sphere_face_t> {
bool operator()(const internal::sphere_face_t& lhs, const internal::sphere_face_t& rhs) const
{
return eq_funcs(lhs.local_to_world, rhs.local_to_world);
}
};
} // namespace detail