ParamGeomInt.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 _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; } // Don't know about periodicity. Overrule when
00082                    // required
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 } // namespace Go
00191 
00192 
00193 #endif // _PARAMGEOMINT_H
00194 
00195 

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