]> Creatis software - cpPlugins.git/commitdiff
...
authorLeonardo Flórez-Valencia <florez-l@javeriana.edu.co>
Fri, 21 Oct 2016 00:15:33 +0000 (19:15 -0500)
committerLeonardo Flórez-Valencia <florez-l@javeriana.edu.co>
Fri, 21 Oct 2016 00:15:33 +0000 (19:15 -0500)
appli/bash/BuildInstances.cxx.in
plugins/Widgets/SplineWidget.cxx

index 084ee1c3dc1d36262ff61c569dabb14c28f4b5e9..dbff248da0ec3d0534be373c4832b12de8ab9a34 100644 (file)
@@ -96,9 +96,11 @@ int main( int argc, char* argv[] )
   for( auto i = templates.begin( ); i != templates.end( ); ++i )
     header << "#include <" << *i << ".h>" << std::endl;
   header << std::endl;
-  for( auto i = classes.begin( ); i != classes.end( ); ++i )
-    header
-      << "extern template class " << *i << ";" << std::endl;
+  /* TODO
+     for( auto i = classes.begin( ); i != classes.end( ); ++i )
+     header
+     << "extern template class " << *i << ";" << std::endl;
+  */
   header
     << std::endl << "#endif // __" << library_name << "__H__" << std::endl;
   if( !( cpPlugins_bash::Write( header.str( ), header_file ) ) )
index 527138c1df381ec37df3b0eb573bfdf3ba00bf7d..2c4a0bcff8db1dca135d68d14d3a9bd323ebd26e 100644 (file)
@@ -94,6 +94,18 @@ _GenerateData( )
       typedef std::vector< _TVector > _TVectors;
 
       unsigned long nPoints = this->m_Contour->GetNumberOfPoints( );
+      double area = 0.0;
+      for( unsigned long i = 0; i < nPoints; ++i )
+      {
+        double p[ 3 ], q[ 3 ];
+        this->m_Contour->GetPoint( i, p );
+        this->m_Contour->GetPoint( ( i + 1 ) % nPoints, q );
+
+        area += ( q[ 0 ] + p[ 0 ] ) * ( q[ 1 ] - p[ 1 ] );
+
+      } // rof
+      std::cout << "Area: " << area << std::endl;
+
       unsigned long support = nPoints / 10;
       _TVectors pp, qp;
       for( unsigned long i = 0; i < support; ++i )