HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GA_SecondaryLookupInfo.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: GA_SecondaryLookupInfo.h (GA Library, C++)
7  *
8  * COMMENTS:
9  * This class holds the information necessary to lookup a specific
10  * secondary primitive from the top level primary primitive.
11  */
12 
13 #ifndef __GA_SecondaryLookupInfo__
14 #define __GA_SecondaryLookupInfo__
15 
16 #include "GA_API.h"
17 #include "GA_Types.h"
18 
19 #include <UT/UT_VectorTypes.h>
20 
21 
22 template <typename T> class UT_Array;
23 
24 
25 /// @brief Information necessary to lookup a secondary primitive.
26 ///
27 /// Primitives may contain secondary primitives, which may themselves contain
28 /// other secondary primitives. This class allows us to store all the nested
29 /// data necessary to traverse the secondary hierarchy.
31 {
32 public:
33  class GA_API node
34  {
35  public:
36  bool operator==(const node &src) const
37  { return myDetail == src.myDetail && myOffset == src.myOffset; }
38  bool operator!=(const node &src) const
39  { return !operator==(src); }
40 
43  };
44 
46  GA_SecondaryLookupInfo(GA_Index detail1, GA_Offset offset1);
47  GA_SecondaryLookupInfo(GA_Index detail1, GA_Offset offset1,
48  GA_Index detail2, GA_Offset offset2);
49  GA_SecondaryLookupInfo(GA_Index detail1, GA_Offset offset1,
50  GA_Index detail2, GA_Offset offset2,
51  GA_Index detail3, GA_Offset offset3);
53  GA_SecondaryLookupInfo(const UT_Int64Array &detail_indices,
54  const UT_Int64Array &prim_offsets);
57 
58  unsigned getDepth() const { return mySize; }
59  const node &getLookup(unsigned i) const { return myData[i]; }
60 
62  bool operator==(const GA_SecondaryLookupInfo &) const;
63 private:
64  node *myData;
65  unsigned mySize;
66 };
67 
68 #endif
69 
#define GA_API
Definition: GA_API.h:14
Information necessary to lookup a secondary primitive.
GA_Size GA_Offset
Definition: GA_Types.h:646
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
const node & getLookup(unsigned i) const
GA_Size GA_Index
Define the strictness of GA_Offset/GA_Index.
Definition: GA_Types.h:640
bool operator==(const node &src) const
LeafData & operator=(const LeafData &)=delete
bool operator!=(const node &src) const
GLenum src
Definition: glcorearb.h:1793