00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __GEO_PrimCircle_H__
00022 #define __GEO_PrimCircle_H__
00023
00024 #include "GEO_API.h"
00025 #include "GEO_PrimType.h"
00026 #include "GEO_Quadric.h"
00027 #include "GEO_Vertex.h"
00028
00029 #define GEO_CIRCLE_XSECT_XP 0
00030 #define GEO_CIRCLE_XSECT_XN 1
00031 #define GEO_CIRCLE_XSECT_YP 2
00032 #define GEO_CIRCLE_XSECT_YN 3
00033
00034 #define GEO_CIRCLE_GUIDEEDGE_X 0
00035 #define GEO_CIRCLE_GUIDEEDGE_Y 1
00036
00037 class GEO_Detail;
00038
00039 class GEO_API GEO_PrimCircle : public GEO_Quadric {
00040 public:
00041 GEO_PrimCircle(GEO_Detail *d);
00042 virtual ~GEO_PrimCircle();
00043
00044
00045 virtual unsigned getPrimitiveId() const;
00046
00047
00048
00049
00050 virtual bool evaluatePoint(GEO_Vertex &result,
00051 GEO_AttributeHandleList &hlist,
00052 fpreal u_unit, fpreal,
00053 uint du, uint) const;
00054 virtual int evaluatePoint( UT_Vector4 &pos, float u_unit, float=0,
00055 unsigned du=0, unsigned = 0) const;
00056 virtual int evaluatePointWAttrib(UT_Vector4 &pos,
00057 GB_AttributeData &adata,
00058 const GB_FloatOffsets &foffsets,
00059 float u_unit, float=0, unsigned du = 0,
00060 unsigned = 0) const;
00061
00062 virtual int getBBox(UT_BoundingBox *bbox) const;
00063 virtual void addToBSphere(UT_BoundingSphere *bsphere) const;
00064 virtual UT_Vector3 computeNormal() const;
00065 virtual UT_Vector3 baryCenter() const;
00066
00067 virtual int hasGuideEdge(int edgeid, UT_Vector4 &a,
00068 UT_Vector4 &b) const;
00069 virtual int hasXsectPoint(int pointid, UT_Vector4 &p) const;
00070
00071 virtual float calcVolume(UT_Vector3 &refpt) const;
00072 virtual float calcArea() const;
00073 virtual float calcPerimeter() const;
00074 private:
00075 friend ostream &operator<<(ostream &os, const GEO_PrimCircle &d)
00076 {
00077 d.save(os, 0);
00078 return os;
00079 }
00080 };
00081 #endif