mirror of https://github.com/CGAL/cgal
fix formatting
This commit is contained in:
parent
82ff73da86
commit
eab6b6b68a
|
|
@ -28,8 +28,8 @@
|
|||
namespace CGAL {
|
||||
|
||||
|
||||
template <typename HD>
|
||||
struct Seam_mesh_halfedge_descriptor {
|
||||
template <typename HD>
|
||||
struct Seam_mesh_halfedge_descriptor {
|
||||
|
||||
typedef HD TM_halfedge_descriptor;
|
||||
|
||||
|
|
@ -80,7 +80,7 @@ namespace CGAL {
|
|||
os << hd.tmhd << ((hd.seam)?" on seam":"");
|
||||
return os;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
|
@ -113,7 +113,7 @@ private:
|
|||
|
||||
public:
|
||||
/// @cond CGAL_DOCUMENT_INTERNALS
|
||||
typedef typename boost::graph_traits<TM>::face_descriptor face_descriptor;
|
||||
typedef typename boost::graph_traits<TM>::face_descriptor face_descriptor;
|
||||
|
||||
const TM& mesh()const
|
||||
{
|
||||
|
|
@ -125,7 +125,7 @@ typedef typename boost::graph_traits<TM>::face_descriptor face_descriptor;
|
|||
/** A vertex
|
||||
*
|
||||
**/
|
||||
struct vertex_descriptor{
|
||||
struct vertex_descriptor {
|
||||
|
||||
vertex_descriptor()
|
||||
{}
|
||||
|
|
@ -221,25 +221,25 @@ typedef typename boost::graph_traits<TM>::face_descriptor face_descriptor;
|
|||
{
|
||||
//std::cerr << "increment\n";
|
||||
if(hd == end) return;
|
||||
do{
|
||||
do {
|
||||
++hd;
|
||||
//std::cerr << *hd << " ++" << std::endl;
|
||||
if(hd == end) return;
|
||||
TM_vertex_descriptor tvd = target(*hd,mesh_->mesh());
|
||||
//std::cerr << "tvd = " << tvd << std::endl;
|
||||
if( (! mesh_->has_on_seam(tvd))&& (halfedge(tvd,mesh_->mesh()) == *hd)){
|
||||
if( (! mesh_->has_on_seam(tvd))&& (halfedge(tvd,mesh_->mesh()) == *hd)) {
|
||||
//std::cerr <<"return as not on seam and reverse incidence\n";
|
||||
return;
|
||||
}
|
||||
if(mesh_->has_on_seam(edge(*hd,mesh_->mesh()))){
|
||||
if(mesh_->has_on_seam(edge(*hd,mesh_->mesh()))) {
|
||||
//std::cerr <<"return as edge on seam\n";
|
||||
return;
|
||||
}
|
||||
if(mesh_->has_on_seam(tvd) && is_border(opposite(*hd,mesh_->mesh()),mesh_->mesh())){
|
||||
if(mesh_->has_on_seam(tvd) && is_border(opposite(*hd,mesh_->mesh()),mesh_->mesh())) {
|
||||
//std::cerr <<"return as edge on border and target on seam\n";
|
||||
return;
|
||||
}
|
||||
}while(true);
|
||||
} while(true);
|
||||
}
|
||||
|
||||
bool equal(const vertex_iterator& other) const
|
||||
|
|
@ -247,7 +247,9 @@ typedef typename boost::graph_traits<TM>::face_descriptor face_descriptor;
|
|||
return (this->mesh_ == other.mesh_) && (this->hd == other.hd);
|
||||
}
|
||||
|
||||
vertex_descriptor dereference() const { return vertex_descriptor(*hd); }
|
||||
vertex_descriptor dereference() const {
|
||||
return vertex_descriptor(*hd);
|
||||
}
|
||||
|
||||
|
||||
TM_halfedge_iterator hd, end;
|
||||
|
|
@ -334,18 +336,18 @@ public:
|
|||
*this,
|
||||
std::back_inserter(faces));
|
||||
|
||||
BOOST_FOREACH(face_descriptor fd, faces){
|
||||
BOOST_FOREACH(TM_halfedge_descriptor tmhd , halfedges_around_face(halfedge(fd,tm),tm)){
|
||||
BOOST_FOREACH(face_descriptor fd, faces) {
|
||||
BOOST_FOREACH(TM_halfedge_descriptor tmhd , halfedges_around_face(halfedge(fd,tm),tm)) {
|
||||
halfedge_descriptor hd(tmhd);
|
||||
vertex_descriptor vd = target(hd,mesh);
|
||||
put(vipm,vd,-1);
|
||||
}
|
||||
}
|
||||
BOOST_FOREACH(face_descriptor fd, faces){
|
||||
BOOST_FOREACH(TM_halfedge_descriptor tmhd , halfedges_around_face(halfedge(fd,tm),tm)){
|
||||
BOOST_FOREACH(face_descriptor fd, faces) {
|
||||
BOOST_FOREACH(TM_halfedge_descriptor tmhd , halfedges_around_face(halfedge(fd,tm),tm)) {
|
||||
halfedge_descriptor hd(tmhd);
|
||||
vertex_descriptor vd = target(hd,mesh);
|
||||
if(get(vipm,vd) == -1){
|
||||
if(get(vipm,vd) == -1) {
|
||||
put(vipm,vd,index);
|
||||
++index;
|
||||
}
|
||||
|
|
@ -361,69 +363,57 @@ public:
|
|||
return index;
|
||||
}
|
||||
|
||||
|
||||
|
||||
halfedge_descriptor m_next(const halfedge_descriptor& hd) const
|
||||
{
|
||||
if((! hd.seam)&& (! is_border(hd.tmhd,tm))){
|
||||
if((! hd.seam)&& (! is_border(hd.tmhd,tm))) {
|
||||
return halfedge_descriptor(next(hd.tmhd, tm));
|
||||
}
|
||||
Halfedge_around_target_circulator<TM> hatc(hd.tmhd,tm);
|
||||
do {
|
||||
--hatc;
|
||||
}while((! has_on_seam(*hatc))&&(! is_border(opposite(*hatc,tm),tm)));
|
||||
} while((! has_on_seam(*hatc))&&(! is_border(opposite(*hatc,tm),tm)));
|
||||
return halfedge_descriptor(opposite(*hatc,tm), ! is_border(opposite(*hatc,tm),tm));
|
||||
}
|
||||
|
||||
|
||||
halfedge_descriptor m_prev(const halfedge_descriptor& hd) const
|
||||
{
|
||||
if((! hd.seam)&& (! is_border(hd.tmhd,tm))){
|
||||
if((! hd.seam)&& (! is_border(hd.tmhd,tm))) {
|
||||
return halfedge_descriptor(prev(hd.tmhd, tm));
|
||||
}
|
||||
Halfedge_around_source_circulator<TM> hatc(hd.tmhd,tm);
|
||||
do {
|
||||
++hatc;
|
||||
}while((! has_on_seam(*hatc))&&(! is_border(opposite(*hatc,tm),tm)));
|
||||
} while((! has_on_seam(*hatc))&&(! is_border(opposite(*hatc,tm),tm)));
|
||||
return halfedge_descriptor(opposite(*hatc,tm), ! is_border(opposite(*hatc,tm),tm));
|
||||
}
|
||||
|
||||
|
||||
halfedge_descriptor m_opposite(const halfedge_descriptor& hd) const
|
||||
{
|
||||
if(! hd.seam){
|
||||
if(! hd.seam) {
|
||||
return halfedge_descriptor(opposite(hd.tmhd,tm), has_on_seam(hd));
|
||||
}
|
||||
|
||||
return halfedge_descriptor(opposite(hd.tmhd,tm));
|
||||
}
|
||||
|
||||
|
||||
vertex_descriptor m_target(halfedge_descriptor hd) const
|
||||
{
|
||||
TM_halfedge_descriptor tmhd(hd);
|
||||
if(! has_on_seam(target(tmhd,tm))){
|
||||
if(! has_on_seam(target(tmhd,tm))) {
|
||||
tmhd = halfedge(target(tmhd,tm),tm);
|
||||
return vertex_descriptor(halfedge_descriptor(tmhd));
|
||||
}
|
||||
|
||||
if(hd.seam){
|
||||
if(hd.seam) {
|
||||
return m_target(halfedge_descriptor(prev(opposite(tmhd,tm),tm)));
|
||||
}
|
||||
|
||||
while((! has_on_seam(tmhd)) && (! is_border(opposite(tmhd,tm),tm))){
|
||||
while((! has_on_seam(tmhd)) && (! is_border(opposite(tmhd,tm),tm))) {
|
||||
tmhd = prev(opposite(tmhd,tm),tm);
|
||||
}
|
||||
|
||||
return vertex_descriptor(halfedge_descriptor(tmhd));
|
||||
}
|
||||
|
||||
/*
|
||||
vertex_descriptor m_target(const halfedge_descriptor& hd) const
|
||||
{
|
||||
return m_target(hd.tmhd);
|
||||
}
|
||||
*/
|
||||
|
||||
vertex_descriptor m_source(const halfedge_descriptor& hd) const
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue