mirror of https://github.com/CGAL/cgal
Apply suggestions from code review
Co-authored-by: Mael <mael.rouxel.labbe@geometryfactory.com>
This commit is contained in:
parent
4acccc210b
commit
4c27d08372
|
|
@ -339,7 +339,7 @@ bool write_GOCAD(std::ostream& os,
|
||||||
* \cgalParamNBegin{point_map}
|
* \cgalParamNBegin{point_map}
|
||||||
* \cgalParamDescription{a property map associating points to the elements of the range `points`}
|
* \cgalParamDescription{a property map associating points to the elements of the range `points`}
|
||||||
* \cgalParamType{a model of `ReadablePropertyMap` whose key type is the value type
|
* \cgalParamType{a model of `ReadablePropertyMap` whose key type is the value type
|
||||||
* of the iterator of `PointRange` and value type is a model of the concept`Point_3`}
|
* of the iterator of `PointRange` and value type is a model of the concept `Kernel::Point_3`}
|
||||||
* \cgalParamDefault{`CGAL::Identity_property_map<std::iterator_traits<PointRange::iterator>::value_type>`}
|
* \cgalParamDefault{`CGAL::Identity_property_map<std::iterator_traits<PointRange::iterator>::value_type>`}
|
||||||
* \cgalParamNEnd
|
* \cgalParamNEnd
|
||||||
* \cgalParamNBegin{stream_precision}
|
* \cgalParamNBegin{stream_precision}
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ public:
|
||||||
m_writer.write_header(m_os, points.size(), 0, polygons.size());
|
m_writer.write_header(m_os, points.size(), 0, polygons.size());
|
||||||
for(std::size_t i=0, end=points.size(); i<end; ++i)
|
for(std::size_t i=0, end=points.size(); i<end; ++i)
|
||||||
{
|
{
|
||||||
typename SC::Point_3 p = conv(get(point_map, points[i]));
|
decltype(auto) p = conv(get(point_map, points[i]));
|
||||||
m_writer.write_vertex(p.x(), p.y(), p.z());
|
m_writer.write_vertex(p.x(), p.y(), p.z());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -367,7 +367,7 @@ bool write_OBJ(std::ostream& os,
|
||||||
* \cgalParamNBegin{point_map}
|
* \cgalParamNBegin{point_map}
|
||||||
* \cgalParamDescription{a property map associating points to the elements of the range `points`}
|
* \cgalParamDescription{a property map associating points to the elements of the range `points`}
|
||||||
* \cgalParamType{a model of `ReadablePropertyMap` whose key type is the value type
|
* \cgalParamType{a model of `ReadablePropertyMap` whose key type is the value type
|
||||||
* of the iterator of `PointRange` and value type is a model of the concept `Point_3`}
|
* of the iterator of `PointRange` and value type is a model of the concept `Kernel::Point_3`}
|
||||||
* \cgalParamDefault{`CGAL::Identity_property_map<std::iterator_traits<PointRange::iterator>::value_type>`}
|
* \cgalParamDefault{`CGAL::Identity_property_map<std::iterator_traits<PointRange::iterator>::value_type>`}
|
||||||
* \cgalParamNEnd
|
* \cgalParamNEnd
|
||||||
* \cgalParamNBegin{stream_precision}
|
* \cgalParamNBegin{stream_precision}
|
||||||
|
|
|
||||||
|
|
@ -317,7 +317,7 @@ bool write_OFF(std::ostream& os,
|
||||||
* \cgalParamNBegin{point_map}
|
* \cgalParamNBegin{point_map}
|
||||||
* \cgalParamDescription{a property map associating points to the elements of the range `points`}
|
* \cgalParamDescription{a property map associating points to the elements of the range `points`}
|
||||||
* \cgalParamType{a model of `ReadablePropertyMap` whose key type is the value type
|
* \cgalParamType{a model of `ReadablePropertyMap` whose key type is the value type
|
||||||
* of the iterator of `PointRange` and value type is a model of the concept `Point_3`}
|
* of the iterator of `PointRange` and value type is a model of the concept `Kernel::Point_3`}
|
||||||
* \cgalParamDefault{`CGAL::Identity_property_map<std::iterator_traits<PointRange::iterator>::value_type>`}
|
* \cgalParamDefault{`CGAL::Identity_property_map<std::iterator_traits<PointRange::iterator>::value_type>`}
|
||||||
* \cgalParamNEnd
|
* \cgalParamNEnd
|
||||||
* \cgalParamNBegin{stream_precision}
|
* \cgalParamNBegin{stream_precision}
|
||||||
|
|
|
||||||
|
|
@ -325,9 +325,9 @@ bool write_STL(std::ostream& os,
|
||||||
const Point& q = get(point_map, points[face[1]]);
|
const Point& q = get(point_map, points[face[1]]);
|
||||||
const Point& r = get(point_map, points[face[2]]);
|
const Point& r = get(point_map, points[face[2]]);
|
||||||
|
|
||||||
Point_3 pp = conv(p);
|
decltype(auto) pp = conv(p);
|
||||||
Point_3 qq = conv(q);
|
decltype(auto) qq = conv(q);
|
||||||
Point_3 rr = conv(r);
|
decltype(auto) rr = conv(r);
|
||||||
|
|
||||||
const Vector_3 nn = collinear(pp,qq,rr) ? Vector_3(static_cast<FT>(1),static_cast<FT>(0),static_cast<FT>(0)) : unit_normal(pp,qq,rr);
|
const Vector_3 nn = collinear(pp,qq,rr) ? Vector_3(static_cast<FT>(1),static_cast<FT>(0),static_cast<FT>(0)) : unit_normal(pp,qq,rr);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue