HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
UT_BoundingCircle.h
Go to the documentation of this file.
1 #include "UT_API.h"
2 #include "UT_Array.h"
3 #include "UT_Vector2.h"
4 
5 /// Returns radius squared
6 template<typename T>
7 UT_API T UTboundingCircle(const T *coords, exint n, T *centre_out = nullptr);
8 
9 template<typename T>
10 inline T UTboundingCircle(const UT_Array<UT_Vector2T<T> > &coords, UT_Vector2T<T> *centre_out = nullptr)
11 {
12  return UTboundingCircle((const T*)coords.getArray(), coords.size(), centre_out ? centre_out->data() : nullptr);
13 }
14 
15 template<typename T>
16 inline T UTboundingCircle(const UT_Vector2T<T> *coords, exint n, UT_Vector2T<T> *centre_out = nullptr)
17 {
18  return UTboundingCircle((const T*)coords, n, centre_out ? centre_out->data() : nullptr);
19 }
SYS_FORCE_INLINE constexpr const T * data() const noexcept
#define UT_API
Definition: UT_API.h:12
2D Vector class.
Definition: UT_Vector2.h:137
GLdouble n
Definition: glcorearb.h:2007
int64 exint
Definition: SYS_Types.h:115
UT_API T UTboundingCircle(const T *coords, exint n, T *centre_out=nullptr)
Returns radius squared.