#include <POP_ContextData.h>

Public Member Functions | |
| POP_ContextData (const char *owner) | |
| virtual | ~POP_ContextData (void) |
| const char * | getName () const |
| void | copyFrom (const POP_ContextData &data, GU_Detail *gdp=NULL) |
| void | cook (OP_Context &context) |
| cook() is used to perform cooking on the POP specified by myCookPOP. | |
| void | cookGuide (OP_Context &context) |
| void | reset (POP_Node *pop, GU_Detail *gdp, const char *init, bool keepgeo, unsigned seed, bool solveimmediately) |
| void | frameReset (void) |
| void | offsetReset (void) |
| offsetReset() resets the attribute offsets. | |
| void | recacheOffset (void) |
| void | cacheMissingInternalAttributes () |
| GU_Detail * | getDisplayDetail (void) |
| void | setDisplayToMyGdp () |
| float | random (void) |
| float | randomSample (void) |
| unsigned | getRandomSeed () const |
| GU_Detail * | getDetail (void) const |
| void | cacheDetail (POP_Node *node) |
| void | addToParticleList (GEO_PrimParticle *part, POP_Node *pop, int idx) |
| void | clearParticleLists () |
| void | setRefDetail (GU_Detail *gdp) |
| int | getRuleSuppression () |
| void | setRuleSuppression (int suppress) |
| POP_ParticleList * | getParticleList (void) |
| int | isGuideOnly (void) const |
| int | nextID (void) |
| void | bumpNumParticles (int delta) |
| int | allowBirth (void) |
| allowBirth() returns whether a new particle can be born. | |
| void | getInputGeo (UT_String &path, int index) const |
| void | setInputGeo (const UT_String &path, int index) |
| void | appendGuide (POP_Node *, const GU_DetailHandle &) |
| void | setInstanceGuide (POP_Node *, const GU_DetailHandle &) |
| bool | getSelectionChanged () const |
| void | setSelectionChanged () |
| void | setTime (fpreal time) |
| fpreal | getTime () const |
| void | setTimeInc (fpreal tinc) |
| fpreal | getTimeInc () const |
Blind Data Management | |
| POP_BlindData * | getBlindData (const POP_Node *pop) const |
| int | addBlindData (POP_BlindData *data) |
| POP_BlindData * | stealBlindData (const POP_Node *pop) |
GEO_PrimParticle Management | |
| GEO_PrimParticle * | getPrimPart (POP_Node *node) |
| GEO_PrimParticle * | hasPrimPart (POP_Node *node) |
| POP_Node * | getGenerator (GEO_PrimParticle *part) const |
Event Management | |
| GA_RWAttributeRef | getEventAttr (void) |
| getEventAttr() returns the event attribute. | |
| void | addEvent (UT_String &events, float t) |
| addEvent() signals that an event has occurred. | |
| void | removeEvent (UT_String &events) |
| removeEvent() signals that an event is over. | |
| void | clearAllEvents (void) |
| clearAllEvents() clears any currently active events. | |
POP_Cache Reference Counting | |
Reference counting, used for caching in POP_Cache (through POPNET_Node) Note that when the count reaches 0, myGdp is deleted along with this, because in the POP_Cache a new gdp is created for each context data. | |
| void | incRef () |
| void | decRef () |
Cook Control Flags | |
These flags control how the pop network will cook. They globally turn off various update rules so it is possible to, for example, only perform the velocity update, or only perform the cooking. | |
| bool | shouldDoReap () const |
| void | setDoReap (bool v) |
| bool | shouldDoPrep () const |
| void | setDoPrep (bool v) |
| bool | shouldDoApplyRules () const |
| void | setDoApplyRules (bool v) |
| bool | shouldDoCook () const |
| void | setDoCook (bool v) |
| bool | shouldDoCookFirst () const |
| void | setDoCookFirst (bool v) |
User Local Variables | |
| CH_LocalVariable * | getUserVariables (void) |
| const CH_LocalVariable * | getUserVariables (void) const |
| GA_RWAttributeRef | addUserVariable (const char *name, int tuplesize, GA_StorageClass type, GA_Defaults def, const char *local=0) |
| int | isUserVariable (int index) |
| float | getUserVariableValue (GEO_Point *ppt, int index, int thread) |
| uint64 | getUserVariableSerial () const |
Static Public Member Functions | |
| static POP_ContextData * | getExpressionData (int thread) |
Public Attributes | |
| float | myTime |
| float | myTimeInc |
| void * | myUserData |
| int | myRemoveUnused |
| OP_Network * | myXformObj |
| POP_Node * | myCookPOP |
| POP_Node * | myDisplayPOP |
| int | myDoInfoButton |
| int | myDoUpdateViewport |
| int | myMaxParticles |
| POP_GuideHandleList | myOPGuides |
| UT_IntArray | myGuidePOPs |
| UT_PtrArray< GEO_Point * > | myInstancePoints |
| GU_DetailHandle | myInstanceOPGuide |
| int | myInstanceGuidePOP |
| int | myNotifyCache |
Friends | |
| class | POP_ContextDataHandle |
The POP_ContextData contains the geometry detail to update during the cook along with many cached attribute offsets.
POP/POP_CircleForce.C, POP/POP_CircleForce.h, POP/POP_LocalForce.C, POP/POP_LocalForce.h, POP/POP_RadialBirth.C, POP/POP_RadialBirth.h, POP/POP_SpotLight.C, and POP/POP_SpotLight.h.
Definition at line 54 of file POP_ContextData.h.
| POP_ContextData::POP_ContextData | ( | const char * | owner | ) |
| virtual POP_ContextData::~POP_ContextData | ( | void | ) | [virtual] |
| int POP_ContextData::addBlindData | ( | POP_BlindData * | data | ) |
Returns 1 if the data was added successfully to the context data. At this point, the context assumes ownership of the data and may delete it from time to time.
| void POP_ContextData::addEvent | ( | UT_String & | events, | |
| float | t | |||
| ) |
addEvent() signals that an event has occurred.
| void POP_ContextData::addToParticleList | ( | GEO_PrimParticle * | part, | |
| POP_Node * | pop, | |||
| int | idx | |||
| ) |
| GA_RWAttributeRef POP_ContextData::addUserVariable | ( | const char * | name, | |
| int | tuplesize, | |||
| GA_StorageClass | type, | |||
| GA_Defaults | def, | |||
| const char * | local = 0 | |||
| ) |
| int POP_ContextData::allowBirth | ( | void | ) |
allowBirth() returns whether a new particle can be born.
| void POP_ContextData::appendGuide | ( | POP_Node * | , | |
| const GU_DetailHandle & | ||||
| ) |
The following method is used to append guide geometry during a cook. The specified GU_DetailHandle must be pointing to a POP_Guide.
| void POP_ContextData::bumpNumParticles | ( | int | delta | ) | [inline] |
bumpNumParticles() updates the running count of particles in the network.
Definition at line 384 of file POP_ContextData.h.
| void POP_ContextData::cacheDetail | ( | POP_Node * | node | ) |
| void POP_ContextData::cacheMissingInternalAttributes | ( | ) |
cacheMissingInternalOffsets() will acquire any attribute offsets from the gdp that it currently has noted as missing.
| void POP_ContextData::clearAllEvents | ( | void | ) |
clearAllEvents() clears any currently active events.
| void POP_ContextData::clearParticleLists | ( | ) | [inline] |
Erases the particle lists. You will need to reset() to rebuild them, but this avoids having dangling pointers to primitives You must clear lists if you will be losing control of the gdp and someone else may delete primitives.
Definition at line 206 of file POP_ContextData.h.
| void POP_ContextData::cook | ( | OP_Context & | context | ) |
cook() is used to perform cooking on the POP specified by myCookPOP.
| void POP_ContextData::cookGuide | ( | OP_Context & | context | ) |
cookGuide() is like cook() except that it is used to recook the guide geometry only.
| void POP_ContextData::copyFrom | ( | const POP_ContextData & | data, | |
| GU_Detail * | gdp = NULL | |||
| ) |
| void POP_ContextData::decRef | ( | ) | [inline] |
Definition at line 218 of file POP_ContextData.h.
| void POP_ContextData::frameReset | ( | void | ) |
frameReset() is used to reset some information on a per frame basis. It should be called before an attempt to cook a POP. However, once this is set, any number of calls to cook a POP can be performed assuming the underlying network does not change.
| POP_BlindData* POP_ContextData::getBlindData | ( | const POP_Node * | pop | ) | const |
Return the blind data associated with the POP. If there is no data stored for the pop, a null ptr will be returned.
| GU_Detail* POP_ContextData::getDetail | ( | void | ) | const [inline] |
getDetail() returns the GU_Detail being processed by this POP_ContextData.
Definition at line 175 of file POP_ContextData.h.
| GU_Detail* POP_ContextData::getDisplayDetail | ( | void | ) | [inline] |
Definition at line 116 of file POP_ContextData.h.
| GA_RWAttributeRef POP_ContextData::getEventAttr | ( | void | ) |
getEventAttr() returns the event attribute.
| static POP_ContextData* POP_ContextData::getExpressionData | ( | int | thread | ) | [static] |
Query the context with respect to which expression functions are to be evaluated.
| POP_Node* POP_ContextData::getGenerator | ( | GEO_PrimParticle * | part | ) | const |
getGenerator() returns the POP_Node that created a particular particle primitive.
| void POP_ContextData::getInputGeo | ( | UT_String & | path, | |
| int | index | |||
| ) | const |
Query the path to the specified context geometry.
| [out] | path | node path |
| [in] | index | [0 .. MAX_INPUT_GEOS-1] |
| const char* POP_ContextData::getName | ( | void | ) | const [inline] |
Definition at line 60 of file POP_ContextData.h.
| POP_ParticleList* POP_ContextData::getParticleList | ( | void | ) | [inline] |
Definition at line 259 of file POP_ContextData.h.
| GEO_PrimParticle* POP_ContextData::getPrimPart | ( | POP_Node * | node | ) |
getPrimPart() returns the particle primitive generated by a particular POP. If this particle doesn't exist already, it creates a new one.
| unsigned POP_ContextData::getRandomSeed | ( | ) | const [inline] |
Definition at line 154 of file POP_ContextData.h.
| int POP_ContextData::getRuleSuppression | ( | ) | [inline] |
Globally force the suppression of certain update rules when executing POP_Node::applyRulesToList(). This should be a mask (bitfield) of the relevant PART_STAT_SUPP* flags you want to suppress.
Definition at line 254 of file POP_ContextData.h.
| bool POP_ContextData::getSelectionChanged | ( | ) | const [inline] |
Definition at line 409 of file POP_ContextData.h.
| fpreal POP_ContextData::getTime | ( | ) | const [inline] |
Access the context time
Definition at line 99 of file POP_ContextData.h.
| fpreal POP_ContextData::getTimeInc | ( | ) | const [inline] |
Access the context time
Definition at line 101 of file POP_ContextData.h.
| const CH_LocalVariable* POP_ContextData::getUserVariables | ( | void | ) | const [inline] |
Definition at line 356 of file POP_ContextData.h.
| CH_LocalVariable* POP_ContextData::getUserVariables | ( | void | ) | [inline] |
Definition at line 355 of file POP_ContextData.h.
| uint64 POP_ContextData::getUserVariableSerial | ( | ) | const [inline] |
Definition at line 369 of file POP_ContextData.h.
| float POP_ContextData::getUserVariableValue | ( | GEO_Point * | ppt, | |
| int | index, | |||
| int | thread | |||
| ) |
| GEO_PrimParticle* POP_ContextData::hasPrimPart | ( | POP_Node * | node | ) |
hasPrimPart() returns whether the node already has a particle primitive assigned to it.
| void POP_ContextData::incRef | ( | ) | [inline] |
Definition at line 214 of file POP_ContextData.h.
| int POP_ContextData::isGuideOnly | ( | void | ) | const [inline] |
isGuideOnly() returns true when POP_Node::cookPop() implementations should only update the guide geometry.
Definition at line 374 of file POP_ContextData.h.
| int POP_ContextData::isUserVariable | ( | int | index | ) | [inline] |
Definition at line 364 of file POP_ContextData.h.
| int POP_ContextData::nextID | ( | void | ) |
nextId() returns the integer ID to assign to the next birthed particle.
| void POP_ContextData::offsetReset | ( | void | ) |
offsetReset() resets the attribute offsets.
| float POP_ContextData::random | ( | void | ) | [inline] |
random() returns a random number between 0-1. This should be used instead of UTfastRandom() so that random numbers used within POPs are completely deterministic.
Definition at line 526 of file POP_ContextData.h.
| float POP_ContextData::randomSample | ( | void | ) | [inline] |
This uses the same seed as random() but sends the result through a hash... This is slower than random, but has the advantage that succeeding calls produce values that are "more" independent of each other. Specifically, if you sample a cube, you'll get a nice distribution
Definition at line 532 of file POP_ContextData.h.
| void POP_ContextData::recacheOffset | ( | void | ) |
recacheOffset() will reacquire the attribute offsets from the gdp. This method should be called if the offsets in the detail may have changed, say as that result of a merge operation.
| void POP_ContextData::removeEvent | ( | UT_String & | events | ) |
removeEvent() signals that an event is over.
| void POP_ContextData::reset | ( | POP_Node * | pop, | |
| GU_Detail * | gdp, | |||
| const char * | init, | |||
| bool | keepgeo, | |||
| unsigned | seed, | |||
| bool | solveimmediately | |||
| ) |
reset() is used to completely reset the POP_ContextData. It should be called whenever a restart of the particle system is required.
| void POP_ContextData::setDisplayToMyGdp | ( | ) | [inline] |
Definition at line 121 of file POP_ContextData.h.
| void POP_ContextData::setDoApplyRules | ( | bool | v | ) | [inline] |
Definition at line 244 of file POP_ContextData.h.
| void POP_ContextData::setDoCook | ( | bool | v | ) | [inline] |
Definition at line 246 of file POP_ContextData.h.
| void POP_ContextData::setDoCookFirst | ( | bool | v | ) | [inline] |
Definition at line 248 of file POP_ContextData.h.
| void POP_ContextData::setDoPrep | ( | bool | v | ) | [inline] |
Definition at line 242 of file POP_ContextData.h.
| void POP_ContextData::setDoReap | ( | bool | v | ) | [inline] |
Definition at line 240 of file POP_ContextData.h.
| void POP_ContextData::setInputGeo | ( | const UT_String & | path, | |
| int | index | |||
| ) |
Set the path to the specified context geometry.
| [in] | path | node path |
| [in] | index | [0 .. MAX_INPUT_GEOS-1] |
| void POP_ContextData::setInstanceGuide | ( | POP_Node * | , | |
| const GU_DetailHandle & | ||||
| ) |
The following method is used to specify the instance guide geometry during a cook. The specified GU_DetailHandle must be pointing to a POP_Guide.
| void POP_ContextData::setRefDetail | ( | GU_Detail * | gdp | ) | [inline] |
Definition at line 232 of file POP_ContextData.h.
| void POP_ContextData::setRuleSuppression | ( | int | suppress | ) | [inline] |
Globally force the suppression of certain update rules when executing POP_Node::applyRulesToList(). This should be a mask (bitfield) of the relevant PART_STAT_SUPP* flags you want to suppress.
Definition at line 256 of file POP_ContextData.h.
| void POP_ContextData::setSelectionChanged | ( | ) | [inline] |
Definition at line 411 of file POP_ContextData.h.
| void POP_ContextData::setTime | ( | fpreal | time | ) | [inline] |
Access the context time
Definition at line 98 of file POP_ContextData.h.
| void POP_ContextData::setTimeInc | ( | fpreal | tinc | ) | [inline] |
Access the context time
Definition at line 100 of file POP_ContextData.h.
| bool POP_ContextData::shouldDoApplyRules | ( | ) | const [inline] |
Definition at line 243 of file POP_ContextData.h.
| bool POP_ContextData::shouldDoCook | ( | ) | const [inline] |
Definition at line 245 of file POP_ContextData.h.
| bool POP_ContextData::shouldDoCookFirst | ( | ) | const [inline] |
Definition at line 247 of file POP_ContextData.h.
| bool POP_ContextData::shouldDoPrep | ( | ) | const [inline] |
Definition at line 241 of file POP_ContextData.h.
| bool POP_ContextData::shouldDoReap | ( | ) | const [inline] |
Definition at line 239 of file POP_ContextData.h.
| POP_BlindData* POP_ContextData::stealBlindData | ( | const POP_Node * | pop | ) |
Returns the blind data for the pop and gives up any responsiblity or ownership of the data.
friend class POP_ContextDataHandle [friend] |
Definition at line 522 of file POP_ContextData.h.
Definition at line 428 of file POP_ContextData.h.
Definition at line 429 of file POP_ContextData.h.
Definition at line 430 of file POP_ContextData.h.
Definition at line 431 of file POP_ContextData.h.
Definition at line 439 of file POP_ContextData.h.
Definition at line 443 of file POP_ContextData.h.
Definition at line 442 of file POP_ContextData.h.
Definition at line 441 of file POP_ContextData.h.
Definition at line 432 of file POP_ContextData.h.
Definition at line 445 of file POP_ContextData.h.
Definition at line 438 of file POP_ContextData.h.
Definition at line 426 of file POP_ContextData.h.
| float POP_ContextData::myTime |
Definition at line 423 of file POP_ContextData.h.
Definition at line 425 of file POP_ContextData.h.
Definition at line 427 of file POP_ContextData.h.
1.5.9