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 _PARAMGEOMINT_H
00034 #define _PARAMGEOMINT_H
00035
00036
00037 #include "ParamObjectInt.h"
00038 #include "BoundaryGeomInt.h"
00039 #include <boost/shared_ptr.hpp>
00040
00041
00042 namespace Go {
00045
00046
00047
00048 class ParamGeomInt;
00049 class ParamPointInt;
00050 class ParamCurveInt;
00051 class ParamSurfaceInt;
00052 class DirectionCone;
00053
00054
00057
00058 class ParamGeomInt : public ParamObjectInt {
00059 public:
00062 ParamGeomInt(ParamGeomInt* parent = 0) : ParamObjectInt(parent) {}
00063
00065 virtual ~ParamGeomInt(){}
00066
00068 virtual int dimension() const = 0;
00069
00080 virtual int checkPeriodicity(int pardir) const
00081 { return -1; }
00082
00083
00093 virtual void subdivide(int pardir, double par,
00094 std::vector<boost::
00095 shared_ptr<ParamGeomInt> >& subdiv_objs,
00096 std::vector<boost::
00097 shared_ptr<ParamGeomInt> >& bd_objs) = 0;
00098
00101 virtual CompositeBox compositeBox() const = 0;
00102
00105 virtual DirectionCone directionCone() const = 0;
00106
00108 bool coneLargerThanPi();
00109
00116 virtual DirectionCone reducedDirectionCone(bool reduce_at_bd[4],
00117 double epsge) const;
00118
00121 virtual void
00122 getBoundaryObjects(std::vector<boost::
00123 shared_ptr<BoundaryGeomInt> >& bd_objs) = 0;
00124
00129 virtual int getMeshSize(int dir) = 0;
00130
00136 virtual double paramFromMesh(int dir, int idx) = 0;
00137
00139 virtual std::vector<double>::iterator getMesh() = 0;
00140
00143 int nmbBdObj() const
00144 { return boundary_obj_.size(); }
00145
00149 BoundaryGeomInt* getBoundaryObject(int bd_idx) const
00150 {
00151 return (bd_idx < 0 || bd_idx >= int(boundary_obj_.size()))
00152 ? 0 : boundary_obj_[bd_idx].get();
00153 }
00154
00159 virtual int isDegenerate(double epsge, int dir)
00160 { return 0; }
00161
00168 virtual bool isDegenerate(double epsge, int dir, double *par) = 0;
00169
00171 virtual bool isLinear(double epsge);
00172
00175 virtual bool isSpline() = 0;
00176
00181 virtual double getOptimizedConeAngle(Point& axis1, Point& axis2) = 0;
00182
00183 protected:
00184 std::vector<boost::shared_ptr<BoundaryGeomInt> > boundary_obj_;
00185
00186 };
00187
00188
00190 }
00191
00192
00193 #endif // _PARAMGEOMINT_H
00194
00195