Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Accessing superclass

Subject: CGAL users discussion list

List archive

[cgal-discuss] Accessing superclass


Chronological Thread 
  • From: Lam <>
  • To:
  • Subject: [cgal-discuss] Accessing superclass
  • Date: Wed, 1 Jul 2009 14:34:44 +0200 (CEST)

Hi I have a class derived from Polyhedron_3 class. Now I have a problem in
access it.

This is an simple example

typedef CGAL::Simple_cartesian<double> Kernel;
typedef Kernel::Point_3 Point_3;
typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
typedef Polyhedron::Vertex_iterator Vertex_iterator;

class Model : public Polyhedron{
int A;
public:
Model(char *FileIn){
A=254;
std::ifstream FIN(FileIn);
std::ofstream FOUT("cube28_.wrl");

std::cout << "ops";
// all guives me error
FIN >> this->Polyhedron_3;
FIN >> this->Polyhedron;

}

};

int main() {

Polyhedron P;
Model M("cube26.ply");
std::ifstream
fcin("C:\\Users\\rlam\\Desktop\\CGAL\\Polyhedron\\cube26.off");
std::ofstream
fcout("C:\\Users\\rlam\\Desktop\\CGAL\\Polyhedron\\cube26.wrl");
fcin >> P;
CGAL::VRML_2_ostream out( fcout);

}



Archive powered by MHonArc 2.6.16.

Top of Page