25 #ifndef INCLUDED_Rect_h_GUID_A81C8929_371D_4EBC_C6BB_A7264EF642E6 26 #define INCLUDED_Rect_h_GUID_A81C8929_371D_4EBC_C6BB_A7264EF642E6 39 template <
typename Scalar =
double>
class Rect {
42 typedef Scalar value_type;
43 enum Side { LEFT = 0, RIGHT = 1, TOP = 2, BOTTOM = 3 };
47 return m_data[
static_cast<index_type
>(s)];
50 return m_data[
static_cast<index_type
>(s)];
61 for (
auto &e : m_data) {
68 typedef std::array<Scalar, 4> storage_type;
69 typedef std::size_t index_type;
74 template <
typename StreamType,
typename Scalar>
75 StreamType &operator<<(StreamType &os, Rect<Scalar>
const &rect) {
77 os <<
"L: " << rect[R::LEFT];
78 os <<
" R: " << rect[R::RIGHT];
79 os <<
" T: " << rect[R::TOP];
80 os <<
" B: " << rect[R::BOTTOM];
86 #endif // INCLUDED_Rect_h_GUID_A81C8929_371D_4EBC_C6BB_A7264EF642E6 Definition: RunLoopManager.h:42
The main namespace for all C++ elements of the framework, internal and external.
Definition: namespace_osvr.dox:3
type & operator()(Side s, value_type v)
Chained function call operator for setting sides.
Definition: Rect.h:54
type & operator*=(Scalar v)
Componentwise multiplication by scalar.
Definition: Rect.h:60
value_type & operator[](Side s)
Access by side.
Definition: Rect.h:46