00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __GEO_Closure_h__
00020 #define __GEO_Closure_h__
00021
00022 #include "GEO_API.h"
00023 #include "GEO_PrimType.h"
00024 #include "GEO_PrimTypeCompat.h"
00025
00026 #include <UT/UT_IntArray.h>
00027
00028 class GA_Edge;
00029 class GA_Group;
00030 class GA_PointGroup;
00031 class GA_EdgeGroup;
00032 class GA_PrimitiveGroup;
00033 class GA_VertexGroup;
00034 class GA_BreakpointGroup;
00035 namespace GA_PrimCompat { class TypeMask; }
00036 class GA_GBPointRefArray;
00037 class GEO_Face;
00038 class GEO_Detail;
00039 class GEO_Point;
00040 class GEO_PointRefArray;
00041
00042 class GEO_API GEO_Closure
00043 {
00044 public:
00045 GEO_Closure(GEO_Detail &gdp);
00046 ~GEO_Closure();
00047
00048
00049 void findPrimsUsingEdge(const GA_Edge *edge,
00050 GA_PrimitiveGroup *edgeprimsgrp,
00051 GA_GBPointRefArray &prefarr);
00052
00053 void findPrimsUsingEdge(const GA_Edge *edge,
00054 UT_IntArray &primlist,
00055 GA_GBPointRefArray &prefarr);
00056
00057
00058
00059 void findPolysUsingEdge(const GEO_Point &pt0,
00060 const GEO_Point &pt1,
00061 GA_PrimitiveGroup *edgeprimsgrp,
00062 GA_GBPointRefArray &prefarr);
00063
00064
00065
00066 void findPolysUsingEdge(const GEO_Point &pt0,
00067 const GEO_Point &pt1,
00068 UT_IntArray &primlist,
00069 GA_GBPointRefArray &prefarr);
00070
00071 void findPrimsUsingPoint(const GEO_Point *pt,
00072 GA_PrimitiveGroup *primgrp,
00073 GA_GBPointRefArray &prefarr);
00074
00075
00076
00077 void findPrimsUsingPoint(const GEO_Point *pt,
00078 UT_IntArray &primlist,
00079 GA_GBPointRefArray &prefarr,
00080 const GA_PrimCompat::TypeMask
00081 &primmask=GEO_PrimTypeCompat::GEOPRIMALL);
00082
00083
00084
00085
00086 static int getSharedPoint(GEO_Face *face0, GEO_Face *face1,
00087 int &vtxidx0, int &vtxidx1);
00088
00089
00090
00091 static int haveSharedPoint(GEO_Face *face0, GEO_Face *face1);
00092
00093
00094 int getNumSharedEdges(GEO_Point &pt,
00095 GA_GBPointRefArray &prefarr);
00096
00097 GA_PrimitiveGroup *getPrimitiveClosure(const GA_EdgeGroup &edgegroup,
00098 GEO_PointRefArray *&prefarr);
00099 GA_PrimitiveGroup *getEdgePointClosure(const GEO_PointRefArray &prefarr,
00100 const GA_Edge &edge,
00101 GA_PrimitiveGroup *primgrp = 0);
00102
00103
00104
00105 GA_PrimitiveGroup *getPrimitiveClosure(const GA_BreakpointGroup *grp = 0,
00106 const GA_PrimCompat::TypeMask
00107 &mask=GEO_PrimTypeCompat::GEOSPLINE);
00108
00109
00110 GA_PointGroup *getPointClosure(const GA_Group &group);
00111 GA_PointGroup *getPointClosure(const GA_PointGroup &ptgroup);
00112 GA_PointGroup *getPointClosure(const GA_EdgeGroup &edgegroup);
00113 GA_PointGroup *getPointClosure(const GA_PrimitiveGroup &primgroup);
00114 GA_PointGroup *getPointClosure(const GA_VertexGroup &vtxgroup);
00115
00116
00117 GA_VertexGroup *getVertexClosure(const GA_Group &group);
00118 GA_VertexGroup *getVertexClosure(const GA_PointGroup &ptgroup);
00119 GA_VertexGroup *getVertexClosure(const GA_EdgeGroup &edgegroup);
00120 GA_VertexGroup *getVertexClosure(const GA_PrimitiveGroup &primgroup);
00121 GA_VertexGroup *getVertexClosure(const GA_VertexGroup &vtxgroup);
00122
00123
00124 GA_PrimitiveGroup *getPrimitiveClosure(const GA_Group &group);
00125 GA_PrimitiveGroup *getPrimitiveClosure(const GA_PointGroup &ptgroup);
00126 GA_PrimitiveGroup *getPrimitiveClosure(
00127 const GA_PrimitiveGroup &primgroup);
00128 GA_PrimitiveGroup *getPrimitiveClosure(const GA_VertexGroup &vtxgroup);
00129
00130 private:
00131 GEO_Detail &myGdp;
00132 };
00133 #endif