35 #ifndef IE_CORE_BOXTRAITS_H
36 #define IE_CORE_BOXTRAITS_H
38 #include "boost/static_assert.hpp"
40 #include "OpenEXR/ImathBox.h"
41 #include "OpenEXR/ImathBoxAlgo.h"
43 #include "IECore/VectorTraits.h"
53 typedef typename T::BaseType BaseType;
61 typedef typename BoxTypeTraits<T>::BaseType BaseType;
76 static BaseType
min(
const T &box )
82 static BaseType
max(
const T &box )
87 static void setMin( T &box,
const BaseType &p )
92 static void setMax( T &box,
const BaseType &p )
100 return box.isEmpty();
113 struct BoxTypeTraits<
Imath::Box3s>
115 typedef Imath::V3s BaseType;
120 struct BoxTypeTraits<
Imath::Box3i>
122 typedef Imath::V3i BaseType;
127 struct BoxTypeTraits<
Imath::Box3f>
129 typedef Imath::V3f BaseType;
134 struct BoxTypeTraits<
Imath::Box3d>
136 typedef Imath::V3d BaseType;
141 struct BoxTypeTraits<
Imath::Box2s>
143 typedef Imath::V2s BaseType;
148 struct BoxTypeTraits<
Imath::Box2i>
150 typedef Imath::V2i BaseType;
155 struct BoxTypeTraits<
Imath::Box2f>
157 typedef Imath::V2f BaseType;
162 struct BoxTypeTraits<
Imath::Box2d>
164 typedef Imath::V2d BaseType;
171 #endif // IE_CORE_BOXTRAITS_H
static BaseType min(const T &box)
Return the box's minimum corner point.
Definition: BoxTraits.h:76
Definition: BoxTraits.h:59
Definition: BoxTraits.h:51
static BaseType max(const T &box)
Return the box's maximum corner point.
Definition: BoxTraits.h:82
static T create()
Create an empty box.
Definition: BoxTraits.h:70
static void makeEmpty(T &box)
Modify the box such that it is considered to be empty.
Definition: BoxTraits.h:104
static T create(const BaseType &min, const BaseType &max)
Create a box from the minimum and maximum corner points.
Definition: BoxTraits.h:64
This namespace contains all components of the core library.
Definition: AddSmoothSkinningInfluencesOp.h:43
static bool isEmpty(const T &box)
Return true if the box is considered to be empty.
Definition: BoxTraits.h:98