HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
POP_Node.h File Reference
#include "POP_API.h"
#include "POP_ContextData.h"
#include "POP_Defines.h"
#include "POP_Error.h"
#include "POP_Guide.h"
#include "POP_ParticleIterator.h"
#include "POP_ParticleList.h"
#include "POP_Shared.h"
#include "POP_GBElement.h"
#include <GOP/GOP_Manager.h>
#include <GU/GU_DetailHandle.h>
#include <GA/GA_PageHandle.h>
#include <OP/OP_Network.h>
#include <UT/UT_Interrupt.h>
#include <UT/UT_NTStreamUtil.h>
#include <UT/UT_ValArray.h>
#include <UT/UT_Thread.h>
#include <UT/UT_Vector3.h>
#include <GA/GA_GBElement.h>
+ Include dependency graph for POP_Node.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  GA_GBPointIterator
 
class  GA_GBPointIteratorNoCacheConst< GA_POINT_TYPE >
 
class  GA_GBPointIteratorNoCache< GA_POINT_TYPE >
 
class  GA_GBPrimWrap
 
class  POP_Node
 

Macros

#define GA_FOR_ALL_GPOINTS(gdp, point)
 
#define GA_FOR_ALL_GROUP_POINTS_NC(gdp, grp, PtType, pt)   for (GA_GBPointIteratorNoCache<PtType> pt(*(gdp),grp); !pt.atEnd(); ++pt)
 
#define GA_FOR_ALL_GROUP_POINTS(gdp, grp, point)
 
#define GA_FOR_ALL_GROUP_POINTS_NC_CONST(gdp, grp, PtType, pt)   for (GA_GBPointIteratorNoCacheConst<PtType> pt(*(gdp),grp); !pt.atEnd(); ++pt)
 
#define GA_FOR_ALL_OPT_GROUP_POINTS_NC_CONST(gdp, grp, PtType, point)   GA_FOR_ALL_GROUP_POINTS_NC_CONST(gdp, grp, PtType, point)
 
#define GA_FOR_PAIRS_OF_GROUP_POINTS(gdp1, grp1, point1, gdp2, grp2, point2)
 
Macros to aid in implementing individual parameter evaluation methods

Convenience macros typically used while implementing parameter evaluation methods on subclasses of POP_Node.

#define FLOAT_PARM(name, idx, vi, t)   return evalFloat(name, &myIndirect[idx], vi, t);
 
#define INT_PARM(name, idx, vi, t)   return evalInt(name, &myIndirect[idx], vi, t);
 
#define STR_PARM(name, idx, vi, t)   evalString(s, name, &myIndirect[idx], vi, t);
 
#define STR_PARM_NE(name, idx, vi, t)   evalStringRaw(s, name, &myIndirect[idx], vi, t);
 
Macros to aid in efficient per-particle parameter evaluation
#define POP_FPARM(myvar, get)
 Use in class definition to declare members for caching non-variable dependent values. More...
 
#define POP_IPARM(myvar, get)
 Use in class definition to declare members for caching non-variable dependent values. More...
 
#define POP_SPARM(myvar, get)
 Use in class definition to declare members for caching non-variable dependent values. More...
 
#define POP_VPARM(myvar, get)
 Use in class definition to declare members for caching non-variable dependent values. More...
 
#define POP_FCACHE(var, eval, get, myvar, classname)
 Use during cook to select between a per-particle or per-cook evaluation method. More...
 
#define POP_ICACHE(var, eval, get, myvar, classname)
 Use in class definition to declare members for caching non-variable dependent values. More...
 
#define POP_SCACHE(var, eval, get, myvar, classname)
 Use in class definition to declare members for caching non-variable dependent values. More...
 
#define POP_VCACHE(var, expr, get, myvar, classname)
 Use in class definition to declare members for caching non-variable dependent values. More...
 
#define POP_PEVAL(name)   (this->*name)(t)
 Use during cook to call a parameter evaluation method pointer. More...
 
#define POP_SEVAL(name, s)   (this->*name)(s, t)
 Use in class definition to declare members for caching non-variable dependent values. More...
 
#define POP_VEVAL(name, expr, x, y, z, thread)   (this->*name)(expr, x, y, z, thread)
 Use in class definition to declare members for caching non-variable dependent values. More...
 
#define POP_CB_PEVAL(name)   (this->*name)(data->myTime)
 Use during cook to call a parameter evaluation method pointer during a callback. More...
 
#define POP_CB_SEVAL(name, s)   (this->*name)(s, data->myTime)
 Use during cook to call a parameter evaluation method pointer during a callback. More...
 

Typedefs

typedef void(POP_Node::* POP_BirthAttribFunc )(POP_ContextData *data, GEO_PointP ppt, UT_Vector3 *vel, void *userdata)
 
typedef float(POP_Node::* POP_FloatFunc )(POP_ContextData *data)
 
typedef int(POP_Node::* POP_IntFunc )(POP_ContextData *data)
 
typedef void(POP_Node::* POP_TraverseFunc )(void *userdata)
 
typedef void(POP_Node::* POP_JitterFunc )(GU_Detail **gdp, GA_PointGroup **pointGroup, GA_PrimitiveGroup **primGroup, GU_RayIntersect **rayIntersect, POP_AttribMap **map, float timeIncFraction)
 
typedef UT_ValArray
< POP_ParticleList * > 
POP_ParticleListArray
 A PtrArray which stores pointers to POP_ParticleList. More...
 
Pointers to evaluation methods
typedef float(POP_Node::* POP_FParam )(float t)
 
typedef int(POP_Node::* POP_IParam )(float t)
 
typedef void(POP_Node::* POP_SParam )(UT_String &s, float t)
 
typedef void(POP_Node::* POP_VParam )(EV_EXPRESSION *expr, float &x, float &y, float &z, int thread)
 

Functions

SYS_VISIBILITY_EXPORT void newPopOperator (OP_OperatorTable *table)
 
POP_API void POPgetVexReservedTemplateLists (UT_ValArray< PRM_Template * > &tplatelists)
 

Macro Definition Documentation

#define FLOAT_PARM (   name,
  idx,
  vi,
 
)    return evalFloat(name, &myIndirect[idx], vi, t);

Definition at line 58 of file POP_Node.h.

#define GA_FOR_ALL_GPOINTS (   gdp,
  point 
)
Value:
for (GA_GBPointIterator it(*(gdp)); \
(point = GEO_PointP(gdp, it.getPoint())); ++it)
DO NOT USE THIS CLASS!!!
Definition: GEO_Point.h:389

Iterate over all points.

Definition at line 296 of file POP_Node.h.

#define GA_FOR_ALL_GROUP_POINTS (   gdp,
  grp,
  point 
)
Value:
for (GA_GBPointIterator it(*(gdp), grp); \
(point = GEO_PointP(gdp, it.getPoint())); ++it)
DO NOT USE THIS CLASS!!!
Definition: GEO_Point.h:389

Iterate over all points in group.

See Also
GA_RTIElementGroup

Definition at line 309 of file POP_Node.h.

#define GA_FOR_ALL_GROUP_POINTS_NC (   gdp,
  grp,
  PtType,
  pt 
)    for (GA_GBPointIteratorNoCache<PtType> pt(*(gdp),grp); !pt.atEnd(); ++pt)

Iterate over all points in group.

See Also
GA_RTIElementGroup The point will be reused for all the iterations, so do not cache the resulting pointer!

Definition at line 304 of file POP_Node.h.

#define GA_FOR_ALL_GROUP_POINTS_NC_CONST (   gdp,
  grp,
  PtType,
  pt 
)    for (GA_GBPointIteratorNoCacheConst<PtType> pt(*(gdp),grp); !pt.atEnd(); ++pt)

Definition at line 313 of file POP_Node.h.

#define GA_FOR_ALL_OPT_GROUP_POINTS_NC_CONST (   gdp,
  grp,
  PtType,
  point 
)    GA_FOR_ALL_GROUP_POINTS_NC_CONST(gdp, grp, PtType, point)

Definition at line 321 of file POP_Node.h.

#define GA_FOR_PAIRS_OF_GROUP_POINTS (   gdp1,
  grp1,
  point1,
  gdp2,
  grp2,
  point2 
)
Value:
for (GA_GBPointIterator it(*(gdp1), grp1, *(gdp2), grp2); \
(point1=GEO_PointP(gdp1, it.getPoint())) && \
(point2=GEO_PointP(gdp2, it.getPoint2())); ++it)
DO NOT USE THIS CLASS!!!
Definition: GEO_Point.h:389

Iterate over points in the specified groups across both GA_Details in a pairwise fashion.

Definition at line 327 of file POP_Node.h.

#define INT_PARM (   name,
  idx,
  vi,
 
)    return evalInt(name, &myIndirect[idx], vi, t);
Examples:
field3d/ROP_Field3D.h, and SOP/SOP_SParticle.h.

Definition at line 60 of file POP_Node.h.

#define POP_CB_PEVAL (   name)    (this->*name)(data->myTime)

Use during cook to call a parameter evaluation method pointer during a callback.

Definition at line 498 of file POP_Node.h.

#define POP_CB_SEVAL (   name,
 
)    (this->*name)(s, data->myTime)

Use during cook to call a parameter evaluation method pointer during a callback.

Definition at line 503 of file POP_Node.h.

#define POP_FCACHE (   var,
  eval,
  get,
  myvar,
  classname 
)
Value:
{ \
if (isVarDependent(data->getDetail(), \
(POP_FParam) &classname::eval, t, thread)) \
var = (POP_FParam) &classname::eval; \
else \
{ myvar = eval(t); var = (POP_FParam) &classname::get; } \
}
float(POP_Node::* POP_FParam)(float t)
Definition: POP_Node.h:403
GLboolean * data
Definition: glcorearb.h:130
if(rank==1) return rank

Use during cook to select between a per-particle or per-cook evaluation method.

Calls the parameter evaluation method eval, and if the evaluation is dependent on any per-particle variables, sets the method pointer var to point to eval. Otherwise it caches the value in the member variable myvar and sets var to point to get, the method that simply returns said cached value.

Definition at line 446 of file POP_Node.h.

#define POP_FPARM (   myvar,
  get 
)
Value:
float myvar; \
float get(float) { return(myvar); }

Use in class definition to declare members for caching non-variable dependent values.

Declares a member variable myvar to cache a parameter value and an evaluator method to return that value.

Definition at line 418 of file POP_Node.h.

#define POP_ICACHE (   var,
  eval,
  get,
  myvar,
  classname 
)
Value:
{ \
if (isVarDependent(data->getDetail(), \
(POP_IParam) &classname::eval, t, thread)) \
var = (POP_IParam) &classname::eval; \
else \
{ myvar = eval(t); var = (POP_IParam) &classname::get; } \
}
int(POP_Node::* POP_IParam)(float t)
Definition: POP_Node.h:404
GLboolean * data
Definition: glcorearb.h:130
if(rank==1) return rank

Use in class definition to declare members for caching non-variable dependent values.

Declares a member variable myvar to cache a parameter value and an evaluator method to return that value.

Definition at line 455 of file POP_Node.h.

#define POP_IPARM (   myvar,
  get 
)
Value:
int myvar; \
int get(float) { return(myvar); }
typedef int
Definition: png.h:1175

Use in class definition to declare members for caching non-variable dependent values.

Declares a member variable myvar to cache a parameter value and an evaluator method to return that value.

Definition at line 422 of file POP_Node.h.

#define POP_PEVAL (   name)    (this->*name)(t)

Use during cook to call a parameter evaluation method pointer.

Definition at line 487 of file POP_Node.h.

#define POP_SCACHE (   var,
  eval,
  get,
  myvar,
  classname 
)
Value:
{ \
if (isVarDependent(data->getDetail(), \
(POP_SParam) &classname::eval, t, thread)) \
var = (POP_SParam) &classname::eval; \
else \
{ eval(myvar, t); var = (POP_SParam) &classname::get; } \
}
void(POP_Node::* POP_SParam)(UT_String &s, float t)
Definition: POP_Node.h:405
GLboolean * data
Definition: glcorearb.h:130
if(rank==1) return rank

Use in class definition to declare members for caching non-variable dependent values.

Declares a member variable myvar to cache a parameter value and an evaluator method to return that value.

Definition at line 464 of file POP_Node.h.

#define POP_SEVAL (   name,
 
)    (this->*name)(s, t)

Use in class definition to declare members for caching non-variable dependent values.

Declares a member variable myvar to cache a parameter value and an evaluator method to return that value.

Definition at line 490 of file POP_Node.h.

#define POP_SPARM (   myvar,
  get 
)
Value:
UT_String myvar; \
void get(UT_String& s, float) { s = myvar; }
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)

Use in class definition to declare members for caching non-variable dependent values.

Declares a member variable myvar to cache a parameter value and an evaluator method to return that value.

Definition at line 426 of file POP_Node.h.

#define POP_VCACHE (   var,
  expr,
  get,
  myvar,
  classname 
)
Value:
{ \
if (isVarDependent(data->getDetail(), expr, thread)) \
var = &classname::evalVector; \
else \
{ evalVector(expr, myvar[0], myvar[1], myvar[2], thread); \
var = (POP_VParam) &classname::get; } \
}
GLboolean * data
Definition: glcorearb.h:130
if(rank==1) return rank
void(POP_Node::* POP_VParam)(EV_EXPRESSION *expr, float &x, float &y, float &z, int thread)
Definition: POP_Node.h:406

Use in class definition to declare members for caching non-variable dependent values.

Declares a member variable myvar to cache a parameter value and an evaluator method to return that value.

Definition at line 473 of file POP_Node.h.

#define POP_VEVAL (   name,
  expr,
  x,
  y,
  z,
  thread 
)    (this->*name)(expr, x, y, z, thread)

Use in class definition to declare members for caching non-variable dependent values.

Declares a member variable myvar to cache a parameter value and an evaluator method to return that value.

Definition at line 493 of file POP_Node.h.

#define POP_VPARM (   myvar,
  get 
)
Value:
float myvar[3]; \
void get(EV_EXPRESSION*, float &x, float &y, float &z, int) \
{ x = myvar[0]; y = myvar[1]; z = myvar[2]; }
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
GLdouble GLdouble GLdouble z
Definition: glcorearb.h:847
GLint y
Definition: glcorearb.h:102
typedef int
Definition: png.h:1175
GLint GLenum GLint x
Definition: glcorearb.h:408

Use in class definition to declare members for caching non-variable dependent values.

Declares a member variable myvar to cache a parameter value and an evaluator method to return that value.

Definition at line 430 of file POP_Node.h.

#define STR_PARM (   name,
  idx,
  vi,
 
)    evalString(s, name, &myIndirect[idx], vi, t);
Examples:
field3d/ROP_Field3D.h, and ROP/ROP_Dumper.h.

Definition at line 62 of file POP_Node.h.

#define STR_PARM_NE (   name,
  idx,
  vi,
 
)    evalStringRaw(s, name, &myIndirect[idx], vi, t);

Definition at line 64 of file POP_Node.h.

Typedef Documentation

typedef void(POP_Node::* POP_BirthAttribFunc)(POP_ContextData *data, GEO_PointP ppt, UT_Vector3 *vel, void *userdata)

Prototype for function that sets attributes after points are birthed.

Parameters
dataPOP_ContextData being used
pptparticle's point
velparticle velocity
userdatapassed in data

Definition at line 367 of file POP_Node.h.

typedef float(POP_Node::* POP_FloatFunc)(POP_ContextData *data)

Prototype for function that returns a floating point value. Function returns the value.

Parameters
dataPOP_ContextData being used. Needed for random num generation.

Definition at line 374 of file POP_Node.h.

typedef float(POP_Node::* POP_FParam)(float t)

Definition at line 403 of file POP_Node.h.

typedef int(POP_Node::* POP_IntFunc)(POP_ContextData *data)

Prototype for function that returns a integer value. Function returns the value.

Parameters
dataPOP_ContextData being used. Needed for random num generation.

Definition at line 380 of file POP_Node.h.

typedef int(POP_Node::* POP_IParam)(float t)

Definition at line 404 of file POP_Node.h.

typedef void(POP_Node::* POP_JitterFunc)(GU_Detail **gdp, GA_PointGroup **pointGroup, GA_PrimitiveGroup **primGroup, GU_RayIntersect **rayIntersect, POP_AttribMap **map, float timeIncFraction)

Prototype for function that can be called per node to allow jitter births. Modifies the passed in values to update gdp, source groups, intersectors (if necessary), and attribute mappings (if necessary).

Definition at line 389 of file POP_Node.h.

A PtrArray which stores pointers to POP_ParticleList.

Definition at line 395 of file POP_Node.h.

typedef void(POP_Node::* POP_SParam)(UT_String &s, float t)

Definition at line 405 of file POP_Node.h.

typedef void(POP_Node::* POP_TraverseFunc)(void *userdata)

Prototype for function that can be called per node for POP_Node::traverse() and POP_Node::pseudocook().

Definition at line 384 of file POP_Node.h.

typedef void(POP_Node::* POP_VParam)(EV_EXPRESSION *expr, float &x, float &y, float &z, int thread)

Definition at line 406 of file POP_Node.h.

Function Documentation

SYS_VISIBILITY_EXPORT void newPopOperator ( OP_OperatorTable table)
POP_API void POPgetVexReservedTemplateLists ( UT_ValArray< PRM_Template * > &  tplatelists)