IntersectorAlgPar.h

00001 //===========================================================================
00002 // GoTools - SINTEF Geometry Tools
00003 //
00004 // GoTools module: Intersections, version 1.0
00005 //
00006 // Copyright (C) 2000-2007 SINTEF ICT, Applied Mathematics, Norway.
00007 //
00008 // This program is free software; you can redistribute it and/or          
00009 // modify it under the terms of the GNU General Public License            
00010 // as published by the Free Software Foundation version 2 of the License. 
00011 //
00012 // This program is distributed in the hope that it will be useful,        
00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of         
00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          
00015 // GNU General Public License for more details.                           
00016 //
00017 // You should have received a copy of the GNU General Public License      
00018 // along with this program; if not, write to the Free Software            
00019 // Foundation, Inc.,                                                      
00020 // 59 Temple Place - Suite 330,                                           
00021 // Boston, MA  02111-1307, USA.                                           
00022 //
00023 // Contact information: E-mail: tor.dokken@sintef.no                      
00024 // SINTEF ICT, Department of Applied Mathematics,                         
00025 // P.O. Box 124 Blindern,                                                 
00026 // 0314 Oslo, Norway.                                                     
00027 //
00028 // Other licenses are also available for this software, notably licenses
00029 // for:
00030 // - Building commercial software.                                        
00031 // - Building software whose source code you wish to keep private.        
00032 //===========================================================================
00033 #ifndef _INTERSECTORALGPAR_H
00034 #define _INTERSECTORALGPAR_H
00035 
00036 
00037 #include "Intersector.h"
00038 
00039 
00040 namespace Go {
00043 
00044 
00045 
00046 class AlgObjectInt;
00047 class ParamObjectInt;
00048 class IntersectorFuncConst;
00049 class SplineCurve;
00050 class SplineSurface;
00051 class AlgObj2DInt;
00052 class AlgObj3DInt;
00053 
00054 
00060 
00061 class IntersectorAlgPar : public Intersector {
00062 public:
00063 
00076     IntersectorAlgPar(boost::shared_ptr<AlgObjectInt> alg_obj,
00077                       boost::shared_ptr<ParamObjectInt> param_obj,
00078                       boost::shared_ptr<GeoTol> epsge,
00079                       Intersector* prev = 0,
00080                       int eliminated_parameter = -1,
00081                       double eliminated_value = 0);
00082 
00084     virtual ~IntersectorAlgPar(){};
00085 
00089     virtual void compute(bool compute_at_boundary = true);
00090 
00096     // Sends request to IntersectionPool.
00097     virtual void
00098     getResult(std::vector<boost::shared_ptr<IntersectionPoint> >& int_points,
00099               std::vector<boost::shared_ptr<IntersectionCurve> >& int_curves);
00100 
00103     virtual int numParams() const;
00104 
00105 protected:
00106 
00107     boost::shared_ptr<ParamObjectInt> param_int_;
00108 
00109     boost::shared_ptr<AlgObjectInt> algobj_int_; // To be replaced by
00110                                                  // general algebraic
00111                                                  // object.
00112 
00113     // We create an object IntersectorFuncConst from the param_int_ &
00114     // algobj_int_.
00115     boost::shared_ptr<IntersectorFuncConst> int_func_const_;
00116 
00117     virtual void print_objs();
00118 
00119     virtual int getBoundaryIntersections();
00120 
00121     virtual int performInterception();
00122 
00123     virtual int simpleCase();
00124 
00125     virtual bool isLinear();
00126 
00127     virtual bool complexityReduced();
00128 
00129     virtual void handleComplexity();
00130 
00131     virtual int checkCoincidence();
00132     
00133     virtual void microCase();
00134     
00135     virtual int updateIntersections();
00136 
00137     virtual int repairIntersections()
00138     { return 0; }
00139 
00140     virtual int linearCase();
00141 
00142     virtual int doSubdivide();
00143 
00144     virtual void printDebugInfo();
00145 
00146 private:
00147 
00148     boost::shared_ptr<IntersectorFuncConst> 
00149     insertCurveInAlgobj(SplineCurve* cv,
00150                         AlgObj2DInt* alg_obj2d_int,
00151                         boost::shared_ptr<GeoTol> epsge,
00152                         Intersector* intersector,
00153                         int eliminated_parameter,
00154                         double eliminated_value);
00155 
00156     boost::shared_ptr<IntersectorFuncConst>
00157     insertSurfaceInAlgobj(SplineSurface* sf,
00158                           AlgObj3DInt* alg_obj3d_int,
00159                           boost::shared_ptr<GeoTol>
00160                           epsge,
00161                           Intersector* intersector,
00162                           int eliminated_parameter,
00163                           double eliminated_value);
00164 
00165 };
00166 
00167 
00169 } // namespace Go
00170 
00171 
00172 #endif // _INTERSECTORALGPAR_H
00173 
00174 

Generated on Fri Nov 23 12:24:33 2007 for GoTools Intersections Library by  doxygen 1.5.1