HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GEO_Macros.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  * NAME: Geometry Library (C++)
7  *
8  * COMMENTS:
9  * This defines the detail class (the container for all points/primitives)
10  *
11  */
12 
13 #ifndef __GEO_Macros_h__
14 #define __GEO_Macros_h__
15 
16 #include <GA/GA_GBMacros.h> // FOR loops for groups (point and prim)
17 #include "GEO_PrimList.h"
18 
20 
21 /// An adapter class to allow the iteration macros in this file to maintain a
22 /// local GEO_PrimList::GroupIterationCache object.
24 {
25 public:
26  template<typename DETAIL_TYPE, typename PRIM_TYPE, typename SEC_PRIM_TYPE>
27  SYS_DEPRECATED_HDK(13.0)
28  inline GEO_GBMixGroupFwdIterator(
29  DETAIL_TYPE *gdp, const GA_PrimitiveGroup &group,
30  PRIM_TYPE *&prim, SEC_PRIM_TYPE *&sec)
31  {
32  gdp->primitives().headMix(group, prim, sec,
33  myCache);
34  }
35 
36  template<typename DETAIL_TYPE, typename PRIM_TYPE, typename SEC_PRIM_TYPE>
37  SYS_DEPRECATED_HDK(13.0)
38  inline int nextMix(DETAIL_TYPE *gdp,
39  const GA_PrimitiveGroup &group,
40  PRIM_TYPE *&prim, SEC_PRIM_TYPE *&sec,
41  PRIM_TYPE *&next_prim, SEC_PRIM_TYPE *&next_sec)
42  {
43  return gdp->primitives().nextMix(group, prim, sec,
44  next_prim, next_sec, myCache);
45  }
46 private:
48 };
49 
50 #define FOR_ALL_MIX_GROUP_PRIMITIVES(gdp, grp, prim, sec) \
51  for (GEO_GBMixGroupFwdIterator __iter(gdp, *grp, prim, sec); prim; \
52  __iter.nextMix(gdp, *grp, prim, sec, prim, sec))
53 
54 #define FOR_SAFE_MIX_GROUP_PRIMITIVES(gdp, grp, prim, sec, nextprim, nextsec) \
55  for (GEO_GBMixGroupFwdIterator __iter(gdp, *grp, prim, sec); \
56  prim && (__iter.nextMix(gdp,*grp,prim,sec,nextprim,nextsec) || true) && prim; \
57  prim = nextprim, sec = nextsec)
58 
60 
61 #endif
*get result *(waiting if necessary)*A common idiom is to fire a bunch of sub tasks at the and then *wait for them to all complete We provide a helper class
Definition: thread.h:623
#define SYS_DEPRECATED_PUSH_DISABLE()
#define SYS_DEPRECATED_POP_DISABLE()
Class used to avoid O(n^2) traversal of ordered groups.
#define GEO_API
Definition: GEO_API.h:14
Create macros which emulate the macros in the obsolete GB library.
#define SYS_DEPRECATED_HDK(__V__)
#define const
Definition: zconf.h:214