Fixed clashes with min/max macros in Windows.h

This commit is contained in:
Laurent Saboret 2006-08-31 09:36:41 +00:00
parent 1684a3d07f
commit 80f61dfaf6
3 changed files with 33 additions and 33 deletions

View File

@ -120,14 +120,14 @@ static bool write_file_eps(const Parameterization_polyhedron_adaptor& mesh_adapt
double y1 = scale * mesh_adaptor.info(pHalfedge->prev())->uv().y();
double x2 = scale * mesh_adaptor.info(pHalfedge)->uv().x();
double y2 = scale * mesh_adaptor.info(pHalfedge)->uv().y();
xmin = std::min(xmin,x1);
xmin = std::min(xmin,x2);
xmax = std::max(xmax,x1);
xmax = std::max(xmax,x2);
ymax = std::max(ymax,y1);
ymax = std::max(ymax,y2);
ymin = std::min(ymin,y1);
ymin = std::min(ymin,y2);
xmin = (std::min)(xmin,x1);
xmin = (std::min)(xmin,x2);
xmax = (std::max)(xmax,x1);
xmax = (std::max)(xmax,x2);
ymax = (std::max)(ymax,y1);
ymax = (std::max)(ymax,y2);
ymin = (std::min)(ymin,y1);
ymin = (std::min)(ymin,y2);
}
out << "%!PS-Adobe-2.0 EPSF-2.0" << std::endl;

View File

@ -65,12 +65,12 @@ bool Mesh_cutter::init()
m_pPolyhedron->tag_facets(FREE);
// compute bounding box and center
double xmin = m_pPolyhedron->min(0);
double ymin = m_pPolyhedron->min(1);
double zmin = m_pPolyhedron->min(2);
double xmax = m_pPolyhedron->max(0);
double ymax = m_pPolyhedron->max(1);
double zmax = m_pPolyhedron->max(2);
double xmin = m_pPolyhedron->minimum(0);
double ymin = m_pPolyhedron->minimum(1);
double zmin = m_pPolyhedron->minimum(2);
double xmax = m_pPolyhedron->maximum(0);
double ymax = m_pPolyhedron->maximum(1);
double zmax = m_pPolyhedron->maximum(2);
double xcenter = 0.5*(xmin+xmax);
double ycenter = 0.5*(ymin+ymax);
double zcenter = 0.5*(zmin+zmax);

View File

@ -266,17 +266,17 @@ public:
{
Facet_iterator pFace = facets_begin();
Facet_handle pClosest = pFace;
double min = pFace->distance(point);
double minimum = pFace->distance(point);
for(;pFace != facets_end();
pFace++)
{
if(is_inner(pFace))
{
double distance = pFace->distance(point);
if(distance < min)
if(distance < minimum)
{
pClosest = pFace;
min = distance;
minimum = distance;
}
}
}
@ -313,55 +313,55 @@ public:
}
// compute bounding interval
double min BOOST_PREVENT_MACRO_SUBSTITUTION (int coord)
double minimum (int coord)
{
CGAL_assertion(size_of_vertices() > 0);
Vertex_iterator pVertex = vertices_begin();
double min = pVertex->point()[coord];
double minimum = pVertex->point()[coord];
for(;pVertex != vertices_end();pVertex++)
min = (std::min)(min,pVertex->point()[coord]);
return min;
minimum = (std::min)(minimum,pVertex->point()[coord]);
return minimum;
}
double max BOOST_PREVENT_MACRO_SUBSTITUTION (int coord)
double maximum (int coord)
{
CGAL_assertion(size_of_vertices() > 0);
Vertex_iterator pVertex = vertices_begin();
double max = pVertex->point()[coord];
double maximum = pVertex->point()[coord];
for(;pVertex != vertices_end();pVertex++)
max = (std::max)(max,pVertex->point()[coord]);
return max;
maximum = (std::max)(maximum,pVertex->point()[coord]);
return maximum;
}
Vertex_handle vertex_min(int coord,
double &min)
double &minimum)
{
CGAL_assertion(size_of_vertices() > 0);
Vertex_iterator pVertex = vertices_begin();
Vertex_handle pBest = pVertex;
min = pVertex->point()[coord];
minimum = pVertex->point()[coord];
for(;pVertex != vertices_end();pVertex++)
{
double value = pVertex->point()[coord];
if(value < min)
if(value < minimum)
{
min = (std::min)(min,value);
minimum = (std::min)(minimum,value);
pBest = pVertex;
}
}
return pBest;
}
Vertex_handle vertex_max(int coord,
double &max)
double &maximum)
{
CGAL_assertion(size_of_vertices() > 0);
Vertex_iterator pVertex = vertices_begin();
Vertex_handle pBest = pVertex;
max = pVertex->point()[coord];
maximum = pVertex->point()[coord];
for(;pVertex != vertices_end();pVertex++)
{
double value = pVertex->point()[coord];
if(value > max)
if(value > maximum)
{
max = (std::max)(max,value);
maximum = (std::max)(maximum,value);
pBest = pVertex;
}
}