mirror of https://github.com/CGAL/cgal
after Mael's review
This commit is contained in:
parent
89ba13f977
commit
36b66946b8
|
|
@ -161,7 +161,6 @@ bool read_PLY(std::istream& is,
|
|||
}
|
||||
|
||||
|
||||
|
||||
/*!
|
||||
\ingroup PkgBGLIoFuncsPLY
|
||||
|
||||
|
|
@ -333,10 +332,6 @@ bool read_PLY(const std::string& fname,
|
|||
\cgalParamNEnd
|
||||
\cgalNamedParamsEnd
|
||||
|
||||
\note The point and vector types of the point and normal property map must be `double`or `float`
|
||||
in order to respect the specification of the PLY file format.
|
||||
A `Cartesian_converter_property_map` can be used to convert the points and vectors on the fly.
|
||||
|
||||
\returns `true` if writing was successful, `false` otherwise.
|
||||
*/
|
||||
template <typename Graph, typename CGAL_NP_TEMPLATE_PARAMETERS>
|
||||
|
|
@ -456,13 +451,13 @@ bool write_PLY(std::ostream& os,
|
|||
const Point_3& p = get(vpm, vd);
|
||||
internal::output_properties(os, &p, make_ply_point_writer (Identity_property_map<Point_3>()));
|
||||
if constexpr (!parameters::is_default_parameter<CGAL_NP_CLASS, internal_np::vertex_normal_map_t>::value)
|
||||
{
|
||||
auto vnm = get_parameter(np, internal_np::vertex_normal_map);
|
||||
typedef decltype(vnm) Normal_map;
|
||||
typedef typename Normal_map::value_type Vector_3;
|
||||
Vector_3 vec = get(vnm,vd);
|
||||
internal::output_properties(os, &vec, make_ply_normal_writer (Identity_property_map<Vector_3>()));
|
||||
}
|
||||
{
|
||||
auto vnm = get_parameter(np, internal_np::vertex_normal_map);
|
||||
typedef decltype(vnm) Normal_map;
|
||||
typedef typename Normal_map::value_type Vector_3;
|
||||
Vector_3 vec = get(vnm,vd);
|
||||
internal::output_properties(os, &vec, make_ply_normal_writer (Identity_property_map<Vector_3>()));
|
||||
}
|
||||
if(has_vcolor)
|
||||
{
|
||||
const CGAL::IO::Color& c = get(vcm, vd);
|
||||
|
|
@ -576,10 +571,6 @@ bool write_PLY(std::ostream& os, const Graph& g, const CGAL_NP_CLASS& np = param
|
|||
\cgalParamNEnd
|
||||
\cgalNamedParamsEnd
|
||||
|
||||
\note The point and vector types of the point and normal property map must be `double`or `float`
|
||||
in order to respect the specification of the PLY file format.
|
||||
A `Cartesian_converter_property_map` can be used to convert the points and vectors on the fly.
|
||||
|
||||
\returns `true` if writing was successful, `false` otherwise.
|
||||
*/
|
||||
template <typename Graph, typename CGAL_NP_TEMPLATE_PARAMETERS>
|
||||
|
|
|
|||
|
|
@ -475,15 +475,15 @@ bool fill_simplex_specific_header(std::ostream& os,
|
|||
if constexpr (std::is_same<FloatDouble, float>::value)
|
||||
{
|
||||
os << "property float nx" << std::endl
|
||||
<< "property float ny" << std::endl
|
||||
<< "property float nz" << std::endl;
|
||||
<< "property float ny" << std::endl
|
||||
<< "property float nz" << std::endl;
|
||||
printers.push_back(new Property_printer<VIndex, Normal_map>(vnm));
|
||||
}
|
||||
else
|
||||
{
|
||||
os << "property double nx" << std::endl
|
||||
<< "property double ny" << std::endl
|
||||
<< "property double nz" << std::endl;
|
||||
<< "property double ny" << std::endl
|
||||
<< "property double nz" << std::endl;
|
||||
auto fvnm = CGAL::make_cartesian_converter_property_map<Epick::Vector_3>(vnm);
|
||||
printers.push_back(new Property_printer<VIndex, decltype(fvnm)>(fvnm));
|
||||
}
|
||||
|
|
@ -989,7 +989,6 @@ namespace IO {
|
|||
///
|
||||
/// \returns `true` if writing was successful, `false` otherwise.
|
||||
|
||||
|
||||
template <typename P,
|
||||
typename CGAL_NP_TEMPLATE_PARAMETERS>
|
||||
bool write_PLY(std::ostream& os,
|
||||
|
|
@ -1002,6 +1001,7 @@ bool write_PLY(std::ostream& os,
|
|||
typedef typename SMesh::Face_index FIndex;
|
||||
typedef typename SMesh::Edge_index EIndex;
|
||||
typedef typename SMesh::Halfedge_index HIndex;
|
||||
|
||||
if(!os.good())
|
||||
return false;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue