00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 #ifndef VRS_KNOT_H
00038 #define VRS_KNOT_H
00039
00040 #include <vrs/shape.h>
00041
00042 namespace VRS {
00043
00045 class VRS_CORE_API Knot:public Shape {
00046
00047 public:
00048 Knot(
00049 double innerRad = 0.75,
00050 double rotRat = 0.25,
00051 double thickness = 0.125,
00052 const Vector& center = Vector(0,0,0),
00053 double phiMin = 0,
00054 double phiMax = 360,
00055 double theta = 360,
00056 double q = 3,
00057 double p = 2
00058 );
00059
00060
00061
00062
00063 void setCenter(const Vector&);
00064 Vector getCenter() const;
00066
00067 void setInnerRad(double);
00068 void setRotRad(double);
00069 void setThickness(double);
00070 double getInnerRad() const;
00071 double getRotRad() const;
00072 double getThickness() const;
00077 void setPhi(double minphi, double maxphi);
00078 double getPhiMin() const;
00079 double getPhiMax() const;
00084 void setTheta(double);
00085 double getTheta() const;
00089 void setP(double);
00090 void setQ(double);
00091 double getP() const;
00092 double getQ() const;
00095 virtual Bounds boundingBox() const;
00097
00098 VRS_TYPEINFO(Knot, Shape);
00099 VRS_SERIALIZABLE(Knot);
00100
00101 private:
00102 Vector center_;
00103 double innerRad_;
00104 double rotRad_;
00105 double thickness_;
00106 double phiMin_;
00107 double phiMax_;
00108 double theta_;
00109 double p_;
00110 double q_;
00111 };
00112
00113 inline Vector Knot::getCenter() const { return center_;}
00114 inline double Knot::getInnerRad() const { return innerRad_; }
00115 inline double Knot::getRotRad() const { return rotRad_; }
00116 inline double Knot::getThickness() const { return thickness_; }
00117 inline double Knot::getPhiMin() const { return phiMin_; }
00118 inline double Knot::getPhiMax() const { return phiMax_; }
00119 inline double Knot::getTheta() const { return theta_; }
00120 inline double Knot::getP() const { return p_; }
00121 inline double Knot::getQ() const { return q_; }
00122
00123 }
00124
00125 #endif // VRS_KNOT_H
00126