- Moved external member function definitions into class definitions

to please VC7.
This commit is contained in:
Lutz Kettner 2002-05-08 12:32:51 +00:00
parent 2c05f8f1a0
commit 541314aa10
5 changed files with 60 additions and 65 deletions

View File

@ -1,6 +1,11 @@
Nef_2 Package: Release changes
----------------------------------------------------------------------
1.17 (08 May 2002)
- Moved external member function definitions into class definitions
to please VC7.
1.16 (7 May 2002)
- casting of Standard_RT(0) required before assignment for Borland

View File

@ -47,6 +47,9 @@ Nef_polyhedron_2-demo$(EXE_EXT): Nef_polyhedron_2-demo$(OBJ_EXT)
Simple-demo$(EXE_EXT): Simple-demo$(OBJ_EXT)
$(CGAL_CXX) $(LIBPATH) $(EXE_OPT)Simple-demo Simple-demo$(OBJ_EXT) $(LDFLAGS)
nef_2$(EXE_EXT): nef_2$(OBJ_EXT)
$(CGAL_CXX) $(LIBPATH) $(EXE_OPT)nef_2 nef_2$(OBJ_EXT) $(LDFLAGS)
clean: \
Nef_polyhedron_2-demo.clean Simple-demo.clean

View File

@ -696,7 +696,7 @@ void clone(const Plane_map& H) const;
\precond |H.check_integrity_and_topological_planarity()| and
|P| is empty.}*/
#if ! defined(_MSC_VER) || _MSC_VER >= 1300
#if ! defined(_MSC_VER)
template <typename LINKDA>
void clone_skeleton(const Plane_map& H, const LINKDA& L) const;
@ -761,7 +761,7 @@ void clone_skeleton(const HDS& H, const LINKDA& L) const
#endif
void reflecting_inversion();
void reflecting_inversion()
/*{\Xop inverts the topological links corresponding to a reflecting
inversion. Assume that the plane map is embedded into the x-y plane
and one looks at it from the tip of the positive z-axis in space. Now
@ -770,6 +770,26 @@ consequence faces are right of edges and adjacency list are clockwise
order-preserving. This operation recreates our embedding invariant
(faces are left of edges and adjacency lists are counterclockwise
order-preserving).}*/
{
// swap faces:
Halfedge_iterator e;
for (e = halfedges_begin(); e != halfedges_end(); ++(++e)) {
Face_handle f1 = face(e), f2 = face(twin(e));
e->set_face(f2); twin(e)->set_face(f1);
}
// reverse adjacency lists:
std::vector<Halfedge_handle> A;
Vertex_iterator v;
for (v = vertices_begin(); v != vertices_end(); ++v) {
if ( is_isolted(v) ) continue;
Halfedge_around_vertex_circulator h = out_edges(v), hend(h);
CGAL_For_all(h,hend) A.push_back(h);
int n = A.size();
for (int i=0; i<n; ++i)
set_adjacency_at_source_between(A[(i+1)%n],A[i],A[(i-1)%n]);
}
CGAL_assertion_msg(0,"test this");
}
/*{\Mtext \headerline{Associated Information}\restoreopdims}*/
@ -880,7 +900,7 @@ void PM_decorator<HDS>::clone(const HDS& H) const
CGAL_assertion((check_integrity_and_topological_planarity(),1));
}
#if ! defined(_MSC_VER) || _MSC_VER >= 1300
#if ! defined(_MSC_VER)
template <typename HDS>
template <typename LINKDA>
@ -933,29 +953,6 @@ clone_skeleton(const HDS& H, const LINKDA& L) const
#endif
template <typename HDS>
void PM_decorator<HDS>::reflecting_inversion()
{
// swap faces:
Halfedge_iterator e;
for (e = halfedges_begin(); e != halfedges_end(); ++(++e)) {
Face_handle f1 = face(e), f2 = face(twin(e));
e->set_face(f2); twin(e)->set_face(f1);
}
// reverse adjacency lists:
std::vector<Halfedge_handle> A;
Vertex_iterator v;
for (v = vertices_begin(); v != vertices_end(); ++v) {
if ( is_isolted(v) ) continue;
Halfedge_around_vertex_circulator h = out_edges(v), hend(h);
CGAL_For_all(h,hend) A.push_back(h);
int n = A.size();
for (int i=0; i<n; ++i)
set_adjacency_at_source_between(A[(i+1)%n],A[i],A[(i-1)%n]);
}
CGAL_assertion_msg(0,"test this");
}
CGAL_END_NAMESPACE

View File

@ -86,15 +86,40 @@ class PM_io_parser : public PMDEC
public:
/*{\Mcreation 3}*/
PM_io_parser(std::istream& is, Plane_map& H);
PM_io_parser(std::istream& is, Plane_map& H)
/*{\Mcreate creates an instance |\Mvar| of type |\Mname|
to input |H| from |is|.}*/
: Base(H), in(is), out(std::cout), verbose(0), vn(0), en(0), fn(0)
{ clear(); }
PM_io_parser(std::ostream& os, const Plane_map& H);
PM_io_parser(std::ostream& os, const Plane_map& H)
/*{\Mcreate creates an instance |\Mvar| of type |\Mname|
to output |H| to |os|.}*/
: Base(const_cast<Plane_map&>(H)), in(std::cin), out(os),
VI(vertices_begin(),vertices_end(),'v'),
EI(halfedges_begin(),halfedges_end(),'e'),
FI(faces_begin(),faces_end(),'f'),
vn(number_of_vertices()),
en(number_of_halfedges()),
fn(number_of_faces())
{ verbose = (out.iword(CGAL::IO::mode) != CGAL::IO::ASCII &&
out.iword(CGAL::IO::mode) != CGAL::IO::BINARY);
}
PM_io_parser(std::ostream& os, const PMDEC& D)
: Base(D), in(std::cin), out(os),
VI(vertices_begin(),vertices_end(),'v'),
EI(halfedges_begin(),halfedges_end(),'e'),
FI(faces_begin(),faces_end(),'f'),
vn(number_of_vertices()),
en(number_of_halfedges()),
fn(number_of_faces())
{ verbose = (out.iword(CGAL::IO::mode) != CGAL::IO::ASCII &&
out.iword(CGAL::IO::mode) != CGAL::IO::BINARY);
}
PM_io_parser(std::ostream&, const PMDEC& D);
/*{\Moperations 2 3}*/
@ -115,41 +140,6 @@ static void dump(const PMDEC& D, std::ostream& os = std::cerr);
}; // PM_io_parser<PMDEC>
template <typename PMDEC>
PM_io_parser<PMDEC>::PM_io_parser
(std::istream& iin, Plane_map& H) :
Base(H), in(iin), out(std::cout), verbose(0), vn(0), en(0), fn(0)
{ clear(); }
template <typename PMDEC>
PM_io_parser<PMDEC>::PM_io_parser
(std::ostream& iout, const Plane_map& H) :
Base(const_cast<Plane_map&>(H)), in(std::cin), out(iout),
VI(vertices_begin(),vertices_end(),'v'),
EI(halfedges_begin(),halfedges_end(),'e'),
FI(faces_begin(),faces_end(),'f'),
vn(number_of_vertices()),
en(number_of_halfedges()),
fn(number_of_faces())
{ verbose = (out.iword(CGAL::IO::mode) != CGAL::IO::ASCII &&
out.iword(CGAL::IO::mode) != CGAL::IO::BINARY);
}
template <typename PMDEC>
PM_io_parser<PMDEC>::PM_io_parser
(std::ostream& iout, const PMDEC& D) :
Base(D), in(std::cin), out(iout),
VI(vertices_begin(),vertices_end(),'v'),
EI(halfedges_begin(),halfedges_end(),'e'),
FI(faces_begin(),faces_end(),'f'),
vn(number_of_vertices()),
en(number_of_halfedges()),
fn(number_of_faces())
{ verbose = (out.iword(CGAL::IO::mode) != CGAL::IO::ASCII &&
out.iword(CGAL::IO::mode) != CGAL::IO::BINARY);
}
//-----------------------------------------------------------------------------
// OUTPUT AND INPUT:
//-----------------------------------------------------------------------------

View File

@ -1 +1 @@
1.16 ( 7 May 2002)
1.17 (08 May 2002)