Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Re: Move a point

Subject: CGAL users discussion list

List archive

[cgal-discuss] Re: Move a point


Chronological Thread 
  • From: "Michael Schmidt" <>
  • To:
  • Subject: [cgal-discuss] Re: Move a point
  • Date: Thu, 4 Sep 2008 09:34:54 +0200
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=jbosPreAnpuFndJcnGiL04+U9S348GnzpkxAgxNR3PzLOToY2SpJBTYxppMeARwvG0 FnMDVp+mUhY+jC5RYCdjv02y7fFFFHrx9La3d/6DbtMk1e9wOyZz7cE2GBc6bH1sizIz nbA+dx0l8XYHKF9w+miBWGkc/NwFSmNGmp/KI=

Hi,

thanks a lot for this workaround. Due to my data structure I have to
subclass Point_2 anyway, thus I put the workaround in my subclass to
provide the setX() function:

class My_point : public CGAL::Point_2< CGAL::Cartesian<double> >
{
// constructor
My_point(int x, int y)
: CGAL::Point_2< CGAL::Cartesian<double> >(x,y)
{
}


void setX( const int& x)
{
*this = My_point(x, this->y());
// Note: All data stored in the subclass My_point will be lost
// except used in the constructor
}
};

It's indeed not very nice, but it works fine.

Greetings,
Michael


  • [cgal-discuss] Re: Move a point, Michael Schmidt, 09/04/2008

Archive powered by MHonArc 2.6.16.

Top of Page