This commit is contained in:
Efi Fogel 2012-11-01 13:17:06 +00:00
parent 27534ef311
commit bb82c3a6eb
17 changed files with 230 additions and 251 deletions

View File

@ -23,9 +23,9 @@
ArrangementDemoTabBase::ArrangementDemoTabBase( QWidget* parent ) :
QWidget( parent ),
layout( new QGridLayout( this ) ),
graphicsView( new ArrangementDemoGraphicsView( this ) ),
scene( new QGraphicsScene( -100, -100, 100, 100 ) ),
layout( new QGridLayout( this ) ),
arrangementGraphicsItem( NULL ),
curveInputCallback( NULL ),
deleteCurveCallback( NULL ),

View File

@ -48,7 +48,8 @@ public:
virtual QGraphicsScene* getScene( ) const;
virtual ArrangementDemoGraphicsView* getView( ) const;
virtual CGAL::Qt::ArrangementGraphicsItemBase* getArrangementGraphicsItem( ) const;
virtual CGAL::Qt::ArrangementGraphicsItemBase* getArrangementGraphicsItem( )
const;
virtual CGAL::Qt::GraphicsViewCurveInputBase* getCurveInputCallback( ) const;
virtual CGAL::Qt::Callback* getDeleteCurveCallback( ) const;
virtual CGAL::Qt::Callback* getPointLocationCallback( ) const;

View File

@ -37,7 +37,7 @@
ArrangementDemoWindow::ArrangementDemoWindow(QWidget* parent) :
CGAL::Qt::DemosMainWindow( parent ),
lastTabIndex( -1 ),
lastTabIndex(static_cast<unsigned int>(-1)),
ui( new Ui::ArrangementDemoWindow )
{
this->setupUi( );
@ -139,13 +139,8 @@ ArrangementDemoTabBase* ArrangementDemoWindow::makeTab( TraitsType tt )
ArrangementDemoTabBase* ArrangementDemoWindow::getTab( unsigned int tabIndex )
const
{
if ( tabIndex < 0 || tabIndex > this->tabs.size( ) )
{
return NULL;
}
ArrangementDemoTabBase* tab = this->tabs[ tabIndex ];
return tab;
if (tabIndex > this->tabs.size()) return NULL;
return this->tabs[tabIndex];
}
ArrangementDemoTabBase* ArrangementDemoWindow::getCurrentTab( ) const
@ -222,8 +217,8 @@ void ArrangementDemoWindow::updateMode( QAction* newMode )
// QWidget* widget = this->ui->tabWidget->currentWidget( );
// ArrangementDemoTabBase* demoTab =
// static_cast< ArrangementDemoTabBase* >( widget );
const int TabIndex = this->ui->tabWidget->currentIndex( );
if ( TabIndex == -1 ) return;
const unsigned int TabIndex = this->ui->tabWidget->currentIndex( );
if (TabIndex == static_cast<unsigned int>(-1)) return;
ArrangementDemoTabBase* activeTab = this->tabs[ TabIndex ];
QGraphicsScene* activeScene = activeTab->getScene( );
QGraphicsView* activeView = activeTab->getView( );
@ -278,23 +273,18 @@ void ArrangementDemoWindow::updateMode( QAction* newMode )
this->updateFillColorSwatch( );
}
void ArrangementDemoWindow::resetCallbackState( int tabIndex )
void ArrangementDemoWindow::resetCallbackState( unsigned int tabIndex )
{
if ( tabIndex == -1 )
{
return;
}
if (tabIndex == static_cast<unsigned int>(-1)) return;
ArrangementDemoTabBase* activeTab = this->tabs[ tabIndex ];
QAction* activeMode = this->activeModes[ tabIndex ];
// unhook the old active mode
if ( activeMode == this->ui->actionInsert )
{
}
{ }
else if ( activeMode == this->ui->actionDrag )
{
}
{ }
else if ( activeMode == this->ui->actionDelete )
{
activeTab->getDeleteCurveCallback( )->reset( );
@ -325,12 +315,9 @@ void ArrangementDemoWindow::resetCallbackState( int tabIndex )
}
}
void ArrangementDemoWindow::removeCallback( int tabIndex )
void ArrangementDemoWindow::removeCallback( unsigned int tabIndex )
{
if ( tabIndex == -1 )
{
return;
}
if (tabIndex == static_cast<unsigned int>(-1)) return;
ArrangementDemoTabBase* activeTab = this->tabs[ tabIndex ];
QGraphicsScene* activeScene = activeTab->getScene( );
@ -388,9 +375,8 @@ void ArrangementDemoWindow::removeCallback( int tabIndex )
void ArrangementDemoWindow::updateFillColorSwatch( )
{
int currentTabIndex = this->ui->tabWidget->currentIndex( );
if ( currentTabIndex == -1 )
return;
unsigned int currentTabIndex = this->ui->tabWidget->currentIndex( );
if (currentTabIndex == static_cast<unsigned int>(-1)) return;
ArrangementDemoTabBase* currentTab = this->tabs[ currentTabIndex ];
FillFaceCallbackBase* fillFaceCallback = currentTab->getFillFaceCallback( );
QColor fillColor = fillFaceCallback->getColor( );
@ -1033,11 +1019,10 @@ void ArrangementDemoWindow::on_actionOverlay_triggered( )
void ArrangementDemoWindow::on_actionCloseTab_triggered( )
{
int currentTabIndex = this->ui->tabWidget->currentIndex( );
if ( ! this->ui->tabWidget->count( ) || currentTabIndex == -1 )
{
unsigned int currentTabIndex = this->ui->tabWidget->currentIndex( );
if (! this->ui->tabWidget->count() ||
(currentTabIndex == static_cast<unsigned int>(-1)))
return;
}
// delete the tab
this->ui->tabWidget->removeTab( currentTabIndex );
@ -1051,8 +1036,7 @@ void ArrangementDemoWindow::on_actionPrintConicCurves_triggered( )
{
// int currentTabIndex = this->ui->tabWidget->currentIndex( );
// Conic_arr* arr;
// if ( currentTabIndex == -1 )
// return;
// if (currentTabIndex == static_cast<unsigned int>(-1)) return;
// CGAL::Object o = this->arrangements[ currentTabIndex ];
// if ( ! CGAL::assign( arr, o ) )
// return;
@ -1103,10 +1087,8 @@ void ArrangementDemoWindow::on_actionPrintConicCurves_triggered( )
void ArrangementDemoWindow::on_actionZoomIn_triggered( )
{
int currentTabIndex = this->ui->tabWidget->currentIndex( );
if ( currentTabIndex == -1 )
return;
unsigned int currentTabIndex = this->ui->tabWidget->currentIndex( );
if (currentTabIndex == static_cast<unsigned int>(-1)) return;
ArrangementDemoTabBase* currentTab = this->tabs[ currentTabIndex ];
QGraphicsView* view = currentTab->getView( );
view->scale( 2.0, 2.0 );
@ -1114,10 +1096,8 @@ void ArrangementDemoWindow::on_actionZoomIn_triggered( )
void ArrangementDemoWindow::on_actionZoomOut_triggered( )
{
int currentTabIndex = this->ui->tabWidget->currentIndex( );
if ( currentTabIndex == -1 )
return;
unsigned int currentTabIndex = this->ui->tabWidget->currentIndex( );
if (currentTabIndex == static_cast<unsigned int>(-1)) return;
ArrangementDemoTabBase* currentTab = this->tabs[ currentTabIndex ];
QGraphicsView* view = currentTab->getView( );
view->scale( 0.5, 0.5 );
@ -1125,14 +1105,15 @@ void ArrangementDemoWindow::on_actionZoomOut_triggered( )
void ArrangementDemoWindow::on_actionPreferences_triggered( )
{
int currentTabIndex = this->ui->tabWidget->currentIndex( );
if ( currentTabIndex == -1 )
return;
unsigned int currentTabIndex = this->ui->tabWidget->currentIndex( );
if (currentTabIndex == static_cast<unsigned int>(-1)) return;
ArrangementDemoTabBase* currentTab = this->tabs[ currentTabIndex ];
CGAL::Qt::ArrangementGraphicsItemBase* agi = currentTab->getArrangementGraphicsItem( );
CGAL::Qt::ArrangementGraphicsItemBase* agi =
currentTab->getArrangementGraphicsItem( );
ArrangementDemoGraphicsView* view = currentTab->getView( );
EnvelopeCallbackBase* envelopeCallback = currentTab->getEnvelopeCallback( );
VerticalRayShootCallbackBase* verticalRayShootCallback = currentTab->getVerticalRayShootCallback( );
VerticalRayShootCallbackBase* verticalRayShootCallback =
currentTab->getVerticalRayShootCallback( );
SplitEdgeCallbackBase* splitEdgeCallback = currentTab->getSplitEdgeCallback( );
#if 0
@ -1210,9 +1191,8 @@ void ArrangementDemoWindow::on_actionPreferences_triggered( )
void ArrangementDemoWindow::on_actionFillColor_triggered( )
{
int currentTabIndex = this->ui->tabWidget->currentIndex( );
if ( currentTabIndex == -1 )
return;
unsigned int currentTabIndex = this->ui->tabWidget->currentIndex( );
if (currentTabIndex == static_cast<unsigned int>(-1)) return;
ArrangementDemoTabBase* currentTab = this->tabs[ currentTabIndex ];
FillFaceCallbackBase* fillFaceCallback = currentTab->getFillFaceCallback( );
QColor fillColor = fillFaceCallback->getColor( );
@ -1221,7 +1201,6 @@ void ArrangementDemoWindow::on_actionFillColor_triggered( )
if ( selectedColor.isValid( ) )
{
fillFaceCallback->setColor( selectedColor );
this->updateFillColorSwatch( );
}
}

View File

@ -102,8 +102,8 @@ signals:
protected:
void setupUi( );
void resetCallbackState( int tabIndex );
void removeCallback( int tabIndex );
void resetCallbackState( unsigned int tabIndex );
void removeCallback( unsigned int tabIndex );
void updateFillColorSwatch( );
void openArrFile( QString filename );
@ -112,7 +112,7 @@ protected:
std::vector< ArrangementDemoTabBase* > tabs;
std::vector< CGAL::Object > arrangements;
std::vector< QAction* > activeModes; // for the current tab
int lastTabIndex;
unsigned int lastTabIndex;
Ui::ArrangementDemoWindow* ui;
QActionGroup* modeGroup;

View File

@ -22,7 +22,8 @@
#include <CGAL/Bbox_2.h>
//#include <CGAL/apply_to_range.h>
//#include <CGAL/Kernel/global_functions.h> // TODO: should be included in PainterOstream.h
// TODO: should be included in PainterOstream.h
//#include <CGAL/Kernel/global_functions.h>
#include <CGAL/Qt/GraphicsItem.h>
#include <CGAL/Qt/Converter.h>
#include <CGAL/Arr_circular_arc_traits_2.h>
@ -79,25 +80,25 @@ template <typename Arr_, typename ArrTraits = typename Arr_::Geometry_traits_2>
class ArrangementGraphicsItem : public ArrangementGraphicsItemBase
{
typedef Arr_ Arrangement;
typedef typename Arrangement::Geometry_traits_2 Traits;
typedef typename Arrangement::Vertex_iterator Vertex_iterator;
typedef typename Arrangement::Curve_iterator Curve_iterator;
typedef typename Arrangement::Edge_iterator Edge_iterator;
typedef typename Arrangement::Halfedge Halfedge;
typedef typename Arrangement::Halfedge_handle Halfedge_handle;
typedef typename Arrangement::Face_handle Face_handle;
typedef typename Arrangement::Face_iterator Face_iterator;
typedef typename Arrangement::Hole_iterator Holes_iterator;
typedef typename Arrangement::Geometry_traits_2 Traits;
typedef typename Arrangement::Vertex_iterator Vertex_iterator;
typedef typename Arrangement::Curve_iterator Curve_iterator;
typedef typename Arrangement::Edge_iterator Edge_iterator;
typedef typename Arrangement::Halfedge Halfedge;
typedef typename Arrangement::Halfedge_handle Halfedge_handle;
typedef typename Arrangement::Face_handle Face_handle;
typedef typename Arrangement::Face_iterator Face_iterator;
typedef typename Arrangement::Hole_iterator Holes_iterator;
typedef typename Arrangement::Ccb_halfedge_circulator Ccb_halfedge_circulator;
typedef typename ArrTraitsAdaptor< Traits >::Kernel Kernel;
typedef typename Traits::X_monotone_curve_2 X_monotone_curve_2;
typedef typename Kernel::Point_2 Kernel_point_2;
typedef typename Traits::Point_2 Point_2;
typedef typename ArrTraitsAdaptor< Traits >::Kernel Kernel;
typedef typename Traits::X_monotone_curve_2 X_monotone_curve_2;
typedef typename Kernel::Point_2 Kernel_point_2;
typedef typename Traits::Point_2 Point_2;
//typedef typename Kernel::Segment_2 Segment_2;
typedef ArrangementGraphicsItemBase Superclass;
typedef typename Kernel::Segment_2 Segment_2;
typedef ArrangementGraphicsItemBase Superclass;
typedef typename Kernel::Segment_2 Segment_2;
public:
ArrangementGraphicsItem( Arrangement* t_ );
@ -239,7 +240,10 @@ protected:
}
template < typename Traits >
void paintFace( Face_handle f, QPainter* painter, Traits traits ) { }
void paintFace(Face_handle /* f */, QPainter* /* painter */,
Traits /* traits */)
{ }
template < typename Kernel_ >
void paintFace( Face_handle f, QPainter* painter,
CGAL::Arr_segment_traits_2< Kernel_ > )
@ -468,8 +472,8 @@ protected:
}
template < typename CircularKernel >
void paintFace( Face_handle f, QPainter* painter,
CGAL::Arr_circular_arc_traits_2< CircularKernel > traits )
void paintFace(Face_handle f, QPainter* painter,
CGAL::Arr_circular_arc_traits_2<CircularKernel> /* traits */)
{
if ( f->is_unbounded( ) )
{
@ -624,8 +628,8 @@ protected:
#if 0
template < typename CircularKernel >
void paintFace( Face_handle f, QPainter* painter,
CGAL::Arr_circular_arc_traits_2< CircularKernel > traits )
void paintFace(Face_handle f, QPainter* painter,
CGAL::Arr_circular_arc_traits_2<CircularKernel> /* traits */)
{
// std::cout << "face begin" << std::endl;
if (! f->is_unbounded()) // f is not the unbounded face
@ -825,7 +829,7 @@ protected:
void
ArrangementGraphicsItem< Arr_, ArrTraits >::
paint(QPainter* painter,
const QStyleOptionGraphicsItem* option,
const QStyleOptionGraphicsItem* /* option */,
QWidget* /*widget*/)
{
this->paint( painter, ArrTraits( ) );
@ -834,7 +838,7 @@ protected:
template < typename Arr_, typename ArrTraits >
template < typename TTraits >
void ArrangementGraphicsItem< Arr_, ArrTraits >::
paint( QPainter* painter, TTraits traits )
paint(QPainter* painter, TTraits /* traits */)
{
this->paintFaces( painter );
@ -861,9 +865,8 @@ protected:
template < typename Arr_, typename ArrTraits >
template < typename Kernel_ >
void
ArrangementGraphicsItem< Arr_, ArrTraits >::
paint( QPainter* painter, CGAL::Arr_linear_traits_2< Kernel_ > traits )
void ArrangementGraphicsItem< Arr_, ArrTraits >::
paint(QPainter* painter, CGAL::Arr_linear_traits_2< Kernel_ > /* traits */)
{
this->updateBoundingBox( );
this->paintFaces( painter );
@ -890,10 +893,9 @@ protected:
template < typename Arr_, typename ArrTraits >
template < typename CircularKernel >
void
ArrangementGraphicsItem< Arr_, ArrTraits >::
paint( QPainter* painter,
CGAL::Arr_circular_arc_traits_2< CircularKernel > traits )
void ArrangementGraphicsItem< Arr_, ArrTraits >::
paint(QPainter* painter,
CGAL::Arr_circular_arc_traits_2< CircularKernel > /* traits */)
{
typedef Kernel_point_2 Non_arc_point_2;
typedef typename Traits::Point_2 Arc_point_2;
@ -923,10 +925,9 @@ protected:
template < typename Arr_, typename ArrTraits >
template < typename Coefficient_ >
void
ArrangementGraphicsItem< Arr_, ArrTraits >::
paint( QPainter* painter,
CGAL::Arr_algebraic_segment_traits_2< Coefficient_ > traits )
void ArrangementGraphicsItem< Arr_, ArrTraits >::
paint(QPainter* painter,
CGAL::Arr_algebraic_segment_traits_2< Coefficient_ > /* traits */)
{
painter->setPen( this->verticesPen );
QRectF clipRect = this->boundingRect( );
@ -963,16 +964,15 @@ protected:
// We let the bounding box only grow, so that when vertices get removed
// the maximal bbox gets refreshed in the GraphicsView
template < typename Arr_, typename ArrTraits >
void
ArrangementGraphicsItem< Arr_, ArrTraits >::updateBoundingBox( )
void ArrangementGraphicsItem< Arr_, ArrTraits >::updateBoundingBox( )
{
this->updateBoundingBox( ArrTraits( ) );
}
template < typename Arr_, typename ArrTraits >
template < typename TTraits >
void
ArrangementGraphicsItem< Arr_, ArrTraits >::updateBoundingBox(TTraits traits)
void ArrangementGraphicsItem< Arr_, ArrTraits >::
updateBoundingBox(TTraits /* traits */)
{
this->prepareGeometryChange( );
if ( this->arr->number_of_vertices( ) == 0 )
@ -998,11 +998,12 @@ protected:
this->bb = this->bb + this->curveBboxMap[ it ];
}
}
template < typename Arr_, typename ArrTraits >
template < typename Kernel_ >
void
ArrangementGraphicsItem< Arr_, ArrTraits >::
updateBoundingBox( CGAL::Arr_linear_traits_2< Kernel_ > traits )
updateBoundingBox(CGAL::Arr_linear_traits_2< Kernel_ > /* traits */)
{
this->prepareGeometryChange( );
QRectF clipRect = this->viewportRect( );
@ -1062,14 +1063,15 @@ protected:
this->bb = CGAL::Bbox_2( 0, 0, 0, 0 );
this->bb_initialized = true;
}
typename Traits::Make_x_monotone_2 make_x_monotone_2 = traits.make_x_monotone_2_object( );
typename Traits::Make_x_monotone_2 make_x_monotone_2 =
traits.make_x_monotone_2_object( );
for ( Curve_iterator it = this->arr->curves_begin( );
it != this->arr->curves_end( );
++it )
{
std::vector< CGAL::Object > cvs;
make_x_monotone_2( *it, std::back_inserter( cvs ) );
for ( int i = 0 ; i < cvs.size( ); ++i )
for ( unsigned int i = 0 ; i < cvs.size( ); ++i )
{
X_monotone_curve_2 cv;
CGAL::assign( cv, cvs[ i ] );
@ -1104,14 +1106,14 @@ protected:
{
typedef Arr_ Arrangement;
typedef ArrangementGraphicsItemBase Superclass;
typedef typename Arrangement::Geometry_traits_2 Traits;
typedef typename Arrangement::Vertex_iterator Vertex_iterator;
typedef typename Arrangement::Curve_iterator Curve_iterator;
typedef typename Arrangement::Edge_iterator Edge_iterator;
typedef typename Arrangement::Geometry_traits_2 Traits;
typedef typename Arrangement::Vertex_iterator Vertex_iterator;
typedef typename Arrangement::Curve_iterator Curve_iterator;
typedef typename Arrangement::Edge_iterator Edge_iterator;
typedef typename ArrTraitsAdaptor< Traits >::Kernel Kernel;
typedef typename Traits::X_monotone_curve_2 X_monotone_curve_2;
typedef typename Kernel::Point_2 Point_2;
typedef typename Kernel::Segment_2 Segment_2;
typedef typename Traits::X_monotone_curve_2 X_monotone_curve_2;
typedef typename Kernel::Point_2 Point_2;
typedef typename Kernel::Segment_2 Segment_2;
public:
ArrangementGraphicsItem( Arrangement* arr_ ):
@ -1157,7 +1159,8 @@ protected:
{
this->updateBoundingBox( );
painter->setPen( this->verticesPen );
this->painterostream = ArrangementPainterOstream< Traits >( painter, this->boundingRect( ) );
this->painterostream =
ArrangementPainterOstream< Traits >( painter, this->boundingRect( ) );
this->painterostream.setScene( this->scene );
for ( Vertex_iterator it = this->arr->vertices_begin( );

View File

@ -248,7 +248,7 @@ public: // constructors
public: // methods
ArrangementPainterOstream& operator<<( const X_monotone_curve_2& curve )
{
for ( int i = 0; i < curve.size( ); ++i )
for ( unsigned int i = 0; i < curve.size( ); ++i )
{
Segment_2 segment = curve[ i ];
this->painterOstream << segment;
@ -374,7 +374,7 @@ public: // methods
{
visibleParts = this->visibleParts( curve );
}
for ( int i = 0; i < visibleParts.size( ); ++i )
for ( unsigned int i = 0; i < visibleParts.size( ); ++i )
{
X_monotone_curve_2 subcurve = visibleParts[ i ];
int n;
@ -513,10 +513,10 @@ protected: // methods
intersect_2( left, curve, std::back_inserter( leftIntersections ) );
intersect_2( top, curve, std::back_inserter( topIntersections ) );
intersect_2( right, curve, std::back_inserter( rightIntersections ) );
int total = bottomIntersections.size( )
+ leftIntersections.size( )
+ topIntersections.size( )
+ rightIntersections.size( );
// int total = bottomIntersections.size( )
// + leftIntersections.size( )
// + topIntersections.size( )
// + rightIntersections.size( );
intersect_2( bottom, curve, std::back_inserter( intersections ) );
intersect_2( left, curve, std::back_inserter( intersections ) );
@ -537,7 +537,7 @@ protected: // methods
QPointF qendpt1 = this->convert( leftEndpt );
QPointF qendpt2 = this->convert( rightEndpt );
std::list< Point_2 > pointList;
for ( int i = 0; i < intersections.size( ); ++i )
for ( unsigned int i = 0; i < intersections.size( ); ++i )
{
CGAL::Object o = intersections[ i ];
std::pair< Intersection_point_2, Multiplicity > pair;
@ -557,7 +557,7 @@ protected: // methods
Construct_x_monotone_subcurve_2< Traits > construct_x_monotone_subcurve_2;
std::vector< X_monotone_curve_2 > clippings;
typename std::list< Point_2 >::iterator pointListItr = pointList.begin( );
for ( int i = 0; i < pointList.size( ); i += 2 )
for ( unsigned int i = 0; i < pointList.size( ); i += 2 )
{
Point_2 p1 = *pointListItr++;
Point_2 p2 = *pointListItr++;
@ -608,7 +608,7 @@ protected: // methods
std::vector< std::pair< Intersection_point_2, Multiplicity > > tmp;
// filter out the non-intersection point results
for ( int i = 0; i < res.size( ); ++i )
for ( unsigned int i = 0; i < res.size( ); ++i )
{
CGAL::Object obj = res[ i ];
std::pair< Intersection_point_2, Multiplicity > pair;
@ -624,7 +624,7 @@ protected: // methods
std::sort( tmp.begin( ), tmp.end( ), compare_intersection_point_result );
// box up the sorted elements
for ( int i = 0; i < tmp.size( ); ++i )
for ( unsigned int i = 0; i < tmp.size( ); ++i )
{
std::pair< Intersection_point_2, Multiplicity > pair = tmp[ i ];
CGAL::Object o = CGAL::make_object( pair );
@ -845,10 +845,9 @@ public: // methods
if(points.empty())
return *this;
QPainter *ppnt = this->qp;
// QPainter *ppnt = this->qp;
QGraphicsView* view = this->scene->views( ).first( );
int height = view->height();
// int height = view->height();
// std::cerr << ws.width() << " and " << ws.height() << "\n";
typename std::list<Coord_vec_2>::const_iterator lit = points.begin();
//ppnt->moveTo((*p1).first, height - (*p1).second);

View File

@ -60,13 +60,13 @@ bool Callback::eventFilter( QObject* object, QEvent* event )
return QObject::eventFilter( object, event );
}
void Callback::mousePressEvent( QGraphicsSceneMouseEvent* event ) { }
void Callback::mousePressEvent(QGraphicsSceneMouseEvent* /* event */) { }
void Callback::mouseMoveEvent( QGraphicsSceneMouseEvent* event ) { }
void Callback::mouseMoveEvent(QGraphicsSceneMouseEvent* /* event */) { }
void Callback::mouseReleaseEvent( QGraphicsSceneMouseEvent* event ) { }
void Callback::mouseReleaseEvent(QGraphicsSceneMouseEvent* /* event */) { }
void Callback::keyPressEvent( QKeyEvent* event ) { }
void Callback::keyPressEvent(QKeyEvent* /* event */) { }
void Callback::slotModelChanged( ) { }

View File

@ -59,9 +59,9 @@ public: // ctors
}
public: // methods
virtual void paint( QPainter* painter,
const QStyleOptionGraphicsItem* option,
QWidget* widget )
virtual void paint(QPainter* painter,
const QStyleOptionGraphicsItem* /* option */,
QWidget* /* widget */)
{
// draw the curves
QPen edgesPen( this->m_edgeColor, this->m_edgeWidth );
@ -70,7 +70,7 @@ public: // methods
this->painterOstream =
ArrangementPainterOstream< Traits >( painter, clippingRectangle );
this->painterOstream.setScene( this->getScene( ) );
for ( int i = 0; i < this->curves.size( ); ++i )
for ( unsigned int i = 0; i < this->curves.size( ); ++i )
{
X_monotone_curve_2 curve = this->curves[ i ];
this->painterOstream << curve;
@ -79,7 +79,7 @@ public: // methods
// draw the points
QPen verticesPen( this->m_vertexColor, this->m_vertexRadius );
painter->setPen( verticesPen );
for ( int i = 0; i < this->points.size( ); ++i )
for ( unsigned int i = 0; i < this->points.size( ); ++i )
{
Point_2 arrPoint = this->points[ i ];
Kernel_point_2 point( CGAL::to_double( arrPoint.x( ) ),
@ -188,15 +188,15 @@ protected: // methods
this->boundingBoxInitialized = true;
}
for ( int i = 1; i < this->curves.size( ); ++i )
for ( unsigned int i = 1; i < this->curves.size( ); ++i )
{
this->boundingBox = this->boundingBox + this->curves[ i ].bbox( );
}
for ( int i = 0; i < this->points.size( ); ++i )
for ( unsigned int i = 0; i < this->points.size( ); ++i )
{
Point_2 pt = this->points[ i ];
Kernel_point_2 point( CGAL::to_double( pt.x( ) ), CGAL::to_double( pt.y( ) ) );
Kernel_point_2 point(CGAL::to_double(pt.x()), CGAL::to_double(pt.y()));
this->boundingBox = this->boundingBox + point.bbox( );
}
}
@ -227,15 +227,15 @@ class CurveGraphicsItem< CGAL::Arr_linear_traits_2< Kernel_ > > :
{
public: // typedefs
// known curve types
typedef CGAL::Arr_linear_traits_2< Kernel_ > Traits;
typedef CGAL::Arr_linear_traits_2< Kernel_ > Traits;
typedef Kernel_ Kernel;
typedef typename Traits::Curve_2 Curve_2;
typedef typename Traits::X_monotone_curve_2 X_monotone_curve_2;
typedef typename Traits::Point_2 Point_2;
typedef typename Kernel::Segment_2 Segment_2;
typedef typename Kernel::Line_2 Line_2;
typedef typename Kernel::Ray_2 Ray_2;
typedef typename Kernel::Point_2 Kernel_point_2;
typedef typename Traits::Curve_2 Curve_2;
typedef typename Traits::X_monotone_curve_2 X_monotone_curve_2;
typedef typename Traits::Point_2 Point_2;
typedef typename Kernel::Segment_2 Segment_2;
typedef typename Kernel::Line_2 Line_2;
typedef typename Kernel::Ray_2 Ray_2;
typedef typename Kernel::Point_2 Kernel_point_2;
public: // ctors
CurveGraphicsItem( ):
@ -247,18 +247,20 @@ public: // ctors
}
public: // methods
virtual void paint( QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget )
virtual void paint(QPainter* painter,
const QStyleOptionGraphicsItem* /* option */,
QWidget* /* widget */)
{
QRectF clippingRectangle = this->viewportRect( );
painter->setPen( QPen( ::Qt::red, 0. ) );
this->painterOstream =
ArrangementPainterOstream< Traits >( painter, clippingRectangle );
for ( int i = 0; i < this->curves.size( ); ++i )
for ( unsigned int i = 0; i < this->curves.size( ); ++i )
{
X_monotone_curve_2 curve = this->curves[ i ];
this->painterOstream << curve;
}
for ( int i = 0; i < this->points.size( ); ++i )
for ( unsigned int i = 0; i < this->points.size( ); ++i )
{
Point_2 arrPoint = this->points[ i ];
Kernel_point_2 point( CGAL::to_double( arrPoint.x( ) ),
@ -270,7 +272,6 @@ public: // methods
void insert( const X_monotone_curve_2& curve )
{
this->curves.push_back( curve );
this->updateBoundingBox( );
}
@ -372,7 +373,7 @@ protected: // methods
this->convert = CGAL::Qt::Converter< Kernel >( clipRect );
bool first = 1;
for ( int i = 0; i < curves.size( ); ++i )
for ( unsigned int i = 0; i < curves.size( ); ++i )
{
X_monotone_curve_2 curve = curves[ i ];
if ( curve.is_segment( ) )

View File

@ -113,7 +113,7 @@ void DeleteCurveCallback< Arr_ >::reset( )
template < typename Arr_ >
void
DeleteCurveCallback< Arr_ >::mousePressEvent( QGraphicsSceneMouseEvent* event )
DeleteCurveCallback<Arr_>::mousePressEvent(QGraphicsSceneMouseEvent* /* event */)
{
if ( this->removableHalfedge == Halfedge_handle( ) )
{

View File

@ -52,7 +52,7 @@ protected:
/**
Updates and draws the lower and upper envelopes of an observed arrangement.
*/
template < class Arr_, class Traits = typename Arr_::Geometry_traits_2 >
template < typename Arr_, typename Traits = typename Arr_::Geometry_traits_2 >
class EnvelopeCallback : public EnvelopeCallbackBase
{
public:
@ -61,13 +61,13 @@ public:
//typedef typename Arrangement::Geometry_traits_2 Traits;
typedef typename Traits::X_monotone_curve_2 X_monotone_curve_2;
//typedef typename Traits::Construct_x_monotone_curve_2 Construct_x_monotone_curve_2;
typedef typename ArrTraitsAdaptor< Traits >::Kernel Kernel;
typedef typename Kernel::Point_2 Kernel_point_2;
typedef typename Traits::Point_2 Point_2;
typedef typename Kernel::Segment_2 Segment_2;
typedef typename Kernel::Ray_2 Ray_2;
typedef typename Kernel::Line_2 Line_2;
typedef CGAL::Envelope_diagram_1< Traits > Diagram_1;
typedef typename ArrTraitsAdaptor< Traits >::Kernel Kernel;
typedef typename Kernel::Point_2 Kernel_point_2;
typedef typename Traits::Point_2 Point_2;
typedef typename Kernel::Segment_2 Segment_2;
typedef typename Kernel::Ray_2 Ray_2;
typedef typename Kernel::Line_2 Line_2;
typedef CGAL::Envelope_diagram_1< Traits > Diagram_1;
/**
Construct an envelope callback observing the given arrangement.
@ -142,14 +142,14 @@ protected:
*/
void updateEnvelope( bool lower );
template < class TTraits >
template < typename TTraits >
void updateEnvelope( bool lower, TTraits traits );
template < class CircularKernel >
template < typename CircularKernel >
void updateEnvelope(bool lower,
CGAL::Arr_circular_arc_traits_2<CircularKernel> traits);
template < class Coefficient_ >
template < typename Coefficient_ >
void updateEnvelope(bool lower,
CGAL::Arr_algebraic_segment_traits_2<Coefficient_> traits);
@ -160,7 +160,7 @@ protected:
using CGAL::Qt::Callback::scene;
}; // class EnvelopeCallback
template < class Arr_, class Traits >
template < typename Arr_, typename Traits >
EnvelopeCallback< Arr_, Traits >::
EnvelopeCallback( Arrangement* arr_, QObject* parent ):
EnvelopeCallbackBase( parent ),
@ -172,28 +172,23 @@ EnvelopeCallback( Arrangement* arr_, QObject* parent ):
this->upperEnvelope->hide( );
}
template < class Arr_, class Traits >
void
EnvelopeCallback< Arr_, Traits >::
slotModelChanged( )
template < typename Arr_, typename Traits >
void EnvelopeCallback< Arr_, Traits >::slotModelChanged( )
{
this->updateEnvelope( true );
this->updateEnvelope( false );
}
template < class Arr_, class Traits >
void
EnvelopeCallback< Arr_, Traits >::
updateEnvelope( bool lower )
template < typename Arr_, typename Traits >
void EnvelopeCallback< Arr_, Traits >::updateEnvelope( bool lower )
{
this->updateEnvelope( lower, Traits( ) );
}
template < class Arr_, class Traits >
template < class TTraits >
void
EnvelopeCallback< Arr_, Traits >::
updateEnvelope( bool lower, TTraits traits )
template < typename Arr_, typename Traits >
template < typename TTraits >
void EnvelopeCallback< Arr_, Traits >::updateEnvelope(bool lower,
TTraits /* traits */)
{
CGAL::Qt::CurveGraphicsItem< Traits >* envelopeToUpdate;
if ( lower )
@ -273,12 +268,12 @@ updateEnvelope( bool lower, TTraits traits )
envelopeToUpdate->modelChanged( );
}
template < class Arr_, class Traits >
template < class CircularKernel >
template < typename Arr_, typename Traits >
template < typename CircularKernel >
void
EnvelopeCallback< Arr_, Traits >::
updateEnvelope( bool lower,
CGAL::Arr_circular_arc_traits_2< CircularKernel > traits )
updateEnvelope(bool lower,
CGAL::Arr_circular_arc_traits_2< CircularKernel > /* traits */)
{
typedef Kernel_point_2 Non_arc_point_2;
typedef typename Traits::Point_2 Arc_point_2;
@ -294,7 +289,8 @@ updateEnvelope( bool lower,
envelopeToUpdate->clear( );
std::list< X_monotone_curve_2 > curves;
for ( Edge_iterator eit = this->arr->edges_begin( ); eit != this->arr->edges_end( ); ++eit )
for ( Edge_iterator eit =
this->arr->edges_begin( ); eit != this->arr->edges_end( ); ++eit )
{
curves.push_back( eit->curve( ) );
}
@ -358,19 +354,17 @@ updateEnvelope( bool lower,
envelopeToUpdate->modelChanged( );
}
template < class Arr_, class Traits >
template < class Coefficient_ >
void
EnvelopeCallback< Arr_, Traits >::
updateEnvelope( bool lower,
CGAL::Arr_algebraic_segment_traits_2< Coefficient_ > traits )
template < typename Arr_, typename Traits >
template < typename Coefficient_ >
void EnvelopeCallback< Arr_, Traits >::
updateEnvelope(bool /* lower */,
CGAL::Arr_algebraic_segment_traits_2< Coefficient_ > /* traits */)
{
// std::cout << "alg seg envelope stub" << std::endl;
}
template < class Arr_, class Traits >
void
EnvelopeCallback< Arr_, Traits >::showLowerEnvelope( bool show )
template < typename Arr_, typename Traits >
void EnvelopeCallback< Arr_, Traits >::showLowerEnvelope( bool show )
{
if ( show )
{
@ -384,9 +378,8 @@ EnvelopeCallback< Arr_, Traits >::showLowerEnvelope( bool show )
}
}
template < class Arr_, class Traits >
void
EnvelopeCallback< Arr_, Traits >::showUpperEnvelope( bool show )
template < typename Arr_, typename Traits >
void EnvelopeCallback< Arr_, Traits >::showUpperEnvelope( bool show )
{
if ( show )
{

View File

@ -135,7 +135,7 @@ void FillFaceCallback<Arr_>::mousePressEvent(QGraphicsSceneMouseEvent* event)
template < class Arr_ >
void
FillFaceCallback< Arr_ >::mouseMoveEvent( QGraphicsSceneMouseEvent* event )
FillFaceCallback< Arr_ >::mouseMoveEvent(QGraphicsSceneMouseEvent* /* event */)
{ }
template < class Arr_ >

View File

@ -63,11 +63,11 @@ GraphicsViewCurveInputBase::GraphicsViewCurveInputBase( QObject* parent ) :
}
void
GraphicsViewCurveInputBase::mouseMoveEvent( QGraphicsSceneMouseEvent* event )
GraphicsViewCurveInputBase::mouseMoveEvent(QGraphicsSceneMouseEvent* /* event */)
{ }
void
GraphicsViewCurveInputBase::mousePressEvent( QGraphicsSceneMouseEvent* event )
void GraphicsViewCurveInputBase::
mousePressEvent(QGraphicsSceneMouseEvent* /* event */)
{
// std::cout << "GraphicsViewCurveInputBase::mousePressEvent" << std::endl;
}

View File

@ -223,7 +223,7 @@ protected:
if ( event->button( ) == ::Qt::RightButton )
{ // finalize polyline input
for ( int i = 0; i < this->polylineGuide.size( ); ++i )
for ( unsigned int i = 0; i < this->polylineGuide.size( ); ++i )
{
if ( this->scene != NULL )
{
@ -338,7 +338,7 @@ protected:
QPointF p2 = this->convert( this->snapPoint( event ) );
double radius = sqrt( (p1.x( ) - p2.x( ))*(p1.x( ) - p2.x( ))
+ (p1.y( ) - p2.y( ))*(p1.y( ) - p2.y( )) );
double d = radius * sqrt( 2.0 );
// double d = radius * sqrt( 2.0 );
this->circleItem->setRect( p1.x( ) - radius, p1.y( ) -
radius, 2*radius, 2*radius );
}
@ -411,7 +411,7 @@ protected:
{
if ( this->conicType == CONIC_SEGMENT )
{
for ( int i = 0; i < this->polylineGuide.size( ); ++i )
for ( unsigned int i = 0; i < this->polylineGuide.size( ); ++i )
{
if ( this->scene != NULL )
{
@ -467,7 +467,7 @@ protected:
double y1 = CGAL::to_double( bb.ymin( ) );
double x2 = CGAL::to_double( bb.xmax( ) );
double y2 = CGAL::to_double( bb.ymax( ) );
double sq_rad = CGAL::square(x2 - x1) + CGAL::square(y2 - y1);
// double sq_rad = CGAL::square(x2 - x1) + CGAL::square(y2 - y1);
Rat_FT a = CORE::abs( Rat_FT(x1) - Rat_FT(x2) )/2;
Rat_FT b = CORE::abs( Rat_FT(y1) - Rat_FT(y2) )/2;
@ -753,7 +753,7 @@ public:
{ }
protected:
void mouseMoveEvent( QGraphicsSceneMouseEvent* event ) { }
void mouseMoveEvent(QGraphicsSceneMouseEvent* /* event */) {}
void mousePressEvent( QGraphicsSceneMouseEvent* event )
{
@ -778,7 +778,7 @@ protected:
CGAL::make_x_monotone( arc, std::back_inserter( subarcs ) );
typename CircularKernel::Has_on_2 has_on;
bool isOn = false;
for ( int i = 0; i < subarcs.size( ); ++i )
for ( unsigned int i = 0; i < subarcs.size( ); ++i )
{
Circular_arc_2 subarc;
if ( CGAL::assign( subarc, subarcs[ i ] ) )

View File

@ -148,7 +148,7 @@ mousePressEvent( QGraphicsSceneMouseEvent* event )
template < typename Arr_ >
void PointLocationCallback< Arr_ >::
mouseMoveEvent( QGraphicsSceneMouseEvent* event )
mouseMoveEvent(QGraphicsSceneMouseEvent* /* event */)
{ }
template < typename Arr_ >

View File

@ -25,8 +25,9 @@
#include <QGraphicsScene>
#include <QGraphicsSceneMouseEvent>
#include <CGAL/Qt/Converter.h>
#include "CurveGraphicsItem.h"
#include <CGAL/Arrangement_with_history_2.h>
#include "CurveGraphicsItem.h"
#include "Utils.h"
#include "ISnappable.h"
@ -239,18 +240,17 @@ splitEdges( const Point_2& clickedPoint, TTraits traits )
template < typename Arr_ >
template < typename CircularKernel >
void SplitEdgeCallback< Arr_ >::
splitEdges( const Point_2& clickedPoint,
CGAL::Arr_circular_arc_traits_2< CircularKernel > traits )
splitEdges(const Point_2& /* clickedPoint */,
CGAL::Arr_circular_arc_traits_2< CircularKernel > /* traits */)
{
// std::cout << "Circular arc split edges stub" << std::endl;
}
template < typename Arr_ >
template < typename Coefficient_ >
void
SplitEdgeCallback< Arr_ >::
splitEdges( const Point_2& clickedPoint,
CGAL::Arr_algebraic_segment_traits_2< Coefficient_ > traits )
void SplitEdgeCallback< Arr_ >::
splitEdges(const Point_2& /* clickedPoint */,
CGAL::Arr_algebraic_segment_traits_2< Coefficient_ > /* traits */)
{
// std::cout << "Algebraic segment split edges stub" << std::endl;
}
@ -265,8 +265,8 @@ SplitEdgeCallback< Arr_ >::mouseMoveEvent( QGraphicsSceneMouseEvent* event )
template < typename Arr_ >
template < typename TTraits >
void SplitEdgeCallback< Arr_ >::updateGuide( const Point_2& clickedPoint,
TTraits traits )
void SplitEdgeCallback<Arr_>::updateGuide(const Point_2& clickedPoint,
TTraits /* traits */)
{
if ( this->hasFirstPoint )
{ // provide visual feedback for where the split line is
@ -285,8 +285,8 @@ void SplitEdgeCallback< Arr_ >::updateGuide( const Point_2& clickedPoint,
template < typename Arr_ >
template < typename CircularKernel >
void SplitEdgeCallback< Arr_ >::
updateGuide( const Point_2& clickedPoint,
CGAL::Arr_circular_arc_traits_2< CircularKernel > traits )
updateGuide(const Point_2& clickedPoint,
CGAL::Arr_circular_arc_traits_2< CircularKernel > /* traits */)
{
if ( this->hasFirstPoint )
{ // provide visual feedback for where the split line is
@ -312,8 +312,8 @@ SplitEdgeCallback< Arr_ >::snapPoint( QGraphicsSceneMouseEvent* event )
template < typename Arr_ >
template < typename TTraits >
typename SplitEdgeCallback< Arr_ >::Point_2
SplitEdgeCallback< Arr_ >::snapPoint( QGraphicsSceneMouseEvent *event,
TTraits traits )
SplitEdgeCallback<Arr_>::snapPoint(QGraphicsSceneMouseEvent* event,
TTraits /* traits */)
{
if ( this->snapToGridEnabled )
{
@ -335,8 +335,8 @@ SplitEdgeCallback< Arr_ >::snapPoint( QGraphicsSceneMouseEvent *event,
template < typename Arr_ >
template < typename CircularKernel >
typename SplitEdgeCallback< Arr_ >::Point_2 SplitEdgeCallback< Arr_ >::
snapPoint( QGraphicsSceneMouseEvent* event,
CGAL::Arr_circular_arc_traits_2< CircularKernel > traits )
snapPoint(QGraphicsSceneMouseEvent* event,
CGAL::Arr_circular_arc_traits_2<CircularKernel> /* traits */)
{
if ( this->snapToGridEnabled )
{

View File

@ -414,10 +414,10 @@ public: // methods
double operator() ( const Point_2& p, const X_monotone_curve_2& c ) const
{
// Get the co-ordinates of the curve's source and target.
double sx = CGAL::to_double( c.source( ).x( ) ),
sy = CGAL::to_double( c.source( ).y( ) ),
tx = CGAL::to_double( c.target( ).x( ) ),
ty = CGAL::to_double( c.target( ).y( ) );
// double sx = CGAL::to_double( c.source( ).x( ) );
// double sy = CGAL::to_double( c.source( ).y( ) );
// double tx = CGAL::to_double( c.target( ).x( ) );
// double ty = CGAL::to_double( c.target( ).y( ) );
if ( c.orientation( ) == CGAL::COLLINEAR )
{
@ -432,7 +432,7 @@ public: // methods
{
// If the curve is monotone, than its source and its target has the
// extreme x co-ordinates on this curve.
bool is_source_left = (sx < tx);
// bool is_source_left = (sx < tx);
//int x_min = is_source_left ? (*w).x_pixel(sx) : (*w).x_pixel(tx);
//int x_max = is_source_left ? (*w).x_pixel(tx) : (*w).x_pixel(sx);
//double prev_x = is_source_left ? sx : tx;
@ -443,7 +443,7 @@ public: // methods
bool first = true;
FT min_dist( 100000000 );
AlgKernel ker;
// AlgKernel ker;
int n = 100;
if ( this->scene != NULL && this->scene->views( ).size( ) != 0 )
@ -501,7 +501,8 @@ public:
typedef typename Traits::X_monotone_curve_2 X_monotone_curve_2;
public:
double operator() ( const Point_2& p, const X_monotone_curve_2& c ) const
double operator()(const Point_2& /* p */,
const X_monotone_curve_2& /* c */) const
{
double res = 0.0;
return res;
@ -515,14 +516,14 @@ public:
typedef ArrTraits Traits;
typedef typename ArrTraitsAdaptor< Traits >::Kernel Kernel;
typedef typename ArrTraitsAdaptor< Traits >::CoordinateType CoordinateType;
//typedef typename Kernel::FT FT;
// typedef typename Kernel::FT FT;
typedef typename Kernel::Point_2 Point_2;
typedef typename Kernel::Line_2 Line_2;
typedef typename Traits::X_monotone_curve_2 X_monotone_curve_2;
typedef typename Traits::Multiplicity Multiplicity;
typedef typename Traits::Intersect_2 Intersect_2;
typedef std::pair< typename Traits::Point_2, Multiplicity >
IntersectionResult;
IntersectionResult;
Arr_compute_y_at_x_2( ):
intersectCurves( this->traits.intersect_2_object( ) )
@ -580,7 +581,7 @@ protected:
typename TTraits::Construct_x_monotone_curve_2 construct_x_monotone_curve_2 =
traits_.construct_x_monotone_curve_2_object( );
CoordinateType res( 0 );
QRectF clipRect = this->viewportRect( );
// QRectF clipRect = this->viewportRect( );
Line_2 line = curve.supporting_line( );
// FIXME: get a better bounding box for an unbounded segment
Point_2 p1c1( x, CoordinateType( -10000000 ) ); // clicked point
@ -956,7 +957,8 @@ public: // typedefs
typedef typename Kernel::Segment_2 Segment_2;
public: // methods
// curve can be unbounded. if curve is unbounded to the left, pLeft is a point on the left edge of viewport.
// curve can be unbounded. if curve is unbounded to the left,
// pLeft is a point on the left edge of viewport.
X_monotone_curve_2 operator() ( const X_monotone_curve_2& curve,
const Point_2& pLeft, const Point_2& pRight )
{
@ -1029,9 +1031,9 @@ class SnapToGridStrategy : public SnapStrategy< ArrTraits >
{
public:
typedef typename ArrTraitsAdaptor< ArrTraits >::Kernel Kernel;
typedef typename ArrTraits::Point_2 Point_2;
typedef typename Kernel::Point_2 Kernel_point_2;
typedef SnapStrategy< ArrTraits > Superclass;
typedef typename ArrTraits::Point_2 Point_2;
typedef typename Kernel::Point_2 Kernel_point_2;
typedef SnapStrategy< ArrTraits > Superclass;
SnapToGridStrategy( ) :
Superclass( NULL ),
@ -1049,7 +1051,7 @@ public:
}
template < class TTraits >
Point_2 snapPoint( QGraphicsSceneMouseEvent* event, TTraits traits )
Point_2 snapPoint(QGraphicsSceneMouseEvent* event, TTraits /* traits */)
{
QPointF clickedPoint = event->scenePos( );
QRectF viewportRect = this->viewportRect( );
@ -1092,8 +1094,8 @@ public:
}
template < class CircularKernel >
Point_2 snapPoint( QGraphicsSceneMouseEvent* event,
CGAL::Arr_circular_arc_traits_2< CircularKernel > traits )
Point_2 snapPoint(QGraphicsSceneMouseEvent* event,
CGAL::Arr_circular_arc_traits_2<CircularKernel> /* traits */)
{
QPointF clickedPoint = event->scenePos( );
QRectF viewportRect = this->viewportRect( );
@ -1150,7 +1152,7 @@ class SnapToArrangementVertexStrategy:
public SnapStrategy< typename Arr_::Geometry_traits_2 >
{
public:
typedef Arr_ Arrangement;
typedef Arr_ Arrangement;
typedef typename Arrangement::Geometry_traits_2 Traits;
typedef typename ArrTraitsAdaptor< Traits >::Kernel Kernel;
typedef SnapStrategy< Traits > Superclass;
@ -1178,7 +1180,7 @@ public:
}
template < class TTraits >
Point_2 snapPoint( const Kernel_point_2& clickedPoint, TTraits traits )
Point_2 snapPoint(const Kernel_point_2& clickedPoint, TTraits /* traits */)
{
Point_2 initialPoint( CGAL::to_double(clickedPoint.x()),
CGAL::to_double(clickedPoint.y()) );
@ -1218,8 +1220,8 @@ public:
}
template < class CircularKernel >
Point_2 snapPoint( const Kernel_point_2& clickedPoint,
CGAL::Arr_circular_arc_traits_2< CircularKernel > traits )
Point_2 snapPoint(const Kernel_point_2& clickedPoint,
CGAL::Arr_circular_arc_traits_2<CircularKernel> /* traits */)
{
typedef Kernel_point_2 Non_arc_point_2;
typedef typename CircularKernel::Circular_arc_point_2 Arc_point_2;
@ -1298,7 +1300,7 @@ public:
protected:
template < class T, class TTraits >
Point_2 operator()( const T& x, const T& y, TTraits traits )
Point_2 operator()(const T& x, const T& y, TTraits /* traits */)
{
CoordinateType xx( x );
CoordinateType yy( y );
@ -1307,8 +1309,9 @@ protected:
}
template < class T, class CircularKernel >
Point_2 operator()( const T& x, const T& y,
CGAL::Arr_circular_arc_traits_2< CircularKernel > traits )
Point_2 operator()(const T& x, const T& y,
CGAL::Arr_circular_arc_traits_2<CircularKernel>
/* traits */)
{
typedef typename CircularKernel::Root_for_circles_2_2 Root_for_circles_2_2;
CoordinateType xx( x );
@ -1335,7 +1338,7 @@ public: // typedefs
typedef Compute_squared_distance_2< ArrTraits > Point_curve_distance;
typedef typename ArrTraits::X_monotone_curve_2 X_monotone_curve_2;
typedef CGAL::Arr_walk_along_line_point_location< Arrangement >
Point_location_strategy;
Point_location_strategy;
typedef typename ArrTraitsAdaptor< ArrTraits >::Kernel Kernel;
typedef typename Kernel::Point_2 Point_2;
typedef typename Arrangement::Face_const_handle Face_const_handle;
@ -1343,7 +1346,7 @@ public: // typedefs
typedef typename Arrangement::Vertex_const_handle Vertex_const_handle;
typedef typename Arrangement::Ccb_halfedge_const_circulator
Ccb_halfedge_const_circulator;
typedef typename Point_curve_distance::FT FT;
typedef typename Point_curve_distance::FT FT;
typedef typename Arrangement::Hole_const_iterator Hole_const_iterator;
typedef typename Arrangement::Halfedge_around_vertex_const_circulator
Halfedge_around_vertex_const_circulator;
@ -1407,7 +1410,7 @@ public: // member methods
#endif
Hole_const_iterator hit;
Hole_const_iterator eit = face->holes_end( );
int counter = 0;
// int counter = 0;
for ( hit = face->holes_begin( ); hit != eit; ++hit )
{ // check any holes inside this face
Ccb_halfedge_const_circulator cc = *hit;
@ -1465,18 +1468,18 @@ protected: // member fields
#if 0
template < class Arr_, class Coefficient_ >
class Find_nearest_edge< Arr_, CGAL::Arr_algebraic_segment_traits_2< Coefficient_ > >: public Find_nearest_edge_base
class Find_nearest_edge< Arr_, CGAL::Arr_algebraic_segment_traits_2<
Coefficient_ > >: public Find_nearest_edge_base
{
public:
Halfedge_const_handle operator()( const Point_2& queryPt )
{
}
{ }
};
#endif
template < class Arr_, class Kernel_ >
class Find_nearest_edge< Arr_, CGAL::Arr_linear_traits_2< Kernel_ > >: public Find_nearest_edge_base
class Find_nearest_edge< Arr_, CGAL::Arr_linear_traits_2< Kernel_ > > :
public Find_nearest_edge_base
{
public: // typedefs
typedef Arr_ Arrangement;
@ -1484,15 +1487,15 @@ public: // typedefs
typedef Compute_squared_distance_2< ArrTraits > Point_curve_distance;
typedef typename ArrTraits::X_monotone_curve_2 X_monotone_curve_2;
typedef CGAL::Arr_walk_along_line_point_location< Arrangement >
Point_location_strategy;
Point_location_strategy;
typedef typename ArrTraitsAdaptor< ArrTraits >::Kernel Kernel;
typedef typename Kernel::Point_2 Point_2;
typedef typename Kernel::Point_2 Point_2;
typedef typename Arrangement::Face_const_handle Face_const_handle;
typedef typename Arrangement::Halfedge_const_handle Halfedge_const_handle;
typedef typename Arrangement::Vertex_const_handle Vertex_const_handle;
typedef typename Arrangement::Ccb_halfedge_const_circulator
Ccb_halfedge_const_circulator;
typedef typename Point_curve_distance::FT FT;
typedef typename Point_curve_distance::FT FT;
typedef typename Arrangement::Hole_const_iterator Hole_const_iterator;
typedef typename Arrangement::Halfedge_around_vertex_const_circulator
Halfedge_around_vertex_const_circulator;

View File

@ -211,7 +211,7 @@ mousePressEvent( QGraphicsSceneMouseEvent* event )
template < typename Arr_ >
void VerticalRayShootCallback< Arr_ >::
mouseMoveEvent( QGraphicsSceneMouseEvent* event )
mouseMoveEvent(QGraphicsSceneMouseEvent* /* event */)
{ }
template < typename Arr_ >
@ -251,8 +251,8 @@ highlightPointLocation( QGraphicsSceneMouseEvent* event )
{
Kernel_point_2 p2( FT( this->queryPt.x( ) ), y2 );
Segment_2 lineSegment( this->queryPt, p2 );
QLineF qLineSegment = this->convert( lineSegment );
//this->activeRay->setLine( qLineSegment );
// QLineF qLineSegment = this->convert( lineSegment );
// this->activeRay->setLine( qLineSegment );
this->rayGraphicsItem.setSource( event->scenePos( ) );
this->rayGraphicsItem.setTargetY( CGAL::to_double( y2 ) );
this->rayGraphicsItem.setIsInfinite( true );
@ -270,8 +270,8 @@ highlightPointLocation( QGraphicsSceneMouseEvent* event )
FT yInt( yApprox );
Kernel_point_2 p2( this->queryPt.x( ), yInt );
Segment_2 seg( this->queryPt, p2 );
QLineF qseg = this->convert( seg );
//this->activeRay->setLine( qseg );
// QLineF qseg = this->convert( seg );
// this->activeRay->setLine( qseg );
this->rayGraphicsItem.setSource( event->scenePos( ) );
this->rayGraphicsItem.setTargetY( CGAL::to_double( yInt ) );
this->rayGraphicsItem.setIsInfinite( false );