1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- #pragma once
- #include <Mathematics/AlignedBox.h>
- namespace WwiseGTE
- {
-
-
- template <int N, typename Real>
- bool GetContainer(int numPoints, Vector<N, Real> const* points, AlignedBox<N, Real>& box)
- {
- return ComputeExtremes(numPoints, points, box.min, box.max);
- }
-
- template <int N, typename Real>
- bool InContainer(Vector<N, Real> const& point, AlignedBox<N, Real> const& box)
- {
- for (int i = 0; i < N; ++i)
- {
- Real value = point[i];
- if (value < box.min[i] || value > box.max[i])
- {
- return false;
- }
- }
- return true;
- }
-
-
- template <int N, typename Real>
- bool MergeContainers(AlignedBox<N, Real> const& box0,
- AlignedBox<N, Real> const& box1, AlignedBox<N, Real>& merge)
- {
- for (int i = 0; i < N; ++i)
- {
- merge.min[i] = std::min(box0.min[i], box1.min[i]);
- merge.max[i] = std::max(box0.max[i], box1.max[i]);
- }
- return true;
- }
- }
|