DCPQuery.h 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. // David Eberly, Geometric Tools, Redmond WA 98052
  2. // Copyright (c) 1998-2020
  3. // Distributed under the Boost Software License, Version 1.0.
  4. // https://www.boost.org/LICENSE_1_0.txt
  5. // https://www.geometrictools.com/License/Boost/LICENSE_1_0.txt
  6. // Version: 4.0.2019.08.13
  7. #pragma once
  8. #include <Mathematics/Math.h>
  9. namespace WwiseGTE
  10. {
  11. // Distance and closest-point queries.
  12. template <typename Real, typename Type0, typename Type1>
  13. class DCPQuery
  14. {
  15. public:
  16. struct Result
  17. {
  18. // A DCPQuery-base class B must define a B::Result struct with
  19. // member 'Real distance'. A DCPQuery-derived class D must also
  20. // derive a D::Result from B:Result but may have no members. The
  21. // idea is to allow Result to store closest-point information in
  22. // addition to the distance. The operator() is non-const so that
  23. // specific implementations can use internal data to support the
  24. // queries. The implementations can also use static functions as
  25. // necessary.
  26. };
  27. Result operator()(Type0 const& primitive0, Type1 const& primitive1);
  28. };
  29. }