HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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 }
int64 exint
Definition: SYS_Types.h:125
#define UT_API
Definition: UT_API.h:14
2D Vector class.
Definition: UT_Vector2.h:159
GLdouble n
Definition: glcorearb.h:2008
GLuint coords
Definition: glad.h:4091
constexpr SYS_FORCE_INLINE const T * data() const noexcept
Definition: UT_Vector2.h:217
UT_API T UTboundingCircle(const T *coords, exint n, T *centre_out=nullptr)
Returns radius squared.