mirror of https://github.com/CGAL/cgal
un-doc the NP versions of the soup functions
This commit is contained in:
parent
841f7a2016
commit
45d6bd05c9
|
|
@ -290,7 +290,7 @@ bool test_soup_vtp(bool binary = false)
|
|||
#endif
|
||||
|
||||
template<class FaceGraph>
|
||||
bool test_gocad()
|
||||
bool test_bgl_gocad()
|
||||
{
|
||||
FaceGraph fg;
|
||||
CGAL::make_tetrahedron(Point(0, 0, 0), Point(1, 1, 0),
|
||||
|
|
@ -333,6 +333,55 @@ bool test_gocad()
|
|||
|
||||
return true;
|
||||
}
|
||||
template<class FaceGraph>
|
||||
bool test_bgl_gocad_with_np()
|
||||
{
|
||||
|
||||
typedef typename boost::property_map<FaceGraph,CGAL::vertex_point_t>::type VertexPointMap;
|
||||
FaceGraph fg;
|
||||
CGAL::make_tetrahedron(Point(0, 0, 0), Point(1, 1, 0),
|
||||
Point(2, 0, 1), Point(3, 0, 0), fg);
|
||||
VertexPointMap vpm = get(CGAL::vertex_point, fg);
|
||||
|
||||
std::ostringstream out;
|
||||
CGAL::write_GOCAD(out, "tetrahedron", fg, CGAL::parameters::vertex_point_map(vpm));
|
||||
if(out.fail())
|
||||
{
|
||||
std::cerr<<"Tetrahedron writing failed."<<std::endl;
|
||||
return false;
|
||||
}
|
||||
FaceGraph fg2;
|
||||
VertexPointMap vpm2 = get(CGAL::vertex_point, fg2);
|
||||
std::istringstream in( out.str());
|
||||
std::pair<std::string, std::string> cnn;
|
||||
CGAL::read_GOCAD(in, cnn, fg2, CGAL::parameters::vertex_point_map(vpm2));
|
||||
if(cnn.first != "tetrahedron"){
|
||||
std::cerr<<"reading error: tetrahedron != "<<cnn.first<<std::endl;
|
||||
return 1;
|
||||
}
|
||||
if( !cnn.second.empty()){
|
||||
std::cerr<<"reading error: there should be no color."<<std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if(in.fail()){
|
||||
std::cerr<<"Tetrahedron reading failed."<<std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
if(num_vertices(fg2) != 4){
|
||||
std::cerr<<"Wrong number of vertices: 4 != "<<num_vertices(fg2)<<std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
if(num_faces(fg2) != 4)
|
||||
{
|
||||
std::cerr<<"Wrong number of faces: 4 != "<<num_faces(fg2)<<std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool test_soup_gocad()
|
||||
{
|
||||
|
|
@ -385,7 +434,7 @@ bool test_soup_gocad()
|
|||
}
|
||||
|
||||
template<class FaceGraph>
|
||||
bool test_STL()
|
||||
bool test_bgl_stl()
|
||||
{
|
||||
FaceGraph fg;
|
||||
CGAL::make_tetrahedron(Point(0, 0, 0), Point(1, 1, 0),
|
||||
|
|
@ -418,7 +467,6 @@ bool test_STL()
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
template<class FaceGraph>
|
||||
bool test_bgl_PLY(bool binary = false)
|
||||
{
|
||||
|
|
@ -522,7 +570,6 @@ bool test_bgl_PLY_with_np(bool binary)
|
|||
int main(int argc, char** argv)
|
||||
{
|
||||
const char* filename=(argc>1) ? argv[1] : "data/prim.off";
|
||||
/*
|
||||
// OFF
|
||||
test_bgl_OFF<Polyhedron>(filename);
|
||||
test_bgl_OFF<SM>(filename);
|
||||
|
|
@ -575,23 +622,29 @@ int main(int argc, char** argv)
|
|||
if(!test_bgl_PLY_with_np<SM>(true))
|
||||
return 1;
|
||||
|
||||
*/
|
||||
|
||||
// GOCAD
|
||||
if(!test_gocad<Polyhedron>())
|
||||
if(!test_bgl_gocad<Polyhedron>())
|
||||
return 1;
|
||||
if(!test_gocad<SM>())
|
||||
if(!test_bgl_gocad<SM>())
|
||||
return 1;
|
||||
if(!test_gocad<LCC>())
|
||||
if(!test_bgl_gocad<LCC>())
|
||||
return 1;
|
||||
if(!test_bgl_gocad_with_np<Polyhedron>())
|
||||
return 1;
|
||||
if(!test_bgl_gocad_with_np<SM>())
|
||||
return 1;
|
||||
if(!test_bgl_gocad_with_np<LCC>())
|
||||
return 1;
|
||||
if(!test_soup_gocad())
|
||||
return 1;
|
||||
/*
|
||||
|
||||
// STL
|
||||
if(!test_STL<Polyhedron>())
|
||||
if(!test_bgl_stl<Polyhedron>())
|
||||
return 1;
|
||||
if(!test_STL<SM>())
|
||||
if(!test_bgl_stl<SM>())
|
||||
return 1;
|
||||
if(!test_STL<LCC>())
|
||||
if(!test_bgl_stl<LCC>())
|
||||
return 1;
|
||||
|
||||
// VTP
|
||||
|
|
@ -614,6 +667,6 @@ int main(int argc, char** argv)
|
|||
if(!test_soup_vtp(true))
|
||||
return 1;
|
||||
#endif
|
||||
*/
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -102,13 +102,7 @@ bool read_GOCAD(std::istream& input,
|
|||
|
||||
return !input.fail();
|
||||
}
|
||||
/*!
|
||||
* \ingroup IOstreamFunctions
|
||||
*
|
||||
* reads the content of `is` into `points` and `polygons`, in the GOCAD format.
|
||||
*
|
||||
* \see \ref IOStreamGocad
|
||||
*/
|
||||
|
||||
template <typename PointRange, typename PolygonRange, typename NamedParameters>
|
||||
bool read_GOCAD(std::istream& is,
|
||||
PointRange& points,
|
||||
|
|
@ -119,13 +113,7 @@ bool read_GOCAD(std::istream& is,
|
|||
return read_GOCAD(is, dummy, points, polygons, np);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \ingroup IOstreamFunctions
|
||||
*
|
||||
* reads the content of the file `fname` into `points` and `polygons`, in the GOCAD format.
|
||||
*
|
||||
* \see \ref IOStreamGocad
|
||||
*/
|
||||
|
||||
template <typename PointRange, typename PolygonRange, typename NamedParameters>
|
||||
bool read_GOCAD(const char* fname,
|
||||
PointRange& points,
|
||||
|
|
@ -137,8 +125,21 @@ bool read_GOCAD(const char* fname,
|
|||
return read_GOCAD(in, dummy, points, polygons, np);
|
||||
}
|
||||
|
||||
|
||||
|
||||
template <typename PointRange, typename PolygonRange, typename NamedParameters>
|
||||
bool read_GOCAD(const std::string& fname,
|
||||
PointRange& points,
|
||||
PolygonRange& polygons,
|
||||
const NamedParameters& np)
|
||||
{
|
||||
return read_GOCAD(fname.c_str(), points, polygons, np);
|
||||
}
|
||||
/*!
|
||||
* \ingroup IOstreamFunctions
|
||||
*
|
||||
* reads the content of `is` into `points` and `polygons`, in the GOCAD format.
|
||||
*
|
||||
* \see \ref IOStreamGocad
|
||||
*/
|
||||
template <typename PointRange, typename PolygonRange>
|
||||
bool read_GOCAD(std::istream& is, PointRange& points, PolygonRange& polygons)
|
||||
{
|
||||
|
|
@ -146,12 +147,24 @@ bool read_GOCAD(std::istream& is, PointRange& points, PolygonRange& polygons)
|
|||
return read_GOCAD(is, dummy, points, polygons, parameters::all_default());
|
||||
}
|
||||
|
||||
/*!
|
||||
* \ingroup IOstreamFunctions
|
||||
*
|
||||
* reads the content of the file `fname` into `points` and `polygons`, in the GOCAD format.
|
||||
*
|
||||
* \see \ref IOStreamGocad
|
||||
*/
|
||||
template <typename PointRange, typename PolygonRange>
|
||||
bool read_GOCAD(const char* fname, PointRange& points, PolygonRange& polygons)
|
||||
{
|
||||
return read_GOCAD(fname, points, polygons, parameters::all_default());
|
||||
}
|
||||
|
||||
template <typename PointRange, typename PolygonRange>
|
||||
bool read_GOCAD(const std::string& fname, PointRange& points, PolygonRange& polygons)
|
||||
{
|
||||
return read_GOCAD(fname, points, polygons, parameters::all_default());
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
@ -208,13 +221,7 @@ bool write_GOCAD(std::ostream& os,
|
|||
}
|
||||
} //end internal
|
||||
}//end IO
|
||||
/*!
|
||||
\ingroup IOstreamFunctions
|
||||
|
||||
* writes the content of `points` and `polygons` in `out`, in the TS format.
|
||||
|
||||
\see \ref IOStreamGocad
|
||||
*/
|
||||
template <typename PointRange,
|
||||
typename PolygonRange,
|
||||
typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
||||
|
|
@ -226,7 +233,13 @@ bool write_GOCAD(std::ostream& os,
|
|||
return IO::internal::write_GOCAD(os, "anonymous", points, polygons, np);
|
||||
|
||||
}
|
||||
/*!
|
||||
\ingroup IOstreamFunctions
|
||||
|
||||
* writes the content of `points` and `polygons` in `out`, in the TS format.
|
||||
|
||||
\see \ref IOStreamGocad
|
||||
*/
|
||||
template <typename PointRange,
|
||||
typename PolygonRange>
|
||||
bool write_GOCAD(std::ostream& os,
|
||||
|
|
@ -237,13 +250,6 @@ bool write_GOCAD(std::ostream& os,
|
|||
|
||||
}
|
||||
|
||||
/*!
|
||||
\ingroup IOstreamFunctions
|
||||
|
||||
* writes the content of `points` and `polygons` in a file named `fname`, in the TS format.
|
||||
|
||||
\see \ref IOStreamGocad
|
||||
*/
|
||||
template <typename PointRange,
|
||||
typename PolygonRange,
|
||||
typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
||||
|
|
@ -256,6 +262,14 @@ bool write_GOCAD(const char* fname,
|
|||
return IO::internal::write_GOCAD(os, fname, points, polygons, np);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
\ingroup IOstreamFunctions
|
||||
|
||||
* writes the content of `points` and `polygons` in a file named `fname`, in the TS format.
|
||||
|
||||
\see \ref IOStreamGocad
|
||||
*/
|
||||
template <typename PointRange,
|
||||
typename PolygonRange>
|
||||
bool write_GOCAD(const char* fname,
|
||||
|
|
|
|||
|
|
@ -114,14 +114,7 @@ bool read_OBJ(std::istream& is,
|
|||
} // namespace internal
|
||||
} // namespace IO
|
||||
|
||||
//! \ingroup IOstreamFunctions
|
||||
//!
|
||||
/// reads the content of `is` into `points` and `faces`, using the `OBJ` format.
|
||||
///
|
||||
/// \tparam PointRange a `RandomAccessContainer` of `Point_3,
|
||||
/// \tparam PolygonRange a `RandomAccessContainer` of `RandomAccessContainer` of `std::size_t`
|
||||
///
|
||||
/// \see \ref IOStreamOBJ
|
||||
|
||||
template <typename PointRange, typename PolygonRange, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
||||
bool read_OBJ(std::istream& is,
|
||||
PointRange& points,
|
||||
|
|
@ -136,14 +129,6 @@ bool read_OBJ(std::istream& is,
|
|||
CGAL::Emptyset_iterator()));
|
||||
}
|
||||
|
||||
//! \ingroup IOstreamFunctions
|
||||
//!
|
||||
/// reads the content of the file `fname` into `points` and `faces`, using the `OBJ` format.
|
||||
///
|
||||
/// \tparam PointRange a `RandomAccessContainer` of `Point_3,
|
||||
/// \tparam PolygonRange a `RandomAccessContainer` of `RandomAccessContainer` of `std::size_t`
|
||||
///
|
||||
/// \see \ref IOStreamOBJ
|
||||
template <typename PointRange, typename PolygonRange, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
||||
bool read_OBJ(const char* fname,
|
||||
PointRange& points,
|
||||
|
|
@ -160,12 +145,28 @@ bool read_OBJ(const std::string& fname, PointRange& points, PolygonRange& polygo
|
|||
return read_OBJ(fname.c_str(), points, polygons, np);
|
||||
}
|
||||
|
||||
//! \ingroup IOstreamFunctions
|
||||
//!
|
||||
/// reads the content of `is` into `points` and `faces`, using the `OBJ` format.
|
||||
///
|
||||
/// \tparam PointRange a `RandomAccessContainer` of `Point_3,
|
||||
/// \tparam PolygonRange a `RandomAccessContainer` of `RandomAccessContainer` of `std::size_t`
|
||||
///
|
||||
/// \see \ref IOStreamOBJ
|
||||
template <typename PointRange, typename PolygonRange>
|
||||
bool read_OBJ(std::istream& is, PointRange& points, PolygonRange& polygons)
|
||||
{
|
||||
return read_OBJ(is, points, polygons, parameters::all_default());
|
||||
}
|
||||
|
||||
//! \ingroup IOstreamFunctions
|
||||
//!
|
||||
/// reads the content of the file `fname` into `points` and `faces`, using the `OBJ` format.
|
||||
///
|
||||
/// \tparam PointRange a `RandomAccessContainer` of `Point_3,
|
||||
/// \tparam PolygonRange a `RandomAccessContainer` of `RandomAccessContainer` of `std::size_t`
|
||||
///
|
||||
/// \see \ref IOStreamOBJ
|
||||
template <typename PointRange, typename PolygonRange>
|
||||
bool read_OBJ(const char* fname, PointRange& points, PolygonRange& polygons)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -224,24 +224,6 @@ bool read_PLY(std::istream& is,
|
|||
}
|
||||
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup IOstreamFunctions
|
||||
*
|
||||
* reads the content of `is` into `points` and `polygons`, in the PLY format.
|
||||
*
|
||||
* `PointRange` is a model of the concepts `RandomAccessContainer`
|
||||
* and `BackInsertionSequence` whose `value type` is a `CGAL::Point_3`.
|
||||
*
|
||||
* `PolygonRange` is a model of the concepts `RandomAccessContainer`
|
||||
* and `BackInsertionSequence` whose `value type` is `std::size_t`.
|
||||
*
|
||||
\cgalNamedParamsBegin
|
||||
\cgalParamBegin{face_color_map} the property map with the colors associated to the faces of `g`.\cgalParamEnd
|
||||
\cgalParamBegin{vertex_color_map} the property map with the colors associated to the vertices of `g`.\cgalParamEnd
|
||||
\cgalNamedParamsEnd
|
||||
* \see \ref IOStreamPLY
|
||||
*/
|
||||
template <typename PointRange, typename PolygonRange, typename NamedParameters>
|
||||
bool read_PLY(std::istream& is,
|
||||
PointRange& points,
|
||||
|
|
@ -262,6 +244,21 @@ bool read_PLY(std::istream& is,
|
|||
std::back_inserter(dummy_pf));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup IOstreamFunctions
|
||||
*
|
||||
* reads the content of `is` into `points` and `polygons`, in the PLY format.
|
||||
*
|
||||
* `PointRange` is a model of the concepts `RandomAccessContainer`
|
||||
* and `BackInsertionSequence` whose `value type` is a `CGAL::Point_3`.
|
||||
*
|
||||
* `PolygonRange` is a model of the concepts `RandomAccessContainer`
|
||||
* and `BackInsertionSequence` whose `value type` is `std::size_t`.
|
||||
*
|
||||
* \see \ref IOStreamPLY
|
||||
*/
|
||||
template <class PointRange, class PolygonRange>
|
||||
bool
|
||||
read_PLY(std::istream& is,
|
||||
|
|
@ -352,6 +349,16 @@ read_PLY(std::istream& is,
|
|||
return !is.fail();
|
||||
}
|
||||
|
||||
template <typename PointRange, typename PolygonRange, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
||||
bool read_PLY(const char* fname,
|
||||
PointRange& points,
|
||||
PolygonRange& polygons,
|
||||
const CGAL_BGL_NP_CLASS& np)
|
||||
{
|
||||
std::ofstream os(fname);
|
||||
return read_PLY(os, points, polygons, np);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \ingroup IOstreamFunctions
|
||||
*
|
||||
|
|
@ -363,23 +370,8 @@ read_PLY(std::istream& is,
|
|||
* `PolygonRange` is a model of the concepts `RandomAccessContainer`
|
||||
* and `BackInsertionSequence` whose `value type` is `std::size_t`.
|
||||
|
||||
\cgalNamedParamsBegin
|
||||
\cgalParamBegin{face_color_map} the property map with the colors associated to the faces of `g`.\cgalParamEnd
|
||||
\cgalParamBegin{vertex_color_map} the property map with the colors associated to the vertices of `g`.\cgalParamEnd
|
||||
\cgalNamedParamsEnd
|
||||
|
||||
* \see \ref IOStreamPLY
|
||||
*/
|
||||
template <typename PointRange, typename PolygonRange, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
||||
bool read_PLY(const char* fname,
|
||||
PointRange& points,
|
||||
PolygonRange& polygons,
|
||||
const CGAL_BGL_NP_CLASS& np)
|
||||
{
|
||||
std::ofstream os(fname);
|
||||
return read_PLY(os, points, polygons, np);
|
||||
}
|
||||
|
||||
template <typename PointRange, typename PolygonRange>
|
||||
bool read_PLY(const char* fname,
|
||||
PointRange& points,
|
||||
|
|
@ -409,18 +401,6 @@ bool read_PLY(const std::string fname,
|
|||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// Write
|
||||
|
||||
/*!
|
||||
* \ingroup IOstreamFunctions
|
||||
*
|
||||
* writes the content of `points` and `polygons` in `out`, in the PLY format.
|
||||
*
|
||||
* `PointRange` is a model of the concepts `RandomAccessContainer`
|
||||
* and `BackInsertionSequence` whose `value type` is a `CGAL::Point_3`.
|
||||
*
|
||||
* `PolygonRange` is a model of the concepts `RandomAccessContainer`
|
||||
* and `BackInsertionSequence` whose `value type` is `std::size_t`.
|
||||
* \see \ref IOStreamPLY
|
||||
*/
|
||||
template <class PointRange, class PolygonRange, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS >
|
||||
bool write_PLY(std::ostream& out,
|
||||
const PointRange& points,
|
||||
|
|
@ -472,6 +452,18 @@ bool write_PLY(std::ostream& out,
|
|||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup IOstreamFunctions
|
||||
*
|
||||
* writes the content of `points` and `polygons` in `out`, in the PLY format.
|
||||
*
|
||||
* `PointRange` is a model of the concepts `RandomAccessContainer`
|
||||
* and `BackInsertionSequence` whose `value type` is a `CGAL::Point_3`.
|
||||
*
|
||||
* `PolygonRange` is a model of the concepts `RandomAccessContainer`
|
||||
* and `BackInsertionSequence` whose `value type` is `std::size_t`.
|
||||
* \see \ref IOStreamPLY
|
||||
*/
|
||||
template <class PointRange, class PolygonRange>
|
||||
bool write_PLY(std::ostream& out,
|
||||
const PointRange& points,
|
||||
|
|
@ -489,6 +481,17 @@ bool write_PLY(std::ostream& out,
|
|||
return write_PLY(out, points, polygons, parameters::all_default());
|
||||
}
|
||||
|
||||
template <class PointRange, class PolygonRange, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS >
|
||||
bool write_PLY(const char* fname,
|
||||
const PointRange& points,
|
||||
const PolygonRange& polygons,
|
||||
const CGAL_BGL_NP_CLASS& np)
|
||||
{
|
||||
std::ofstream os(fname);
|
||||
return write_PLY(os, points, polygons, np);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup IOstreamFunctions
|
||||
*
|
||||
|
|
@ -501,16 +504,6 @@ bool write_PLY(std::ostream& out,
|
|||
* and `BackInsertionSequence` whose `value type` is `std::size_t`.
|
||||
* \see \ref IOStreamPLY
|
||||
*/
|
||||
template <class PointRange, class PolygonRange, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS >
|
||||
bool write_PLY(const char* fname,
|
||||
const PointRange& points,
|
||||
const PolygonRange& polygons,
|
||||
const CGAL_BGL_NP_CLASS& np)
|
||||
{
|
||||
std::ofstream os(fname);
|
||||
return write_PLY(os, points, polygons, np);
|
||||
}
|
||||
|
||||
template <class PointRange, class PolygonRange>
|
||||
bool write_PLY(const char* fname,
|
||||
const PointRange& points,
|
||||
|
|
|
|||
|
|
@ -30,13 +30,6 @@ namespace CGAL {
|
|||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// Read
|
||||
|
||||
/*!
|
||||
* \ingroup IOstreamFunctions
|
||||
*
|
||||
* reads the content of `is` into `points` and `facets`, in the STL format.
|
||||
*
|
||||
* \see \ref IOStreamSTL
|
||||
*/
|
||||
template <typename PointRange, typename TriangleRange, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
||||
bool read_STL(std::istream& is,
|
||||
PointRange& points,
|
||||
|
|
@ -120,13 +113,6 @@ bool read_STL(std::istream& is,
|
|||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
* \ingroup IOstreamFunctions
|
||||
*
|
||||
* reads the content of a file named `fname` into `points` and `facets`, in the STL format.
|
||||
*
|
||||
* \see \ref IOStreamSTL
|
||||
*/
|
||||
template <typename PointRange, typename TriangleRange, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
||||
bool read_STL(const char* fname,
|
||||
PointRange& points,
|
||||
|
|
@ -143,12 +129,26 @@ bool read_STL(const std::string& fname, PointRange& points, TriangleRange& facet
|
|||
return read_STL(fname.c_str(), points, facets, np);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \ingroup IOstreamFunctions
|
||||
*
|
||||
* reads the content of `is` into `points` and `facets`, in the STL format.
|
||||
*
|
||||
* \see \ref IOStreamSTL
|
||||
*/
|
||||
template <typename PointRange, typename TriangleRange>
|
||||
bool read_STL(std::istream& is, PointRange& points, TriangleRange& facets)
|
||||
{
|
||||
return read_STL(is, points, facets, parameters::all_default());
|
||||
}
|
||||
|
||||
/*!
|
||||
* \ingroup IOstreamFunctions
|
||||
*
|
||||
* reads the content of a file named `fname` into `points` and `facets`, in the STL format.
|
||||
*
|
||||
* \see \ref IOStreamSTL
|
||||
*/
|
||||
template <typename PointRange, typename TriangleRange>
|
||||
bool read_STL(const char* fname, PointRange& points, TriangleRange& facets)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -87,13 +87,6 @@ bool vtkPointSet_to_polygon_soup(vtkPointSet* poly_data,
|
|||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// Read
|
||||
/*!
|
||||
* \ingroup IOstreamFunctions
|
||||
*
|
||||
* reads the content of `is` into `points` and `polygons`, in the VTPformat.
|
||||
*
|
||||
* \see \ref IOStreamVTK
|
||||
*/
|
||||
template <typename PointRange, typename PolygonRange, typename NamedParameters>
|
||||
bool read_VTP(const char* fname,
|
||||
PointRange& points,
|
||||
|
|
@ -118,6 +111,13 @@ bool read_VTP(const std::string& fname,
|
|||
return read_VTP(fname.c_str(), points, polygons, np);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \ingroup IOstreamFunctions
|
||||
*
|
||||
* reads the content of `is` into `points` and `polygons`, in the VTPformat.
|
||||
*
|
||||
* \see \ref IOStreamVTK
|
||||
*/
|
||||
template <typename PointRange, typename PolygonRange>
|
||||
bool read_VTP(const char* fname,
|
||||
PointRange& points,
|
||||
|
|
@ -338,18 +338,7 @@ void write_soup_polys_points(std::ostream& os,
|
|||
}//end internal
|
||||
}//end IO
|
||||
|
||||
/*!
|
||||
* \ingroup IOstreamFunctions
|
||||
*
|
||||
* writes the content of `points` and `polygons` in `out`, in the VTP format.
|
||||
*
|
||||
* \cgalNamedParamsBegin
|
||||
* \cgalParamBegin{use_binary_mode} a Boolean indicating if the
|
||||
* data should be written in binary (`true`, the default) or in ASCII (`false`).
|
||||
* \cgalParamEnd
|
||||
* \cgalNamedParamsEnd
|
||||
* \see \ref IOStreamVTK
|
||||
*/
|
||||
|
||||
template <typename PointRange, typename PolygonRange, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
||||
bool write_VTP(std::ostream& os,
|
||||
const PointRange& points,
|
||||
|
|
@ -398,6 +387,18 @@ bool write_VTP(std::ostream& os,
|
|||
os << "</VTKFile>\n";
|
||||
}
|
||||
|
||||
/*!
|
||||
* \ingroup IOstreamFunctions
|
||||
*
|
||||
* writes the content of `points` and `polygons` in `out`, in the VTP format.
|
||||
*
|
||||
* \cgalNamedParamsBegin
|
||||
* \cgalParamBegin{use_binary_mode} a Boolean indicating if the
|
||||
* data should be written in binary (`true`, the default) or in ASCII (`false`).
|
||||
* \cgalParamEnd
|
||||
* \cgalNamedParamsEnd
|
||||
* \see \ref IOStreamVTK
|
||||
*/
|
||||
template <typename PointRange, typename PolygonRange>
|
||||
bool write_VTP(std::ostream& os,
|
||||
const PointRange& points,
|
||||
|
|
@ -406,6 +407,16 @@ bool write_VTP(std::ostream& os,
|
|||
return write_VTP(os, points, polygons, parameters::all_default());
|
||||
}
|
||||
|
||||
template <typename PointRange, typename PolygonRange, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
||||
bool write_VTP(const char* fname,
|
||||
const PointRange& points,
|
||||
const PolygonRange& polygons,
|
||||
const CGAL_BGL_NP_CLASS& np)
|
||||
{
|
||||
std::ofstream out(fname);
|
||||
return write_VTP(out, points, polygons, np);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \ingroup IOstreamFunctions
|
||||
*
|
||||
|
|
@ -418,16 +429,6 @@ bool write_VTP(std::ostream& os,
|
|||
* \cgalNamedParamsEnd
|
||||
* \see \ref IOStreamVTK
|
||||
*/
|
||||
template <typename PointRange, typename PolygonRange, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
||||
bool write_VTP(const char* fname,
|
||||
const PointRange& points,
|
||||
const PolygonRange& polygons,
|
||||
const CGAL_BGL_NP_CLASS& np)
|
||||
{
|
||||
std::ofstream out(fname);
|
||||
return write_VTP(out, points, polygons, np);
|
||||
}
|
||||
|
||||
template <typename PointRange, typename PolygonRange>
|
||||
bool write_VTP(const char* fname,
|
||||
const PointRange& points,
|
||||
|
|
|
|||
Loading…
Reference in New Issue