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