00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __GU_PrimTriBezier__
00020 #define __GU_PrimTriBezier__
00021
00022 #include "GU_API.h"
00023 #include <GEO/GEO_PrimTriBezier.h>
00024 #include "GU_Detail.h"
00025 #include "GU_Prim.h"
00026
00027 class GU_PrimTriBezierCache;
00028
00029 class GU_API GU_PrimTriBezier : public GEO_PrimTriBezier, public GU_Primitive
00030 {
00031 public:
00032
00033
00034 GU_PrimTriBezier(GU_Detail *gdp) : GEO_PrimTriBezier(gdp), GU_Primitive()
00035 { myDisplayCache = 0; }
00036 virtual ~GU_PrimTriBezier();
00037
00038
00039
00040 virtual GEO_Primitive *convert(GU_ConvertParms &parms,
00041 GB_PointGroup *usedpts = 0);
00042 virtual GEO_Primitive *convertNew(GU_ConvertParms &parms);
00043
00044 virtual void *castTo (void) const;
00045 virtual const GEO_Primitive *castToGeo(void) const;
00046
00047
00048
00049
00050
00051
00052
00053 static GU_PrimTriBezier *build(GU_Detail *gdp, int order,
00054 int appendPts = 1);
00055
00056
00057 virtual void normal(int noff) const;
00058 virtual void normal(UT_Vector3Array &output) const;
00059 virtual void clip(UT_Vector3 &nml, float d = 0, int normalize = 1,
00060 GEO_Primitive *prim=0,
00061 GB_PrimitiveGroup *clipgrp = 0);
00062
00063 virtual int intersectRay(const UT_Vector3 &o, const UT_Vector3 &d,
00064 float tmax = 1E17F, float tol = 1E-12F,
00065 float *distance = 0, UT_Vector3 *pos = 0,
00066 UT_Vector3 *nml = 0, int accurate = 0,
00067 float *u = 0, float *v = 0,
00068 int ignoretrim = 1) const;
00069
00070
00071
00072 virtual GU_RayIntersect *createRayCache(int &persistent);
00073
00074 virtual GU_DisplayMesh *getDisplayMesh(int noff, float lod);
00075
00076
00077 virtual GU_DisplayCache *getDisplayCache(void) const;
00078 virtual int buildDisplayCache(GU_CacheParms &parms);
00079
00080 virtual void destroyCache();
00081 virtual void notifyCache(int type);
00082 virtual void notifyCache(int type, const GEO_Point &ppt);
00083 virtual void notifyCache(int type, const GB_PointGroup &grp);
00084 virtual void notifyCache(int type, const UT_Matrix4 &xform,
00085 int push);
00086 virtual void notifyCache(int type, const UT_Vector3 &delta);
00087
00088 protected:
00089 private:
00090 GU_PrimTriBezierCache *myDisplayCache;
00091
00092 };
00093
00094 #endif
00095