00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __GU_TrimConvertPatch_h__
00021 #define __GU_TrimConvertPatch_h__
00022
00023 #include "GU_API.h"
00024 #include <UT/UT_RefArray.h>
00025 #include <UT/UT_Vector4Array.h>
00026 #include <GB/GB_Attribute.h>
00027 #include <GEO/GEO_AttributeHandleList.h>
00028 #include "GU_TrimBasePatch.h"
00029
00030 class UT_IntArray;
00031 class GU_Detail;
00032 class GEO_TPSurf;
00033 class GU_PrimPoly;
00034 class GU_TrimConvertPatch;
00035
00036
00037
00038
00039 class GU_API GU_TrimConvertTesselator : public GU_TrimBaseTesselator {
00040 public:
00041 GU_TrimConvertTesselator(GU_Detail *gdp, GU_TrimConvertPatch *sourcepatch);
00042 virtual ~GU_TrimConvertTesselator();
00043
00044
00045 virtual void reset();
00046
00047
00048 virtual void startPoly();
00049 virtual void endPoly();
00050 virtual void cancelPoly();
00051 virtual void addPolyPoint(GU_TrimBasePoint *point);
00052
00053
00054 virtual void startTStrip();
00055 virtual void endTStrip();
00056 virtual void addTStripPoints(GU_TrimBasePoint *p1,
00057 GU_TrimBasePoint *p2);
00058
00059
00060
00061 void setPreserveGroups(int preservegroups)
00062 { myPreserveGroups = preservegroups; }
00063
00064 private:
00065 GU_Detail *myGDP;
00066 GU_PrimPoly *myPrim;
00067 GEO_Point *myP1, *myP2;
00068 GU_TrimConvertPatch *myPatch;
00069
00070
00071
00072 GU_TrimBasePoint *myFirstPolyPoint, *myLastPolyPoint;
00073
00074
00075 GEO_Point **myGEOPoints;
00076 GEO_Vertex **myGEOVertices;
00077 GEO_AttributeHandleList *myHandles;
00078 UT_IntArray *myPointIndices;
00079 #if 0
00080 GB_AttributeData *myVtxAttrib;
00081 GB_AttributeData *myPtAttrib;
00082
00083 int myVASize, myPASize;
00084 #endif
00085 int myCurveEnd;
00086
00087 int myPreserveGroups;
00088 };
00089
00090
00091 class GU_API GU_TrimConvertPatch : public GU_TrimBasePatch {
00092 public:
00093 GU_TrimConvertPatch(GU_Detail *gdp, GEO_TPSurf *surface);
00094 virtual ~GU_TrimConvertPatch();
00095
00096
00097
00098 void getPointArrays(
00099 GEO_Point **&geopoints,
00100 GEO_Vertex **&geovertices,
00101 GEO_AttributeHandleList *&hlist,
00102 UT_IntArray *&ptindices,
00103 int &curveend);
00104
00105
00106 virtual void refreshCells(GEO_TPSurf *, int, int,
00107 int, int) {}
00108
00109 GEO_TPSurf *getSurf() const { return mySurf; }
00110
00111 private:
00112 #ifdef INTEL_COMPILER
00113 GU_TrimConvertPatch(const GU_TrimConvertPatch& ) { }
00114 #endif
00115
00116 protected:
00117
00118 virtual void fillPoint(GU_TrimPatchPoint *p);
00119
00120
00121
00122
00123
00124 virtual void fillCornerPoints();
00125
00126
00127
00128 virtual void fillEdgePoints();
00129
00130 protected:
00131
00132 GEO_TPSurf *mySurf;
00133 GU_Detail *myGDP;
00134
00135
00136 UT_PtrArray<GEO_Point *> myGEOPoints;
00137 UT_PtrArray<GEO_Vertex *> myGEOVertices;
00138 GEO_AttributeHandleList myHandles;
00139 UT_IntArray *myPointIndices;
00140 int myCurveEnd;
00141 };
00142 #endif
00143