HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
POP_ParticleList.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_ParticleList_h__
9 #define __POP_ParticleList_h__
10 
11 #include "POP_API.h"
12 class GEO_PrimParticle;
13 class POP_Node;
14 class POP_ParticleList;
15 class GEO_Detail;
16 
17 // The POP_ParticleList is just a linked list of particle primitives used
18 // to keep track of which primitives each POP is supposed to process.
19 
21 {
22 public:
24  : myPart(part)
25  , myPop(pop)
26  , myNext(NULL)
27  {}
29 
30  bool operator==(const POP_ParticleNode &src) const
31  {
32  return myPart == src.myPart
33  && myPop == src.myPop;
34  }
35  bool operator!=(const POP_ParticleNode &src) const
36  { return !(*this == src); }
37 
41 };
42 
44 {
45 public:
47  : myHead(NULL)
48  , myCurr(NULL)
49  {
50  }
52  : myHead(NULL)
53  , myCurr(NULL)
54  {
55  POP_ParticleNode *curr;
56  for (curr = src.myHead; curr; curr = curr->myNext)
57  add(curr->myPart, curr->myPop);
58  }
60  {
61  clear();
62  }
63 
65  {
66  if (&src != this)
67  {
68  POP_ParticleNode *curr;
69  clear();
70  for (curr = src.myHead; curr; curr=curr->myNext)
71  add(curr->myPart, curr->myPop);
72  }
73  return *this;
74  }
75  bool operator==(const POP_ParticleList &src) const
76  {
77  if (this == &src)
78  return true;
79  const POP_ParticleNode *p0, *p1;
80  for (p0 = myHead, p1 = src.myHead;
81  p0 && p1;
82  p0 = p0->myNext, p1 = p1->myNext)
83  {
84  if (*p0 != *p1)
85  return false;
86  }
87  return true;
88  }
89 
90  void clear(void);
92  POP_Node* pop = NULL);
93  void merge (const POP_ParticleList* list);
94  void copyNewGdp (const POP_ParticleList& list,
95  const GEO_Detail *gdp);
96  GEO_PrimParticle *iterateInit(void);
97  GEO_PrimParticle *iterateNext(void);
98  POP_ParticleNode *find(GEO_PrimParticle* part) const;
99  bool isEmpty() const { return !myHead; }
100 
101 protected:
104 };
105 #endif
GEO_PrimParticle * myPart
POP_ParticleNode(GEO_PrimParticle *part, POP_Node *pop)
#define POP_API
Definition: POP_API.h:10
bool operator==(const POP_ParticleNode &src) const
bool isEmpty() const
bool operator!=(const POP_ParticleNode &src) const
POP_ParticleNode * myCurr
POP_ParticleNode * myHead
POP_ParticleList(const POP_ParticleList &src)
bool operator==(const POP_ParticleList &src) const
POP_ParticleNode * myNext
POP_ParticleList & operator=(const POP_ParticleList &src)
GLenum src
Definition: glcorearb.h:1792