Added some comments.

This commit is contained in:
Miguel Granados 2002-07-15 13:35:46 +00:00
parent bf1511ea32
commit b2cc1d95d6
8 changed files with 32 additions and 21 deletions

View File

@ -6,5 +6,6 @@ Nef_3 Package: TODO
- Extended kernel with infimaximal box
- Define endpoint of segments used for ray shoting to be in the
infimaximal box.
- Constructor from a halfspace.
- Write a SNC_const_decorator class cloning the current SNC_decorator
class methods but using constant attributes.

View File

@ -284,7 +284,7 @@ Size_type number_of_sface_cycles() const;
Size_type number_of_connected_components() const;
/*{\Mop calculates the number of connected components of |P|.}*/
void print_statistics(std::stringstream& os = std::cout) const
void print_statistics(std::ostream& os = std::cout) const
/*{\Mop print the statistics of |P|: the number of vertices, edges,
and faces.}*/
{

View File

@ -123,7 +123,7 @@ std::string index(SHalfloop_handle l) const
std::string index(SFace_handle f) const
{ return FI(f,verbose); }
static void dump(Vertex_handle v, std::ostream& os = cerr);
static void dump(Vertex_handle v, std::ostream& os = std::cerr);
/*{\Mstatic prints the plane map decorated by |D| to |os|.}*/
}; // SNC_SM_io_parser<Refs_>

View File

@ -137,6 +137,7 @@ public:
#define USING(t) typedef typename Base::t t
USING(Vertex_handle);
USING(Halfedge_handle);
USING(Halfedge_const_handle);
USING(Halfloop_handle);
USING(Face_handle);
USING(Vertex_iterator);
@ -159,6 +160,8 @@ public:
USING(SFace_const_handle);
#undef USING
typedef typename Base::Kernel Kernel;
typedef std::pair<Halfedge_handle,Halfedge_handle> Halfedge_pair;
/*{\Mtypes 3}*/

View File

@ -165,7 +165,7 @@ public:
template <typename EW>
SNC_io_parser<EW>::SNC_io_parser(std::istream& is, SNC_structure& W) :
Base(W), in(is), out(std::cout)
{ CGAL_nef3_assertion(W.empty());
{ CGAL_nef3_assertion(W.is_empty());
verbose = false; }
template <typename EW>

View File

@ -30,7 +30,7 @@
// ============================================================================
//#ifndef CGAL_SNC_POINT_LOCATOR_H
#ifdef CGAL_NEF3_DEPRECATED_CLASS
/* funcionality now provided by SNC_ray_shoter.h */
#error funcionality now provided by SNC_ray_shoter.h
#define CGAL_SNC_POINT_LOCATOR_H
#include <CGAL/basic.h>

View File

@ -919,14 +919,17 @@ public:
TRACEN("removing "<<IO->index(u)<<" & "<<IO->index(SD.twin(u)));
Halfedge_handle src(SD.source(u)), tgt(SD.target(u));
if ( SD.is_closed_at_source(u) )
SD.set_face( SD.source(u), SD.face(u));
SD.set_face( src, fu);
if ( SD.is_closed_at_source( SD.twin(u)) )
SD.set_face( SD.target(u), SD.face(u));
SD.set_face( tgt, fu);
/* TO VERIFY: does is_closed_at_source(u) imply is_isolated(src)?
if it is true, the svertex face update is not necesary. */
SD.delete_edge_pair(u);
if( SD.is_isolated(src))
SD.delete_vertex_only(src);
if( SD.is_isolated(tgt))
SD.delete_vertex_only(tgt);
/* TO VERIFY: can both svertices be isolated at the same time? */
}
}
else if( assign(l, fc)) {

View File

@ -234,7 +234,7 @@ protected:
SVertex_handle sv[3];
for(int vi=0; vi<3; ++vi) {
sv[vi] = SD.new_vertex(sp[vi]);
D.mark(sv[vi]) = space;
D.mark(sv[vi]) = true;
}
/* create facet's edge uses */
Sphere_segment ss[3];
@ -244,27 +244,31 @@ protected:
ss[si] = Sphere_segment(sp[si],sp[(si+1)%3]);
SD.circle(she[si]) = ss[si].sphere_circle();
SD.circle(SD.twin(she[si])) = ss[si].opposite().sphere_circle();
SD.mark(she[si]) = space;
SD.mark(she[si]) = true;
}
/* create facets */
SFace_handle fi = SD.new_face();
SFace_handle fe = SD.new_face();
SD.link_as_face_cycle(she[0], fi);
SD.link_as_face_cycle(SD.twin(she[0]), fe);
SD.mark(fi) = true;
SD.mark(fe) = true;
/* set face mark */
SHalfedge_iterator e = SD.shalfedges_begin();
SFace_handle f;
Sphere_point p1 = SD.point(SD.source(e));
Sphere_point p2 = SD.point(SD.target(e));
Sphere_point p3 = SD.point(SD.target(SD.next(e)));
if ( spherical_orientation(p1,p2,p3) > 0 )
f = SD.face(e);
else
f = SD.face(SD.twin(e));
SD.mark(f) = space;
if( space == EMPTY) {
SHalfedge_iterator e = SD.shalfedges_begin();
SFace_handle f;
Sphere_point p1 = SD.point(SD.source(e));
Sphere_point p2 = SD.point(SD.target(e));
Sphere_point p3 = SD.point(SD.target(SD.next(e)));
if ( spherical_orientation(p1,p2,p3) > 0 )
f = SD.face(e);
else
f = SD.face(SD.twin(e));
SD.mark(f) = false;
}
// SD.mark_of_halfsphere(-1) = (x<0 && y>0 && z>0);
// SD.mark_of_halfsphere(+1) = (x>0 && y>0 && z<0);
/* TODO: to check if the commented code above is wrong */
/* TODO: to check if the commented code above could be wrong */
SM_point_locator L(v);
L.init_marks_of_halfspheres();
#ifdef CGAL_NEF3_DUMP_SPHERE_MAPS
@ -588,8 +592,8 @@ public:
bool contains(Object_handle h) const
/*{\Mop returns true iff the object |h| is contained in the set
represented by |\Mvar|.}*/
// TO IMPLEMENT: { SNC_point_locator PL(snc()); return PL.mark(h);}
{ return false; }
// { SNC_point_locator PL(snc()); return PL.mark(h);}
{ CGAL_nef3_assertion_msg( 0, "not implemented."); }
bool contained_in_boundary(Object_handle h) const
/*{\Mop returns true iff the object |h| is contained in the $2$-skeleton