00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __GU_PrimRBezCurve_h__
00022 #define __GU_PrimRBezCurve_h__
00023
00024 #include "GU_API.h"
00025 #include <GEO/GEO_PrimRBezCurve.h>
00026 #include <GEO/GEO_PrimNURBCurve.h>
00027 #include "GU_Curve.h"
00028
00029 class GU_Detail;
00030 class GU_PrimPoly;
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043 class GU_API GU_PrimRBezCurve : public GEO_PrimRBezCurve, public GU_Curve
00044 {
00045 public:
00046
00047
00048 GU_PrimRBezCurve(GU_Detail *gdp) : GEO_PrimRBezCurve((GEO_Detail *)gdp),
00049 GU_Curve()
00050 {
00051 setCurve(this);
00052 }
00053
00054 #if 0
00055
00056
00057 GU_PrimRBezCurve(GU_Detail *gdp, int nelems, int order = 4, int closed = 0,
00058 int appendPoints = 1);
00059 #endif
00060 ~GU_PrimRBezCurve();
00061
00062 GU_PrimPoly *makeGrevillePoly(GU_Detail *dest = 0);
00063
00064 virtual void *castTo() const;
00065 virtual const GEO_Primitive *castToGeo(void) const;
00066
00067
00068
00069
00070
00071
00072
00073 static GU_PrimRBezCurve *build(GU_Detail *gudp,
00074 int nelems, int order = 4, int closed=0,
00075 int appendPoints = 1);
00076
00077 virtual int intersectRay(const UT_Vector3 &o, const UT_Vector3 &d,
00078 float tmax = 1E17F, float tol = 1E-12F,
00079 float *distance = 0, UT_Vector3 *pos = 0,
00080 UT_Vector3 *nml = 0, int accurate = 0,
00081 float *u = 0, float *v = 0,
00082 int ignoretrim = 1) const;
00083
00084 GEO_Primitive *convertNew(GU_ConvertParms &parms);
00085 GEO_PrimNURBCurve *convertToNURBNew(void);
00086
00087
00088
00089
00090
00091 virtual GEO_Face *reconfigure(unsigned type, int order, int open,
00092 int interpends, int nonrational) const;
00093
00094
00095
00096
00097
00098
00099
00100 virtual GU_Curve *cut(float u1, float u2,
00101 int &ind1, int &ind2, int keep);
00102
00103
00104 virtual void openAt(float u);
00105
00106
00107
00108
00109
00110
00111
00112
00113 int removeEdges(const UT_BitArray &edgemap,
00114 UT_IntArray &removededges);
00115
00116
00117 void interpLocal(const UT_PtrArray<GEO_Point *> &gpData,
00118 int order, int wrapped, int corner);
00119 void interpLocal(const UT_Vector4Array &v4Data,
00120 int order, int wrapped, int corner);
00121
00122 private:
00123
00124
00125
00126 int create(int nelems, int order = 4, int closed = 0,
00127 int appendPoints = 1);
00128
00129 };
00130
00131 #endif