00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __SOP_SplitPointParser_h__
00021 #define __SOP_SplitPointParser_h__
00022
00023 #include "SOP_API.h"
00024 #include <GU/GU_EdgeSplit.h>
00025 #include <GOP/GOP_Parser.h>
00026 #include "SOP_PolySplit.h"
00027
00028
00029 #define CHAR_EDGE 'e'
00030 #define CHAR_VERTEX 'v'
00031 #define CHAR_POINT 'p'
00032 #define CHAR_T ':'
00033 #define CHAR_POINT_DELIM '-'
00034
00035 class SOP_API SOP_SplitPointParser : public GOP_Parser
00036 {
00037 public:
00038 SOP_SplitPointParser(UT_String &str, float forcedt, GU_Detail &gdp);
00039 ~SOP_SplitPointParser() {}
00040
00041 protected:
00042 virtual void addPoint(GU_SplitLoc *slvert) = 0;
00043 virtual void handleError();
00044
00045 private:
00046 virtual void init();
00047 virtual void finish();
00048 virtual bool dispatch(char c);
00049
00050
00051 virtual void handleStart();
00052 void handleCollectPrim();
00053 void handleCollectVert();
00054 void handleCollectEdge();
00055 void handleCollectT();
00056 void handleCollectP0();
00057 void handleCollectP1();
00058 void handleCollectPT();
00059
00060
00061
00062 bool addSplitLocVert();
00063 bool addSplitLocEdge();
00064 bool addSplitLocPoints();
00065
00066
00067 GU_Detail &myGdp;
00068
00069 float myT;
00070 int myPrim;
00071 int myIndex;
00072 int myP0;
00073 int myP1;
00074
00075 float myForcedT;
00076 };
00077
00078 #endif
00079