HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
POP_Node.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  */
7 
8 #ifndef __POP_Node_h__
9 #define __POP_Node_h__
10 
11 //#define POP_USE_GA_VECTORIZE
12 
13 #include "POP_API.h"
14 #include "POP_ContextData.h"
15 #include "POP_Defines.h"
16 #include "POP_Error.h"
17 #include "POP_Guide.h"
18 #include "POP_ParticleIterator.h"
19 #include "POP_ParticleList.h"
20 #include "POP_Shared.h"
21 
22 #include "POP_GBElement.h"
23 
24 #include <GOP/GOP_Manager.h>
25 #include <GU/GU_DetailHandle.h>
26 #include <GA/GA_PageHandle.h>
27 
28 #include <OP/OP_Network.h>
29 
30 #include <UT/UT_Interrupt.h>
31 #include <UT/UT_NTStreamUtil.h>
32 #include <UT/UT_ValArray.h>
33 #include <UT/UT_Thread.h>
34 #include <UT/UT_Vector3.h>
35 
36 
37 class EV_EXPRESSION;
38 class GA_Detail;
39 class GA_PointGroup;
40 class GEO_Point;
41 class GU_RayIntersect;
42 class OP_OperatorTable;
43 class OP_OutputCodeParms;
44 class POP_AttribMap;
45 struct POP_SlideAttribs;
46 
47 extern "C"
48 {
50 };
51 
52 /// @name Macros to aid in implementing individual parameter evaluation methods
53 /// Convenience macros typically used while implementing parameter evaluation
54 /// methods on subclasses of POP_Node.
55 /// @{
56 // TODO: These functions get called per point in POPs so we should really be
57 // calling the eval.*T() versions instead and pass down the thread id.
58 #define FLOAT_PARM(name, idx, vi, t) \
59  return evalFloat(name, &myIndirect[idx], vi, t);
60 #define INT_PARM(name, idx, vi, t) \
61  return evalInt(name, &myIndirect[idx], vi, t);
62 #define STR_PARM(name, idx, vi, t) \
63  evalString(s, name, &myIndirect[idx], vi, t);
64 #define STR_PARM_NE(name, idx, vi, t) \
65  evalStringRaw(s, name, &myIndirect[idx], vi, t);
66 /// @}
67 
69 
70 #include <GA/GA_GBElement.h>
71 
72 class GA_GBPoint;
73 class GA_PointGroup;
74 
76 {
77 public:
78  /// Iterate over all points
79  SYS_DEPRECATED_HDK(13.0)
80  explicit GA_GBPointIterator(const GA_Detail &gdp);
81  SYS_DEPRECATED_HDK(13.0)
83 
84  /// Iterate over all points from the given point till the last in the list
85  SYS_DEPRECATED_HDK(13.0)
87  const GA_Detail &gdp, const GA_GBPoint *first,
88  const GA_GBPoint *last);
89 
90  /// Iterate over all points in group (group is optional)
91  SYS_DEPRECATED_HDK(13.0)
92  GA_GBPointIterator(const GA_Detail &gdp, const GA_PointGroup *group);
93  SYS_DEPRECATED_HDK(13.0)
94  GA_GBPointIterator(const GA_Detail &gdp, const GA_PointGroup *group,
96 
97  /// Iterate over pairs of points - groups are optional
98  SYS_DEPRECATED_HDK(13.0)
100  const GA_Detail &gdp1, const GA_PointGroup *group1,
101  const GA_Detail &gdp2, const GA_PointGroup *group2);
102 
103  /// Destructor
104  SYS_DEPRECATED_HDK(13.0)
106 
107  /// Return the current point (NULL if complete)
108  SYS_DEPRECATED_HDK(13.0)
109  GA_GBPointP &getPoint() const { return SYSconst_cast(myP1); }
110  /// Return the next point (NULL if no valid point)
111  SYS_DEPRECATED_HDK(13.0)
112  GA_GBPointP &getNextPoint() const { return SYSconst_cast(myN1); }
113 
114  /// Return the current point from the 2nd detail (NULL if complete)
115  SYS_DEPRECATED_HDK(13.0)
116  GA_GBPointP &getPoint2() const { return SYSconst_cast(myP2); }
117  /// Return the next point from the 2nd detail
118  SYS_DEPRECATED_HDK(13.0)
119  GA_GBPointP &getNextPoint2() const { return SYSconst_cast(myN2); }
120 
121  /// Advance to next iteration
122  SYS_DEPRECATED_HDK(13.0)
123  void advance();
124 
125  /// Increment operator calls advance() to move to the next element
126  SYS_DEPRECATED_HDK(13.0)
127  GA_GBPointIterator &operator++() { advance(); return *this; }
128 
129  // No post inc as it is harmful.
130 private:
131  void setNext();
132  bool atEnd() const
133  {
134  return myI1.atEnd() ||
135  (myI2.isValid() && myI2.atEnd());
136  }
137  GA_Detail *myG1, *myG2;
138  GA_Iterator myI1, myI2;
139  GA_GBPointP myP1, myP2; // Current points
140  GA_GBPointP myN1, myN2; // Next points
141 };
142 
143 // The no-cache variant of the iterator returns not pointers to
144 // real GEO_Point *, but always the same GEO_Point * that it just reuses
145 // This allows old-style code to iterate over points without having
146 // to construct a GEO_Point * table.
147 // Note the GEO_Point * will be invalid outside this iterator, so don't
148 // cache it!
149 template <typename GA_POINT_TYPE>
151 {
152 public:
153  typedef typename GA_POINT_TYPE::DetailType DetailType;
154  typedef GA_POINT_TYPE PointType;
155 
156  /// Iterate over all points in group (group is optional)
157  SYS_DEPRECATED_HDK(13.0)
159  const DetailType &gdp,
160  const GA_PointGroup *group = 0)
161  : myGdp(gdp)
162  , myIt(myGdp.getPointRange(group))
163  , myPoint(gdp.getPointMap(),
164  myIt.atEnd() ? GA_INVALID_OFFSET
165  : *myIt)
166  {
167  }
168 
169  SYS_DEPRECATED_HDK(13.0)
171  const DetailType &gdp,
172  GA_Range::safedeletions safe,
173  const GA_PointGroup *group = 0)
174  : myGdp(gdp)
175  , myIt(myGdp.getPointRange(group), safe)
176  , myPoint(gdp.getPointMap(),
177  myIt.atEnd() ? GA_INVALID_OFFSET
178  : *myIt)
179  {
180  }
181 
182  /// Return the current point (NULL if complete)
183  // @{
184  SYS_DEPRECATED_HDK(13.0)
185  const PointType * get() const
186  {
187  if (atEnd())
188  return 0;
189  return &myPoint;
190  }
191  SYS_DEPRECATED_HDK(13.0)
192  const PointType * operator->() const
193  {
194  return get();
195  }
196  // @}
197 
198  SYS_DEPRECATED_HDK(13.0)
199  bool atEnd() const
200  {
201  return myIt.atEnd();
202  }
203 
204  /// Advance to next iteration
205  // @{
206  SYS_DEPRECATED_HDK(13.0)
208  operator++()
209  {
210  advance();
211  return *this;
212  }
213  SYS_DEPRECATED_HDK(13.0)
215  {
216  ++myIt;
217  if (myIt.atEnd())
218  myPoint = PointType(myGdp.getPointMap(), GA_INVALID_OFFSET);
219  else
220  myPoint = PointType(myGdp.getPointMap(), *myIt);
221  }
222  // @}
223 
224 private:
225 
226  const DetailType & myGdp;
227  GA_Iterator myIt;
228  PointType myPoint;
229 };
230 
231 template <typename GA_POINT_TYPE>
233  : private GA_GBPointIteratorNoCacheConst<GA_POINT_TYPE>
234 {
235 public:
236 
239 
240  typedef typename GA_POINT_TYPE::DetailType DetailType;
241  typedef GA_POINT_TYPE PointType;
242 
243  /// Iterate over all points in group (group is optional)
244  SYS_DEPRECATED_HDK(13.0)
246  DetailType &gdp,
247  const GA_PointGroup *group = 0)
248  : GA_GBPointIteratorNoCacheConst<GA_POINT_TYPE>(
249  gdp, group)
250  {
251  }
252 
253  SYS_DEPRECATED_HDK(13.0)
255  DetailType &gdp,
256  GA_Range::safedeletions safe,
257  const GA_PointGroup *group = 0)
258  : GA_GBPointIteratorNoCacheConst<GA_POINT_TYPE>(
259  gdp, safe, group)
260  {
261  }
262 
263 
264  /// Return the current point (NULL if complete)
265  // @{
266  SYS_DEPRECATED_HDK(13.0)
268  { return const_cast<PointType *>(Super::get()); }
269  SYS_DEPRECATED_HDK(13.0)
270  const PointType * get() const
271  { return Super::get(); }
272  SYS_DEPRECATED_HDK(13.0)
273  PointType * operator->()
274  { return get(); }
275  SYS_DEPRECATED_HDK(13.0)
276  const PointType * operator->() const
277  { return Super::get(); }
278  // @}
279 
280  // Increment operator calls advance() to move to the next element
281  SYS_DEPRECATED_HDK(13.0)
283  operator++()
284  { Super::advance(); return *this; }
285 
286  SYS_DEPRECATED_HDK(13.0)
287  bool atEnd() const
288  { return Super::atEnd(); }
289 
290 };
291 
293 
294 /// @def GA_FOR_ALL_GPOINTS(gdp, point)
295 /// Iterate over all points.
296 #define GA_FOR_ALL_GPOINTS(gdp, point) \
297  for (GA_GBPointIterator it(*(gdp)); \
298  (point = GEO_PointP(gdp, it.getPoint())); ++it)
299 
300 /// @def GA_FOR_ALL_GROUP_POINTS_NC(gdp, grp, GEO_Point, point)
301 /// Iterate over all points in group. @see GA_RTIElementGroup
302 /// The point will be reused for all the iterations, so do not cache
303 /// the resulting pointer!
304 #define GA_FOR_ALL_GROUP_POINTS_NC(gdp, grp, PtType, pt) \
305  for (GA_GBPointIteratorNoCache<PtType> pt(*(gdp),grp); !pt.atEnd(); ++pt)
306 
307 /// @def GA_FOR_ALL_GROUP_POINTS(gdp, grp, point)
308 /// Iterate over all points in group. @see GA_RTIElementGroup
309 #define GA_FOR_ALL_GROUP_POINTS(gdp, grp, point) \
310  for (GA_GBPointIterator it(*(gdp), grp); \
311  (point = GEO_PointP(gdp, it.getPoint())); ++it)
312 
313 #define GA_FOR_ALL_GROUP_POINTS_NC_CONST(gdp, grp, PtType, pt) \
314  for (GA_GBPointIteratorNoCacheConst<PtType> pt(*(gdp),grp); !pt.atEnd(); ++pt)
315 
316 /// @def GA_FOR_ALL_OPT_GROUP_POINTS_NC(gdp, grp, GEO_Point, point)
317 /// Iterate over all points in group, but the group can be NULL.
318 /// @see GA_RTIElementGroup
319 /// The point will be reused for all the iterations, so do not cache
320 /// the resulting pointer!
321 #define GA_FOR_ALL_OPT_GROUP_POINTS_NC_CONST(gdp, grp, PtType, point) \
322  GA_FOR_ALL_GROUP_POINTS_NC_CONST(gdp, grp, PtType, point)
323 
324 /// @def GA_FOR_PAIRS_OF_GROUP_POINTS(gdp1, group1, point1, gdp2, group2, point2)
325 /// Iterate over points in the specified groups across both GA_Details in a
326 /// pairwise fashion.
327 #define GA_FOR_PAIRS_OF_GROUP_POINTS(gdp1, grp1, point1, gdp2, grp2, point2) \
328  for (GA_GBPointIterator it(*(gdp1), grp1, *(gdp2), grp2); \
329  (point1=GEO_PointP(gdp1, it.getPoint())) && \
330  (point2=GEO_PointP(gdp2, it.getPoint2())); ++it)
331 
332 /// Wrapper to easily mimic old GA_GBElement interface for primitives,
333 /// now that they're not GA_GBElement objects.
335 {
336 public:
337  SYS_DEPRECATED_HDK(13.0)
339  : GA_GBElement()
340  {}
341  SYS_DEPRECATED_HDK(13.0)
343  : GA_GBElement(prim->getIndexMap(), prim->getMapOffset())
344  {}
345  SYS_DEPRECATED_HDK(13.0)
347  : GA_GBElement(prim.getIndexMap(), prim.getMapOffset())
348  {}
349  SYS_DEPRECATED_HDK(13.0)
351  {
353  return *this;
354  }
356  { return this; }
357  const GA_GBPrimWrap *operator->() const
358  { return this; }
359 };
360 
361 /// Prototype for function that sets attributes after points are birthed.
362 /// @param data POP_ContextData being used
363 /// @param ppt particle's point
364 /// @param vel particle velocity
365 /// @param userdata passed in data
368  void* userdata);
369 
370 /// Prototype for function that returns a floating point value.
371 /// Function returns the value.
372 /// @param data POP_ContextData being used. Needed for random num
373 /// generation.
375 
376 /// Prototype for function that returns a integer value.
377 /// Function returns the value.
378 /// @param data POP_ContextData being used. Needed for random num
379 /// generation.
381 
382 /// Prototype for function that can be called per node for POP_Node::traverse()
383 /// and POP_Node::pseudocook().
384 typedef void (POP_Node::*POP_TraverseFunc)(void* userdata);
385 
386 /// Prototype for function that can be called per node to allow jitter
387 /// births. Modifies the passed in values to update gdp, source groups,
388 /// intersectors (if necessary), and attribute mappings (if necessary).
390  GA_PointGroup **pointGroup, GA_PrimitiveGroup **primGroup,
391  GU_RayIntersect **rayIntersect, POP_AttribMap **map,
392  float timeIncFraction);
393 
394 /// A PtrArray which stores pointers to POP_ParticleList.
396 
397 //-----------------------------------------------------------------------------
398 
399 // Parameter evaluation
400 
401 /// @name Pointers to evaluation methods
402 /// @{
403 typedef float (POP_Node::*POP_FParam)(float t);
404 typedef int (POP_Node::*POP_IParam)(float t);
405 typedef void (POP_Node::*POP_SParam)(UT_String &s, float t);
407  float &x, float& y, float &z, int thread);
408 /// @}
409 
410 /// @name Macros to aid in efficient per-particle parameter evaluation
411 /// @{
412 
413 /// @brief Use in class definition to declare members for caching non-variable
414 /// dependent values.
415 
416 /// Declares a member variable @c myvar to cache a parameter value and an
417 /// evaluator method @c to return that value.
418 #define POP_FPARM(myvar, get) \
419  float myvar; \
420  float get(float) { return(myvar); }
421 
422 #define POP_IPARM(myvar, get) \
423  int myvar; \
424  int get(float) { return(myvar); }
425 
426 #define POP_SPARM(myvar, get) \
427  UT_String myvar; \
428  void get(UT_String& s, float) { s = myvar; }
429 
430 #define POP_VPARM(myvar, get) \
431  float myvar[3]; \
432  void get(EV_EXPRESSION*, float &x, float &y, float &z, int) \
433  { x = myvar[0]; y = myvar[1]; z = myvar[2]; }
434 
435 /// @name Macros to aid in efficient per-particle parameter evaluation
436 /// @{
437 
438 /// @brief Use during cook to select between a per-particle or per-cook
439 /// evaluation method.
440 
441 /// Calls the parameter evaluation method @c eval, and if the evaluation is
442 /// dependent on any per-particle variables, sets the method pointer @c var
443 /// to point to @c eval. Otherwise it caches the value in the member variable
444 /// @c myvar and sets @c var to point to @c get, the method that simply returns
445 /// said cached value.
446 #define POP_FCACHE(var, eval, get, myvar, classname) \
447  { \
448  if (isVarDependent(data->getDetail(), \
449  (POP_FParam) &classname::eval, t, thread)) \
450  var = (POP_FParam) &classname::eval; \
451  else \
452  { myvar = eval(t); var = (POP_FParam) &classname::get; } \
453  }
454 
455 #define POP_ICACHE(var, eval, get, myvar, classname) \
456  { \
457  if (isVarDependent(data->getDetail(), \
458  (POP_IParam) &classname::eval, t, thread)) \
459  var = (POP_IParam) &classname::eval; \
460  else \
461  { myvar = eval(t); var = (POP_IParam) &classname::get; } \
462  }
463 
464 #define POP_SCACHE(var, eval, get, myvar, classname) \
465  { \
466  if (isVarDependent(data->getDetail(), \
467  (POP_SParam) &classname::eval, t, thread)) \
468  var = (POP_SParam) &classname::eval; \
469  else \
470  { eval(myvar, t); var = (POP_SParam) &classname::get; } \
471  }
472 
473 #define POP_VCACHE(var, expr, get, myvar, classname) \
474  { \
475  if (isVarDependent(data->getDetail(), expr, thread)) \
476  var = &classname::evalVector; \
477  else \
478  { evalVector(expr, myvar[0], myvar[1], myvar[2], thread); \
479  var = (POP_VParam) &classname::get; } \
480  }
481 /// @}
482 
483 /// @name Macros to aid in efficient per-particle parameter evaluation
484 /// @{
485 
486 /// @brief Use during cook to call a parameter evaluation method pointer.
487 #define POP_PEVAL(name) \
488  (this->*name)(t)
489 
490 #define POP_SEVAL(name, s) \
491  (this->*name)(s, t)
492 
493 #define POP_VEVAL(name, expr, x, y, z, thread) \
494  (this->*name)(expr, x, y, z, thread)
495 
496 /// @brief Use during cook to call a parameter evaluation method pointer during
497 /// a callback.
498 #define POP_CB_PEVAL(name) \
499  (this->*name)(data->myTime)
500 
501 /// @brief Use during cook to call a parameter evaluation method pointer during
502 /// a callback.
503 #define POP_CB_SEVAL(name, s) \
504  (this->*name)(s, data->myTime)
505 /// @}
506 
507 //-----------------------------------------------------------------------------
508 
510 {
511 public:
512  static const char *theChildTableName;
513  virtual const char *getChildType() const;
514  virtual const char *getOpType() const;
515 
516  virtual OP_OpTypeId getChildTypeID() const;
517  virtual OP_OpTypeId getOpTypeID() const;
518 
519  static void buildOperatorTable (OP_OperatorTable& table);
520 
521  virtual int getNetOverviewColor (UT_Color& color);
522 
523  /// traverse() is used to traverse all nodes and perform some method
524  /// one each node.
525  void traverse (POP_TraverseFunc traverse,
526  void* userdata = 0);
527 
528  /// pseudocook() is used to traverse all nodes and perform some method
529  /// one each node in the cook chain.
530  void pseudocook (POP_TraverseFunc traverse,
531  void* userdata = 0);
532 
533  /// preCook() and postCook() performs pre and post cook processing. They
534  /// are called by POP_ContextData::cook() and POP_ContextData::cookGuide().
535  void preCook (OP_Context& context);
536  void postCook (OP_Context& context);
537 
538  /// computeNetChecksum() returns a CRC checksum which is "unique"
539  /// for a particular network topology with a particular set of parameters.
540  unsigned long computeNetChecksum (void);
541 
542  /// addAllAttribs() traverses the nodes that will be cooked and
543  /// adds the required attributes to the gdp by calling addAttrib().
544  void addAllAttribs (POP_ContextData* data);
545 
546  /// getParticleList() acts as an access method to get at this POP's
547  /// particle list. It just returns this POP's POP_ParticleList and
548  /// assumes that this structure is already up to date. Use
549  /// buildParticleList() to build an up-to-date particle list.
550  POP_ParticleList* getParticleList (void) { return(&myParticleList); };
551 
552  /// timestep() is used to perform timestepping. (i.e. move particles,
553  /// update state, etc). This function can be overridden to perform a
554  /// custom integration step. The default implementation calls the static
555  /// timestepStatic function. Note that this function is only called on
556  /// the cook POP, not every POP in the network.
557  virtual void timestep(OP_Context &context);
558  /// Standard particle timestep function.
559  static void timestepStatic(OP_Context &context);
560 
561  /// prepParticles() prepares particles for the current frame by resetting
562  /// the particle's state.
563  static void prepParticles (OP_Context &context);
564 
565  /// applyRulesToList() is really the heart of timestep. It actually applies
566  /// the appropriate rules to each particle.
567  static void applyRulesToList( POP_ParticleList *particleList,
568  POP_ContextData *data );
569 
570  /// reapParticles() removes dead particles from the system.
571  static void reapParticles (OP_Context &context);
572 
573  void warnDisplayFlag (void);
574  void unwarnDisplayFlag (void);
575 
576  virtual int isRefInput (unsigned) const { return 0; }
577 
578  /// @{
579  /// These functions are used by lots of POPs to generate obj/sop menus
580  static int filterForceObjs(OP_Node *node);
581  static void buildForceObjMenu (void *data, PRM_Name* menu,
582  int maxSize,
583  const PRM_SpareData* , const PRM_Parm *);
584  static void buildObjMenu (void *data, PRM_Name* menu,
585  int maxSize,
586  const PRM_SpareData* , const PRM_Parm *);
587  static void buildSopMenu (void *data, PRM_Name* menu,
588  int maxSize,
589  const PRM_SpareData*, const PRM_Parm *);
590  /// @}
591 
592  virtual void getNodeSpecificInfoText(OP_Context &context,
593  OP_NodeInfoParms &iparms);
594  virtual void fillInfoTreeNodeSpecific(UT_InfoTree &tree,
595  const OP_NodeInfoTreeParms &parms);
596 
597  // Absolute Width
598  virtual fpreal getW() const;
599  // Absolute Height
600  virtual fpreal getH() const;
601 
602  /// This function provides a whole bunch of slightly different functionality
603  /// to each of a bunch of different POPs (thus the complex signature).
604  /// Any POP which accesses a piece of SOP geometry should use this function
605  /// to get the geometry. It supports DOP geometry paths as well.
606  /// The first parameter is the path to get the gometry from. If NULL, the
607  /// data and t parameters are used to evaluate parameters on the POP to
608  /// get the path. addextrainput tells it whether to add an extra input
609  /// to the POP for when the SOP changes. ignorexform tells this function
610  /// to ignore any transform on the object containing the SOP (or DOP).
611  /// copygdp provides a place to stores a transformed version of the
612  /// geometry if required. This and all subsequent parameter can be NULL
613  /// if the information isn't required (such as when the geometry is
614  /// being accessed just to get a list of available group names). The
615  /// prevsop parameter can point to the SOP that was last retrieved. It's
616  /// value is updated by this function, after doing a comparison to
617  /// see if the value has changed. retdoxform and retxform return whether
618  /// a transform is required on the geometry, and what that transform is.
619  /// Finally, retneedsreset helps POPs keep track of whether anything has
620  /// changed since the last call to this function. This takes into account
621  /// changes to the prevsop, whether or not the geometry has to be xformed,
622  /// and the value passed in through retneedsreset.
623  GU_Detail *getGeo(const char *overridegeopath,
624  const POP_ContextData *data, fpreal t,
625  int addextrainput, int ignorexform,
626  GU_Detail *copygdp, OP_Node **prevsop,
627  int *retdoxform, UT_DMatrix4 *retxform,
628  int *retneedsreset);
629 
630 protected:
631  POP_Node (OP_Network* parent, const char* name,
632  OP_Operator* entry);
633  virtual ~POP_Node (void);
634 
635  virtual OP_ERROR cookPop (OP_Context &context) = 0;
636 
637  // This will change a POPobjName POPsopName pair into a POPfullsopName
638  // You can override what it applies to with the specified overrides.
639  // If soptoken is "" it will only convert the object.
640  // Note it looks for the objtoken and soptoken inside the obsolete
641  // list and the desttoken inside the ParmList.
642  // The relative is 1 if the new path should be relative to this, and
643  // 0 if it should be absolute.
644  void applyBackwardsPathCompatibility(
645  PRM_ParmList *obsolete_parms,
646  const char *objtoken = 0,
647  const char *soptoken = 0,
648  const char *desttoken = 0,
649  int relative = 1);
650 
651  virtual void getOperationInfo(UT_String &info, OP_Context &context);
652 
653  /// Add any attributes required by this POP to the detail in the supplied
654  /// POP_ContextData (pointer passed as void *). This method is called by
655  /// addAllAttribs().
656  virtual void addAttrib (void*) {};
657 
658  /// @name Add standard error/warning
659  /// @{
660  void addError(POP_ErrorCodes code, const char* msg = 0)
661  { UTaddError("POP", code, msg); }
662  void addMessage(POP_ErrorCodes code, const char* msg = 0)
663  { UTaddMessage("POP", code, msg); }
664  void addWarning(POP_ErrorCodes code, const char* msg = 0)
665  { UTaddWarning("POP", code, msg); }
666  void addFatal(POP_ErrorCodes code, const char* msg = 0)
667  { UTaddFatal("POP", code, msg); }
668  /// @}
669 
670  /// getInputParticleList() returns a linked list of all of the
671  /// particle system primitives used by a particular input. It will cook the
672  /// input POP as necessary.
673  POP_ParticleList* getInputParticleList (int idx, OP_Context& context);
674 
675  // cacheForDisplay() caches the current gdp for display purposes if
676  // necessary.
677  void cacheForDisplay (OP_Context &context);
678 
679  /// checkActivation() returns 1 if the POP should be active and 0
680  /// otherwise.
681  int checkActivation (POP_ContextData* data,
683 
684  /// doUpdateViewport() indicates whether the POP needs to perform
685  /// updates for the viewport (like guide geometry for example).
686  int doUpdateViewport (POP_ContextData* data);
687 
688  /// @name Add standard attribute
689 
690  /// @{
691  /// add___Attrib() is used to add attributes to the detail if
692  /// they don't exist already.
693  void addAlphaAttrib (POP_ContextData* data);
694  void addAngVelAttrib (POP_ContextData* data);
695  void addAttractAttrib (POP_ContextData* data);
696  void addBounceAttrib (POP_ContextData* data);
697  void addComAttrib (POP_ContextData* data);
698  void addChargeAttrib (POP_ContextData* data);
699  void addClingAttrib (POP_ContextData* data);
700  void addDiffuseAttrib (POP_ContextData* data);
701  void addDistanceAttrib (POP_ContextData* data);
702  void addDragAttrib (POP_ContextData* data);
703  void addFollowAttrib (POP_ContextData* data);
704  void addFDynamicAttrib (POP_ContextData* data);
705  void addFStaticAttrib (POP_ContextData* data);
706  void addGenAttrib (POP_ContextData* data);
707  void addHitDiffuseAttrib (POP_ContextData* data);
708  void addHitIDAttrib (POP_ContextData* data);
709  void addHitNormalAttrib (POP_ContextData* data);
710  void addHitForceAttrib (POP_ContextData* data);
711  void addHitPosAttrib (POP_ContextData* data);
712  void addHitPosUVAttrib (POP_ContextData* data);
713  void addHitTimeAttrib (POP_ContextData* data);
714  void addHitUVAttrib (POP_ContextData* data);
715  void addIDAttrib (POP_ContextData* data);
716  void addInstanceAttrib (POP_ContextData* data);
717  void addMassAttrib (POP_ContextData* data);
718  void addNearestAttrib (POP_ContextData* data);
719  void addNearestDistAttrib (POP_ContextData* data);
720  void addNumHitAttrib (POP_ContextData* data);
721  void addNumProximityAttrib(POP_ContextData *data);
722  void addOrbitAttrib (POP_ContextData* data);
723  void addOrbitAxisAttrib (POP_ContextData* data);
724  void addOrbitCenterAttrib (POP_ContextData* data);
725  void addOrbitRadiusAttrib (POP_ContextData* data);
726  void addOrbitSpeedAttrib (POP_ContextData* data);
727  void addOrientAttrib (POP_ContextData* data);
728  void addParentAttrib (POP_ContextData* data);
729 
730  void addPosPathAttrib (POP_ContextData* data);
731 
732  void addPosPrimAttrib (POP_ContextData* data);
733  void addPosUVAttrib (POP_ContextData* data);
734  void addPrevVelAttrib (POP_ContextData* data);
735  void addOriginAttrib (POP_ContextData* data);
736  void addRotAttrib (POP_ContextData* data);
737  void addScaleAttrib (POP_ContextData* data);
738  void addScale3Attrib (POP_ContextData* data);
739  void addSpeedAttrib (POP_ContextData* data);
740  void addSpeedLimitAttrib (POP_ContextData* data);
741  void addSpringKAttrib (POP_ContextData* data);
742  void addSpriteRotAttrib (POP_ContextData* data);
743  void addSpriteScaleAttrib (POP_ContextData* data);
744  void addSpriteShopAttrib (POP_ContextData* data);
745  void addSpriteUVAttrib (POP_ContextData* data);
746  void addTensionAttrib (POP_ContextData* data);
747  void addTorqueAttrib (POP_ContextData* data);
748  void addTransAttrib (POP_ContextData* data);
749  void addUpAttrib (POP_ContextData* data);
750  /// @}
751 
752  /// addUserVariable() is used to add user defined attributes to
753  /// the detail. It also takes care of adding local variables.
755  const char* name, int tuplesize,
757  GA_Defaults def, const char* local = 0)
758  {return(data->addUserVariable(name, tuplesize, type, def, local));}
759 
760  /// @{
761  /// buildParticleList() is used to build the list of particle
762  /// primitives that the POP should process.
763  OP_ERROR buildParticleList (OP_Context &context,
764  int checkForDuplicates = 0);
765  OP_ERROR buildParticleList (POP_ParticleList& buildList,
766  OP_Context &context,
767  int checkForDuplicates = 0);
768  OP_ERROR buildParticleList (int input, OP_Context &contexti);
769  OP_ERROR buildParticleList (POP_ParticleList& buildList,
770  int input, OP_Context &context);
771  /// @}
772 
773  /// initParticleList() initializes the particle list with
774  /// the particle primitive. Used by generators.
775  void initParticleList (OP_Context &context,
776  GEO_PrimParticle* part = NULL);
777 
778  // a helper method that adds primitves form src_list to dest_list
779  // INPUTS:
780  // src_list - list whose particles to add to tdest_list
781  // pop - pop operator that is an owner of src_list (used for error checks)
782  // input_index - if pop is an input operator, then this argument is
783  // its index. If pop is a generator or a non-input, use -1
784  // contest - context at which particles are added to dest_list
785  // checkForDuplicates - if true, particles from src_list are checked
786  // if there is already such particle in dest_list
787  // RETURNS:
788  // the error
789  OP_ERROR addListToParticleList( POP_ParticleList& dest_list,
790  POP_ParticleList& src_list,
791  const POP_Node *pop, int input_index,
792  OP_Context &context,
793  int checkForDuplicates);
794 
795  // addToParticleList() adds a primitive to the particle list.
796  int addToParticleList (OP_Context &context,
797  GEO_PrimParticle* part, int idx);
798 
799  // buildParticleListArray() is used to build an array of pointers
800  // to particle lists containing the particle primitives that the
801  // POP should process. No inputs does NOT return an error.
802  // Only valid if no error is returned.
803  // Parameters:
804  // array - a reference to the POP_ParticleListArray to append to
805  // num - will be set to the number of particle lists appended
806  // context - the context
807  // checkForDuplicates - a flag indicating whether to check for
808  // duplicate primitives.
809  OP_ERROR buildParticleListArray(POP_ParticleListArray& array,
810  int& num, OP_Context &context,
811  int checkForDuplicates = 0);
812 
813  /// birthParticle() should be used to birth particles into a particle
814  /// system
815  /// @param data POP_ContextData being used
816  /// @param part particle primitive to birth into
817  /// @param pos position of the birthed point
818  /// @param map mapping for inheriting attributes from the inherit
819  /// attribute data.
820  /// @param inherit inherit general attributes (required when map is used)
821  /// @param split inherit parental attributes (parent, origin,
822  /// generation)
823  /// @param originIndex origin index value.
824  /// @param originGeo origin from geometry number
825  /// @param originUse how to set origin id. Bit mask
826  /// - POP_ORIGIN_INDEX: add passed in index
827  /// - POP_ORIGIN_GEO: add source geometry number
828  /// - POP_ORIGIN_PARENT: add split origin
829  /// @param lifetime total expected life of the particle
830  /// @param birthAttrib function to set attributes after particle is
831  /// birthed
832  /// @param userdata passed into birthAttrib
833  GA_Offset birthParticle (POP_ContextData* data,
834  GEO_PrimParticle* part,
835  const UT_Vector4& pos,
836  POP_AttribMap* map,
837  GEO_PointP inherit,
838  GA_Offset splitoff,
839  POP_IntFunc originIndex, int originGeo,
840  int originUse, POP_FloatFunc lifetime,
841  POP_BirthAttribFunc birthAttrib = NULL,
842  void* userData = NULL);
843 
844  // initParticleAttrib() handles setting some attributes when birthing a
845  // particle. These include ID, origin, parent and generation.
846  void initParticleAttrib (POP_ContextData* data,
847  GA_Offset ptoff,
848  GA_Offset splitoff,
849  float age, float expected,
850  POP_IntFunc originIndex,
851  int originGeo, int originUse);
852 
853  /// @name Standard update rules
854  /// @{
855 
856  /// applyDefault___Rules() applies the default rules for that
857  /// attribute to the point.
858  static void applyDefaultPosRules (GA_Offset ptoff,
859  POP_ContextData* data,
860  int* state);
861  static void applyDefaultVelRules (GA_Offset ptoff,
862  POP_ContextData* data,
863  int* state);
864  static void applyDefaultRotRules (GA_Offset start,
865  GA_Offset end,
866  POP_ContextData* data,
867  int* state);
868  static void applyDefaultAngVelRules (GA_Offset start,
869  GA_Offset end,
870  POP_ContextData* data,
871  int* state);
872  static void applyDefaultUpRules (GA_Offset start,
873  GA_Offset end,
874  POP_ContextData* data,
875  int* state);
876  static void applyDefaultSpeedRules (GA_Offset start,
877  GA_Offset end,
878  POP_ContextData* data);
879  static void applyDefaultSlideRules (GA_Offset start,
880  GA_Offset end,
881  POP_ContextData* data,
882  int* state,
883  int globalsuppress);
884  /// @}
885 
886  // Methods for handling sliding particles
887  static void setupStateForSlidingParticles();
888  static void cleanupStateForSlidingParticles();
889  static void preProcessSlidingParticle(
890  GA_Offset ptoff,
891  POP_ContextData *data,
892  POP_SlideAttribs &attribs,
893  int *state,
894  UT_Vector3 &nml,
895  UT_Vector3 &surface_vel);
896  static void postProcessSlidingParticle(
897  GA_Offset ptoff,
898  POP_ContextData *data,
899  POP_SlideAttribs &attribs,
900  int *state,
901  UT_Vector3 &nml,
902  UT_Vector3 &initial_pos,
903  const UT_Vector3 &surface_vel);
904 
905  static void getPosFromReferencedSop(
906  UT_Vector4 &pos,
907  GA_Offset ptoff,
908  POP_ContextData *data);
909 
910  static void getPosFromPrimUV(
911  POP_ContextData *data,
912  const char *sop_path,
913  int primnum,
914  const UT_Vector2 &uv,
915  GA_Offset ptoff,
916  UT_Vector4 &pos);
917 
918  /// Add guide geometry for accelerations to myGuide.
919  void addAccelGuide (GEO_PointP ppt, float ax, float ay,
920  float az, float scale = 1.0f,
921  int normalize = 0);
922  void addAccelGuide (const GA_Detail *gdp, GA_Offset ptoff,
923  float ax, float ay, float az,
924  float scale = 1.0f,
925  int normalize = 0);
926 
927  /// Change the string into a valid group name. A return value of true
928  /// indicates that the string needed changing, in which case severity
929  /// specifies the level of error this method generated (UT_ERROR_NONE,
930  /// UT_ERROR_WARNING, or UT_ERROR_ABORT).
931  /// Note that this does not force the name to be non-zero in length.
932  bool forceValidGroupName(UT_String &name,
934  /// Change the string into a valid group prefix. A return value of true
935  /// indicates that the string needed changing, in which case severity
936  /// specifies the level of error this method generated (UT_ERROR_NONE,
937  /// UT_ERROR_WARNING, or UT_ERROR_ABORT).
938  /// Note that this does not force the prefix to be non-zero in length.
939  bool forceValidGroupPrefix(UT_String &name,
941 
942  /// @name Get group corresponding to supplied pattern
943  /// @{
944  const GA_PointGroup *parsePointGroups (const char* pattern,
945  GU_Detail* pgdp=0,
946  int allow_numeric = 1);
947  const GA_PrimitiveGroup *parsePrimitiveGroups (const char* pattern,
948  GU_Detail* pgdp=0,
949  int allow_numeric = 1);
950  GA_PointGroup *parsePointGroupsCopy(const char* pattern,
951  GU_Detail* pgdp=0,
952  int allow_numeric = 1);
953  GA_PrimitiveGroup *parsePrimitiveGroupsCopy(const char* pattern,
954  GU_Detail* pgdp=0,
955  int allow_numeric = 1);
956  /// @}
957 
958  /// evalVector() evaluates a vector expression and places the results
959  /// in the x, y and z parameters.
960  void evalVector (EV_EXPRESSION* expr,
961  float &x, float &y, float &z,
962  int thread);
963 
964  /// @name Test a parameter for references to per-particle variables
965  /// @{
966  virtual int isVarDependent (GU_Detail* gdp, POP_FParam param,
967  float t, int thread);
968  virtual int isVarDependent (GU_Detail* gdp, POP_IParam param,
969  float t, int thread);
970  virtual int isVarDependent (GU_Detail* gdp, POP_SParam param,
971  float t, int thread);
972  virtual int isVarDependent (GU_Detail* gdp, EV_EXPRESSION* expr,
973  int thread);
974  /// @}
975 
976  /// @brief Control whether parameter evalutions are allowed to reference
977  /// local variables.
978  ///
979  /// Derived classes that implement local variables will generally want to
980  /// override this virtual.
981  virtual void allowVar (int val);
982 
983  void traverseNode (POP_TraverseFunc traverse,
984  void* userdata = 0);
985 
986  void flagTraverse (void* userdata);
987  virtual void doPreCook (void* userdata);
988  void updateChecksum (void* userdata);
989 
990  // For nodes that include a geometry (SOP/DOP) path, this function
991  // returns the parameter name that contains the path. This function
992  // is used by getGeoPath().
993  virtual const char *getGeoPathParmName() const;
994  // Fetches the geometry path to be used by this node. This function
995  // either returns the appropriate context geometry path, or the value
996  // of the parm specified in getGeoPathParmName(). This function is
997  // used by getGeo().
998  void getGeoPath(UT_String &geopath,
999  const POP_ContextData *data,
1000  fpreal t);
1001 
1002  // Obtain the world transform with optional reference object.
1003  // If either of them is NULL, then we omit using it. This method will also
1004  // add transform errors if encountered.
1005  bool getXformToReference(OP_Context &context,
1006  OP_Node *target,
1007  OP_Node *reference,
1008  UT_DMatrix4 &mat);
1009 
1010  /// This method returns the previous context data used to cook this
1011  /// node, or the one used to cook the first input if we don't have
1012  /// one cached.
1013  const POP_ContextData *getPrevContextData() const;
1014 
1016 
1017  static void buildPointGroupMenu(void* data, PRM_Name* menu,
1018  int maxSize, const PRM_SpareData*,
1019  const PRM_Parm *);
1020  static void buildGenericGroupMenu(const GA_ElementGroupTable *table,
1021  PRM_Name *menu, int maxSize,
1022  int &index);
1023 
1025 
1026  static void buildGeneratorMenu(void* data, PRM_Name* menu,
1027  int maxSize, const PRM_SpareData*,
1028  const PRM_Parm *);
1029 
1031 
1032  /// The guide handle owns the guide detail and permits indirect (external)
1033  /// references to the POP_Guide. Within the context of this node, we can
1034  /// safely use myGuide as a convenient way to avoid casting.
1035  ///
1036  /// @warning Preserve requests are ignored.
1039 
1041 
1042 private:
1043 
1044  virtual OP_ERROR cookMe (OP_Context &context);
1045  virtual OP_ERROR bypassMe (OP_Context &context, int &copied_input);
1046 
1047  virtual OP_DataType getCookedDataType (void) const;
1048  virtual void deleteCookedData (void);
1049 
1050  virtual int saveCookedData (const char* filename, OP_Context &);
1051  virtual int saveCookedData (std::ostream &os, OP_Context &,
1052  int binary = 0);
1053  virtual const char* getFileExtension (int binary) const;
1054 
1055  virtual const char *getCookTimerLabel(const OP_Context &context) const;
1056 
1057  virtual int doDeleteRewire (void) const;
1058 
1059  static void initializeExpressions (void);
1060 
1061  GU_Detail* myPrevDetail;
1062  POP_ContextDataHandle myPrevContextData;
1063  UT_String myInfoText;
1064  int myWarnDisplayFlag;
1065  int myTraverse;
1066  int myPseudoCooking;
1067 };
1068 
1069 // Function to get a list of template arrays containing parm names that must
1070 // be reserved when compiling VEX POPs.
1071 POP_API extern void
1073 
1074 #endif
virtual int saveCookedData(std::ostream &os, OP_Context &, int binary=0)=0
GLint first
Definition: glcorearb.h:404
virtual const char * getCookTimerLabel(const OP_Context &context) const
virtual int doDeleteRewire() const
Definition: OP_Node.h:1484
POP_ParticleList * getParticleList(void)
Definition: POP_Node.h:550
GA_Offset getMapOffset() const
Definition: GA_GBElement.h:103
Iteration over a range of elements.
Definition: GA_Iterator.h:28
void addMessage(POP_ErrorCodes code, const char *msg=0)
Definition: POP_Node.h:662
virtual int getNetOverviewColor(UT_Color &color)
virtual fpreal getH() const
Node position/scale is used by the UI.
void addFatal(POP_ErrorCodes code, const char *msg=0)
Definition: POP_Node.h:666
Class which stores the default values for a GA_Attribute.
Definition: GA_Defaults.h:35
#define SYS_VISIBILITY_EXPORT
#define POP_API
Definition: POP_API.h:10
GA_StorageClass
Definition: GA_Types.h:68
GA_API const UT_StringHolder uv
#define SYS_DEPRECATED_PUSH_DISABLE()
#define SYS_DEPRECATED_POP_DISABLE()
GLuint start
Definition: glcorearb.h:474
GLuint color
Definition: glcorearb.h:1260
virtual OP_OpTypeId getOpTypeID() const =0
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
UT_API UT_ErrorSeverity UTaddFatal(const char *type, int code, const char *msg=0, const UT_SourceLocation *loc=0)
const GLuint GLenum const void * binary
Definition: glcorearb.h:1923
POP_ErrorCodes
Definition: POP_Error.h:11
SYS_FORCE_INLINE T * SYSconst_cast(const T *foo)
Definition: SYS_Types.h:126
GLdouble GLdouble GLdouble z
Definition: glcorearb.h:847
POP_Guide * myGuide
Definition: POP_Node.h:1038
GA_POINT_TYPE PointType
Definition: POP_Node.h:241
UT_ErrorSeverity
Definition: UT_Error.h:25
Parameters for OP_Node::getInfoText()/OP_Node::getNodeSpecificInfoText()
GLint y
Definition: glcorearb.h:102
GA_GBElement & operator=(const GA_GBElement &src)
Definition: GA_GBElement.h:81
float(POP_Node::* POP_FParam)(float t)
Definition: POP_Node.h:403
virtual void getNodeSpecificInfoText(OP_Context &context, OP_NodeInfoParms &parms)
void(POP_Node::* POP_SParam)(UT_String &s, float t)
Definition: POP_Node.h:405
3D Vector class.
UT_API UT_ErrorSeverity UTaddMessage(const char *type, int code, const char *msg=0, const UT_SourceLocation *loc=0)
POP_API void POPgetVexReservedTemplateLists(UT_ValArray< PRM_Template * > &tplatelists)
virtual OP_ERROR cookMe(OP_Context &context)=0
UT_ValArray< POP_ParticleList * > POP_ParticleListArray
A PtrArray which stores pointers to POP_ParticleList.
Definition: POP_Node.h:395
#define GA_INVALID_OFFSET
Definition: GA_Types.h:654
void(POP_Node::* POP_JitterFunc)(GU_Detail **gdp, GA_PointGroup **pointGroup, GA_PrimitiveGroup **primGroup, GU_RayIntersect **rayIntersect, POP_AttribMap **map, float timeIncFraction)
Definition: POP_Node.h:389
A range of elements in an index-map.
Definition: GA_Range.h:42
void(POP_Node::* POP_BirthAttribFunc)(POP_ContextData *data, GEO_PointP ppt, UT_Vector3 *vel, void *userdata)
Definition: POP_Node.h:367
GA_Size GA_Offset
Definition: GA_Types.h:617
bool atEnd() const
Definition: GA_Iterator.h:100
bool atEnd() const
Definition: POP_Node.h:287
int(POP_Node::* POP_IParam)(float t)
Definition: POP_Node.h:404
GA_API const UT_StringHolder scale
This class provides a way to manage a reference to an attribute permitting Read-Write access...
GU_DetailHandle myGuideHandle
Definition: POP_Node.h:1037
GLfloat f
Definition: glcorearb.h:1925
virtual int isRefInput(unsigned) const
Definition: POP_Node.h:576
virtual const char * getOpType() const =0
GA_RWAttributeRef addUserVariable(POP_ContextData *data, const char *name, int tuplesize, GA_StorageClass type, GA_Defaults def, const char *local=0)
Definition: POP_Node.h:754
virtual void addAttrib(void *)
Definition: POP_Node.h:656
SYS_VISIBILITY_EXPORT void newPopOperator(OP_OperatorTable *table)
GLuint GLuint end
Definition: glcorearb.h:474
float(POP_Node::* POP_FloatFunc)(POP_ContextData *data)
Definition: POP_Node.h:374
void advance()
Advance to next iteration.
Definition: POP_Node.h:214
void addError(POP_ErrorCodes code, const char *msg=0)
Definition: POP_Node.h:660
#define POP_Guide
Definition: POP_Guide.h:17
GLenum target
Definition: glcorearb.h:1666
GA_POINT_TYPE::DetailType DetailType
Definition: POP_Node.h:240
virtual fpreal getW() const
Node position/scale is used by the UI.
GLenum GLenum severity
Definition: glcorearb.h:2538
DO NOT USE THIS CLASS!!!
Definition: GEO_Point.h:193
GLboolean * data
Definition: glcorearb.h:130
#define SYS_DEPRECATED_HDK(__V__)
GLuint const GLchar * name
Definition: glcorearb.h:785
static PRM_ChoiceList pointGroupMenu
Definition: POP_Node.h:1015
GridType::Ptr normalize(const GridType &grid, bool threaded, InterruptT *interrupt)
Normalize the vectors of the given vector-valued grid.
void addWarning(POP_ErrorCodes code, const char *msg=0)
Definition: POP_Node.h:664
virtual OP_DataType getCookedDataType() const =0
OP_OpTypeId
Definition: OP_Node.h:263
int(POP_Node::* POP_IntFunc)(POP_ContextData *data)
Definition: POP_Node.h:380
GA_POINT_TYPE::DetailType DetailType
Definition: POP_Node.h:153
virtual const char * getChildType() const
double fpreal
Definition: SYS_Types.h:269
GOP_Manager myGroupParse
Definition: POP_Node.h:1040
virtual const char * getFileExtension(int binary) const =0
GLenum GLfloat param
Definition: glcorearb.h:103
Parameters for OP_Node::fillInfoTree()/OP_Node::fillInfoTreeNodeSpecific()
virtual void fillInfoTreeNodeSpecific(UT_InfoTree &tree, const OP_NodeInfoTreeParms &parms)
typedef int
Definition: png.h:1175
static PRM_ChoiceList generatorMenu
Definition: POP_Node.h:1024
POP_ParticleList myParticleList
Definition: POP_Node.h:1030
const GA_GBPrimWrap * operator->() const
Definition: POP_Node.h:357
GLuint index
Definition: glcorearb.h:785
GA_GBPointIteratorNoCacheConst< GA_POINT_TYPE > Super
Definition: POP_Node.h:238
static const char * theChildTableName
Definition: POP_Node.h:512
UT_API UT_ErrorSeverity UTaddWarning(const char *type, int code, const char *msg=0, const UT_SourceLocation *loc=0)
GLint GLenum GLint x
Definition: glcorearb.h:408
GLuint GLfloat * val
Definition: glcorearb.h:1607
OP_DataType
Definition: OP_DataTypes.h:27
virtual OP_OpTypeId getChildTypeID() const =0
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:107
GA_RWAttributeRef addUserVariable(const char *name, int tuplesize, GA_StorageClass type, GA_Defaults def, const char *local=0)
Container class for all geometry.
Definition: GA_Detail.h:96
png_infop png_uint_32 int num
Definition: png.h:2158
void(POP_Node::* POP_TraverseFunc)(void *userdata)
Definition: POP_Node.h:384
PointType * get()
Return the current point (NULL if complete)
Definition: POP_Node.h:267
#define const
Definition: zconf.h:214
DO NOT USE THIS CLASS!!!
Definition: GEO_Point.h:389
void(POP_Node::* POP_VParam)(EV_EXPRESSION *expr, float &x, float &y, float &z, int thread)
Definition: POP_Node.h:406
void activate(GridOrTree &, const typename GridOrTree::ValueType &value, const typename GridOrTree::ValueType &tolerance=zeroVal< typename GridOrTree::ValueType >())
Mark as active any inactive tiles or voxels in the given grid or tree whose values are equal to value...
Definition: Morphology.h:944
virtual OP_ERROR bypassMe(OP_Context &context, int &copied_input)=0
GA_GBPrimWrap * operator->()
Definition: POP_Node.h:355
GA_API const UT_StringHolder age
UT_API UT_ErrorSeverity UTaddError(const char *type, int code, const char *msg=0, const UT_SourceLocation *loc=0)
virtual void deleteCookedData()=0
const PointType * get() const
Return the current point (NULL if complete)
Definition: POP_Node.h:185
const GA_IndexMap & getIndexMap() const
Provide access to the GA_IndexMap containing this element.
Definition: GA_GBElement.h:99