00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __GU_Topology__
00022 #define __GU_Topology__
00023
00024 #include "GU_API.h"
00025 class GU_Detail;
00026 class GU_TopologyAttrib;
00027 class GU_TopologyGroup;
00028 class GB_AttributeDict;
00029
00030 class GU_API GU_TopologyFlags {
00031 public:
00032 GU_TopologyFlags() {
00033 myPrimCount = 1;
00034 myPointCount = 1;
00035 myVertexCount = 0;
00036 myGroups = 1;
00037 myAttributes = 1;
00038 };
00039
00040 unsigned myPrimCount:1,
00041 myPointCount:1,
00042 myVertexCount:1,
00043 myGroups:1,
00044 myAttributes:1;
00045 };
00046
00047 class GU_API GU_Topology {
00048 public:
00049 GU_Topology();
00050 ~GU_Topology();
00051
00052 void setFlags(const GU_TopologyFlags &flags);
00053 void initialize(const GU_Detail *gdp);
00054 int isDifferent(const GU_Detail *gdp) const;
00055
00056 private:
00057 void clearAndDestroy();
00058 void clearAttributes();
00059 void clearGroups();
00060
00061 GU_TopologyFlags myFlags;
00062 int myPrims;
00063 int myPoints;
00064 int *myVertices;
00065 GU_TopologyAttrib *myPtAttribs;
00066 GU_TopologyAttrib *myPrimAttribs;
00067 GU_TopologyAttrib *myVtxAttribs;
00068 GU_TopologyAttrib *myDetailAttribs;
00069 int myPtAttribCount;
00070 int myPrimAttribCount;
00071 int myVtxAttribCount;
00072 int myDetailAttribCount;
00073 GU_TopologyGroup *myPtGroups;
00074 GU_TopologyGroup *myPrimGroups;
00075 int myPtGroupCount;
00076 int myPrimGroupCount;
00077 };
00078
00079 #endif
00080