Subject: CGAL users discussion list
List archive
- From: Andreas Fabri <>
- To:
- Subject: Re: [cgal-discuss] const_handle to non_const_handle
- Date: Mon, 21 Nov 2016 08:30:49 +0100
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=None ; spf=None
- Ironport-phdr: 9a23:b18epRQ7XM4/UbMpoFHCe9sVNtpsv+yvbD5Q0YIujvd0So/mwa67bRSN2/xhgRfzUJnB7Loc0qyN4vumAzZLu8vR+DBaKdoXCE9D0Z1X1yUbQ+e7SmTDZMbwaCI7GMkQHHRExFqcdXZvJcDlelfJqWez5zNBUj/2NA5yO/inUtWK15f/hKiO/MjYbAxMwTa8erhvNw6erAPLt8BQj5ExBLw2z07gpHdSdu1NjU1hL0iS10L14Muq8Zd4tSpZsegg38FNVqD3Y74pQ7VTEDM8IiY+48i95kqLdheG+nZJCjZeqRFPGQWQtBw=
- Organization: GeometryFactory
Well, it is not a static function.
If your arrangement object is called arr
you have to write
arr.non_const_handle(*f);
best,
andreas
On 20/11/2016 22:11, sg wrote:
I am implementing some code in CGAL. I made an arrangement. Now I want to add
some data to every face in arrangement. So i access a face by below method.
It return const handle. So i try to convert this to non_const_handle. But it
show error that " cannot call member function without object."
const Face_const_handle* f;
if(f = boost::get<Face_const_handle>(&(it->second))){
Arrangement_2::Face_handle fh = Arrangement_2::non_const_handle(*f);
// ERROR HERE
for(int i=1;i<convexPts.size();i++){
CGAL::Gmpq temp =
CGAL::squared_distance(convexPts[0],convexPts[i]);
if(temp>max){
max = temp;
fh->set_data(max);
}
}
}
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/const-handle-to-non-const-handle-tp4662374.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
--
Andreas Fabri, PhD
Chief Officer, GeometryFactory
Editor, The CGAL Project
phone: +33.492.954.912 skype: andreas.fabri
- [cgal-discuss] const_handle to non_const_handle, sg, 11/20/2016
- Re: [cgal-discuss] const_handle to non_const_handle, Andreas Fabri, 11/21/2016
- Re: [cgal-discuss] const_handle to non_const_handle, sg, 11/21/2016
- Re: [cgal-discuss] const_handle to non_const_handle, Andreas Fabri, 11/21/2016
- Re: [cgal-discuss] const_handle to non_const_handle, sg, 11/21/2016
- Re: [cgal-discuss] const_handle to non_const_handle, Andreas Fabri, 11/21/2016
- Re: [cgal-discuss] const_handle to non_const_handle, Efi Fogel, 11/21/2016
- Re: [cgal-discuss] const_handle to non_const_handle, Andreas Fabri, 11/21/2016
- Re: [cgal-discuss] const_handle to non_const_handle, sg, 11/21/2016
- Re: [cgal-discuss] const_handle to non_const_handle, Andreas Fabri, 11/21/2016
- Re: [cgal-discuss] const_handle to non_const_handle, sg, 11/21/2016
- Re: [cgal-discuss] const_handle to non_const_handle, Andreas Fabri, 11/21/2016
Archive powered by MHonArc 2.6.18.