HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HDK_Sample Namespace Reference

This namespace is used to hold all HDK example source code. More...

Namespaces

 GU_Copy
 
 GU_CurveFrame
 
 UT
 

Classes

class  CHOP_Blend
 
class  ut_SpringData
 
class  CHOP_Spring
 
class  CHOP_Stair
 
class  COP2_FullImageFilter
 
class  cop2_FullImageFilterData
 
class  cop2_MultiInputWipeData
 
class  COP2_MultiInputWipe
 
class  cop2_AddFunc
 
class  COP2_PixelAdd
 
class  cop2_EdgeEnhance
 
class  cop2_EdgeEnhanceOp
 
class  COP2_SampleFilter
 Simple example of a kernel filter. More...
 
class  cop2_SampleFilterContext
 Storage class for our parameters and the kernel. More...
 
class  COP2_SampleGenerator
 Simple COP generator example for the HDK. More...
 
class  cop2_SampleGeneratorData
 Data class to hold parm values and data for COP2_SampleGenerator. More...
 
class  DOP_GroupAndApply
 
class  EUC_Expression
 
class  EUC_ExprPoint
 
class  EUC_ExprPointFromObject
 
class  EUC_ExprLineFromPoints
 
class  EUC_ExprCircleFromPoints
 
class  EUC_ExprIntersect
 
class  EUC_ExprSelect
 
class  EUC_Object
 
class  EUC_Point
 
class  EUC_Line
 
class  EUC_Circle
 
class  SOP_EuclidBase
 
class  SOP_EuclidPoint
 
class  SOP_EuclidPointFromObject
 
class  SOP_EuclidLineFromPoints
 
class  SOP_EuclidCircleFromPoints
 
class  SOP_EuclidIntersect
 
class  SOP_EuclidSelect
 
class  BackgroundTask
 BackgroundTask is the object which keeps track of the background process. More...
 
class  BackgroundTimer
 Event generator to poll for completed tasks. More...
 
class  FS_HomeReadHelper
 Class to open a file as a read stream. The class tests for a "home:" prefix and replaces it with $HOME. More...
 
class  FS_HomeWriteHelper
 Class to open a file as a write stream. The class tests for a "home:" prefix and replaces it with $HOME. More...
 
class  FS_HomeInfoHelper
 Class to stat a file. The class tests for a "home:" prefix and replaces it with $HOME. More...
 
class  SOP_HOMWave
 
struct  IMG_SampleHeader
 
class  IMG_SampleFormat
 
class  IMG_Sample
 
class  MocapStreamRokokoHDK
 
class  OBJ_Shake
 
class  OBJ_WorldAlign
 
class  ROP_Dumper
 
class  GAS_NetVDBSliceExchange
 
class  SIM_ElectricalProperties
 
class  SIM_ForceOrbit
 
class  SIM_GasAdd
 
class  SIM_RadialEmit
 
class  SIM_HairForceCallback
 
class  SIM_SolverHair
 
class  SNOW_Solver
 
class  SNOW_VoxelArray
 
class  SNOW_Visualize
 
class  MSS_BrushHairLen
 
class  MSS_BrushHairLenSelector
 
class  MSS_CustomBrushState
 
class  SOP_ArrayAttrib
 
class  SOP_BlindData
 
class  SOP_BouncyAgent
 
class  SOP_BrushHairLen
 
class  SOP_CopRaster
 
class  SOP_CopyPackedCache
 
class  SOP_CopyPackedVerb
 
class  SOP_CopyPacked
 This is the SOP class definition. More...
 
struct  GU_PointTransformCache
 
struct  GU_CopyToPointsCache
 
class  SOP_CopyToPointsHDKCache
 
class  SOP_CopyToPointsHDKVerb
 
class  SOP_CopyToPointsHDK
 
class  SOP_CPPWave
 
class  SOP_UndoCustomBrushData
 
struct  SOP_CustomBrushData
 
class  SOP_CustomBrush
 
class  SOP_DetailAttrib
 
class  SOP_DualStar
 
class  SOP_Flatten
 
class  SOP_GroupRename
 
class  SOP_HDKObject
 
class  SOP_IKSample
 
class  SOP_NURBS
 Shows the interface for building a NURBS surface. More...
 
class  SOP_OrientAlongCurveVerb
 
class  SOP_OrientAlongCurve
 This is the SOP class definition. More...
 
class  SOP_PointWave
 
class  sop_bindparms
 
class  SOP_PrimVOP
 
class  SOP_SParticle
 
class  SOP_SplitPointsHDKVerb
 
class  SOP_SplitPointsHDK
 This is the SOP class definition. More...
 
class  SOP_Star
 
class  SOP_Surface
 
struct  GU_GridT
 
class  SOP_SweepHDKCache
 
struct  sop_SweepGridTransformWrapper
 
class  SOP_SweepHDKVerb
 
class  SOP_SweepHDK
 This is the SOP class definition. More...
 
class  SOP_TimeCompare
 
class  SOP_VolumeProject
 
class  SOP_WindingNumber
 
class  UT_SolidAngle
 
class  UT_SubtendedAngle
 
class  geo_PrimTetraJSON
 
class  GEO_PrimTetra
 
class  GR_PrimTetraHook
 The primitive render hook which creates GR_PrimTetra objects. More...
 
class  GR_PrimTetra
 
class  GT_PrimTetraCollect
 
class  SOP_Tetra
 
class  MyDialog
 
class  gamma_Table
 
class  SOP_CustomVopOperatorFilter
 
class  SOP_CustomVop
 C++ SOP node to provide the custom VOP context. More...
 
class  VOP_CustomVop
 C++ VOP node to select one of its inputs and feed it into the output. More...
 
class  VOP_Switch
 C++ VOP node to select one of its inputs and feed it into the output. More...
 
class  RAY_DemoBox
 A very simple mantra procedural to render a box. More...
 
class  RAY_DemoEdgeDetectFilter
 
class  RAY_DemoFile
 A procedural which does a deferred load of geometry from disk. More...
 
class  RAY_DemoGT
 A procedural using GT to create geometry for rendering. More...
 
class  FractalPoint
 
class  RAY_DemoMountain
 
class  ray_SpriteAttribMap
 
class  RAY_DemoSpriteParms
 
class  RAY_DemoSprite
 
class  ray_ChildBox
 Procedural used in RAY/RAY_DemoStamp.C to render a box. More...
 
class  RAY_DemoStamp
 A procedural which splits into further procedurals during rendering. More...
 
class  ray_VolumeSphere
 Volume primitive used by RAY/RAY_DemoVolumeSphere.C. More...
 
class  RAY_DemoVolumeSphere
 Example of a custom volume primitive. More...
 

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 >
 

Enumerations

enum  EUC_ObjType { EUC_PointType, EUC_LineType, EUC_CircleType }
 
enum  {
  SOP_CUSTOMBRUSH_GRP_IDX = 0, SOP_CUSTOMBRUSH_ORIGIN_IDX, SOP_CUSTOMBRUSH_DIRECTION_IDX, SOP_CUSTOMBRUSH_RADIUS_IDX,
  SOP_CUSTOMBRUSH_COLOR_IDX, SOP_CUSTOMBRUSH_ALPHA_IDX, SOP_CUSTOMBRUSH_OPERATION_IDX, SOP_CUSTOMBRUSH_EVENT_IDX,
  SOP_CUSTOMBRUSH_CLEARALL_IDX
}
 
enum  UVStyle { UVStyle::NORMALIZED, UVStyle::ROUNDED, UVStyle::FULL }
 

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 >
UTsignedSolidAngleTri (const UT_Vector3T< T > &a, const UT_Vector3T< T > &b, const UT_Vector3T< T > &c, const UT_Vector3T< T > &query)
 
template<typename 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 >
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)
 

Detailed Description

This namespace is used to hold all HDK example source code.

JSON methods

Example dialog class. It should be derived from AP_Interface.

Typedef Documentation

Definition at line 417 of file GU_Grid.h.

template<uint N>
using HDK_Sample::UT_BVH = typedef UT::BVH<N>

Definition at line 583 of file UT_BVH.h.

Enumeration Type Documentation

anonymous enum
Enumerator
SOP_CUSTOMBRUSH_GRP_IDX 
SOP_CUSTOMBRUSH_ORIGIN_IDX 
SOP_CUSTOMBRUSH_DIRECTION_IDX 
SOP_CUSTOMBRUSH_RADIUS_IDX 
SOP_CUSTOMBRUSH_COLOR_IDX 
SOP_CUSTOMBRUSH_ALPHA_IDX 
SOP_CUSTOMBRUSH_OPERATION_IDX 
SOP_CUSTOMBRUSH_EVENT_IDX 
SOP_CUSTOMBRUSH_CLEARALL_IDX 

Definition at line 35 of file SOP_CustomBrush.h.

Enumerator
EUC_PointType 
EUC_LineType 
EUC_CircleType 
Examples:
euclid/EUC_Object.h.

Definition at line 38 of file EUC_Object.h.

enum HDK_Sample::UVStyle
strong
Enumerator
NORMALIZED 
ROUNDED 
FULL 

Definition at line 5104 of file SOP_SweepHDK.C.

Function Documentation

template<>
bool HDK_Sample::compareValues< const char * > ( const char *const &  a,
const char *const &  b 
)
Examples:
VEX/VEX_Sort.C.

Definition at line 55 of file VEX_Sort.C.

template<>
bool HDK_Sample::compareValues< UT_Matrix3 > ( const UT_Matrix3 a,
const UT_Matrix3 b 
)
Examples:
VEX/VEX_Sort.C.

Definition at line 76 of file VEX_Sort.C.

template<>
bool HDK_Sample::compareValues< UT_Matrix4 > ( const UT_Matrix4 a,
const UT_Matrix4 b 
)
Examples:
VEX/VEX_Sort.C.

Definition at line 83 of file VEX_Sort.C.

template<>
bool HDK_Sample::compareValues< UT_Vector3 > ( const UT_Vector3 a,
const UT_Vector3 b 
)
Examples:
VEX/VEX_Sort.C.

Definition at line 62 of file VEX_Sort.C.

template<>
bool HDK_Sample::compareValues< UT_Vector4 > ( const UT_Vector4 a,
const UT_Vector4 b 
)
Examples:
VEX/VEX_Sort.C.

Definition at line 69 of file VEX_Sort.C.

template<typename INT_T >
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.

template<typename INT_TYPE , typename FUNCTOR >
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.

template<typename INT_TYPE , typename FUNCTOR >
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.

template<typename INT_TYPE , typename FUNCTOR >
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   
)
template<typename T >
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.

template<typename T >
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.

template<typename T >
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.