HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GEO_AttribFind.h File Reference
#include "GEO_API.h"
#include <GA/GA_Handle.h>
#include <UT/UT_Array.h>
#include <UT/UT_KDTree.h>
#include <UT/UT_Vector2.h>
#include <UT/UT_Vector3.h>
#include <UT/UT_VectorTypes.h>
+ Include dependency graph for GEO_AttribFind.h:

Go to the source code of this file.

Classes

struct  GEO_TriOrQuadT< T >
 
class  GEO_2DTree
 
class  GEO_3DTree
 

Macros

#define __GEO_AttribFind__
 

Functions

template<typename POLY >
void GEOpickUpAttribPoints (const POLY &poly, const UT_Vector2 *attribvalues, GEO_2DTree &tree, ut_KDPQueue *kdqueue, UT_IntArray &temp, UT_Array< UT_Vector2 > &temp2, UT_Array< UT_Vector3 > &primuvwsarray, UT_Array< exint > &treepointnumsarray, float tolerance=1e-7f, bool wrapunitsquare=false)
 
void GEO_API GEOpickUpAttribPoints (const GEO_PrimTetrahedron &tet, const UT_Vector3 *attribvalues, GEO_3DTree &tree, ut_KDPQueue *kdqueue, UT_IntArray &temp, UT_Array< UT_Vector3 > &temp2, UT_Array< UT_Vector3 > &primuvwsarray, UT_Array< exint > &treepointnumsarray, float tolerance=1e-7f, bool wrapunitcube=false)
 
template<typename INT >
bool GEOfindAttrib (const GA_Attribute *queryattrib, const GA_Range &queryrange, const GEO_Detail &searchindetail, const GA_Range &searchinrange, const GA_Attribute *searchinattrib, const GA_RWHandleT< INT > &foundprimnums, const GA_RWHandleV3 &foundprimuvws, float tolerance=1e-7f, bool wrapunitcube=false)
 
template<typename INT >
bool GEOfindAttrib (const GA_Attribute *queryattrib, const GA_Range &queryrange, const GEO_Detail &searchindetail, const GA_Range &searchinrange, const GA_Attribute *searchinattrib, const GA_RWHandleT< UT_ValArray< INT > > &foundprimnums, const GA_RWHandleT< UT_Fpreal32Array > &foundprimuvws, float tolerance=1e-7f, bool wrapunitcube=false)
 
template<typename INT >
void GEOfindAttrib (const UT_Array< UT_Vector3 > &queries, const GEO_Detail &searchindetail, const GA_Range &searchinrange, const GA_Attribute *searchinattrib, UT_Array< INT > &foundprimnums, UT_Array< UT_Vector3 > &foundprimuvws, float tolerance=1e-7f, bool wrapunitcube=false)
 
GEO_API void GEOfindAttrib (const GA_Attribute *queryattrib, const GA_Range &queryrange, const GEO_Detail &searchindetail, const GA_Range &searchinrange, const GA_Attribute *searchinattrib, GA_AttributeOwner indexattrib, GA_Attribute *foundindexattrib, GA_Attribute *foundweightsattrib, bool wrapunitcube=false)
 
GEO_API void GEOfindAttrib (const UT_Array< UT_Vector3 > &queries, const GEO_Detail &searchindetail, const GA_Range &searchinrange, const GA_Attribute *searchinattrib, GA_AttributeOwner indexattrib, UT_Array< GEO_TriOrQuadT< GA_Offset > > &foundindexattrib, UT_Array< GEO_TriOrQuadT< float > > &foundweightsattrib, bool wrapunitcube=false)
 

Macro Definition Documentation

#define __GEO_AttribFind__

Definition at line 15 of file GEO_AttribFind.h.

Function Documentation

template<typename INT >
bool GEOfindAttrib ( const GA_Attribute queryattrib,
const GA_Range queryrange,
const GEO_Detail searchindetail,
const GA_Range searchinrange,
const GA_Attribute searchinattrib,
const GA_RWHandleT< INT > &  foundprimnums,
const GA_RWHandleV3 foundprimuvws,
float  tolerance = 1e-7f,
bool  wrapunitcube = false 
)

Finds, for each element in queryrange, the primitive number and primitive uvw in searchindetail at which searchingattrib matches queryattrib.

If appropriate, it interpolates inside (convexed) polygons and tetrahedra to find matching values. Anything that has no match will not be written-to, in case you want to do multiple queries, so make sure to initialize foundprimnums to -1 (default value -1 suffices).

Returns false if the attributes aren't compatible with this querying. searchinattrib must be a numeric, float, point or vertex attribute, queryattrib must be a numeric, float or int attribute of any owner, and the two must have the same tuple size. searchinrange must be a primitive range.

template<typename INT >
bool GEOfindAttrib ( const GA_Attribute queryattrib,
const GA_Range queryrange,
const GEO_Detail searchindetail,
const GA_Range searchinrange,
const GA_Attribute searchinattrib,
const GA_RWHandleT< UT_ValArray< INT > > &  foundprimnums,
const GA_RWHandleT< UT_Fpreal32Array > &  foundprimuvws,
float  tolerance = 1e-7f,
bool  wrapunitcube = false 
)
template<typename INT >
void GEOfindAttrib ( const UT_Array< UT_Vector3 > &  queries,
const GEO_Detail searchindetail,
const GA_Range searchinrange,
const GA_Attribute searchinattrib,
UT_Array< INT > &  foundprimnums,
UT_Array< UT_Vector3 > &  foundprimuvws,
float  tolerance = 1e-7f,
bool  wrapunitcube = false 
)
GEO_API void GEOfindAttrib ( const GA_Attribute queryattrib,
const GA_Range queryrange,
const GEO_Detail searchindetail,
const GA_Range searchinrange,
const GA_Attribute searchinattrib,
GA_AttributeOwner  indexattrib,
GA_Attribute foundindexattrib,
GA_Attribute foundweightsattrib,
bool  wrapunitcube = false 
)

Finds, for each element in queryrange, the vertex or point numbers and corresponding weights in searchindetail at which searchingattrib matches queryattrib.

If appropriate, it interpolates inside (convexed) polygons and tetrahedra to find matching values. Anything that has no match will not be written-to, in case you want to do multiple queries, so make sure to initialize foundprimnums to -1 (default value -1 suffices).

With this version, for polygons with 5 or more sides, only up to 4 indices and weights are produced, because it considers the convexed polygons produced by GEOconvexPoly, producing results more consistent with Mantra.

GEO_API void GEOfindAttrib ( const UT_Array< UT_Vector3 > &  queries,
const GEO_Detail searchindetail,
const GA_Range searchinrange,
const GA_Attribute searchinattrib,
GA_AttributeOwner  indexattrib,
UT_Array< GEO_TriOrQuadT< GA_Offset > > &  foundindexattrib,
UT_Array< GEO_TriOrQuadT< float > > &  foundweightsattrib,
bool  wrapunitcube = false 
)
template<typename POLY >
void GEOpickUpAttribPoints ( const POLY &  poly,
const UT_Vector2 attribvalues,
GEO_2DTree tree,
ut_KDPQueue *  kdqueue,
UT_IntArray temp,
UT_Array< UT_Vector2 > &  temp2,
UT_Array< UT_Vector3 > &  primuvwsarray,
UT_Array< exint > &  treepointnumsarray,
float  tolerance = 1e-7f,
bool  wrapunitsquare = false 
)

NOTE: Although tree is non-const, this is safe to call from multiple threads with the same tree.

void GEO_API GEOpickUpAttribPoints ( const GEO_PrimTetrahedron tet,
const UT_Vector3 attribvalues,
GEO_3DTree tree,
ut_KDPQueue *  kdqueue,
UT_IntArray temp,
UT_Array< UT_Vector3 > &  temp2,
UT_Array< UT_Vector3 > &  primuvwsarray,
UT_Array< exint > &  treepointnumsarray,
float  tolerance = 1e-7f,
bool  wrapunitcube = false 
)

NOTE: Although tree is non-const, this is safe to call from multiple threads with the same tree.