POP_LocalVar Class Reference

#include <POP_LocalVar.h>

Inheritance diagram for POP_LocalVar:

POP_Node OP_Network OP_Node OP_Parameters OP_NetworkBoxItem PRM_ParmOwner HDK_Sample::POP_CircleForce HDK_Sample::POP_LocalForce HDK_Sample::POP_SpotLight

List of all members.

Public Member Functions

const GEO_PointcurPoint ()
GU_DetailcurGdp () const

Static Public Attributes

static CH_LocalVariable myVariables []
static OP_VariablePair myVariablePair
static OP_TemplatePair myTemplatePair

Protected Member Functions

 POP_LocalVar (OP_Network *net, const char *name, OP_Operator *entry)
virtual ~POP_LocalVar (void)
virtual float getVariableValue (int index, int thread)
void setupDynamicVars (POP_ContextData *data)
void cleanupDynamicVars ()
void setupVars (POP_ContextData *data, const GB_PointGroup *source=0)
virtual int isVarDependent (GU_Detail *gdp, POP_FParam param, float t, int thread)
virtual int isVarDependent (GU_Detail *gdp, POP_IParam param, float t, int thread)
virtual int isVarDependent (GU_Detail *gdp, POP_SParam param, float t, int thread)
virtual int isVarDependent (GU_Detail *gdp, EV_EXPRESSION *expr, int thread)
virtual void allowVar (int val)
 Control whether parameter evalutions are allowed to reference local variables.
virtual const CH_LocalVariableresolveExtraVariableForSyntaxHighlight (const char *name)
bool updateVarIndependentRamp (GU_Detail *gdp, const PRM_Parm &multi, float t, UT_Ramp &ramp, int thread)

Protected Attributes

GEO_PointmyCurrPt
int myCurrIter
int myVarTest


Detailed Description

A subclass of POP_Node that handles many common local variables. Many modifier POPs will derive from this subclass instead of POP_Node.
Examples:

POP/POP_CircleForce.C, POP/POP_CircleForce.h, POP/POP_LocalForce.C, POP/POP_LocalForce.h, POP/POP_SpotLight.C, and POP/POP_SpotLight.h.

Definition at line 23 of file POP_LocalVar.h.


Constructor & Destructor Documentation

POP_LocalVar::POP_LocalVar ( OP_Network net,
const char *  name,
OP_Operator entry 
) [protected]

virtual POP_LocalVar::~POP_LocalVar ( void   )  [protected, virtual]


Member Function Documentation

virtual void POP_LocalVar::allowVar ( int  val  )  [inline, protected, virtual]

Control whether parameter evalutions are allowed to reference local variables.

Derived classes that implement local variables will generally want to override this virtual.

Reimplemented from POP_Node.

Examples:
POP/POP_LocalForce.C.

Definition at line 65 of file POP_LocalVar.h.

void POP_LocalVar::cleanupDynamicVars (  )  [protected]

Call at the end of a cook to clean up state associated with the use of user-defined local variables.

Examples:
POP/POP_CircleForce.C, POP/POP_LocalForce.C, and POP/POP_SpotLight.C.

GU_Detail* POP_LocalVar::curGdp (  )  const

const GEO_Point* POP_LocalVar::curPoint (  ) 

virtual float POP_LocalVar::getVariableValue ( int  index,
int  thread 
) [protected, virtual]

Reimplemented from OP_Parameters.

virtual int POP_LocalVar::isVarDependent ( GU_Detail gdp,
EV_EXPRESSION expr,
int  thread 
) [protected, virtual]

Reimplemented from POP_Node.

virtual int POP_LocalVar::isVarDependent ( GU_Detail gdp,
POP_SParam  param,
float  t,
int  thread 
) [protected, virtual]

Reimplemented from POP_Node.

virtual int POP_LocalVar::isVarDependent ( GU_Detail gdp,
POP_IParam  param,
float  t,
int  thread 
) [protected, virtual]

Reimplemented from POP_Node.

virtual int POP_LocalVar::isVarDependent ( GU_Detail gdp,
POP_FParam  param,
float  t,
int  thread 
) [protected, virtual]

Reimplemented from POP_Node.

virtual const CH_LocalVariable* POP_LocalVar::resolveExtraVariableForSyntaxHighlight ( const char *  name  )  [protected, virtual]

Reimplemented from OP_Node.

void POP_LocalVar::setupDynamicVars ( POP_ContextData data  )  [protected]

Call at the beginning of a cook (typically right after lockInputs()) to initialize the use of user-defined local variables. Make sure to call cleanupDynamicVars() at the end of the cook.

Examples:
POP/POP_CircleForce.C, POP/POP_LocalForce.C, and POP/POP_SpotLight.C.

void POP_LocalVar::setupVars ( POP_ContextData data,
const GB_PointGroup source = 0 
) [protected]

Call during cooking to initialize data necessary for the evaluation of our local variables.

Examples:
POP/POP_CircleForce.C, POP/POP_LocalForce.C, and POP/POP_SpotLight.C.

bool POP_LocalVar::updateVarIndependentRamp ( GU_Detail gdp,
const PRM_Parm multi,
float  t,
UT_Ramp ramp,
int  thread 
) [protected]

Update a ramp from a specified multiparm. A return value of true indicates that none of the parameters evaluated for this update is dependent on a varying (per particle) local variable. A return value of false indicates that the ramp will need to be updated for every particle using OP_Parameters::updateRampFromMultiParm().


Member Data Documentation

int POP_LocalVar::myCurrIter [protected]

An integer representing the current processing iteration, used to implement the $ITER local variable. The derived class is responsible for updating this member variable.

Examples:
POP/POP_CircleForce.C, POP/POP_LocalForce.C, and POP/POP_SpotLight.C.

Definition at line 87 of file POP_LocalVar.h.

The point currently being processed, used to retrieve attribute values when evaluating local variables. The derived class is responsible for updating this member variable.

Examples:
POP/POP_CircleForce.C, POP/POP_LocalForce.C, and POP/POP_SpotLight.C.

Definition at line 82 of file POP_LocalVar.h.

Definition at line 27 of file POP_LocalVar.h.

int POP_LocalVar::myVarTest [protected]

Definition at line 89 of file POP_LocalVar.h.


The documentation for this class was generated from the following file:

Generated on Mon Jan 28 00:29:49 2013 for HDK by  doxygen 1.5.9