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 #ifndef _PARAMPOINTINT_H
00034 #define _PARAMPOINTINT_H
00035
00036
00037 #include "ParamGeomInt.h"
00038 #include "Values.h"
00039
00040
00041 namespace Go {
00044
00045
00046
00047 class RotatedBox;
00048
00049
00052
00053 class ParamPointInt : public ParamGeomInt {
00054 public:
00060 explicit ParamPointInt(boost::shared_ptr<Point> point,
00061 ParamGeomInt* parent = 0);
00062
00064 virtual ~ParamPointInt() {};
00065
00071 virtual void point(Point& pt, const double* tpar) const
00072 { pt = *(point_.get()); }
00073
00088 virtual void point(std::vector<Point>& pt,
00089 const double* tpar,
00090 int derivs,
00091 const bool* from_right = 0,
00092 double resolution = 1.0e-12) const
00093 {
00094 DEBUG_ERROR_IF(derivs != 0,
00095 "Asked for derivatives of a standalone point.");
00096 pt.resize(1);
00097 pt[0] = *(point_.get());
00098 }
00099
00102 virtual ParamPointInt* getParamPointInt()
00103 { return this; }
00104
00106 virtual int numParams() const
00107 { return 0; }
00108
00109
00118 virtual void getLengthAndWiggle(double *length, double *wiggle) {}
00119
00124 virtual bool hasInnerKnots(int pardir) const
00125 { return false; }
00126
00131 virtual bool hasCriticalVals(int pardir) const
00132 { return false; }
00133
00138 virtual bool hasCriticalValsOrKnots(int pardir) const
00139 { return false; }
00140
00144 virtual bool canDivide(int pardir)
00145 { return false; }
00146
00150 virtual std::vector<double> getCriticalVals(int pardir) const
00151 {
00152 std::vector<double> seg;
00153 return seg;
00154 }
00155
00160 virtual std::vector<double> getInnerKnotVals(int pardir,
00161 bool sort=false) const
00162 {
00163 std::vector<double> knots;
00164 return knots;
00165 }
00166
00171 virtual std::vector<double> getCriticalValsAndKnots(int pardir) const
00172 {
00173 std::vector<double> vals;
00174 return vals;
00175 }
00176
00181 virtual int getMeshSize(int dir)
00182 { return 1; }
00183
00190 virtual double paramFromMesh(int dir, int idx)
00191 { return 0.0; }
00192
00194 virtual std::vector<double>::iterator getMesh()
00195 { return coords_.begin(); }
00196
00200 virtual double startParam(int pardir) const
00201 { return 0.0; }
00202
00207 virtual double endParam(int pardir) const
00208 { return 0.0; }
00209
00215 virtual bool boundaryPoint(const double* par, double eps) const
00216 { return true; }
00217
00227 virtual void
00228 subdivide(int pardir, double par,
00229 std::vector<boost::shared_ptr<ParamGeomInt> >& subdiv_objs,
00230 std::vector<boost::shared_ptr<ParamGeomInt> >& bd_objs) {}
00231
00234 virtual CompositeBox compositeBox() const;
00235
00239 virtual DirectionCone directionCone() const;
00240
00243 virtual void
00244 getBoundaryObjects(std::vector<boost::
00245 shared_ptr<BoundaryGeomInt> >& bd_objs);
00246
00248 virtual int dimension() const
00249 { return dim_; }
00250
00257 virtual bool isDegenerate(double epsge, int dir, double *par)
00258 { return false; }
00259
00262 virtual bool isSpline()
00263 { return false; }
00264
00272 virtual double getOptimizedConeAngle(Point& axis1, Point& axis2)
00273 { return M_PI; }
00274
00280 RotatedBox getRotatedBox(std::vector<Point>& axis) const;
00281
00282 protected:
00283
00284
00285 boost::shared_ptr<Point> point_;
00286
00287 int dim_;
00288
00289 ParamCurveInt *parentcurve_;
00290
00291 mutable std::vector<double> coords_;
00292
00293 };
00294
00295
00297 }
00298
00299
00300 #endif // _PARAMPOINTINT_H
00301