//=========================================================================== // GoTools Core - SINTEF Geometry Tools Core library, version 2.0.1 // // Copyright (C) 2000-2007, 2010 SINTEF ICT, Applied Mathematics, Norway. // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation version 2 of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., // 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. // // Contact information: E-mail: tor.dokken@sintef.no // SINTEF ICT, Department of Applied Mathematics, // P.O. Box 124 Blindern, // 0314 Oslo, Norway. // // Other licenses are also available for this software, notably licenses // for: // - Building commercial software. // - Building software whose source code you wish to keep private. //=========================================================================== 00015 #ifndef _PARABOLA_H 00016 #define _PARABOLA_H 00017 00018 00019 00020 00021 #include "GoTools/geometry/ElementaryCurve.h" 00022 00023 00024 namespace Go { 00025 00026 00033 00034 class Parabola : public ElementaryCurve 00035 { 00036 public: 00039 Parabola() 00040 {}; 00041 00045 Parabola(Point location, Point direction, Point normal, 00046 double focal_dist); 00047 00049 virtual ~Parabola(); 00050 00053 virtual void read (std::istream& is); 00056 virtual void write (std::ostream& os) const; 00057 00058 00059 // --- Functions inherited from GeomObject --- 00060 00061 virtual BoundingBox boundingBox() const; 00062 00063 virtual int dimension() const; 00064 00065 virtual ClassType instanceType() const; 00066 00067 static ClassType classType(); 00068 00069 virtual Parabola* clone() const; 00070 00071 // --- Functions inherited from ParamCurve --- 00072 00073 virtual void point(Point& pt, double tpar) const; 00074 00075 virtual void point(std::vector<Point>& pts, 00076 double tpar, 00077 int derivs, 00078 bool from_right = true) const; 00079 00080 virtual double startparam() const; 00081 virtual double endparam() const; 00082 00083 virtual void reverseParameterDirection(bool switchparam = false); 00084 00085 virtual void setParameterInterval(double t1, double t2); 00086 00087 virtual SplineCurve* geometryCurve(); 00088 00089 virtual bool isDegenerate(double degenerate_epsilon); 00090 00091 virtual 00092 Parabola* subCurve(double from_par, double to_par, 00093 double fuzzy = DEFAULT_PARAMETER_EPSILON) const; 00094 00095 virtual DirectionCone directionCone() const; 00096 00097 virtual void appendCurve(ParamCurve* cv, bool reparam=true); 00098 00099 virtual void appendCurve(ParamCurve* cv, 00100 int continuity, double& dist, bool reparam=true); 00101 00102 virtual void closestPoint(const Point& pt, 00103 double tmin, 00104 double tmax, 00105 double& clo_t, 00106 Point& clo_pt, 00107 double& clo_dist, 00108 double const *seed = 0) const; 00109 00110 virtual double length(double tol); 00111 00112 // --- Functions specific to Parabola --- 00113 00117 void setParamBounds(double startpar, double endpar); 00118 00122 bool isBounded(); 00123 00124 void setSpanningVectors(); 00125 00126 protected: 00127 00128 Point location_; 00129 Point vec1_; // The axes. 00130 Point vec2_; 00131 Point normal_; 00132 00133 double f_; // Focal dist. 00134 00135 double startparam_; 00136 double endparam_; 00137 00138 }; 00139 00140 00141 } // namespace Go 00142 00143 00144 00145 #endif // _PARABOLA_H 00146
Generated on Tue Sep 21 15:44:17 2010 for GoTools Core by  doxygen 1.6.3