Skip to content

Commit

Permalink
A couple more...
Browse files Browse the repository at this point in the history
  • Loading branch information
abellgithub committed May 14, 2018
1 parent 07d0089 commit ecf8b73
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions vendor/kazhdan/PoissonRecon.h
Expand Up @@ -72,11 +72,11 @@ void DumpOutput2( std::vector< char* >& comments , const char* format , ... );
template<typename Real>
XForm4x4<Real> GetPointXForm(PointSource& source, Real scaleFactor)
{
Point3D<double> min , max;
source.boundingBox(min, max);
Point3D<double> center = ( max + min ) / 2;
Real scale = std::max( max[0]-min[0],
std::max(max[1]-min[1], max[2]-min[2]));
Point3D<double> minimum, maximum;
source.boundingBox(minimum, maximum);
Point3D<double> center = (maximum + minimum) / 2;
Real scale = (std::max)(maximum[0]-minimum[0],
(std::max)(maximum[1]-minimum[1], maximum[2]-minimum[2]));
scale *= scaleFactor;
for( int i=0 ; i<3 ; i++ )
center[i] -= scale/2;
Expand Down Expand Up @@ -479,7 +479,7 @@ void PoissonRecon<Real>::solve()
solverInfo.verbose = m_opts.m_verbose;
solverInfo.showResidual = m_opts.m_showResidual;
solverInfo.lowResIterMultiplier =
std::max((Real)1.0, m_opts.m_lowResIterMult);
(std::max)((Real)1.0, m_opts.m_lowResIterMult);

m_solution = m_tree.template solveSystem<Degree, BType>(
FEMSystemFunctor<Degree, BType>(0, 1, 0), m_interp, m_constraints,
Expand Down
10 changes: 5 additions & 5 deletions vendor/kazhdan/point_source/PointSource.h
Expand Up @@ -41,21 +41,21 @@ class PointSource

virtual void reset() = 0;
virtual bool nextPoint(Point& point) = 0;
void boundingBox(Point3D<double>& min, Point3D<double>& max)
void boundingBox(Point3D<double>& minimum, Point3D<double>& maximum)
{
for (size_t i = 0; i < 3; ++i)
{
min[i] = std::numeric_limits<double>::max();
max[i] = std::numeric_limits<double>::lowest();
minimum[i] = (std::numeric_limits<double>::max)();
maximum[i] = (std::numeric_limits<double>::lowest)();
}

Point p;
while (nextPoint(p))
{
for( int i=0 ; i<3 ; i++ )
{
min[i] = std::min(min[i], p.p[i]);
max[i] = std::max(max[i], p.p[i]);
minimum[i] = (std::min)(minimum[i], p.p[i]);
maximum[i] = (std::max)(maximum[i], p.p[i]);
}
}
reset();
Expand Down

0 comments on commit ecf8b73

Please sign in to comment.