- Initial revision for the predicates of regular triangulation.

This commit is contained in:
Sylvain Pion 1999-06-18 12:44:34 +00:00
parent 96d60ec4f8
commit b0c82bafbf
2 changed files with 329 additions and 0 deletions

View File

@ -0,0 +1,154 @@
// ============================================================================
//
// Copyright (c) 1999 The CGAL Consortium
//
// This software and related documentation is part of an INTERNAL release
// of the Computational Geometry Algorithms Library (CGAL). It is not
// intended for general use.
//
// ----------------------------------------------------------------------------
//
// release :
// release_date :
//
// file : include/CGAL/Arithmetic_filter/predicates/Regular_triangulation_ftC2.h
// revision : $Revision$
// revision_date :
// author(s) : Sylvain.Pion@sophia.inria.fr
// Mariette Yvinec <Mariette.Yvinec@sophia.inria.fr>
//
// coordinator : Mariette Yvinec <Mariette.Yvinec@sophia.inria.fr>
//
// ============================================================================
#ifndef CGAL_ARITHMETIC_FILTER_REGULAR_TRIANGULATION_FTC2_H
#define CGAL_ARITHMETIC_FILTER_REGULAR_TRIANGULATION_FTC2_H
// This file is automatically generated by the script for filtering
// predicates, using Interval arithmetic.
// This file contains the low level cartesian predicates
// used by the 2D regular triangulation.
CGAL_BEGIN_NAMESPACE
#ifndef CGAL_CFG_NO_EXPLICIT_TEMPLATE_FUNCTION_ARGUMENT_SPECIFICATION
template < class CGAL_IA_CT, class CGAL_IA_ET, class CGAL_IA_CACHE >
#endif
Oriented_side
power_testC2(
const CGAL::Filtered_exact <CGAL_IA_CT, CGAL_IA_ET, CGAL_IA_CACHE> &px,
const CGAL::Filtered_exact <CGAL_IA_CT, CGAL_IA_ET, CGAL_IA_CACHE> &py,
const CGAL::Filtered_exact <CGAL_IA_CT, CGAL_IA_ET, CGAL_IA_CACHE> &pwt,
const CGAL::Filtered_exact <CGAL_IA_CT, CGAL_IA_ET, CGAL_IA_CACHE> &qx,
const CGAL::Filtered_exact <CGAL_IA_CT, CGAL_IA_ET, CGAL_IA_CACHE> &qy,
const CGAL::Filtered_exact <CGAL_IA_CT, CGAL_IA_ET, CGAL_IA_CACHE> &qwt,
const CGAL::Filtered_exact <CGAL_IA_CT, CGAL_IA_ET, CGAL_IA_CACHE> &rx,
const CGAL::Filtered_exact <CGAL_IA_CT, CGAL_IA_ET, CGAL_IA_CACHE> &ry,
const CGAL::Filtered_exact <CGAL_IA_CT, CGAL_IA_ET, CGAL_IA_CACHE> &rwt,
const CGAL::Filtered_exact <CGAL_IA_CT, CGAL_IA_ET, CGAL_IA_CACHE> &tx,
const CGAL::Filtered_exact <CGAL_IA_CT, CGAL_IA_ET, CGAL_IA_CACHE> &ty,
const CGAL::Filtered_exact <CGAL_IA_CT, CGAL_IA_ET, CGAL_IA_CACHE> &twt)
{
FPU_CW_t backup = FPU_get_cw();
FPU_set_cw(FPU_cw_up);
try
{
Oriented_side result = power_testC2(
px.interval(),
py.interval(),
pwt.interval(),
qx.interval(),
qy.interval(),
qwt.interval(),
rx.interval(),
ry.interval(),
rwt.interval(),
tx.interval(),
ty.interval(),
twt.interval());
FPU_set_cw(backup);
return result;
}
catch (Interval_nt_advanced::unsafe_comparison)
{
FPU_set_cw(backup);
return power_testC2(
px.exact(),
py.exact(),
pwt.exact(),
qx.exact(),
qy.exact(),
qwt.exact(),
rx.exact(),
ry.exact(),
rwt.exact(),
tx.exact(),
ty.exact(),
twt.exact());
}
}
#ifndef CGAL_CFG_NO_EXPLICIT_TEMPLATE_FUNCTION_ARGUMENT_SPECIFICATION
template < class CGAL_IA_CT, class CGAL_IA_ET, class CGAL_IA_CACHE >
#endif
Oriented_side
power_testC2(
const CGAL::Filtered_exact <CGAL_IA_CT, CGAL_IA_ET, CGAL_IA_CACHE> &px,
const CGAL::Filtered_exact <CGAL_IA_CT, CGAL_IA_ET, CGAL_IA_CACHE> &py,
const CGAL::Filtered_exact <CGAL_IA_CT, CGAL_IA_ET, CGAL_IA_CACHE> &pwt,
const CGAL::Filtered_exact <CGAL_IA_CT, CGAL_IA_ET, CGAL_IA_CACHE> &qx,
const CGAL::Filtered_exact <CGAL_IA_CT, CGAL_IA_ET, CGAL_IA_CACHE> &qy,
const CGAL::Filtered_exact <CGAL_IA_CT, CGAL_IA_ET, CGAL_IA_CACHE> &qwt,
const CGAL::Filtered_exact <CGAL_IA_CT, CGAL_IA_ET, CGAL_IA_CACHE> &tx,
const CGAL::Filtered_exact <CGAL_IA_CT, CGAL_IA_ET, CGAL_IA_CACHE> &ty,
const CGAL::Filtered_exact <CGAL_IA_CT, CGAL_IA_ET, CGAL_IA_CACHE> &twt)
{
FPU_CW_t backup = FPU_get_cw();
FPU_set_cw(FPU_cw_up);
try
{
Oriented_side result = power_testC2(
px.interval(),
py.interval(),
pwt.interval(),
qx.interval(),
qy.interval(),
qwt.interval(),
tx.interval(),
ty.interval(),
twt.interval());
FPU_set_cw(backup);
return result;
}
catch (Interval_nt_advanced::unsafe_comparison)
{
FPU_set_cw(backup);
return power_testC2(
px.exact(),
py.exact(),
pwt.exact(),
qx.exact(),
qy.exact(),
qwt.exact(),
tx.exact(),
ty.exact(),
twt.exact());
}
}
CGAL_END_NAMESPACE
#ifdef CGAL_ARITHMETIC_FILTER_H
#ifndef CGAL_ARITHMETIC_FILTER_ARITHMETIC_FILTER_REGULAR_TRIANGULATION_FTC2_H
#include <CGAL/Arithmetic_filter/predicates/Regular_triangulation_ftC2.h>
#endif // CGAL_ARITHMETIC_FILTER_ARITHMETIC_FILTER_REGULAR_TRIANGULATION_FTC2_H
#endif
#endif // CGAL_ARITHMETIC_FILTER_REGULAR_TRIANGULATION_FTC2_H

View File

@ -0,0 +1,175 @@
// ============================================================================
//
// Copyright (c) 1999 The CGAL Consortium
//
// This software and related documentation is part of an INTERNAL release
// of the Computational Geometry Algorithms Library (CGAL). It is not
// intended for general use.
//
// ----------------------------------------------------------------------------
//
// release :
// release_date :
//
// file : include/CGAL/Arithmetic_filter/predicates/Regular_triangulation_rtH2.h
// revision : $Revision$
// revision_date :
// author(s) : Sylvain.Pion@sophia.inria.fr
// Mariette Yvinec <Mariette.Yvinec@sophia.inria.fr>
//
// coordinator : Mariette Yvinec <Mariette.Yvinec@sophia.inria.fr>
//
// ============================================================================
#ifndef CGAL_ARITHMETIC_FILTER_REGULAR_TRIANGULATION_RTH2_H
#define CGAL_ARITHMETIC_FILTER_REGULAR_TRIANGULATION_RTH2_H
// This file is automatically generated by the script for filtering
// predicates, using Interval arithmetic.
// This file contains the low level homogeneous predicates
// used by the 2D regular triangulation.
CGAL_BEGIN_NAMESPACE
#ifndef CGAL_CFG_NO_EXPLICIT_TEMPLATE_FUNCTION_ARGUMENT_SPECIFICATION
template < class CGAL_IA_CT, class CGAL_IA_ET, class CGAL_IA_CACHE >
#endif
Oriented_side
power_testH2(
const CGAL::Filtered_exact <CGAL_IA_CT, CGAL_IA_ET, CGAL_IA_CACHE> &px,
const CGAL::Filtered_exact <CGAL_IA_CT, CGAL_IA_ET, CGAL_IA_CACHE> &py,
const CGAL::Filtered_exact <CGAL_IA_CT, CGAL_IA_ET, CGAL_IA_CACHE> &pw,
const CGAL::Filtered_exact <CGAL_IA_CT, CGAL_IA_ET, CGAL_IA_CACHE> &pwt,
const CGAL::Filtered_exact <CGAL_IA_CT, CGAL_IA_ET, CGAL_IA_CACHE> &qx,
const CGAL::Filtered_exact <CGAL_IA_CT, CGAL_IA_ET, CGAL_IA_CACHE> &qy,
const CGAL::Filtered_exact <CGAL_IA_CT, CGAL_IA_ET, CGAL_IA_CACHE> &qw,
const CGAL::Filtered_exact <CGAL_IA_CT, CGAL_IA_ET, CGAL_IA_CACHE> &qwt,
const CGAL::Filtered_exact <CGAL_IA_CT, CGAL_IA_ET, CGAL_IA_CACHE> &rx,
const CGAL::Filtered_exact <CGAL_IA_CT, CGAL_IA_ET, CGAL_IA_CACHE> &ry,
const CGAL::Filtered_exact <CGAL_IA_CT, CGAL_IA_ET, CGAL_IA_CACHE> &rw,
const CGAL::Filtered_exact <CGAL_IA_CT, CGAL_IA_ET, CGAL_IA_CACHE> &rwt,
const CGAL::Filtered_exact <CGAL_IA_CT, CGAL_IA_ET, CGAL_IA_CACHE> &tx,
const CGAL::Filtered_exact <CGAL_IA_CT, CGAL_IA_ET, CGAL_IA_CACHE> &ty,
const CGAL::Filtered_exact <CGAL_IA_CT, CGAL_IA_ET, CGAL_IA_CACHE> &tw,
const CGAL::Filtered_exact <CGAL_IA_CT, CGAL_IA_ET, CGAL_IA_CACHE> &twt)
{
FPU_CW_t backup = FPU_get_cw();
FPU_set_cw(FPU_cw_up);
try
{
Oriented_side result = power_testH2(
px.interval(),
py.interval(),
pw.interval(),
pwt.interval(),
qx.interval(),
qy.interval(),
qw.interval(),
qwt.interval(),
rx.interval(),
ry.interval(),
rw.interval(),
rwt.interval(),
tx.interval(),
ty.interval(),
tw.interval(),
twt.interval());
FPU_set_cw(backup);
return result;
}
catch (Interval_nt_advanced::unsafe_comparison)
{
FPU_set_cw(backup);
return power_testH2(
px.exact(),
py.exact(),
pw.exact(),
pwt.exact(),
qx.exact(),
qy.exact(),
qw.exact(),
qwt.exact(),
rx.exact(),
ry.exact(),
rw.exact(),
rwt.exact(),
tx.exact(),
ty.exact(),
tw.exact(),
twt.exact());
}
}
#ifndef CGAL_CFG_NO_EXPLICIT_TEMPLATE_FUNCTION_ARGUMENT_SPECIFICATION
template < class CGAL_IA_CT, class CGAL_IA_ET, class CGAL_IA_CACHE >
#endif
Oriented_side
power_testH2(
const CGAL::Filtered_exact <CGAL_IA_CT, CGAL_IA_ET, CGAL_IA_CACHE> &px,
const CGAL::Filtered_exact <CGAL_IA_CT, CGAL_IA_ET, CGAL_IA_CACHE> &py,
const CGAL::Filtered_exact <CGAL_IA_CT, CGAL_IA_ET, CGAL_IA_CACHE> &pw,
const CGAL::Filtered_exact <CGAL_IA_CT, CGAL_IA_ET, CGAL_IA_CACHE> &pwt,
const CGAL::Filtered_exact <CGAL_IA_CT, CGAL_IA_ET, CGAL_IA_CACHE> &qx,
const CGAL::Filtered_exact <CGAL_IA_CT, CGAL_IA_ET, CGAL_IA_CACHE> &qy,
const CGAL::Filtered_exact <CGAL_IA_CT, CGAL_IA_ET, CGAL_IA_CACHE> &qw,
const CGAL::Filtered_exact <CGAL_IA_CT, CGAL_IA_ET, CGAL_IA_CACHE> &qwt,
const CGAL::Filtered_exact <CGAL_IA_CT, CGAL_IA_ET, CGAL_IA_CACHE> &tx,
const CGAL::Filtered_exact <CGAL_IA_CT, CGAL_IA_ET, CGAL_IA_CACHE> &ty,
const CGAL::Filtered_exact <CGAL_IA_CT, CGAL_IA_ET, CGAL_IA_CACHE> &tw,
const CGAL::Filtered_exact <CGAL_IA_CT, CGAL_IA_ET, CGAL_IA_CACHE> &twt)
{
FPU_CW_t backup = FPU_get_cw();
FPU_set_cw(FPU_cw_up);
try
{
Oriented_side result = power_testH2(
px.interval(),
py.interval(),
pw.interval(),
pwt.interval(),
qx.interval(),
qy.interval(),
qw.interval(),
qwt.interval(),
tx.interval(),
ty.interval(),
tw.interval(),
twt.interval());
FPU_set_cw(backup);
return result;
}
catch (Interval_nt_advanced::unsafe_comparison)
{
FPU_set_cw(backup);
return power_testH2(
px.exact(),
py.exact(),
pw.exact(),
pwt.exact(),
qx.exact(),
qy.exact(),
qw.exact(),
qwt.exact(),
tx.exact(),
ty.exact(),
tw.exact(),
twt.exact());
}
}
CGAL_END_NAMESPACE
#ifdef CGAL_ARITHMETIC_FILTER_H
#ifndef CGAL_ARITHMETIC_FILTER_ARITHMETIC_FILTER_REGULAR_TRIANGULATION_RTH2_H
#include <CGAL/Arithmetic_filter/predicates/Regular_triangulation_rtH2.h>
#endif // CGAL_ARITHMETIC_FILTER_ARITHMETIC_FILTER_REGULAR_TRIANGULATION_RTH2_H
#endif
#endif // CGAL_ARITHMETIC_FILTER_REGULAR_TRIANGULATION_RTH2_H