HDK
|
This namespace is used to hold all HDK example source code. More...
Namespaces | |
GU_Copy | |
GU_CurveFrame | |
UT | |
Typedefs | |
typedef UT_ValArray < EUC_Expression * > | EUC_ExpressionList |
typedef UT_ValArray< EUC_Object * > | EUC_ObjectList |
using | GU_Grid = GU_GridT< GA_Offset > |
template<uint N> | |
using | UT_BVH = UT::BVH< N > |
Functions | |
IMPLEMENT_FILTER_OP (cop2_EdgeEnhance, cop2_EdgeEnhanceOp) | |
template<typename INT_T > | |
GA_Offset | GEObuildPrimitives (GEO_Detail *detail, const std::pair< int, exint > *primtype_count_pairs, const GA_Offset init_startpt, const GA_Size npoints_per_copy, const GA_PolyCounts &vertexlistsizelist, const INT_T *vertexpointnumbers, const bool hassharedpoints, const exint *closed_span_lengths, const exint ncopies) |
template GA_Offset | GEObuildPrimitives< int > (GEO_Detail *detail, const std::pair< int, exint > *primtype_count_pairs, const GA_Offset init_startpt, const GA_Size npoints_per_copy, const GA_PolyCounts &polygonsizelist, const int *polygonpointnumbers, const bool hassharedpoints, const exint *closed_span_lengths, const exint ncopies) |
template GA_Offset | GEObuildPrimitives< exint > (GEO_Detail *detail, const std::pair< int, exint > *primtype_count_pairs, const GA_Offset init_startpt, const GA_Size npoints_per_copy, const GA_PolyCounts &polygonsizelist, const exint *polygonpointnumbers, const bool hassharedpoints, const exint *closed_span_lengths, const exint ncopies) |
GA_Size | GEOsplitPoints (GEO_Detail *detail, const GA_ElementGroup *group) |
GA_Size | GEOsplitPointsByAttrib (GEO_Detail *detail, const GA_ElementGroup *group, const GA_Attribute *attrib, fpreal tolerance) |
GA_Size | GEOsplitPointsByAttrib (GEO_Detail *detail, const GA_Range &points, const GA_Attribute *attrib, fpreal tolerance) |
template<typename INT_TYPE , typename FUNCTOR > | |
void | GUiterateGridPoints (const GU_GridT< INT_TYPE > &grid, FUNCTOR &&functor) |
template<typename INT_TYPE , typename FUNCTOR > | |
void | GUiterateGridPrimitives (const GU_GridT< INT_TYPE > &grid, FUNCTOR &&functor) |
template<typename INT_TYPE , typename FUNCTOR > | |
void | GUiterateGridVertices (const GU_GridT< INT_TYPE > &grid, FUNCTOR &&functor) |
template<typename T > | |
T | UTsignedSolidAngleTri (const UT_Vector3T< T > &a, const UT_Vector3T< T > &b, const UT_Vector3T< T > &c, const UT_Vector3T< T > &query) |
template<typename T > | |
T | UTsignedSolidAngleQuad (const UT_Vector3T< T > &a, const UT_Vector3T< T > &b, const UT_Vector3T< T > &c, const UT_Vector3T< T > &d, const UT_Vector3T< T > &query) |
template<typename T > | |
T | UTsignedAngleSegment (const UT_Vector2T< T > &a, const UT_Vector2T< T > &b, const UT_Vector2T< T > &query) |
template<> | |
bool | compareValues< const char * > (const char *const &a, const char *const &b) |
template<> | |
bool | compareValues< UT_Vector3 > (const UT_Vector3 &a, const UT_Vector3 &b) |
template<> | |
bool | compareValues< UT_Vector4 > (const UT_Vector4 &a, const UT_Vector4 &b) |
template<> | |
bool | compareValues< UT_Matrix3 > (const UT_Matrix3 &a, const UT_Matrix3 &b) |
template<> | |
bool | compareValues< UT_Matrix4 > (const UT_Matrix4 &a, const UT_Matrix4 &b) |
This namespace is used to hold all HDK example source code.
JSON methods
Example dialog class. It should be derived from AP_Interface.
Definition at line 39 of file EUC_Expression.h.
typedef UT_ValArray<EUC_Object *> HDK_Sample::EUC_ObjectList |
Definition at line 107 of file EUC_Object.h.
using HDK_Sample::GU_Grid = typedef GU_GridT<GA_Offset> |
using HDK_Sample::UT_BVH = typedef UT::BVH<N> |
anonymous enum |
Definition at line 35 of file SOP_CustomBrush.h.
Enumerator | |
---|---|
EUC_PointType | |
EUC_LineType | |
EUC_CircleType |
Definition at line 38 of file EUC_Object.h.
|
strong |
Enumerator | |
---|---|
NORMALIZED | |
ROUNDED | |
FULL |
Definition at line 5104 of file SOP_SweepHDK.C.
bool HDK_Sample::compareValues< const char * > | ( | const char *const & | a, |
const char *const & | b | ||
) |
Definition at line 55 of file VEX_Sort.C.
bool HDK_Sample::compareValues< UT_Matrix3 > | ( | const UT_Matrix3 & | a, |
const UT_Matrix3 & | b | ||
) |
Definition at line 76 of file VEX_Sort.C.
bool HDK_Sample::compareValues< UT_Matrix4 > | ( | const UT_Matrix4 & | a, |
const UT_Matrix4 & | b | ||
) |
Definition at line 83 of file VEX_Sort.C.
bool HDK_Sample::compareValues< UT_Vector3 > | ( | const UT_Vector3 & | a, |
const UT_Vector3 & | b | ||
) |
Definition at line 62 of file VEX_Sort.C.
bool HDK_Sample::compareValues< UT_Vector4 > | ( | const UT_Vector4 & | a, |
const UT_Vector4 & | b | ||
) |
Definition at line 69 of file VEX_Sort.C.
GA_Offset HDK_Sample::GEObuildPrimitives | ( | GEO_Detail * | detail, |
const std::pair< int, exint > * | primtype_count_pairs, | ||
const GA_Offset | init_startpt, | ||
const GA_Size | npoints_per_copy, | ||
const GA_PolyCounts & | vertexlistsizelist, | ||
const INT_T * | vertexpointnumbers, | ||
const bool | hassharedpoints, | ||
const exint * | closed_span_lengths, | ||
const exint | ncopies = 1 |
||
) |
Function for building primitives in bulk, returning the first primitive offset. This sets up the primitive list, vertices, and topology attributes, parallelizing as much as possible. Any primitive content other than the contents of the GA_Primitive base class will be left at default values, so other data may still need to be initialized in other ways.
Instantiated for INT_T of int (int32) and exint (int64)
Despiate vertexlistsizelist being a GA_PolyCounts, (a run-length encoded array of vertex list sizes), this function works for any primitive types specified in the first component of each pair in primtype_count_pairs.
If ncopies > 1, startpt will have npoints_per_copy added to it between each copy.
Values in vertexpointnumbers are offsets, but relative to startpt, so if constructing from point offsets, be sure to subtract off startpt or specify startpt of GA_Offset(0).
vertexpointnumbers can optionally be nullptr, in which case, vertices will be wired to consecutive point offsets. (This implies that there are no shared points.) This is a fairly common case for separate curve primitives, packed primitives, or polygon soup primitives.
Even if vertexpointnumbers is non-null, hassharedpoints being false can save time (if it applies), because not having shared points avoids the need to ensure a deterministic order of the linked list topology attributes: vertex-to-next-vertex and vertex-to-previous-vertex.
First value of closed_span_lengths is the number with closed false. To start with closed true, have a value of 0 first, then the number with closed true. nullptr means closed false for all primitives.
Definition at line 62 of file GEO_BuildPrimitives.C.
template GA_Offset HDK_Sample::GEObuildPrimitives< exint > | ( | GEO_Detail * | detail, |
const std::pair< int, exint > * | primtype_count_pairs, | ||
const GA_Offset | init_startpt, | ||
const GA_Size | npoints_per_copy, | ||
const GA_PolyCounts & | polygonsizelist, | ||
const exint * | polygonpointnumbers, | ||
const bool | hassharedpoints, | ||
const exint * | closed_span_lengths, | ||
const exint | ncopies | ||
) |
template GA_Offset HDK_Sample::GEObuildPrimitives< int > | ( | GEO_Detail * | detail, |
const std::pair< int, exint > * | primtype_count_pairs, | ||
const GA_Offset | init_startpt, | ||
const GA_Size | npoints_per_copy, | ||
const GA_PolyCounts & | polygonsizelist, | ||
const int * | polygonpointnumbers, | ||
const bool | hassharedpoints, | ||
const exint * | closed_span_lengths, | ||
const exint | ncopies | ||
) |
GA_Size HDK_Sample::GEOsplitPoints | ( | GEO_Detail * | detail, |
const GA_ElementGroup * | group = nullptr |
||
) |
group can be a point, vertex, or primitive group to split out new points for all vertices associated with elements in the group, if the points are shared. This splits all points if group is nullptr. Returns the number of points added. This bumps data IDs as necessary if any points are split.
Definition at line 52 of file GEO_SplitPoints.C.
GA_Size HDK_Sample::GEOsplitPointsByAttrib | ( | GEO_Detail * | detail, |
const GA_ElementGroup * | group, | ||
const GA_Attribute * | attrib, | ||
fpreal | tolerance = 0 |
||
) |
group can be a point, vertex, or primitive group to split out new points for all clusters of vertices in the group where their values are unequal to at least one vertex (whether in the group or not) on the shared point. This splits all points by the attribute if group is nullptr. Returns the number of points added. This bumps data IDs as necessary if any points are split.
Definition at line 391 of file GEO_SplitPoints.C.
GA_Size HDK_Sample::GEOsplitPointsByAttrib | ( | GEO_Detail * | detail, |
const GA_Range & | points, | ||
const GA_Attribute * | attrib, | ||
fpreal | tolerance = 0 |
||
) |
Returns the number of points added. NOTE: You can use GU_Promote to promote primitive attributes to point attributes. This bumps data IDs as necessary if any points are split.
Definition at line 407 of file GEO_SplitPoints.C.
void HDK_Sample::GUiterateGridPoints | ( | const GU_GridT< INT_TYPE > & | grid, |
FUNCTOR && | functor | ||
) |
This calls functor for each point in grid, as: functor(point, row, col)
Consecutive repeated points in a row are skipped, as well as points at the beginning and end of a wrap.
Unlike the primitive and vertex iteration functions, the points passed to the functor are not in ascending order, they are the points in the grid.
Definition at line 48 of file GU_GridImpl.h.
void HDK_Sample::GUiterateGridPrimitives | ( | const GU_GridT< INT_TYPE > & | grid, |
FUNCTOR && | functor | ||
) |
This calls functor for each primitive in grid, as: functor(primnum, row, col, primvtxcount, closed)
Definition at line 97 of file GU_GridImpl.h.
void HDK_Sample::GUiterateGridVertices | ( | const GU_GridT< INT_TYPE > & | grid, |
FUNCTOR && | functor | ||
) |
This calls functor for each vertex in grid, as: functor(vtxnum, row, col, isrowend, iscolend, primnum, primvtxnum)
Definition at line 517 of file GU_GridImpl.h.
HDK_Sample::IMPLEMENT_FILTER_OP | ( | cop2_EdgeEnhance | , |
cop2_EdgeEnhanceOp | |||
) |
T HDK_Sample::UTsignedAngleSegment | ( | const UT_Vector2T< T > & | a, |
const UT_Vector2T< T > & | b, | ||
const UT_Vector2T< T > & | query | ||
) |
Definition at line 259 of file UT_SolidAngle.h.
T HDK_Sample::UTsignedSolidAngleQuad | ( | const UT_Vector3T< T > & | a, |
const UT_Vector3T< T > & | b, | ||
const UT_Vector3T< T > & | c, | ||
const UT_Vector3T< T > & | d, | ||
const UT_Vector3T< T > & | query | ||
) |
Definition at line 92 of file UT_SolidAngle.h.
T HDK_Sample::UTsignedSolidAngleTri | ( | const UT_Vector3T< T > & | a, |
const UT_Vector3T< T > & | b, | ||
const UT_Vector3T< T > & | c, | ||
const UT_Vector3T< T > & | query | ||
) |
Returns the signed solid angle subtended by triangle abc from query point.
WARNING: This uses the right-handed normal convention, whereas most of Houdini uses the left-handed normal convention, so either negate the output, or swap b and c if you want it to be positive inside and negative outside.
Definition at line 50 of file UT_SolidAngle.h.