Subject: CGAL users discussion list
List archive
- From: chengming_26 <>
- To:
- Subject: [cgal-discuss] 来自的邮件
- Date: Tue, 4 Nov 2008 14:05:35 +0800 (CST)
typedef CGAL::Gmpz NT;
typedef CGAL::Quotient<NT> CNT;
typedef CGAL::Cartesian<CNT> CKernel;
typedef CGAL::Homogeneous<NT> Kernel;
typedef CGAL::Nef_polyhedron_3<Kernel> Nef_polyhedron;
typedef CGAL::Quotient<NT> CNT;
typedef CGAL::Cartesian<CNT> CKernel;
typedef CGAL::Homogeneous<NT> Kernel;
typedef CGAL::Nef_polyhedron_3<Kernel> Nef_polyhedron;
typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
typedef Polyhedron::Facet_iterator Facet_iterator;
typedef Polyhedron::Facet_iterator Facet_iterator;
struct Normal_vector {
template <class Facet>
typename Facet::Plane_3 operator()( Facet& f)
{
typename Facet::Halfedge_handle h = f.halfedge();
// Facet::Plane_3 is the normal vector type. We assume the
// CGAL Kernel here and use its global functions.
return CGAL::cross_product(
h->next()->vertex()->point() - h->vertex()->point(),
h->next()->next()->vertex()->point() - h->next()->vertex()->point());
}
};
template <class Facet>
typename Facet::Plane_3 operator()( Facet& f)
{
typename Facet::Halfedge_handle h = f.halfedge();
// Facet::Plane_3 is the normal vector type. We assume the
// CGAL Kernel here and use its global functions.
return CGAL::cross_product(
h->next()->vertex()->point() - h->vertex()->point(),
h->next()->next()->vertex()->point() - h->next()->vertex()->point());
}
};
main()
{
............ //the code of geting "Nef_polyhedron& result" omit;
Polyhedron P;
result.convert_to_Polyhedron(P);
result.convert_to_Polyhedron(P);
for (Facet_iterator itr = P.facets_begin(); itr != P.facets_end(); ++itr)
{
{
std::cout<<CGAL::to_double(Normal_vector()(*itr).hx())<<" "<<
CGAL::to_double(Normal_vector()(*itr).hy())<<" "<<
CGAL::to_double(Normal_vector()(*itr).hz())<<"\n";
CGAL::to_double(Normal_vector()(*itr).hy())<<" "<<
CGAL::to_double(Normal_vector()(*itr).hz())<<"\n";
}
}
why are these error?
error C2039: 'hx' : is not a member of 'CGAL::Plane_3<R_>'
1> with
1> [
1> R_=CGAL::Homogeneous<NT>
1> ]
1>e:\study\c++\cgal_vh\cgal_vh\../Polyhedron/VisualHullComputer.h(271) : error C2039: 'hy' : is not a member of 'CGAL::Plane_3<R_>'
1> with
1> [
1> R_=CGAL::Homogeneous<NT>
1> ]
1>e:\study\c++\cgal_vh\cgal_vh\../Polyhedron/VisualHullComputer.h(272) : error C2039: 'hz' : is not a member of 'CGAL::Plane_3<R_>'
1> with
1> [
1> R_=CGAL::Homogeneous<NT>
1> ]
1> with
1> [
1> R_=CGAL::Homogeneous<NT>
1> ]
1>e:\study\c++\cgal_vh\cgal_vh\../Polyhedron/VisualHullComputer.h(271) : error C2039: 'hy' : is not a member of 'CGAL::Plane_3<R_>'
1> with
1> [
1> R_=CGAL::Homogeneous<NT>
1> ]
1>e:\study\c++\cgal_vh\cgal_vh\../Polyhedron/VisualHullComputer.h(272) : error C2039: 'hz' : is not a member of 'CGAL::Plane_3<R_>'
1> with
1> [
1> R_=CGAL::Homogeneous<NT>
1> ]
[广告] 金秋最关注楼盘-房不胜房
- [cgal-discuss] 来自的邮件, chengming_26, 11/04/2008
Archive powered by MHonArc 2.6.16.