From 3c542bf84e8802c1332cd1c348511e5e049a596f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Leonardo=20Fl=C3=B3rez-Valencia?= Date: Thu, 20 Oct 2016 19:15:33 -0500 Subject: [PATCH] ... --- appli/bash/BuildInstances.cxx.in | 8 +++++--- plugins/Widgets/SplineWidget.cxx | 12 ++++++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/appli/bash/BuildInstances.cxx.in b/appli/bash/BuildInstances.cxx.in index 084ee1c..dbff248 100644 --- a/appli/bash/BuildInstances.cxx.in +++ b/appli/bash/BuildInstances.cxx.in @@ -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 ) ) ) diff --git a/plugins/Widgets/SplineWidget.cxx b/plugins/Widgets/SplineWidget.cxx index 527138c..2c4a0bc 100644 --- a/plugins/Widgets/SplineWidget.cxx +++ b/plugins/Widgets/SplineWidget.cxx @@ -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 ) -- 2.47.1