00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _SO_NURBS_GROUP_
00024 #define _SO_NURBS_GROUP_
00025
00026 #include <Inventor/nodes/SoGroup.h>
00027 #include <Inventor/nodes/SoNurbsProperty.h>
00028 #include <Inventor/elements/SoNurbsPropertyElement.h>
00029 #include <Inventor/STL/vector>
00030
00031 class SoCache;
00032 class SoState;
00033 class SoNurbsBREPAction;
00034 class SoBrep;
00035
00036 #ifndef HIDDEN_FROM_DOC
00037 namespace A3DPhigsCrackFreeTess
00038 {
00039 class Pid_polyline_data;
00040 class Pid_quad_data;
00041 }
00042 class SoTrimList;
00043
00044 #endif
00045
00090 class SoNurbsGroup : public SoGroup {
00091
00092 SO_NODE_HEADER(SoNurbsGroup);
00093
00094 public:
00095
00099 SoNurbsGroup();
00103 virtual ~SoNurbsGroup();
00104
00105 private:
00106 virtual void GLRender(SoGLRenderAction *action);
00107 virtual void rayPick(SoRayPickAction *action);
00108 virtual void callback(SoCallbackAction *action);
00109
00110 private:
00111 #ifndef HIDDEN_FROM_DOC
00112 static void initClass();
00113 static void exitClass();
00114
00115 struct NurbsProperty {
00116 SoNurbsPropertyElement::DrawStyle style;
00117 int numSamplePoints;
00118 SoNurbsProperty::TessellationType tessType;
00119 float tessAngle;
00120 float tessDistance;
00121 int steps;
00122 };
00123 #endif
00124
00125 private:
00126 SoNurbsBREPAction *m_brepAction;
00127
00128 void deleteBrepStruct(SoBrep *brep);
00129 void deleteTessData();
00130 void dispatchData(SbBool doTextures);
00131 void fillCache(SoAction *action, SbBool renderAction);
00132 void computeBREP(SoState *state, SoBrep *brep,
00133 SoNurbsProperty::TessellationType tessType,
00134 float tessAngle, float tessDistance,
00135 SbBool doTextures);
00136
00137 SoCache *cache;
00138 void createGroupCache(SoState *state);
00139
00140 size_t m_numPolygons;
00141 std::vector<SoTrimList*> m_polygons;
00142 class A3DPhigsCrackFreeTess::Pid_polyline_data *m_loops;
00143 class A3DPhigsCrackFreeTess::Pid_polyline_data *m_isoParam;
00144 };
00145
00146 #endif
00147
00148