mirror of https://github.com/CGAL/cgal
Merge pull request #1875 from sloriot/PMP-rename_bbox_3
Rename bbox_3 functions
This commit is contained in:
commit
4c3ea8908e
|
|
@ -285,6 +285,9 @@ and <code>src/</code> directories).
|
|||
<code>max_distance_to_triangle_mesh()</code>,
|
||||
<code>max_distance_to_point_set()</code>.
|
||||
</li>
|
||||
<li>
|
||||
The function <code>CGAL::Polygon_mesh_processing::bbox_3()</code> has been renamed <code>CGAL::Polygon_mesh_processing::bbox()</code>.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Point Set Processing</h3>
|
||||
|
|
|
|||
|
|
@ -153,10 +153,10 @@ and provides a list of the parameters that are used in this package.
|
|||
## Miscellaneous ##
|
||||
- `CGAL::Polygon_mesh_slicer`
|
||||
- `CGAL::Side_of_triangle_mesh`
|
||||
- `CGAL::Polygon_mesh_processing::bbox_3()`
|
||||
- `CGAL::Polygon_mesh_processing::vertex_bbox_3()`
|
||||
- `CGAL::Polygon_mesh_processing::edge_bbox_3()`
|
||||
- `CGAL::Polygon_mesh_processing::face_bbox_3()`
|
||||
- `CGAL::Polygon_mesh_processing::bbox()`
|
||||
- `CGAL::Polygon_mesh_processing::vertex_bbox()`
|
||||
- `CGAL::Polygon_mesh_processing::edge_bbox()`
|
||||
- `CGAL::Polygon_mesh_processing::face_bbox()`
|
||||
- `CGAL::Polygon_mesh_processing::border_halfedges()`
|
||||
|
||||
\todo add `clip_triangle_mesh()` using the code of `Polyhedron_place_clipping.h` and `PMP::corefine()`
|
||||
|
|
|
|||
|
|
@ -62,8 +62,8 @@ namespace CGAL {
|
|||
* @return a bounding box of `pmesh`
|
||||
*/
|
||||
template<typename PolygonMesh, typename CGAL_PMP_NP_TEMPLATE_PARAMETERS>
|
||||
CGAL::Bbox_3 bbox_3(const PolygonMesh& pmesh,
|
||||
const CGAL_PMP_NP_CLASS& np)
|
||||
CGAL::Bbox_3 bbox(const PolygonMesh& pmesh,
|
||||
const CGAL_PMP_NP_CLASS& np)
|
||||
{
|
||||
using boost::choose_param;
|
||||
using boost::get_param;
|
||||
|
|
@ -112,9 +112,9 @@ namespace CGAL {
|
|||
* @return a bounding box of `pmesh`
|
||||
*/
|
||||
template<typename PolygonMesh, typename NamedParameters>
|
||||
CGAL::Bbox_3 vertex_bbox_3(typename boost::graph_traits<PolygonMesh>::vertex_descriptor vd,
|
||||
const PolygonMesh& pmesh,
|
||||
const NamedParameters& np)
|
||||
CGAL::Bbox_3 vertex_bbox(typename boost::graph_traits<PolygonMesh>::vertex_descriptor vd,
|
||||
const PolygonMesh& pmesh,
|
||||
const NamedParameters& np)
|
||||
{
|
||||
using boost::choose_param;
|
||||
using boost::get_param;
|
||||
|
|
@ -155,9 +155,9 @@ namespace CGAL {
|
|||
* @return a bounding box of `pmesh`
|
||||
*/
|
||||
template<typename PolygonMesh, typename NamedParameters>
|
||||
CGAL::Bbox_3 edge_bbox_3(typename boost::graph_traits<PolygonMesh>::edge_descriptor ed,
|
||||
const PolygonMesh& pmesh,
|
||||
const NamedParameters& np)
|
||||
CGAL::Bbox_3 edge_bbox(typename boost::graph_traits<PolygonMesh>::edge_descriptor ed,
|
||||
const PolygonMesh& pmesh,
|
||||
const NamedParameters& np)
|
||||
{
|
||||
using boost::choose_param;
|
||||
using boost::get_param;
|
||||
|
|
@ -199,9 +199,9 @@ namespace CGAL {
|
|||
* @return a bounding box of `pmesh`
|
||||
*/
|
||||
template<typename PolygonMesh, typename NamedParameters>
|
||||
CGAL::Bbox_3 face_bbox_3(typename boost::graph_traits<PolygonMesh>::face_descriptor fd,
|
||||
const PolygonMesh& pmesh,
|
||||
const NamedParameters& np)
|
||||
CGAL::Bbox_3 face_bbox(typename boost::graph_traits<PolygonMesh>::face_descriptor fd,
|
||||
const PolygonMesh& pmesh,
|
||||
const NamedParameters& np)
|
||||
{
|
||||
using boost::choose_param;
|
||||
using boost::get_param;
|
||||
|
|
@ -225,34 +225,53 @@ namespace CGAL {
|
|||
}
|
||||
|
||||
template<typename PolygonMesh>
|
||||
CGAL::Bbox_3 vertex_bbox_3(typename boost::graph_traits<PolygonMesh>::vertex_descriptor vd,
|
||||
CGAL::Bbox_3 vertex_bbox(typename boost::graph_traits<PolygonMesh>::vertex_descriptor vd,
|
||||
const PolygonMesh& pmesh)
|
||||
{
|
||||
return vertex_bbox_3(vd, pmesh,
|
||||
return vertex_bbox(vd, pmesh,
|
||||
CGAL::Polygon_mesh_processing::parameters::all_default());
|
||||
}
|
||||
template<typename PolygonMesh>
|
||||
CGAL::Bbox_3 edge_bbox_3(typename boost::graph_traits<PolygonMesh>::edge_descriptor ed,
|
||||
CGAL::Bbox_3 edge_bbox(typename boost::graph_traits<PolygonMesh>::edge_descriptor ed,
|
||||
const PolygonMesh& pmesh)
|
||||
{
|
||||
return edge_bbox_3(ed, pmesh,
|
||||
return edge_bbox(ed, pmesh,
|
||||
CGAL::Polygon_mesh_processing::parameters::all_default());
|
||||
}
|
||||
template<typename PolygonMesh>
|
||||
CGAL::Bbox_3 face_bbox_3(typename boost::graph_traits<PolygonMesh>::face_descriptor fd,
|
||||
CGAL::Bbox_3 face_bbox(typename boost::graph_traits<PolygonMesh>::face_descriptor fd,
|
||||
const PolygonMesh& pmesh)
|
||||
{
|
||||
return face_bbox_3(fd, pmesh,
|
||||
return face_bbox(fd, pmesh,
|
||||
CGAL::Polygon_mesh_processing::parameters::all_default());
|
||||
}
|
||||
|
||||
template<typename PolygonMesh>
|
||||
CGAL::Bbox_3 bbox_3(const PolygonMesh& pmesh)
|
||||
CGAL::Bbox_3 bbox(const PolygonMesh& pmesh)
|
||||
{
|
||||
return bbox_3(pmesh,
|
||||
return bbox(pmesh,
|
||||
CGAL::Polygon_mesh_processing::parameters::all_default());
|
||||
}
|
||||
|
||||
// deprecated function
|
||||
#ifndef CGAL_NO_DEPRECATED_CODE
|
||||
/*!
|
||||
* \ingroup PkgPolygonMeshProcessing
|
||||
* \deprecated This function is deprecated since \cgal 4.10, `CGAL::Polygon_mesh_processing::bbox()` should be used instead.
|
||||
*/
|
||||
template<typename PolygonMesh, typename CGAL_PMP_NP_TEMPLATE_PARAMETERS>
|
||||
CGAL_DEPRECATED CGAL::Bbox_3 bbox_3(const PolygonMesh& pmesh,
|
||||
const CGAL_PMP_NP_CLASS& np)
|
||||
{
|
||||
return bbox(pmesh, np);
|
||||
}
|
||||
|
||||
template<typename PolygonMesh>
|
||||
CGAL_DEPRECATED CGAL::Bbox_3 bbox_3(const PolygonMesh& pmesh)
|
||||
{
|
||||
return bbox(pmesh);
|
||||
}
|
||||
#endif // CGAL_NO_DEPRECATED_CODE
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -341,7 +341,7 @@ void clip( TriangleMesh& tm,
|
|||
bool close)
|
||||
{
|
||||
if( boost::begin(faces(tm))==boost::end(faces(tm)) ) return;
|
||||
CGAL::Bbox_3 bbox = bbox_3(tm);
|
||||
CGAL::Bbox_3 bbox = ::CGAL::Polygon_mesh_processing::bbox(tm);
|
||||
//extend the bbox a bit to avoid border cases
|
||||
double xd=(bbox.xmax()-bbox.xmin())/100;
|
||||
double yd=(bbox.ymax()-bbox.ymin())/100;
|
||||
|
|
|
|||
|
|
@ -95,22 +95,22 @@ void test_pmesh(const Mesh& pmesh)
|
|||
std::cout << "mesh area (NP) = " << mesh_area_np << std::endl;
|
||||
|
||||
|
||||
CGAL::Bbox_3 bb = PMP::bbox_3(pmesh);
|
||||
CGAL::Bbox_3 bb = PMP::bbox(pmesh);
|
||||
std::cout << "bbox x[" << bb.xmin() << "; " << bb.xmax() << "]" << std::endl;
|
||||
std::cout << " y[" << bb.ymin() << "; " << bb.ymax() << "]" << std::endl;
|
||||
std::cout << " z[" << bb.zmin() << "; " << bb.zmax() << "]" << std::endl;
|
||||
|
||||
CGAL::Bbox_3 bb_v;
|
||||
BOOST_FOREACH(vertex_descriptor vd, vertices(pmesh))
|
||||
bb_v+=PMP::vertex_bbox_3(vd, pmesh);
|
||||
bb_v+=PMP::vertex_bbox(vd, pmesh);
|
||||
|
||||
CGAL::Bbox_3 bb_f;
|
||||
BOOST_FOREACH(face_descriptor fd, faces(pmesh))
|
||||
bb_f+=PMP::face_bbox_3(fd, pmesh);
|
||||
bb_f+=PMP::face_bbox(fd, pmesh);
|
||||
|
||||
CGAL::Bbox_3 bb_e;
|
||||
BOOST_FOREACH(edge_descriptor ed, edges(pmesh))
|
||||
bb_e+=PMP::edge_bbox_3(ed, pmesh);
|
||||
bb_e+=PMP::edge_bbox(ed, pmesh);
|
||||
|
||||
assert(bb==bb_v);
|
||||
assert(bb==bb_f);
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ void random_points(const PolygonMesh& mesh,
|
|||
int n,
|
||||
OutputIterator out)
|
||||
{
|
||||
CGAL::Bbox_3 bb = CGAL::Polygon_mesh_processing::bbox_3(mesh);
|
||||
CGAL::Bbox_3 bb = CGAL::Polygon_mesh_processing::bbox(mesh);
|
||||
CGAL::Random rg(1340818006); // seed some value for make it easy to debug
|
||||
|
||||
double grid_dx = bb.xmax() - bb.xmin();
|
||||
|
|
|
|||
Loading…
Reference in New Issue