Added a function to get the canonical domain to P3MeshDomain_3

This commit is contained in:
Mael Rouxel-Labbé 2017-12-19 15:45:22 +01:00
parent d2ece33849
commit daf772fb33
4 changed files with 22 additions and 5 deletions

View File

@ -57,6 +57,7 @@ template<class LabelingFunction, class BGT>
class Labeled_periodic_3_mesh_domain_3
{
public:
typedef typename BGT::Iso_cuboid_3 Iso_cuboid_3;
/// \name Creation
/// @{
@ -75,5 +76,10 @@ Labeled_periodic_3_mesh_domain_3(const LabelingFunction& f,
/// @}
/*!
* \brief Return the user-chosen cube that is the canonical instance of the flat torus.
*/
const Iso_cuboid_3& canonical_periodic_domain();
}; /* end Labeled_periodic_3_mesh_domain_3 */
} /* end namespace CGAL */

View File

@ -22,7 +22,18 @@ evaluate queries at the canonical representative a point (see Section
\sa `CGAL::refine_periodic_3_mesh_3()`
*/
class Periodic_3MeshDomain_3 {
class Periodic_3MeshDomain_3
{
public:
/*!
Cuboid type.
*/
typedef unspecified_type Iso_cuboid_3;
/*!
Return the user-chosen cube that is the canonical instance of the flat torus.
*/
const Iso_cuboid_3& canonical_periodic_domain();
/// @}

View File

@ -104,7 +104,7 @@ public:
pgt(bbox)
{ }
const Iso_cuboid_3& periodic_bounding_box() const { return Base::bounding_box(); }
const Iso_cuboid_3& canonical_periodic_domain() const { return Base::bounding_box(); }
const Periodic_geom_traits& periodic_geom_traits() const { return pgt; }
Subdomain_index label(const Point_3& p) const {
@ -155,7 +155,7 @@ public:
// This whole canonicalization of offsets process seems useless... Hiding it behind macros.
#ifdef CGAL_PERIODIC_CANONICALIZE_DUAL_INTERSECTIONS
Iso_cuboid_3 pbb = r_domain_.periodic_bounding_box();
Iso_cuboid_3 pbb = r_domain_.canonical_periodic_domain();
FT dimension [3] = { pbb.xmax()-pbb.xmin(),
pbb.ymax()-pbb.ymin(),
pbb.zmax()-pbb.zmin() };
@ -308,7 +308,7 @@ public:
r_domain_.periodic_geom_traits().construct_midpoint_3_object();
#ifdef CGAL_PERIODIC_CANONICALIZE_DUAL_INTERSECTIONS
Iso_cuboid_3 pbb = r_domain_.periodic_bounding_box();
Iso_cuboid_3 pbb = r_domain_.canonical_periodic_domain();
FT dimension [3] = { pbb.xmax() - pbb.xmin(),
pbb.ymax() - pbb.ymin(),
pbb.zmax() - pbb.zmin() };

View File

@ -98,7 +98,7 @@ struct C3t3_initializer_base
bool nonlinear = false,
const int nb_initial_points = -1)
{
c3t3.triangulation().set_domain(domain.periodic_bounding_box());
c3t3.triangulation().set_domain(domain.canonical_periodic_domain());
c3t3.triangulation().insert_dummy_points();
mark_dummy_points(c3t3);