Merge from next to get the is_iterator fix

This commit is contained in:
Marc Glisse 2011-05-14 10:34:10 +00:00
commit 12fe1be5bb
16 changed files with 183 additions and 63 deletions

1
.gitattributes vendored
View File

@ -3188,6 +3188,7 @@ Scripts/developer_scripts/check_library_uses_no_qpl_files.exceptions -text
Scripts/developer_scripts/check_macro_names -text
Scripts/developer_scripts/check_no_CGAL_USE_without_includes_before -text
Scripts/developer_scripts/check_svn_keywords -text
Scripts/developer_scripts/clean_up_branch.sh -text
Scripts/developer_scripts/common_impl.rb -text
Scripts/developer_scripts/create_assertions.sh eol=lf
Scripts/developer_scripts/create_cgal_test -text

View File

@ -1393,9 +1393,9 @@ public:
template < typename L1>
result_type
operator()(const L1& l1, int i) const
operator()(const L1& l1, int) const
{
return result_type(&l1,i);
return result_type(&l1,2);
}
};
@ -1422,9 +1422,9 @@ public:
template < typename L1>
result_type
operator()(const L1& l1, int i) const
operator()(const L1& l1, int) const
{
return result_type(&l1,i);
return result_type(&l1,3);
}
};

View File

@ -122,15 +122,15 @@ for the example output.
\end{ccTexOnly}
\begin{ccHtmlOnly}
<A NAME="PointGenerators">
<TABLE><TR><TD ALIGN=LEFT VALIGN=TOP WIDTH=60%>
Figure:
Output of example program for point generators.
</TD><TD ALIGN=LEFT VALIGN=TOP WIDTH=5% NOWRAP>
</TD><TD ALIGN=LEFT VALIGN=TOP WIDTH=35% NOWRAP>
<img src="./generators_prog1.png"
alt="Point Generator Example Output">
</TD></TR></TABLE>
<A NAME="PointGenerators">
<TABLE WIDTH=100%>
<TR ALIGN=CENTER>
<TD> <img src="./generators_prog1.png" alt="Point Generator Example Output"> </TD>
</TR>
<TR ALIGN=LEFT>
<TD> <B>Figure:</B> Output of example program for point generators. </TD>
</TR>
</TABLE>
\end{ccHtmlOnly}
\section{Example Generating Grid Points}
@ -145,16 +145,16 @@ for the example output.
\ccIncludeExampleCode{Generator/random_grid.cpp}
\begin{ccHtmlOnly}
<A NAME="IntegerPointGenerators">
<TABLE><TR><TD ALIGN=LEFT VALIGN=TOP WIDTH=60%>
Figure:
Output of example program for point generators working
on integer points.
</TD><TD ALIGN=LEFT VALIGN=TOP WIDTH=5% NOWRAP>
</TD><TD ALIGN=LEFT VALIGN=TOP WIDTH=35% NOWRAP>
<img src="./generators_prog2.png"
alt="Integer Point Generator Example Output">
</TD></TR></TABLE>
<A NAME="IntegerPointGenerators">
<TABLE WIDTH=100%>
<TR ALIGN=CENTER>
<TD> <img src="./generators_prog2.png" alt="Integer Point Generator Example Output"> </TD>
</TR>
<TR ALIGN=LEFT>
<TD> <B>Figure:</B> Output of example program for point generators working
on integer points. </TD>
</TR>
</TABLE>
\end{ccHtmlOnly}%
@ -200,15 +200,15 @@ output.
\ccIncludeExampleCode{Generator/random_segments1.cpp}
\begin{ccHtmlOnly}
<A NAME="SegmentGenerator">
<TABLE><TR><TD ALIGN=LEFT VALIGN=TOP WIDTH=60%>
Figure:
Output of example program for the generic segment generator.
</TD><TD ALIGN=LEFT VALIGN=TOP WIDTH=5% NOWRAP>
</TD><TD ALIGN=LEFT VALIGN=TOP WIDTH=35% NOWRAP>
<img src="./Segment_generator_prog1.png"
alt="Segment Generator Example Output">
</TD></TR></TABLE>
<A NAME="SegmentGenerator">
<TABLE WIDTH=100%>
<TR ALIGN=CENTER>
<TD> <img src="./Segment_generator_prog1.png" alt="Segment Generator Example Output"> </TD>
</TR>
<TR ALIGN=LEFT>
<TD> <B>Figure:</B> Output of example program for the generic segment generator. </TD>
</TR>
</TABLE>
\end{ccHtmlOnly}
The second example generates a regular structure of 100 segments; see
@ -225,16 +225,17 @@ used.
\ccIncludeExampleCode{Generator/random_segments2.cpp}
\begin{ccHtmlOnly}
<A NAME="SegmentGeneratorFan">
<TABLE><TR><TD ALIGN=LEFT VALIGN=TOP WIDTH=60%>
Figure:
<A NAME="SegmentGeneratorFan">
<TABLE WIDTH=100%>
<TR ALIGN=CENTER>
<TD> <img src="./Segment_generator_prog2.png" alt="Segment Generator Example Output 2"> </TD>
</TR>
<TR ALIGN=LEFT>
<TD> <B>Figure:</B>
Output of example program for the generic segment generator using
pre-computed point locations.
</TD><TD ALIGN=LEFT VALIGN=TOP WIDTH=5% NOWRAP>
</TD><TD ALIGN=LEFT VALIGN=TOP WIDTH=35% NOWRAP>
<img src="./Segment_generator_prog2.png"
alt="Segment Generator Example Output 2">
</TD></TR></TABLE>
pre-computed point locations. </TD>
</TR>
</TABLE>
\end{ccHtmlOnly}
\lcTex{\ccIndexSubitemEnd[c]{generator}{segment}}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@ -18,7 +18,7 @@
// Author(s) : Marc Glisse
//| If a compiler does not support static_assert (from C++0x)
//| CGAL_CFG_NO_STATIC_ASSERT is set.
//| CGAL_CFG_NO_CPP0X_STATIC_ASSERT is set.
int main(){
static_assert(true,"Everything is fine");

View File

@ -35,6 +35,7 @@
#undef CGAL_CFG_NO_CPP0X_ISFINITE
#undef CGAL_CFG_NO_CPP0X_LONG_LONG
#undef CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE
#undef CGAL_CFG_NO_CPP0X_STATIC_ASSERT
#undef CGAL_CFG_NO_CPP0X_TUPLE
#undef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES

View File

@ -458,6 +458,7 @@ type A & type B & \parbox{4 cm}{\vspace{1 mm}{return type}} \\
<TD><TABLE>
<TR><TD>Point_3</TD></TR>
<TR><TD>Segment_3</TD></TR>
<TR><TD>Triangle_3</TD></TR>
<TR><TD>std::vector &lt; Point_3 &gt; </TD></TR>
</TABLE></TD>
</TR>

View File

@ -164,7 +164,14 @@ Io_implicit_function_plugin::
load_function_plugins()
{
QDir pluginsDir(qApp->applicationDirPath());
if ( !pluginsDir.cd("implicit_functions") ) { return; }
QString dirname = pluginsDir.dirName();
if ( !pluginsDir.cd("implicit_functions") ) {
// In that case, dirname may be "Debug" or "Release" and one has to
// search in ../implicit_functions/Debug or
// ../implicit_functions/Release
QString newDir = QString("../implicit_functions/") + dirname;
if( !pluginsDir.cd(newDir) ) return;
}
Q_FOREACH (QString fileName, pluginsDir.entryList(QDir::Files))
{

View File

@ -112,6 +112,11 @@ public:
/// Removes facet \c facet from 2D complex
void remove_from_complex(const Facet& facet);
/// Removes facet(\c cell, \c i) from 2D complex
void remove_from_complex(const Cell_handle& c, const int i) {
remove_from_complex(Facet(c, i));
}
/// Sets surface index of facet \c facet to \c index
void set_surface_patch_index(const Facet& f, const Surface_patch_index& index)
{
@ -294,19 +299,20 @@ private:
class Facet_iterator_not_in_complex
{
const Self& c3t3_;
const Surface_patch_index index_;
const Self* c3t3_;
Surface_patch_index index_; //need by SWIG: should be const Surface_patch_index
public:
Facet_iterator_not_in_complex(){} //need by SWIG
Facet_iterator_not_in_complex(const Self& c3t3,
const Surface_patch_index& index = Surface_patch_index())
: c3t3_(c3t3)
: c3t3_(&c3t3)
, index_(index) { }
template <typename Iterator>
bool operator()(Iterator it) const
{
if ( index_ == Surface_patch_index() ) { return ! c3t3_.is_in_complex(*it); }
else { return c3t3_.surface_patch_index(*it) != index_; }
if ( index_ == Surface_patch_index() ) { return ! c3t3_->is_in_complex(*it); }
else { return c3t3_->surface_patch_index(*it) != index_; }
}
};
@ -317,8 +323,9 @@ private:
class Cell_not_in_complex
{
const Self* r_self_;
Subdomain_index index_;
Subdomain_index index_;//needed by SWIG, should be const Subdomain_index
public:
Cell_not_in_complex(){}//needed by SWIG
Cell_not_in_complex(const Self& self,
const Subdomain_index& index = Subdomain_index())
: r_self_(&self)
@ -388,7 +395,7 @@ public:
Self operator++(int) { Self tmp(*this); ++(*this); return tmp; }
Self operator--(int) { Self tmp(*this); --(*this); return tmp; }
operator Cell_handle() { return Cell_handle(this->base()); }
operator Cell_handle() const { return Cell_handle(this->base()); }
}; // end class Cells_in_complex_iterator
@ -423,7 +430,7 @@ public:
typedef Surface_patch_index Surface_index;
void set_surface_index(const Facet& f, const Surface_index& index)
{ set_surface_patch_index(f.first, index); }
{ set_surface_patch_index(f, index); }
void set_surface_index(const Cell_handle& c, const int i, const Surface_index& index)
{ set_surface_patch_index(c,i,index); }

View File

@ -301,11 +301,19 @@ struct Tester
c3t3.set_subdomain_index(ch, subdomain_index_bis);
c3t3.set_surface_patch_index(f2, surface_patch_index_bis);
#ifndef CGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX
c3t3.set_surface_index(f2, surface_patch_index_bis);
c3t3.set_surface_index(f2.first, f2.second, surface_patch_index_bis);
#endif
c3t3.set_dimension(vh, 1);
c3t3.set_index(vh, vertex_index);
assert(c3t3.subdomain_index(ch) == subdomain_index_bis);
assert(c3t3.surface_patch_index(f2) == surface_patch_index_bis);
#ifndef CGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX
assert(c3t3.surface_index(f2) == surface_patch_index_bis);
assert(c3t3.surface_index(f2.first, f2.second) == surface_patch_index_bis);
#endif
assert(c3t3.in_dimension(vh) == 1);
assert(c3t3.index(vh) == vertex_index);

View File

@ -15,7 +15,7 @@ typedef CGAL::Cartesian_base_d<CGAL::Gmpq,CGAL::Dimension_tag<2> > KE;
typedef K0 K2;
#elif 0
typedef CGAL::Cartesian_filter_NT<K0> K2;
#elif 0
#elif 1
typedef CGAL::Cartesian_filter_K<K0,KA,KE> K2;
#elif 1
struct K2: CGAL::Lazy_cartesian<KE,KA,CGAL::CartesianD_converter<KE,KA>,K2>{};

View File

@ -136,12 +136,10 @@ compute_average_spacing(
// precondition: at least 2 nearest neighbors
CGAL_point_set_processing_precondition(k >= 2);
InputIterator it;
// Instanciate a KD-tree search.
// Note: We have to convert each input iterator to Point_3.
std::vector<Point> kd_tree_points;
for(it = first; it != beyond; it++)
for(InputIterator it = first; it != beyond; it++)
{
Point point = get(point_pmap, it);
kd_tree_points.push_back(point);
@ -152,7 +150,7 @@ compute_average_spacing(
// vectors (already normalized)
FT sum_spacings = (FT)0.0;
unsigned int nb_points = 0;
for(it = first; it != beyond; it++)
for(InputIterator it = first; it != beyond; it++)
{
sum_spacings += internal::compute_average_spacing<Kernel,Tree>(get(point_pmap,it),tree,k);
nb_points++;

View File

@ -41,13 +41,18 @@ template <class T,class U> struct is_iterator_type_<T,U,true> :
//boost::is_base_of<U,typename std::iterator_traits<T>::iterator_category>
boost::is_convertible<typename std::iterator_traits<T>::iterator_category,U>
{};
template <class T> struct decay_array { typedef T type; };
template <class T> struct decay_array<T[]> { typedef T* type; };
template <class T,int d> struct decay_array<T[d]> { typedef T* type; };
}
// NOTE: we don't want the real std::decay or functions are included
template <class T> struct is_iterator :
internal::is_iterator_<typename boost::decay<T>::type> {};
internal::is_iterator_<typename internal::decay_array<typename boost::remove_cv<typename boost::remove_reference<T>::type>::type>::type> {};
template <class T,class Tag> struct is_iterator_type :
internal::is_iterator_type_<typename boost::decay<T>::type,Tag> {};
internal::is_iterator_type_<typename internal::decay_array<typename boost::remove_cv<typename boost::remove_reference<T>::type>::type>::type,Tag> {};
}

View File

@ -0,0 +1,85 @@
#!/bin/bash
#
# usage: bash clean_up_branch.sh directory [rm]
#
# lists all files that should be removed from a branch.
# directory is the path to the repository.
# If additional rm option is passed, files will be deleted.
#
REPO_DIR=.
DELETE=0
if [ $# -gt 0 ] ; then
REPO_DIR=$1
fi
if [ ! -e $REPO_DIR/.svn/entries ]; then
echo "$REPO_DIR is not a working copy"
exit 1
fi;
if [ $# -gt 1 ]; then
if [ "$2" == "rm" ]; then
DELETE=1
else
echo "Unknown option $2"
exit 1
fi
fi;
echo Cleaning $REPO_DIR
#define regular expression to match generated files
REGEXP='ProgramOutput\.|CMakeFiles|CMakeLists.txt|\.moc$|CMakeCache\.txt|error\.txt|cmake_install\.cmake|Makefile|doc_html|doc_pdf|\.pdflg$|\.ilg$|\.cgallog$|\.blg$|\.bak$|\.hax$|\.aux$|\.maf$|\.hlg$|\.out$|demo.*\/qrc_.*\.cxx|demo.*\/ui_.*\.h'
INITIAL=`svn status --no-ignore $1| awk '{if ($1 =="?" || $1=="I" ) print $2 }'`
#first get executable files
EXECS=''
DIRS=''
KNOWN=''
OTHER=''
for i in $INITIAL; do
if [ -x $REPO_DIR/$i -a ! -d $REPO_DIR/$i ]; then
EXECS="$EXECS $i"
elif [[ "$i" =~ $REGEXP ]]; then
KNOWN="$KNOWN $i"
else
OTHER="$OTHER $i"
fi;
done
if [ "$EXECS" ]; then
echo "#Cleaning executables"
echo rm -rf $EXECS
fi
if [ "$KNOWN" ]; then
echo "#Cleaning known generated files"
echo rm -rf $KNOWN
fi
if [ "$OTHER" ]; then
echo "#No predefined behavior"
echo "# $OTHER"
fi
if [ $DELETE -eq 1 ]; then
if [ "$EXECS" -o "$KNOWN" ]; then
echo "Are you sure you want to execute the printed commands? [YES/NO]"
read ANSWER
if [ "$ANSWER" == "YES" ]; then
for i in $EXECS $KNOWN; do
rm -rf $REPO_DIR/$i
done
fi
else
echo "Nothing to do"
fi
fi

View File

@ -4,8 +4,8 @@
% | 07.09.2007 Pierre Alliez, Laurent Saboret, Gael Guennebaud
% | Package: Surface_reconstruction_points_3
% |
\RCSdef{\RCSPoissonreconstructionfunctionRev}{$Id$}
\RCSdefDate{\RCSPoissonreconstructionfunctionDate}{$Date$}
%\RCSdef{\RCSPoissonreconstructionfunctionRev}{$Id$}
%\RCSdefDate{\RCSPoissonreconstructionfunctionDate}{$Date$}
% |
\ccRefPageBegin
%%RefPage: end of header, begin of main body
@ -143,7 +143,9 @@ The function \ccc{compute_implicit_function}() must be called after the insertio
\ccGlue
\ccMethod{FT operator()(const Point& p) const;}
{
\ccc{ImplicitFunction} interface: evaluates the implicit function at a given 3D query point.
\ccc{ImplicitFunction} interface: evaluates the implicit function at a
given 3D query point. The function \ccc{compute_implicit_function} must be
called before the first call to \ccc{operator()}.
}
\ccGlue
\ccMethod{Point get_inner_point() const;}
@ -156,7 +158,7 @@ Returns a point located inside the inferred surface.
\ccExample
See \ccc{poisson_reconstruction_example.cpp}.
See \ccReferToExampleCode{Surface_reconstruction_points_3/poisson_reconstruction_example.cpp}.
\end{ccRefClass}

View File

@ -841,7 +841,11 @@ In 2009, Sylvain Pion simplified the design of the Delaunay hierarchy
so that it became the simple \ccc{Fast_location} policy in release~3.6.
In 2010, Pedro de Castro and Olivier Devillers added the point
displacement.
displacement in release 3.7.
In 2011, Pedro de Castro and Olivier Devillers implemented in release
3.8 the
structural filtering method, improving the efficiency of point location.
A new demo of this package was introduced in CGAL 3.8, coded by Fei
(Sophie) Che, who was co-mentored by Manuel Caroli and Monique