Skip to content
Snippets Groups Projects
Commit 22d15ff2 authored by Aaron Grabowy's avatar Aaron Grabowy
Browse files

Fixed boundary_of and solid_of box2in3

parent d4b67d09
No related branches found
No related tags found
1 merge request!94Implemented perimeter_of, area_of, volume_of, faces_of, and centroid_of for all remaining types
......@@ -19,16 +19,11 @@ template <int D, class ScalarT, class TraitsT>
{
return {v.min, v.max};
}
template <int D, class ScalarT, class TraitsT>
[[nodiscard]] constexpr box_boundary<D, ScalarT> boundary_of(box<D, ScalarT, D, TraitsT> const& v)
template <int ObjectD, class ScalarT, int DomainD, class TraitsT>
[[nodiscard]] constexpr box_boundary<ObjectD, ScalarT, DomainD> boundary_of(box<ObjectD, ScalarT, DomainD, TraitsT> const& v)
{
return {v.center, v.half_extents};
}
template <class ScalarT, class TraitsT>
[[nodiscard]] constexpr box_boundary<2, ScalarT, 3> boundary_of(box<2, ScalarT, 3, TraitsT> const& v)
{
return {v.center, v.half_extents, v.normal};
}
template <int D, class ScalarT, class TraitsT>
[[nodiscard]] constexpr capsule_boundary<D, ScalarT> boundary_of(capsule<D, ScalarT, TraitsT> const& v)
{
......@@ -157,16 +152,11 @@ template <int D, class ScalarT, class TraitsT>
{
return {v.min, v.max};
}
template <int D, class ScalarT, class TraitsT>
[[nodiscard]] constexpr box<D, ScalarT> solid_of(box<D, ScalarT, D, TraitsT> const& v)
template <int ObjectD, class ScalarT, int DomainD, class TraitsT>
[[nodiscard]] constexpr box<ObjectD, ScalarT, DomainD> solid_of(box<ObjectD, ScalarT, DomainD, TraitsT> const& v)
{
return {v.center, v.half_extents};
}
template <class ScalarT, class TraitsT>
[[nodiscard]] constexpr box<2, ScalarT, 3> solid_of(box<2, ScalarT, 3, TraitsT> const& v)
{
return {v.center, v.half_extents, v.normal};
}
template <int D, class ScalarT, class TraitsT>
[[nodiscard]] constexpr capsule<D, ScalarT> solid_of(capsule<D, ScalarT, TraitsT> const& v)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment