HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GU_Topology.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: GU_Topology.h ( GU Library, C++)
7  *
8  * COMMENTS: Topology checker - builds a structure with which you can
9  * determine different degrees of topology changes (this is
10  * done when you set up the checker)
11  */
12 
13 #ifndef __GU_Topology__
14 #define __GU_Topology__
15 
16 #include "GU_API.h"
17 
18 #include <UT/UT_ValArray.h>
19 #include <GA/GA_Types.h>
20 
21 class GU_Detail;
22 class gu_TopologyAttrib;
23 class gu_TopologyGroup;
24 
26 {
27 public:
29  myPrimCount = 1; // We're interested in # primitives
30  myPointCount = 1; // Interested in # points
31  myVertexCount = 0; // Not in # vertices per prim
32  myGroups = 1; // Interested if groups change
33  myAttributes = 1; // Interested in attribute changes
34  };
35 
36  unsigned myPrimCount:1,
37  myPointCount:1,
38  myVertexCount:1,
39  myGroups:1,
40  myAttributes:1;
41 };
42 
43 /// WARNING: The behaviour of this class is highly suspect!
44 /// Please, do not use it in new code!
46 {
47 public:
48  GU_Topology();
49  ~GU_Topology();
50 
51  void setFlags(const GU_TopologyFlags &flags);
52  void initialize(const GU_Detail *gdp);
53  int isDifferent(const GU_Detail *gdp) const;
54 
55 private:
56  void clearAndDestroy();
57  void clearAttributes();
58  void clearGroups();
59 
60  GU_TopologyFlags myFlags;
61  GA_Size myPrims;
62  GA_Size myPoints;
63  GA_Size myVertices;
67  UT_ValArray<gu_TopologyAttrib *> myDetailAttribs;
71 };
72 
73 #endif
74 
GLbitfield flags
Definition: glcorearb.h:1596
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:236
#define GU_API
Definition: GU_API.h:14
OPENVDB_API void initialize()
Global registration of native Grid, Transform, Metadata and Point attribute types. Also initializes blosc (if enabled).
Definition: logging.h:294