7 #ifndef __TC_VIS_EXTREMA 8 #define __TC_VIS_EXTREMA 10 #include <core/data/sframe/gl_sframe.hpp> 15 namespace visualization {
20 T m_max = std::numeric_limits<T>::min();
21 T m_min = std::numeric_limits<T>::max();
24 void update(
const extrema<T>& value) {
25 this->update(value.get_min());
26 this->update(value.get_max());
29 void update(
const T& value) {
41 DASSERT_GE(m_max, m_min);
48 DASSERT_GE(m_max, m_min);
52 bool operator==(
const extrema<T>& other)
const {
53 return m_max == other.m_max && m_min == other.m_min;
56 friend std::ostream& operator<<(std::ostream& stream, const extrema<T>& ex) {
57 stream <<
"[" << ex.m_min <<
", " << ex.m_max <<
"]";
66 void update(
const bounding_box<T>& value) {
67 this->x.update(value.x);
68 this->y.update(value.y);
71 bool operator==(
const bounding_box<T>& other)
const {
72 return x == other.x && y == other.y;
75 friend std::ostream& operator<<(std::ostream& stream, const bounding_box<T>& bb) {
76 stream <<
"[" << bb.x <<
", " << bb.y <<
"]";