42 using namespace UT::Literal;
44 namespace HDK_Sample {
48 compareValues(
const T &
a,
const T &
b)
64 return a.length2() >
b.length2();
71 return a.length2() >
b.length2();
78 return a.determinant() >
b.determinant();
85 return a.determinant() >
b.determinant();
90 sort(
int argc,
void *argv[],
void *)
98 arr->
sort(compareValues<T>);
102 decimate(
int argc,
void *argv[],
void *)
108 for (
int i = 0; i < src.
entries()/2; i++)
123 using namespace HDK_Sample;
bool compareValues< const char * >(const char *const &a, const char *const &b)
Use this class to extend VEX by adding custom VEX functions.
GLboolean GLboolean GLboolean GLboolean a
typename VEX_PrecisionResolver< P >::vec3_type VEXvec3
void sort(ComparatorBool is_less={})
Sort using std::sort with bool comparator. Defaults to operator<().
typename VEX_PrecisionResolver< P >::float_type VEXfloat
typename VEX_PrecisionResolver< P >::mat4_type VEXmat4
GLboolean GLboolean GLboolean b
bool compareValues< UT_Matrix3 >(const UT_Matrix3 &a, const UT_Matrix3 &b)
exint entries() const
Alias of size(). size() is preferred.
bool compareValues< UT_Vector4 >(const UT_Vector4 &a, const UT_Vector4 &b)
bool compareValues< UT_Vector3 >(const UT_Vector3 &a, const UT_Vector3 &b)
bool compareValues< UT_Matrix4 >(const UT_Matrix4 &a, const UT_Matrix4 &b)
typename VEX_PrecisionResolver< P >::vec4_type VEXvec4
typename VEX_PrecisionResolver< P >::int_type VEXint
static const char * stringAlloc(const char *str)
typename VEX_PrecisionResolver< P >::mat3_type VEXmat3
void sort(I begin, I end, const Pred &pred)