Skip to content

Commit

Permalink
Merge branch 'release/v3.7.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
c-lipka committed Jan 16, 2017
2 parents 837a5c9 + 72e18d9 commit d6e8257
Show file tree
Hide file tree
Showing 15 changed files with 211 additions and 27 deletions.
1 change: 1 addition & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ matrix:
fast_finish: true

environment:
PovBuildDefs: POV_RAY_IS_AUTOBUILD=1;POV_RAY_BUILD_ID="av$(APPVEYOR_BUILD_NUMBER)";BUILT_BY="AppVeyor";
matrix:
- configuration: Release
platform: x64
Expand Down
13 changes: 13 additions & 0 deletions changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,19 @@ Changes between 3.7.1-TBD and 3.7.1
TBD


Changes between 3.7.1-beta.2 and 3.7.1-TBD
==========================================

The focus of this version has been on fixing bugs.

Fixed or Mitigated Bugs
-----------------------

Reported via GitHub:

- #184 ("User defined camera may cause crash during render")


Changes between 3.7.1-beta.1 and 3.7.1-beta.2
=============================================

Expand Down
Binary file modified distribution/platform-specific/windows/Help/povray37.chm
Binary file not shown.
20 changes: 20 additions & 0 deletions revision.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,26 @@ Notes:
POV-Ray v3.7.1-beta.2
------------------------------------------------------------------------------

Commit 481db07 on 2017-01-09 by Christoph Lipka

Fix some more beta registry key issues.

- Beta now _does_ use the "v3.7-beta" registry key instead of "v3.7".
- Beta now only copies v3.6 registry data if no existing v3.7 proper
installation is found.

Commit b6532d0 on 2017-01-09 by Christoph Lipka

Update change logs.

Commit e2fe17d on 2017-01-09 by Christoph Lipka

Update some strings in the Windows binary headers.

Commit 90d12db on 2017-01-08 by Christoph Lipka

Update change logs.

Commit 3410c23 on 2017-01-08 by Christoph Lipka

Make betas live happily alongside the previous release, by using a
Expand Down
64 changes: 63 additions & 1 deletion source/base/configbase.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/// @parblock
///
/// Persistence of Vision Ray Tracer ('POV-Ray') version 3.7.
/// Copyright 1991-2016 Persistence of Vision Raytracer Pty. Ltd.
/// Copyright 1991-2017 Persistence of Vision Raytracer Pty. Ltd.
///
/// POV-Ray is free software: you can redistribute it and/or modify
/// it under the terms of the GNU Affero General Public License as
Expand Down Expand Up @@ -40,6 +40,8 @@

#include "syspovconfigbase.h"

#include <limits>

#include <boost/version.hpp>

//##############################################################################
Expand Down Expand Up @@ -461,6 +463,66 @@
#define M_PI_360 0.00872664625997164788
#endif

/// @}
///
//******************************************************************************
///
/// @name Floating-Point Special Values
///
/// The following macros are used to identify certain special floating-point values.
///
/// @{

/// @def POV_ISINF(x)
/// Test whether floating-point value x denotes positive or negative infinity.
///
/// The default implementation tests whether the absolute of the value is larger than the largest
/// finite value representable by the data type.
///
/// @note
/// The macro must be implemented in a manner that it works properly for all floating-point
/// data types.
///
#ifndef POV_ISINF
template<typename T>
inline bool pov_isinf(T x) { volatile T v = std::numeric_limits<T>::max(); return std::fabs(x) > v; }
#define POV_ISINF(x) pov_isinf(x)
#endif

/// @def POV_ISNAN(x)
/// Test whether floating-point value x denotes "not-a-number" (NaN).
///
/// "Not-a-number" is any special value denoting neither a finite number nor positive or negative
/// infinity. Examples include the result of dividing 0 by 0, or raising a negative value to a
/// non-integer power.
///
/// The default implementation exploits the property that (on most systems) NaNs (and only NaNs)
/// are considered non-equal to any value including themselves.
///
/// @note
/// The macro must be implemented in a manner that it works properly for all floating-point
/// data types.
///
#ifndef POV_ISNAN
template<typename T>
inline bool pov_isnan(T x) { volatile T v = x; return (v != x); }
#define POV_ISNAN(x) pov_isnan(x)
#endif

/// @def POV_ISFINITE(x)
/// Test whether floating-point value x denotes a proper finite number.
///
/// The default implementation tests whether the value is neither infinity nor "not-a-number",
/// using the @ref POV_ISINF and @ref POV_ISNAN macros.
///
/// @note
/// The macro must be implemented in a manner that it works properly for all floating-point
/// data types.
///
#ifndef POV_ISFINITE
#define POV_ISFINITE(x) (!POV_ISINF(x) && !POV_ISNAN(x))
#endif

/// @}
///
//******************************************************************************
Expand Down
14 changes: 12 additions & 2 deletions source/base/mathutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/// @parblock
///
/// Persistence of Vision Ray Tracer ('POV-Ray') version 3.7.
/// Copyright 1991-2016 Persistence of Vision Raytracer Pty. Ltd.
/// Copyright 1991-2017 Persistence of Vision Raytracer Pty. Ltd.
///
/// POV-Ray is free software: you can redistribute it and/or modify
/// it under the terms of the GNU Affero General Public License as
Expand Down Expand Up @@ -169,7 +169,7 @@ inline T1 RoundDownToMultiple(T1 x, T2 base) { return x - (x % base); }
template<typename T1, typename T2>
inline T1 RoundUpToMultiple(T1 x, T2 base) { return RoundDownToMultiple (x + base - 1, base); }

/// Test whether a value is in a given range
/// Test whether a value is in a given range.
///
/// This function tests whether the specified value is within the specified interval.
/// The boundaries are considered part of the interval.
Expand All @@ -180,6 +180,16 @@ inline bool IsInRange (T1 value, T2 min, T2 max)
return (min <= value) && (value <= max);
}

/// Test whether a floating-point value is a proper finite numerical value.
///
/// This function tests whether the specified floating-point value is a proper finite
/// numeric value.
///
inline bool IsFinite(double value)
{
return POV_ISFINITE(value);
}

/// @}
///
//##############################################################################
Expand Down
6 changes: 5 additions & 1 deletion source/core/render/tracepixel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
/// @parblock
///
/// Persistence of Vision Ray Tracer ('POV-Ray') version 3.7.
/// Copyright 1991-2016 Persistence of Vision Raytracer Pty. Ltd.
/// Copyright 1991-2017 Persistence of Vision Raytracer Pty. Ltd.
///
/// POV-Ray is free software: you can redistribute it and/or modify
/// it under the terms of the GNU Affero General Public License as
Expand Down Expand Up @@ -883,8 +883,12 @@ bool TracePixel::CreateCameraRay(Ray& ray, DBL x, DBL y, DBL width, DBL height,
{
if (camera.Location_Fn[i] != NULL)
cameraLocation[i] = mpCameraLocationFn[i]->Evaluate(x0, y0);
if (!IsFinite(cameraLocation[i]))
return false;
if (camera.Direction_Fn[i] != NULL)
cameraDirection[i] = mpCameraDirectionFn[i]->Evaluate(x0, y0);
if (!IsFinite(cameraDirection[i]))
return false;
}
if (cameraDirection.IsNearNull(EPSILON))
return false;
Expand Down
4 changes: 2 additions & 2 deletions source/core/shape/cone.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/// @parblock
///
/// Persistence of Vision Ray Tracer ('POV-Ray') version 3.7.
/// Copyright 1991-2016 Persistence of Vision Raytracer Pty. Ltd.
/// Copyright 1991-2017 Persistence of Vision Raytracer Pty. Ltd.
///
/// POV-Ray is free software: you can redistribute it and/or modify
/// it under the terms of the GNU Affero General Public License as
Expand Down Expand Up @@ -987,7 +987,7 @@ void Cone::UVCoord(Vector2d& Result, const Intersection *Inter, TraceThreadData

void Cone::CalcUV(const Vector3d& IPoint, Vector2d& Result) const
{
DBL len, x, y, z;
DBL len, x, y;
DBL phi, theta;
Vector3d P;

Expand Down
18 changes: 10 additions & 8 deletions source/core/shape/heightfield.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
/// @parblock
///
/// Persistence of Vision Ray Tracer ('POV-Ray') version 3.7.
/// Copyright 1991-2016 Persistence of Vision Raytracer Pty. Ltd.
/// Copyright 1991-2017 Persistence of Vision Raytracer Pty. Ltd.
///
/// POV-Ray is free software: you can redistribute it and/or modify
/// it under the terms of the GNU Affero General Public License as
Expand Down Expand Up @@ -218,6 +218,11 @@ bool HField::Inside(const Vector3d& IPoint, TraceThreadData *Thread) const
px = (int)Test[X];
pz = (int)Test[Z];

// This deals with fringe cases that could slip through the above floating-point tests,
// and would cause out-of-bounds array accesses (most notably #IND values).
px = clip(px, 0, this->Data->max_x - 2);
pz = clip(pz, 0, this->Data->max_z - 2);

x = Test[X] - (DBL)px;
z = Test[Z] - (DBL)pz;

Expand All @@ -233,14 +238,11 @@ bool HField::Inside(const Vector3d& IPoint, TraceThreadData *Thread) const
}
else
{
px = (int)ceil(Test[X]);
pz = (int)ceil(Test[Z]);

y1 = max(Get_Height(px, pz), water);
y2 = max(Get_Height(px-1, pz), water);
y3 = max(Get_Height(px, pz-1), water);
y1 = max(Get_Height(px+1, pz+1), water);
y2 = max(Get_Height(px, pz+1), water);
y3 = max(Get_Height(px+1, pz), water);

Local_Origin = Vector3d((DBL)px,y1,(DBL)pz);
Local_Origin = Vector3d((DBL)(px+1),y1,(DBL)(pz+1));

H_Normal = Vector3d(y2-y1, 1.0, y3-y1);
}
Expand Down
4 changes: 2 additions & 2 deletions tools/windows/htmlhelp/makedocs.pl
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ sub check_images
}
die "$file:$lineno - Orphaned indexentry '$line'" if $line =~ /indexentry/i ;
$newline = "" ;
while ($line =~ /(.*)(<a ([^>]+)>)(.*)/i)
while ($line =~ /(.*?)(<a ([^>]+)>)(.*)/i)
{
my $left = $1 ;
my $attributes = $3 ;
Expand All @@ -432,7 +432,7 @@ sub check_images
{
# we have an <a href="...">, now see if it's an external link
$destination = $1 ;
if ($destination =~ /^http:\/\//i)
if ($destination =~ /^[a-z]*:\/\//i)
{
if ($attributes !~ /target\s*=\s*"([^"]+)"/i)
{
Expand Down
8 changes: 7 additions & 1 deletion unix/povconfig/syspovconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
/// @parblock
///
/// Persistence of Vision Ray Tracer ('POV-Ray') version 3.7.
/// Copyright 1991-2016 Persistence of Vision Raytracer Pty. Ltd.
/// Copyright 1991-2017 Persistence of Vision Raytracer Pty. Ltd.
///
/// POV-Ray is free software: you can redistribute it and/or modify
/// it under the terms of the GNU Affero General Public License as
Expand Down Expand Up @@ -137,6 +137,8 @@ const int NULL=0;
#else
#error "Someone must have found an alternative way of identifying NaNs but failed to implement it here."
#endif
#else
#define POV_ISNAN(x) (false)
#endif

#ifdef HAVE_INF
Expand All @@ -151,8 +153,12 @@ const int NULL=0;
#else
#error "Someone must have found an alternative way of identifying infinities but failed to implement it here."
#endif
#else
#define POV_ISINF(x) (false)
#endif

#define POV_ISFINITE(x) (!POV_ISNAN(x) && !POV_ISINF(x))

#if defined INT8_MAX || defined int8_t
#define POV_INT8 int8_t
#else
Expand Down
7 changes: 4 additions & 3 deletions windows/povconfig/syspovconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
/// @parblock
///
/// Persistence of Vision Ray Tracer ('POV-Ray') version 3.7.
/// Copyright 1991-2016 Persistence of Vision Raytracer Pty. Ltd.
/// Copyright 1991-2017 Persistence of Vision Raytracer Pty. Ltd.
///
/// POV-Ray is free software: you can redistribute it and/or modify
/// it under the terms of the GNU Affero General Public License as
Expand Down Expand Up @@ -297,7 +297,8 @@ namespace pov

#define HAVE_NAN
#define HAVE_INF
#define POV_ISNAN(x) _isnan(x)
#define POV_ISINF(x) _isinf(x)
#define POV_ISNAN(x) (_isnan(x) != 0)
#define POV_ISFINITE(x) (_finite(x) != 0)
#define POV_ISINF(x) (!POV_ISFINITE(x) && !POV_ISNAN(x))

#endif // POVRAY_WINDOWS_SYSPOVCONFIG_H
2 changes: 2 additions & 0 deletions windows/pvedit.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
#ifndef PVEDIT_H_INCLUDED
#define PVEDIT_H_INCLUDED

#include "base/version.h"

#define EDITDLLVERSION 0x0302

#define MAX_EDITORS 32
Expand Down
Loading

0 comments on commit d6e8257

Please sign in to comment.