synaps/map/curve.h

00001 #ifndef SYNAPS_SHAPE_CURVE_H
00002 #define SYNAPS_SHAPE_CURVE_H
00003 
00004 #include <synaps/init.h>
00005 #include <synaps/linalg/fxv.h>
00006 #include <iostream>
00007 #include <synaps/map/interfaces.h>
00008 
00009 __BEGIN_NAMESPACE_SYNAPS
00010 
00011 namespace shape
00012 {
00013   namespace CURVE 
00014   {
00015     template<class Point3, class C>
00016     void project( Point3 & r, const C & c , const Point3 & q )
00017     {
00018        std::cerr << "shape::CURVE::project<Point3,Curve> not implemented\n";
00019     };
00020     
00021   };
00022   
00023   template <class R> struct Curve { 
00024     typedef R rep_t;
00025     R m_rep; 
00026     const R & rep() const { return m_rep; }; 
00027     R & rep() { return m_rep; }; 
00028   };
00029   
00030   template<class Point3, class R>
00031   void project( Point3& r, const Curve<R>& c, const Point3& q )
00032   {
00033     using namespace CURVE;
00034     project(r,c.rep(),q);
00035   };
00036   
00037 };
00038 
00039 template<class R> const typename R::curve_t & gcurve( const R & r ) { return *((typename R::curve_t*)&r); };
00040 
00041 namespace interfaces 
00042 {
00043   template<class C, class R> 
00044   struct ICurveIMP : ICurve 
00045   {
00046     irfcptr<R> rep;
00047     
00048   };
00049  };
00050 
00051 __END_NAMESPACE_SYNAPS
00052 
00053 #include "curve/parametric.h"
00054 #include "curve/implicit.h"
00055 
00056 
00057 
00058 #endif

SYNAPS DOCUMENTATION
logo