Skip to content

Commit

Permalink
Fix Region3 class
Browse files Browse the repository at this point in the history
- Avoid chaining global references
- Drop visibility attributes
- Update docblock

Signed-off-by: Michel Hidalgo <[email protected]>
  • Loading branch information
hidmic committed Mar 21, 2022
1 parent e63f2fe commit d7c74a5
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions include/ignition/math/Region3.hh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#define IGNITION_MATH_REGION3_HH_

#include <cmath>
#include <limits>
#include <ostream>
#include <utility>

Expand All @@ -39,11 +40,15 @@ namespace ignition
/// an intersection of halfspaces. Regions may be open or
/// closed in their boundaries, if any.
///
/// Note that the Region3 class is essentially a set R ⊆ R^3.
/// For 3D solid box semantics, use the `AxisAlignedBox` class
/// instead.
///
/// ## Example
///
/// \snippet examples/region3_example.cc complete
template <typename T>
class IGNITION_MATH_VISIBLE Region3
class Region3
{
/// \brief An unbounded region (-∞, ∞) ✕ (-∞, ∞) ✕ (-∞, ∞)
public: static const Region3<T> &Unbounded;
Expand Down Expand Up @@ -184,9 +189,12 @@ namespace ignition
namespace detail {
template<typename T>
const Region3<T> gUnboundedRegion3(
Interval<T>::Unbounded,
Interval<T>::Unbounded,
Interval<T>::Unbounded);
Interval<T>::Open(-std::numeric_limits<T>::infinity(),
std::numeric_limits<T>::infinity()),
Interval<T>::Open(-std::numeric_limits<T>::infinity(),
std::numeric_limits<T>::infinity()),
Interval<T>::Open(-std::numeric_limits<T>::infinity(),
std::numeric_limits<T>::infinity()));
}
template<typename T>
const Region3<T> &Region3<T>::Unbounded = detail::gUnboundedRegion3<T>;
Expand Down

0 comments on commit d7c74a5

Please sign in to comment.