diff --git a/source/backend/bounding/boundingtask.cpp b/source/backend/bounding/boundingtask.cpp index 3aa09564a..67d0ea701 100644 --- a/source/backend/bounding/boundingtask.cpp +++ b/source/backend/bounding/boundingtask.cpp @@ -8,7 +8,7 @@ /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -31,24 +31,32 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** +// Unit header file must be the first file included within POV-Ray *.cpp files (pulls in config) +#include "backend/bounding/boundingtask.h" + +// Standard C++ header files #include +// Boost header files #include +#if POV_MULTITHREADED #include +#endif -// frame.h must always be the first POV file included (pulls in platform config) -#include "backend/frame.h" -#include "backend/bounding/boundingtask.h" - +// POV-Ray header files (core module) #include "core/bounding/bsptree.h" #include "core/math/matrix.h" #include "core/scene/object.h" #include "core/scene/tracethreaddata.h" +// POV-Ray header files (POVMS module) #include "povms/povmsid.h" +// POV-Ray header files (backend module) #include "backend/scene/backendscenedata.h" #include "backend/support/task.h" @@ -224,4 +232,4 @@ void BoundingTask::SendFatalError(Exception& e) POVMS_SendMessage(msg); } -} +} // end of namespace diff --git a/source/backend/bounding/boundingtask.h b/source/backend/bounding/boundingtask.h index 867a9209c..9401e9495 100644 --- a/source/backend/bounding/boundingtask.h +++ b/source/backend/bounding/boundingtask.h @@ -8,7 +8,7 @@ /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -31,14 +31,23 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** #ifndef POVRAY_BACKEND_BOUNDINGTASK_H #define POVRAY_BACKEND_BOUNDINGTASK_H +// Module config header file must be the first file included within POV-Ray unit header files +#include "backend/configbackend.h" + +// Standard C++ header files #include -#include "backend/frame.h" +// POV-Ray header files (core module) +#include "core/coretypes.h" + +// POV-Ray header files (backend module) #include "backend/render/rendertask.h" namespace pov @@ -67,6 +76,6 @@ class BoundingTask : public SceneTask void SendFatalError(pov_base::Exception& e); }; -} +} // end of namespace #endif // POVRAY_BACKEND_BOUNDINGTASK_H diff --git a/source/backend/configbackend.h b/source/backend/configbackend.h index acae7c611..519883964 100644 --- a/source/backend/configbackend.h +++ b/source/backend/configbackend.h @@ -10,7 +10,7 @@ /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -33,6 +33,8 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** #ifndef POVRAY_BACKEND_CONFIGBACKEND_H diff --git a/source/backend/control/benchmark.cpp b/source/backend/control/benchmark.cpp index 6886c24ea..ab15aa604 100644 --- a/source/backend/control/benchmark.cpp +++ b/source/backend/control/benchmark.cpp @@ -9,7 +9,7 @@ /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -32,14 +32,17 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** -#include - -// frame.h must always be the first POV file included (pulls in platform config) -#include "backend/frame.h" +// Unit header file must be the first file included within POV-Ray *.cpp files (pulls in config) #include "backend/control/benchmark.h" +// C++ variants of standard C header files +#include + +// POV-Ray header files (backend module) #include "backend/control/benchmark_ini.h" #include "backend/control/benchmark_pov.h" @@ -77,5 +80,4 @@ unsigned int Get_Benchmark_Version (void) return (0x0203) ; // Benchmark version 2.03 } -} - +} // end of namespace diff --git a/source/backend/control/benchmark.h b/source/backend/control/benchmark.h index 215c5ca97..928314a54 100644 --- a/source/backend/control/benchmark.h +++ b/source/backend/control/benchmark.h @@ -8,7 +8,7 @@ /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2017 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -31,10 +31,15 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** -#ifndef BENCHMARK_H -#define BENCHMARK_H +#ifndef POVRAY_BACKEND_BENCHMARK_H +#define POVRAY_BACKEND_BENCHMARK_H + +// Module config header file must be the first file included within POV-Ray unit header files +#include "backend/configbackend.h" namespace pov { @@ -46,6 +51,6 @@ namespace pov bool Write_Benchmark_File (const char *Scene_File_Name, const char *INI_File_Name) ; unsigned int Get_Benchmark_Version (void) ; -} +} // end of namespace -#endif +#endif // POVRAY_BACKEND_BENCHMARK_H diff --git a/source/backend/control/messagefactory.cpp b/source/backend/control/messagefactory.cpp index a69d7e11a..d8fc353b8 100644 --- a/source/backend/control/messagefactory.cpp +++ b/source/backend/control/messagefactory.cpp @@ -8,7 +8,7 @@ /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -31,20 +31,26 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** -#include +// Unit header file must be the first file included within POV-Ray *.cpp files (pulls in config) +#include "backend/control/messagefactory.h" + +// Boost header files #include +#if POV_MULTITHREADED +#include +#endif -// frame.h must always be the first POV file included (pulls in platform config) -#include "backend/frame.h" -#include "backend/control/messagefactory.h" +// POV-Ray header files (base module) +#include "base/pov_err.h" +// POV-Ray header files (POVMS module) #include "povms/povmscpp.h" #include "povms/povmsid.h" -#include "base/pov_err.h" - // this must be the last file included #include "base/povdebug.h" @@ -129,4 +135,4 @@ void MessageFactory::SendMessage(MessageClass mc, WarningLevel level, const char (void)POVMS_Send(nullptr, &msg, nullptr, kPOVMSSendMode_NoReply); } -} +} // end of namespace diff --git a/source/backend/control/messagefactory.h b/source/backend/control/messagefactory.h index 879db0cc9..de4e5a376 100644 --- a/source/backend/control/messagefactory.h +++ b/source/backend/control/messagefactory.h @@ -8,7 +8,7 @@ /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -31,16 +31,24 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** #ifndef POVRAY_BACKEND_MESSAGEFACTORY_H #define POVRAY_BACKEND_MESSAGEFACTORY_H -#include "povms/povmscpp.h" -#include "povms/povmsid.h" +// Module config header file must be the first file included within POV-Ray unit header files +#include "backend/configbackend.h" +// POV-Ray header files (base module) #include "base/messenger.h" +// POV-Ray header files (POVMS module) +#include "povms/povmscpp.h" +#include "povms/povmsid.h" + +// POV-Ray header files (backend module) #include "backend/control/renderbackend.h" namespace pov @@ -66,6 +74,6 @@ class MessageFactory : public GenericMessenger const UCS2 *filename = nullptr, POV_LONG line = -1, POV_LONG column = -1, POV_OFF_T offset = -1); }; -} +} // end of namespace #endif // POVRAY_BACKEND_MESSAGEFACTORY_H diff --git a/source/backend/control/renderbackend.cpp b/source/backend/control/renderbackend.cpp index 67c60b133..85bcbe9ae 100644 --- a/source/backend/control/renderbackend.cpp +++ b/source/backend/control/renderbackend.cpp @@ -8,7 +8,7 @@ /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -31,17 +31,21 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** -// frame.h must always be the first POV file included (pulls in platform config) -#include "backend/frame.h" +// Unit header file must be the first file included within POV-Ray *.cpp files (pulls in config) #include "backend/control/renderbackend.h" +// POV-Ray header files (base module) +#include "base/pov_err.h" + +// POV-Ray header files (POVMS module) #include "povms/povmscpp.h" #include "povms/povmsid.h" -#include "base/pov_err.h" - +// POV-Ray header files (backend module) #include "backend/povray.h" #include "backend/control/scene.h" #include "backend/scene/view.h" @@ -784,4 +788,4 @@ void RenderBackend::MakeDoneResult(POVMS_Message& result) result = newmsg; } -} +} // end of namespace diff --git a/source/backend/control/renderbackend.h b/source/backend/control/renderbackend.h index 0bd103e84..4fbb980e9 100644 --- a/source/backend/control/renderbackend.h +++ b/source/backend/control/renderbackend.h @@ -8,7 +8,7 @@ /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2017 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -31,18 +31,26 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** #ifndef POVRAY_BACKEND_RENDERBACKEND_H #define POVRAY_BACKEND_RENDERBACKEND_H +// Module config header file must be the first file included within POV-Ray unit header files +#include "backend/configbackend.h" + +// Standard C++ header files #include #include -#include "povms/povmscpp.h" - +// POV-Ray header files (base module) #include "base/stringutilities.h" +// POV-Ray header files (POVMS module) +#include "povms/povmscpp.h" + namespace pov { @@ -132,6 +140,6 @@ class RenderBackend : public POVMS_MessageReceiver void MakeDoneResult(POVMS_Message& result); }; -} +} // end of namespace #endif // POVRAY_BACKEND_RENDERBACKEND_H diff --git a/source/backend/control/scene.cpp b/source/backend/control/scene.cpp index 53ef04d75..770e01cbf 100644 --- a/source/backend/control/scene.cpp +++ b/source/backend/control/scene.cpp @@ -31,21 +31,28 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** -#include +// Unit header file must be the first file included within POV-Ray *.cpp files (pulls in config) +#include "backend/control/scene.h" -#include +// Boost header files #include +#if POV_MULTITHREADED +#include +#endif -// frame.h must always be the first POV file included (pulls in platform config) -#include "backend/frame.h" -#include "backend/control/scene.h" +// POV-Ray header files (base module) +// POV-Ray header files (core module) #include "core/scene/tracethreaddata.h" +// POV-Ray header files (parser module) #include "parser/parser.h" +// POV-Ray header files (backend module) #include "backend/bounding/boundingtask.h" #include "backend/scene/view.h" @@ -350,4 +357,4 @@ void Scene::ParserControlThread() } } -} +} // end of namespace diff --git a/source/backend/control/scene.h b/source/backend/control/scene.h index 0997702f4..13a8e6a28 100644 --- a/source/backend/control/scene.h +++ b/source/backend/control/scene.h @@ -8,7 +8,7 @@ /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -31,19 +31,30 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** #ifndef POVRAY_BACKEND_SCENE_H #define POVRAY_BACKEND_SCENE_H -#include -#include +// Module config header file must be the first file included within POV-Ray unit header files +#include "backend/configbackend.h" + +// Standard C++ header files #include +#include +#include +// Boost header files +#if POV_MULTITHREADED #include +#endif +// POV-Ray header files (core module) #include "core/scene/tracethreaddata.h" +// POV-Ray header files (backend module) #include "backend/control/renderbackend.h" #include "backend/scene/backendscenedata.h" #include "backend/support/taskqueue.h" @@ -198,6 +209,6 @@ class Scene void ParserControlThread(); }; -} +} // end of namespace #endif // POVRAY_BACKEND_SCENE_H diff --git a/source/backend/frame.h b/source/backend/frame.h deleted file mode 100644 index a62dd2194..000000000 --- a/source/backend/frame.h +++ /dev/null @@ -1,181 +0,0 @@ -//****************************************************************************** -/// -/// @file backend/frame.h -/// -/// Generic header for all back-end modules. -/// -/// This header file is included by all C++ modules in the POV-Ray back-end. -/// It defines various ubiquitous types and constants. -/// -/// @copyright -/// @parblock -/// -/// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2018 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 -/// published by the Free Software Foundation, either version 3 of the -/// License, or (at your option) any later version. -/// -/// POV-Ray is distributed in the hope that it will be useful, -/// but WITHOUT ANY WARRANTY; without even the implied warranty of -/// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -/// GNU Affero General Public License for more details. -/// -/// You should have received a copy of the GNU Affero General Public License -/// along with this program. If not, see . -/// -/// ---------------------------------------------------------------------------- -/// -/// POV-Ray is based on the popular DKB raytracer version 2.12. -/// DKBTrace was originally written by David K. Buck. -/// DKBTrace Ver 2.0-2.12 were written by David K. Buck & Aaron A. Collins. -/// -/// @endparblock -/// -//****************************************************************************** - -#ifndef FRAME_H -#define FRAME_H - -/// @file -/// -/// @todo The size of this file, and it being grouped into various thematical subsections, -/// indicate that its content should be split up into multiple files, to be included from -/// this one; furthermore, some contents may not really be that ubiquitous to warrant -/// including them in every module. - -#include - -#include -#include -#include - -#include - -#include "base/configbase.h" -#include "base/colour.h" -#include "base/types.h" - -#include "core/coretypes.h" -#include "core/bounding/boundingbox.h" - -#include "backend/configbackend.h" - -namespace pov -{ - -using namespace pov_base; - -// from ; we don't want to always type the namespace for these. -using std::min; -using std::max; - -// from ; we don't want to always type the namespace for these. -using std::abs; -using std::acos; -using std::asin; -using std::atan; -using std::atan2; -using std::ceil; -using std::cos; -using std::cosh; -using std::exp; -using std::fabs; -using std::floor; -using std::fmod; -using std::frexp; -using std::ldexp; -using std::log; -using std::log10; -using std::modf; -using std::pow; -using std::sin; -using std::sinh; -using std::sqrt; -using std::tan; -using std::tanh; - -//****************************************************************************** -/// -/// @name Forward Declarations -/// @{ - -class CompoundObject; - -class Intersection; -class Ray; - - -/// @} -/// -//****************************************************************************** -/// -/// @name Scalar, Colour and Vector Stuff -/// -/// @{ - -inline void Destroy_Float(DBL *x) -{ - if (x != nullptr) - delete x; -} - -/// @} -/// -//****************************************************************************** -/// -/// @name Image Stuff -/// @{ - -// Image types. - -#define IMAGE_FILE GIF_FILE+SYS_FILE+TGA_FILE+PGM_FILE+PPM_FILE+PNG_FILE+JPEG_FILE+TIFF_FILE+BMP_FILE+EXR_FILE+HDR_FILE+IFF_FILE+GRAD_FILE -#define NORMAL_FILE GIF_FILE+SYS_FILE+TGA_FILE+PGM_FILE+PPM_FILE+PNG_FILE+JPEG_FILE+TIFF_FILE+BMP_FILE+EXR_FILE+HDR_FILE+IFF_FILE+GRAD_FILE -#define MATERIAL_FILE GIF_FILE+SYS_FILE+TGA_FILE+PGM_FILE+PPM_FILE+PNG_FILE+JPEG_FILE+TIFF_FILE+BMP_FILE+EXR_FILE+HDR_FILE+IFF_FILE+GRAD_FILE -#define HF_FILE GIF_FILE+SYS_FILE+TGA_FILE+PGM_FILE+PPM_FILE+PNG_FILE+JPEG_FILE+TIFF_FILE+BMP_FILE+EXR_FILE+HDR_FILE+POT_FILE - -/// @} -/// -//****************************************************************************** -/// -/// @name Object Stuff -/// -/// @{ - -#ifndef DUMP_OBJECT_DATA -#define DUMP_OBJECT_DATA 0 -#endif - -typedef struct Project_Struct PROJECT; -typedef struct Project_Tree_Node_Struct PROJECT_TREE_NODE; - -struct Project_Struct -{ - int x1, y1, x2, y2; -}; - -/* - * The following structure represent the bounding box hierarchy in 2d space. - * Because is_leaf, Object and Project are the first elements in both - * structures they can be accessed without knowing at which structure - * a pointer is pointing. - */ - -struct Project_Tree_Node_Struct -{ - unsigned short is_leaf; - BBOX_TREE *Node; - PROJECT Project; - unsigned short Entries; - PROJECT_TREE_NODE **Entry; -}; - -/// @} -/// -//****************************************************************************** - -} - -#endif diff --git a/source/backend/lighting/photonestimationtask.cpp b/source/backend/lighting/photonestimationtask.cpp index e2a0b9fbc..363fe40cc 100644 --- a/source/backend/lighting/photonestimationtask.cpp +++ b/source/backend/lighting/photonestimationtask.cpp @@ -10,7 +10,7 @@ /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -33,14 +33,17 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** -#include - -// frame.h must always be the first POV file included (pulls in platform config) -#include "backend/frame.h" +// Unit header file must be the first file included within POV-Ray *.cpp files (pulls in config) #include "backend/lighting/photonestimationtask.h" +// Standard C++ header files +#include + +// POV-Ray header files (core module) #include "core/bounding/boundingbox.h" #include "core/lighting/lightgroup.h" #include "core/lighting/lightsource.h" @@ -49,10 +52,12 @@ #include "core/shape/csg.h" #include "core/support/octree.h" +// POV-Ray header files (POVMS module) #include "povms/povmscpp.h" #include "povms/povmsid.h" #include "povms/povmsutil.h" +// POV-Ray header files (backend module) #include "backend/scene/backendscenedata.h" #include "backend/scene/view.h" #include "backend/scene/viewthreaddata.h" @@ -213,4 +218,4 @@ void PhotonEstimationTask::EstimatePhotonsForObjectAndLight(ObjectPtr Object, Li photonCountEstimate += x; } -} +} // end of namespace diff --git a/source/backend/lighting/photonestimationtask.h b/source/backend/lighting/photonestimationtask.h index a14e0060a..d6df46e4e 100644 --- a/source/backend/lighting/photonestimationtask.h +++ b/source/backend/lighting/photonestimationtask.h @@ -8,7 +8,7 @@ /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -31,14 +31,20 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** -#ifndef PHOTONESTIMATIONTASK_H -#define PHOTONESTIMATIONTASK_H +#ifndef POVRAY_BACKEND_PHOTONESTIMATIONTASK_H +#define POVRAY_BACKEND_PHOTONESTIMATIONTASK_H +// Module config header file must be the first file included within POV-Ray unit header files +#include "backend/configbackend.h" + +// POV-Ray header files (core module) #include "core/render/trace.h" -#include "backend/frame.h" +// POV-Ray header files (backend module) #include "backend/render/rendertask.h" namespace pov @@ -73,5 +79,6 @@ class PhotonEstimationTask : public RenderTask CooperateFunction cooperate; }; -} -#endif +} // end of namespace + +#endif // POVRAY_BACKEND_PHOTONESTIMATIONTASK_H diff --git a/source/backend/lighting/photonshootingstrategy.cpp b/source/backend/lighting/photonshootingstrategy.cpp index 58f71f7d7..b43ad276d 100644 --- a/source/backend/lighting/photonshootingstrategy.cpp +++ b/source/backend/lighting/photonshootingstrategy.cpp @@ -10,7 +10,7 @@ /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -33,14 +33,17 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** -#include - -// frame.h must always be the first POV file included (pulls in platform config) -#include "backend/frame.h" +// Unit header file must be the first file included within POV-Ray *.cpp files (pulls in config) #include "backend/lighting/photonshootingstrategy.h" +// Standard C++ header files +#include + +// POV-Ray header files (core module) #include "core/bounding/boundingbox.h" #include "core/lighting/lightgroup.h" #include "core/lighting/lightsource.h" @@ -53,6 +56,7 @@ #include "core/shape/csg.h" #include "core/support/octree.h" +// POV-Ray header files (backend module) // this must be the last file included #include "base/povdebug.h" @@ -91,5 +95,4 @@ PhotonShootingStrategy::~PhotonShootingStrategy() units.clear(); } - -} +} // end of namespace diff --git a/source/backend/lighting/photonshootingstrategy.h b/source/backend/lighting/photonshootingstrategy.h index 552f75cf9..ab4a5c65d 100644 --- a/source/backend/lighting/photonshootingstrategy.h +++ b/source/backend/lighting/photonshootingstrategy.h @@ -8,7 +8,7 @@ /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2017 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -31,14 +31,23 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** -#ifndef PHOTONSHOOTINGSTRATEGY_H -#define PHOTONSHOOTINGSTRATEGY_H +#ifndef POVRAY_BACKEND_PHOTONSHOOTINGSTRATEGY_H +#define POVRAY_BACKEND_PHOTONSHOOTINGSTRATEGY_H +// Module config header file must be the first file included within POV-Ray unit header files +#include "backend/configbackend.h" + +// Boost header files +#if POV_MULTITHREADED #include +#endif -#include "backend/frame.h" +// POV-Ray header files (core module) +#include "core/coretypes.h" namespace pov { @@ -68,6 +77,6 @@ class PhotonShootingStrategy }; -} +} // end of namespace -#endif +#endif // POVRAY_BACKEND_PHOTONSHOOTINGSTRATEGY_H diff --git a/source/backend/lighting/photonshootingtask.cpp b/source/backend/lighting/photonshootingtask.cpp index 53ee3ce65..ec5e3be9c 100644 --- a/source/backend/lighting/photonshootingtask.cpp +++ b/source/backend/lighting/photonshootingtask.cpp @@ -8,7 +8,7 @@ /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -31,14 +31,17 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** -#include - -// frame.h must always be the first POV file included (pulls in platform config) -#include "backend/frame.h" +// Unit header file must be the first file included within POV-Ray *.cpp files (pulls in config) #include "backend/lighting/photonshootingtask.h" +// Standard C++ header files +#include + +// POV-Ray header files (core module) #include "core/bounding/boundingbox.h" #include "core/lighting/lightgroup.h" #include "core/lighting/lightsource.h" @@ -48,10 +51,12 @@ #include "core/shape/csg.h" #include "core/support/octree.h" +// POV-Ray header files (POVMS module) #include "povms/povmscpp.h" #include "povms/povmsid.h" #include "povms/povmsutil.h" +// POV-Ray header files (backend module) #include "backend/lighting/photonshootingstrategy.h" #include "backend/scene/backendscenedata.h" #include "backend/scene/view.h" @@ -446,4 +451,4 @@ DBL PhotonShootingTask::computeAttenuation(const LightSource* Light, const Ray& return Attenuation; } -} +} // end of namespace diff --git a/source/backend/lighting/photonshootingtask.h b/source/backend/lighting/photonshootingtask.h index 63d1f3eb1..8d3759e1d 100644 --- a/source/backend/lighting/photonshootingtask.h +++ b/source/backend/lighting/photonshootingtask.h @@ -8,7 +8,7 @@ /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -31,15 +31,21 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** -#ifndef PHOTONSHOOTINGTASK_H -#define PHOTONSHOOTINGTASK_H +#ifndef POVRAY_BACKEND_PHOTONSHOOTINGTASK_H +#define POVRAY_BACKEND_PHOTONSHOOTINGTASK_H +// Module config header file must be the first file included within POV-Ray unit header files +#include "backend/configbackend.h" + +// POV-Ray header files (core module) #include "core/lighting/photons.h" #include "core/render/trace.h" -#include "backend/frame.h" +// POV-Ray header files (backend module) #include "backend/render/rendertask.h" namespace pov @@ -93,6 +99,6 @@ class PhotonShootingTask : public RenderTask DBL adcBailout; }; +} // end of namespace -} -#endif +#endif // POVRAY_BACKEND_PHOTONSHOOTINGTASK_H diff --git a/source/backend/lighting/photonsortingtask.cpp b/source/backend/lighting/photonsortingtask.cpp index d75b33518..af234231e 100644 --- a/source/backend/lighting/photonsortingtask.cpp +++ b/source/backend/lighting/photonsortingtask.cpp @@ -8,7 +8,7 @@ /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -31,14 +31,17 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** -#include - -// frame.h must always be the first POV file included (pulls in platform config) -#include "backend/frame.h" +// Unit header file must be the first file included within POV-Ray *.cpp files (pulls in config) #include "backend/lighting/photonsortingtask.h" +// Standard C++ header files +#include + +// POV-Ray header files (core module) #include "core/bounding/boundingbox.h" #include "core/lighting/lightgroup.h" #include "core/lighting/lightsource.h" @@ -47,10 +50,12 @@ #include "core/shape/csg.h" #include "core/support/octree.h" +// POV-Ray header files (POVMS module) #include "povms/povmscpp.h" #include "povms/povmsid.h" #include "povms/povmsutil.h" +// POV-Ray header files (backend module) #include "backend/lighting/photonshootingstrategy.h" #include "backend/scene/backendscenedata.h" #include "backend/scene/view.h" @@ -398,5 +403,4 @@ bool PhotonSortingTask::load() return true; } - -} +} // end of namespace diff --git a/source/backend/lighting/photonsortingtask.h b/source/backend/lighting/photonsortingtask.h index de16eb32b..8b0eb2f6f 100644 --- a/source/backend/lighting/photonsortingtask.h +++ b/source/backend/lighting/photonsortingtask.h @@ -8,7 +8,7 @@ /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -31,14 +31,20 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** -#ifndef PHOTONSORTINGTASK_H -#define PHOTONSORTINGTASK_H +#ifndef POVRAY_BACKEND_PHOTONSORTINGTASK_H +#define POVRAY_BACKEND_PHOTONSORTINGTASK_H +// Module config header file must be the first file included within POV-Ray unit header files +#include "backend/configbackend.h" + +// POV-Ray header files (core module) #include "core/render/trace.h" -#include "backend/frame.h" +// POV-Ray header files (backend module) #include "backend/render/rendertask.h" namespace pov @@ -84,5 +90,6 @@ class PhotonSortingTask : public RenderTask CooperateFunction cooperate; }; -} -#endif +} // end of namespace + +#endif // POVRAY_BACKEND_PHOTONSORTINGTASK_H diff --git a/source/backend/lighting/photonstrategytask.cpp b/source/backend/lighting/photonstrategytask.cpp index 0f64816c4..4560dbb80 100644 --- a/source/backend/lighting/photonstrategytask.cpp +++ b/source/backend/lighting/photonstrategytask.cpp @@ -8,7 +8,7 @@ /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -31,14 +31,17 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** -#include - -// frame.h must always be the first POV file included (pulls in platform config) -#include "backend/frame.h" +// Unit header file must be the first file included within POV-Ray *.cpp files (pulls in config) #include "backend/lighting/photonstrategytask.h" +// Standard C++ header files +#include + +// POV-Ray header files (core module) #include "core/bounding/boundingbox.h" #include "core/lighting/lightgroup.h" #include "core/lighting/lightsource.h" @@ -47,10 +50,12 @@ #include "core/shape/csg.h" #include "core/support/octree.h" +// POV-Ray header files (POVMS module) #include "povms/povmscpp.h" #include "povms/povmsid.h" #include "povms/povmsutil.h" +// POV-Ray header files (backend module) #include "backend/lighting/photonshootingstrategy.h" #include "backend/scene/backendscenedata.h" #include "backend/scene/view.h" @@ -194,5 +199,4 @@ void PhotonStrategyTask::SearchThroughObjectsCreateUnits(vector& Obje } } - -} +} // end of namespace diff --git a/source/backend/lighting/photonstrategytask.h b/source/backend/lighting/photonstrategytask.h index 1708d0d25..38ddc2212 100644 --- a/source/backend/lighting/photonstrategytask.h +++ b/source/backend/lighting/photonstrategytask.h @@ -8,7 +8,7 @@ /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -31,14 +31,20 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** -#ifndef PHOTONSTRATEGYTASK_H -#define PHOTONSTRATEGYTASK_H +#ifndef POVRAY_BACKEND_PHOTONSTRATEGYTASK_H +#define POVRAY_BACKEND_PHOTONSTRATEGYTASK_H +// Module config header file must be the first file included within POV-Ray unit header files +#include "backend/configbackend.h" + +// POV-Ray header files (core module) #include "core/render/trace.h" -#include "backend/frame.h" +// POV-Ray header files (backend module) #include "backend/render/rendertask.h" namespace pov @@ -78,5 +84,6 @@ class PhotonStrategyTask : public RenderTask CooperateFunction cooperate; }; -} -#endif +} // end of namespace + +#endif // POVRAY_BACKEND_PHOTONSTRATEGYTASK_H diff --git a/source/backend/povray.cpp b/source/backend/povray.cpp index 7bf353312..c2e650dad 100644 --- a/source/backend/povray.cpp +++ b/source/backend/povray.cpp @@ -31,29 +31,38 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** -#include -#include +// Unit header file must be the first file included within POV-Ray *.cpp files (pulls in config) +#include "backend/povray.h" +// C++ variants of standard C header files #include -// frame.h must always be the first POV file included (pulls in platform config) -#include "backend/frame.h" -#include "backend/povray.h" - -#include "povms/povmscpp.h" -#include "povms/povmsid.h" -#include "povms/povmsutil.h" +// Boost header files +#include +#if POV_MULTITHREADED +#include +#endif +// POV-Ray header files (base module) #include "base/platformbase.h" #include "base/pov_err.h" #include "base/timer.h" #include "base/types.h" +// POV-Ray header files (core module) #include "core/material/noise.h" #include "core/material/pattern.h" +// POV-Ray header files (POVMS module) +#include "povms/povmscpp.h" +#include "povms/povmsid.h" +#include "povms/povmsutil.h" + +// POV-Ray header files (backend module) #include "backend/control/renderbackend.h" #include "backend/support/task.h" diff --git a/source/backend/povray.h b/source/backend/povray.h index 984a55086..4e71677fb 100644 --- a/source/backend/povray.h +++ b/source/backend/povray.h @@ -14,7 +14,7 @@ /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -37,16 +37,26 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** #ifndef POVRAY_BACKEND_POVRAY_H #define POVRAY_BACKEND_POVRAY_H -#include +// Module config header file must be the first file included within POV-Ray unit header files +#include "backend/configbackend.h" + +// Boost header files #include +#if POV_MULTITHREADED +#include +#endif +// POV-Ray header files (base module) #include "base/version_info.h" +// POV-Ray header files (POVMS module) #include "povms/povmscpp.h" /** diff --git a/source/backend/precomp.cpp b/source/backend/precomp.cpp index fae095b89..f9cce11b3 100644 --- a/source/backend/precomp.cpp +++ b/source/backend/precomp.cpp @@ -8,7 +8,7 @@ /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2017 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -31,6 +31,8 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** #include "backend/precomp.h" diff --git a/source/backend/precomp.h b/source/backend/precomp.h index 95c341178..a169f709d 100644 --- a/source/backend/precomp.h +++ b/source/backend/precomp.h @@ -8,7 +8,7 @@ /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2017 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -31,6 +31,8 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** /// @file @@ -45,8 +47,10 @@ /// absolute minimum when precompiled headers are _not_ used. /// @endparblock -#include "base/configbase.h" +// Module config header file must be the first file included within POV-Ray unit header files +#include "backend/configbackend.h" +// C++ variants of standard C header files #include #include #include @@ -56,28 +60,31 @@ #include #include +// Standard C++ header files #include #include +#include #include #include #include #include +#include #include #include #include #include #include +// Boost header files #include #include #include -#include #include #include #include +#include +#include #if POV_MULTITHREADED #include #include #endif -#include - diff --git a/source/backend/render/radiositytask.cpp b/source/backend/render/radiositytask.cpp index 6472f6bb3..545a5fbff 100644 --- a/source/backend/render/radiositytask.cpp +++ b/source/backend/render/radiositytask.cpp @@ -8,7 +8,7 @@ /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -31,18 +31,24 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** -#include -#include - -// frame.h must always be the first POV file included (pulls in platform config) -#include "backend/frame.h" +// Unit header file must be the first file included within POV-Ray *.cpp files (pulls in config) #include "backend/render/radiositytask.h" +// Boost header files +#include +#if POV_MULTITHREADED +#include +#endif + +// POV-Ray header files (base module) #include "base/timer.h" #include "base/types.h" +// POV-Ray header files (backend module) #include "backend/scene/backendscenedata.h" #include "backend/scene/view.h" #include "backend/scene/viewthreaddata.h" @@ -260,4 +266,4 @@ void RadiosityTask::Finish() GetViewDataPtr()->cpuTime = ConsumedCPUTime(); } -} +} // end of namespace diff --git a/source/backend/render/radiositytask.h b/source/backend/render/radiositytask.h index 55873eaa6..f02260e6b 100644 --- a/source/backend/render/radiositytask.h +++ b/source/backend/render/radiositytask.h @@ -8,7 +8,7 @@ /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -31,16 +31,23 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** #ifndef POVRAY_BACKEND_RADIOSITYTASK_H #define POVRAY_BACKEND_RADIOSITYTASK_H +// Module config header file must be the first file included within POV-Ray unit header files +#include "backend/configbackend.h" + +// POV-Ray header files (core module) #include "core/lighting/photons.h" #include "core/lighting/radiosity.h" #include "core/material/media.h" #include "core/render/tracepixel.h" +// POV-Ray header files (backend module) #include "backend/render/rendertask.h" #include "backend/scene/view.h" @@ -103,7 +110,6 @@ class RadiosityTask : public RenderTask int nominalThreads; }; -} +} // end of namespace #endif // POVRAY_BACKEND_RADIOSITYTASK_H - diff --git a/source/backend/render/rendertask.cpp b/source/backend/render/rendertask.cpp index 2d3b3c210..8d0609a9d 100644 --- a/source/backend/render/rendertask.cpp +++ b/source/backend/render/rendertask.cpp @@ -8,7 +8,7 @@ /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -31,20 +31,27 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** -#include +// Unit header file must be the first file included within POV-Ray *.cpp files (pulls in config) +#include "backend/render/rendertask.h" + +// Boost header files #include +#if POV_MULTITHREADED +#include +#endif -// frame.h must always be the first POV file included (pulls in platform config) -#include "backend/frame.h" +// POV-Ray header files (base module) +#include "base/timer.h" +#include "base/types.h" +// POV-Ray header files (POVMS module) #include "povms/povmsid.h" -#include "base/types.h" -#include "base/timer.h" - -#include "backend/render/rendertask.h" +// POV-Ray header files (backend module) #include "backend/scene/backendscenedata.h" #include "backend/scene/view.h" #include "backend/scene/viewthreaddata.h" @@ -94,4 +101,4 @@ void RenderTask::SendFatalError(Exception& e) POVMS_SendMessage(msg); } -} +} // end of namespace diff --git a/source/backend/render/rendertask.h b/source/backend/render/rendertask.h index 8d9371df4..dda4b85cc 100644 --- a/source/backend/render/rendertask.h +++ b/source/backend/render/rendertask.h @@ -8,7 +8,7 @@ /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -31,11 +31,17 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** #ifndef POVRAY_BACKEND_RENDERTASK_H #define POVRAY_BACKEND_RENDERTASK_H +// Module config header file must be the first file included within POV-Ray unit header files +#include "backend/configbackend.h" + +// POV-Ray header files (backend module) #include "backend/support/task.h" namespace pov @@ -65,6 +71,6 @@ class RenderTask : public SceneTask void SendFatalError(pov_base::Exception& e); }; -} +} // end of namespace #endif // POVRAY_BACKEND_RENDERTASK_H diff --git a/source/backend/render/tracetask.cpp b/source/backend/render/tracetask.cpp index 64a1b70b9..b5fcb57da 100644 --- a/source/backend/render/tracetask.cpp +++ b/source/backend/render/tracetask.cpp @@ -8,7 +8,7 @@ /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -31,31 +31,39 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** +// Unit header file must be the first file included within POV-Ray *.cpp files (pulls in config) +#include "backend/render/tracetask.h" + +// Standard C++ header files #include #include +// Boost header files +#if POV_MULTITHREADED #include +#endif -// frame.h must always be the first POV file included (pulls in platform config) -#include "backend/frame.h" -#include "backend/render/tracetask.h" +// POV-Ray header files (base module) +#ifdef PROFILE_INTERSECTIONS +#include "base/image/image.h" +#endif +// POV-Ray header files (core module) #include "core/material/normal.h" #include "core/math/chi2.h" #include "core/math/jitter.h" #include "core/math/matrix.h" #include "core/render/trace.h" +// POV-Ray header files (backend module) #include "backend/scene/backendscenedata.h" #include "backend/scene/view.h" #include "backend/scene/viewthreaddata.h" -#ifdef PROFILE_INTERSECTIONS -#include "base/image/image.h" -#endif - // this must be the last file included #include "base/povdebug.h" @@ -1060,4 +1068,4 @@ void TraceTask::SubdivideOnePixel(DBL x, DBL y, DBL d, size_t bx, size_t by, siz } } -} +} // end of namespace diff --git a/source/backend/render/tracetask.h b/source/backend/render/tracetask.h index 230f3542a..fa6a40159 100644 --- a/source/backend/render/tracetask.h +++ b/source/backend/render/tracetask.h @@ -8,7 +8,7 @@ /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -31,20 +31,28 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** #ifndef POVRAY_BACKEND_TRACETASK_H #define POVRAY_BACKEND_TRACETASK_H +// Module config header file must be the first file included within POV-Ray unit header files +#include "backend/configbackend.h" + +// Standard C++ header files #include +// POV-Ray header files (base module) #include "base/image/colourspace.h" +// POV-Ray header files (core module) #include "core/lighting/radiosity.h" #include "core/material/media.h" #include "core/render/tracepixel.h" -#include "backend/frame.h" +// POV-Ray header files (backend module) #include "backend/render/rendertask.h" namespace pov @@ -127,6 +135,6 @@ class TraceTask : public RenderTask void SubdivideOnePixel(DBL x, DBL y, DBL d, size_t bx, size_t by, size_t bstep, SubdivisionBuffer& buffer, RGBTColour& result, int level); }; -} +} // end of namespace #endif // POVRAY_BACKEND_TRACETASK_H diff --git a/source/backend/scene/backendscenedata.cpp b/source/backend/scene/backendscenedata.cpp index 49dd777eb..9f469465c 100644 --- a/source/backend/scene/backendscenedata.cpp +++ b/source/backend/scene/backendscenedata.cpp @@ -8,7 +8,7 @@ /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -31,19 +31,23 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** -#include +// Unit header file must be the first file included within POV-Ray *.cpp files (pulls in config) +#include "backend/scene/backendscenedata.h" -#include +// Boost header files #include +#if POV_MULTITHREADED +#include +#endif -// frame.h must always be the first POV file included (pulls in platform config) -#include "backend/frame.h" -#include "backend/scene/backendscenedata.h" - +// POV-Ray header files (base module) #include "base/fileutil.h" +// POV-Ray header files (POVMS module) #include "povms/povmsid.h" // this must be the last file included @@ -308,4 +312,4 @@ OStream *BackendSceneData::CreateFile(POVMSContext ctx, const UCS2String& filena return tempfile; } -} +} // end of namespace diff --git a/source/backend/scene/backendscenedata.h b/source/backend/scene/backendscenedata.h index bd347326b..4d8d6e371 100644 --- a/source/backend/scene/backendscenedata.h +++ b/source/backend/scene/backendscenedata.h @@ -8,7 +8,7 @@ /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -31,13 +31,20 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** #ifndef POVRAY_BACKEND_BACKENDSCENEDATA_H #define POVRAY_BACKEND_BACKENDSCENEDATA_H +// Module config header file must be the first file included within POV-Ray unit header files +#include "backend/configbackend.h" + +// POV-Ray header files (core module) #include "core/scene/scenedata.h" +// POV-Ray header files (backend module) #include "backend/control/renderbackend.h" namespace pov @@ -137,6 +144,6 @@ class BackendSceneData : public SceneData BackendSceneData& operator=(const BackendSceneData&); }; -} +} // end of namespace #endif // POVRAY_BACKEND_BACKENDSCENEDATA_H diff --git a/source/backend/scene/view.cpp b/source/backend/scene/view.cpp index 00c60f63e..9af377316 100644 --- a/source/backend/scene/view.cpp +++ b/source/backend/scene/view.cpp @@ -8,7 +8,7 @@ /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -31,29 +31,41 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** -#include +// Unit header file must be the first file included within POV-Ray *.cpp files (pulls in config) +#include "backend/scene/view.h" + +// C++ variants of standard C header files + +// Standard C++ header files + +// Boost header files #include #include #include #include +#if POV_MULTITHREADED +#include +#endif -// frame.h must always be the first POV file included (pulls in platform config) -#include "backend/frame.h" -#include "backend/scene/view.h" - +// POV-Ray header files (base module) #include "base/path.h" #include "base/timer.h" +// POV-Ray header files (core module) #include "core/lighting/photons.h" #include "core/lighting/radiosity.h" #include "core/math/matrix.h" #include "core/support/octree.h" +// POV-Ray header files (POVMS module) #include "povms/povmscpp.h" #include "povms/povmsid.h" +// POV-Ray header files (backend module) #include "backend/control/renderbackend.h" #include "backend/lighting/photonestimationtask.h" #include "backend/lighting/photonshootingstrategy.h" @@ -1546,4 +1558,4 @@ const Camera *RTRData::CompletedFrame() return (ca ? &cameras[numRTRframes % cameras.size()] : nullptr); } -} +} // end of namespace diff --git a/source/backend/scene/view.h b/source/backend/scene/view.h index abdf2f855..1de4a8dad 100644 --- a/source/backend/scene/view.h +++ b/source/backend/scene/view.h @@ -8,7 +8,7 @@ /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -31,17 +31,32 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** #ifndef POVRAY_BACKEND_VIEW_H #define POVRAY_BACKEND_VIEW_H +// Module config header file must be the first file included within POV-Ray unit header files +#include "backend/configbackend.h" + +// Standard C++ header files #include +// Boost header files +#if POV_MULTITHREADED +#include +#include +#endif + +// POV-Ray header files (core module) #include "core/bounding/bsptree.h" #include "core/lighting/radiosity.h" #include "core/scene/camera.h" +// POV-Ray header files (backend module) +#include "backend/control/renderbackend.h" #include "backend/support/taskqueue.h" namespace pov @@ -49,6 +64,7 @@ namespace pov using namespace pov_base; +class BackendSceneData; class Scene; class SceneData; class ViewData; @@ -504,6 +520,6 @@ class View bool CheckCameraHollowObject(const Vector3d& point, const BBOX_TREE *node); // TODO - comment missing - consider moving elsewhere [trf] }; -} +} // end of namespace #endif // POVRAY_BACKEND_VIEW_H diff --git a/source/backend/scene/viewthreaddata.cpp b/source/backend/scene/viewthreaddata.cpp index 82020a62c..c3eb8fcba 100644 --- a/source/backend/scene/viewthreaddata.cpp +++ b/source/backend/scene/viewthreaddata.cpp @@ -8,7 +8,7 @@ /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -31,14 +31,17 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** -#include - -// frame.h must always be the first POV file included (pulls in platform config) -#include "backend/frame.h" +// Unit header file must be the first file included within POV-Ray *.cpp files (pulls in config) #include "backend/scene/viewthreaddata.h" +// Standard C++ header files +#include + +// POV-Ray header files (backend module) #include "backend/scene/backendscenedata.h" #include "backend/scene/view.h" @@ -73,4 +76,4 @@ const POVRect& ViewThreadData::GetRenderArea() return viewData->GetRenderArea(); } -} +} // end of namespace diff --git a/source/backend/scene/viewthreaddata.h b/source/backend/scene/viewthreaddata.h index 3817f7d62..4636ca4cc 100644 --- a/source/backend/scene/viewthreaddata.h +++ b/source/backend/scene/viewthreaddata.h @@ -8,7 +8,7 @@ /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -31,11 +31,17 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** #ifndef POVRAY_BACKEND_VIEWTHREADDATA_H #define POVRAY_BACKEND_VIEWTHREADDATA_H +// Module config header file must be the first file included within POV-Ray unit header files +#include "backend/configbackend.h" + +// POV-Ray header files (core module) #include "core/scene/tracethreaddata.h" namespace pov @@ -95,6 +101,6 @@ class ViewThreadData : public TraceThreadData ~ViewThreadData(); }; -} +} // end of namespace #endif // POVRAY_BACKEND_VIEWTHREADDATA_H diff --git a/source/backend/support/task.cpp b/source/backend/support/task.cpp index c5f01a6bf..e89d28400 100644 --- a/source/backend/support/task.cpp +++ b/source/backend/support/task.cpp @@ -8,7 +8,7 @@ /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -31,21 +31,27 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** +// Unit header file must be the first file included within POV-Ray *.cpp files (pulls in config) +#include "backend/support/task.h" + +// C++ variants of standard C header files #include + +// Standard C++ header files #include +// Boost header files #include -#include - -// frame.h must always be the first POV file included (pulls in platform config) -#include "backend/frame.h" -#include "backend/support/task.h" +// POV-Ray header files (base module) #include "base/timer.h" #include "base/types.h" +// POV-Ray header files (backend module) #include "backend/control/messagefactory.h" #include "backend/scene/backendscenedata.h" @@ -275,4 +281,4 @@ SceneTask::SceneTask(ThreadData *td, const boost::function1& f messageFactory(sd->warningLevel, sn, sd->backendAddress, sd->frontendAddress, sd->sceneId, vid) {} -} +} // end of namespace diff --git a/source/backend/support/task.h b/source/backend/support/task.h index dfb91da0e..8817cd92d 100644 --- a/source/backend/support/task.h +++ b/source/backend/support/task.h @@ -8,7 +8,7 @@ /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -31,22 +31,38 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** #ifndef POVRAY_BACKEND_TASK_H #define POVRAY_BACKEND_TASK_H -#include -#include +// Module config header file must be the first file included within POV-Ray unit header files +#include "backend/configbackend.h" -#include +// Boost header files #include +#if POV_MULTITHREADED +#include +#endif -#include "backend/frame.h" +// POV-Ray header files (base module) +#include "base/pov_err.h" +#include "base/timer.h" + +// POV-Ray header files (POVMS module) +#include "povms/povms.h" +// POV-Ray header files (backend module) #include "backend/control/messagefactory.h" #include "backend/control/renderbackend.h" -#include "base/timer.h" + +namespace pov_base +{ +class ThreadData; +class Timer; +} namespace pov { @@ -55,7 +71,6 @@ using namespace pov_base; class BackendSceneData; - class Task { public: @@ -190,7 +205,6 @@ class Task void Cleanup(); }; - class SceneTask : public Task { public: @@ -200,6 +214,6 @@ class SceneTask : public Task MessageFactory messageFactory; }; -} +} // end of namespace #endif // POVRAY_BACKEND_TASK_H diff --git a/source/backend/support/taskqueue.cpp b/source/backend/support/taskqueue.cpp index 2a8fe6e14..b3f83ab2c 100644 --- a/source/backend/support/taskqueue.cpp +++ b/source/backend/support/taskqueue.cpp @@ -8,7 +8,7 @@ /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2017 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -31,15 +31,20 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** -#include -#include - -// frame.h must always be the first POV file included (pulls in platform config) -#include "backend/frame.h" +// Unit header file must be the first file included within POV-Ray *.cpp files (pulls in config) #include "backend/support/taskqueue.h" +// Boost header files +#include +#if POV_MULTITHREADED +#include +#endif + +// POV-Ray header files (backend module) #include "backend/support/task.h" // this must be the last file included @@ -260,4 +265,4 @@ void TaskQueue::Notify() processCondition.notify_one(); } -} +} // end of namespace diff --git a/source/backend/support/taskqueue.h b/source/backend/support/taskqueue.h index cb9e2b664..9d16b999c 100644 --- a/source/backend/support/taskqueue.h +++ b/source/backend/support/taskqueue.h @@ -8,7 +8,7 @@ /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2017 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -31,21 +31,43 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** #ifndef POVRAY_BACKEND_TASKQUEUE_H #define POVRAY_BACKEND_TASKQUEUE_H +// Module config header file must be the first file included within POV-Ray unit header files +#include "backend/configbackend.h" + +// Standard C++ header files +#include + +// Boost header files +#include +#if POV_MULTITHREADED #include #include +#endif +// POV-Ray header files (POVMS module) #include "povms/povmscpp.h" -#include "backend/support/task.h" +// POV-Ray header files (backend module) + +namespace pov_base +{ +class ThreadData; +} namespace pov { +using namespace pov_base; + +class Task; + class TaskQueue { class TaskEntry @@ -117,6 +139,6 @@ class TaskQueue TaskQueue& operator=(const TaskQueue&); }; -} +} // end of namespace #endif // POVRAY_BACKEND_TASKQUEUE_H diff --git a/source/base/fileutil.h b/source/base/fileutil.h index f4ae1a6b8..415fe1d1c 100644 --- a/source/base/fileutil.h +++ b/source/base/fileutil.h @@ -8,7 +8,7 @@ /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2017 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -31,6 +31,8 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** #ifndef POVRAY_BASE_FILEUTIL_H @@ -39,7 +41,7 @@ // Module config header file must be the first file included within POV-Ray unit header files #include "base/configbase.h" -// POV-Ray base header files +// POV-Ray header files (base module) #include "base/fileinputoutput.h" #include "base/stringutilities.h" @@ -74,6 +76,11 @@ class IStream; #define EXR_FILE 0x00001000 #define HDR_FILE 0x00002000 +#define IMAGE_FILE GIF_FILE+SYS_FILE+TGA_FILE+PGM_FILE+PPM_FILE+PNG_FILE+JPEG_FILE+TIFF_FILE+BMP_FILE+EXR_FILE+HDR_FILE+IFF_FILE+GRAD_FILE +#define NORMAL_FILE GIF_FILE+SYS_FILE+TGA_FILE+PGM_FILE+PPM_FILE+PNG_FILE+JPEG_FILE+TIFF_FILE+BMP_FILE+EXR_FILE+HDR_FILE+IFF_FILE+GRAD_FILE +#define MATERIAL_FILE GIF_FILE+SYS_FILE+TGA_FILE+PGM_FILE+PPM_FILE+PNG_FILE+JPEG_FILE+TIFF_FILE+BMP_FILE+EXR_FILE+HDR_FILE+IFF_FILE+GRAD_FILE +#define HF_FILE GIF_FILE+SYS_FILE+TGA_FILE+PGM_FILE+PPM_FILE+PNG_FILE+JPEG_FILE+TIFF_FILE+BMP_FILE+EXR_FILE+HDR_FILE+POT_FILE + #define POV_FILE_EXTENSIONS_PER_TYPE 4 struct POV_File_Extensions @@ -91,6 +98,6 @@ IMemStream *Internal_Font_File(int font_id); /// //############################################################################## -} +} // end of namespace #endif // POVRAY_BASE_FILEUTIL_H diff --git a/source/base/precomp.h b/source/base/precomp.h index 0ece245bc..b9c7d42a4 100644 --- a/source/base/precomp.h +++ b/source/base/precomp.h @@ -8,7 +8,7 @@ /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2017 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -31,6 +31,8 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** /// @file @@ -74,13 +76,12 @@ #include #include #include -#include #include #include #include +#include +#include #if POV_MULTITHREADED #include #include #endif -#include - diff --git a/source/core/lighting/photons.cpp b/source/core/lighting/photons.cpp index 08ed3c83b..0f64407f3 100644 --- a/source/core/lighting/photons.cpp +++ b/source/core/lighting/photons.cpp @@ -8,7 +8,7 @@ /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -31,6 +31,8 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** // Unit header file must be the first file included within POV-Ray *.cpp files (pulls in config) @@ -39,7 +41,7 @@ // C++ variants of C standard header files #include -// C++ standard header files +// Standard C++ header files #include #include @@ -2684,4 +2686,3 @@ void LightTargetCombo::computeAnglesAndDeltas(shared_ptr sceneData) } } // end of namespace - diff --git a/source/core/lighting/photons.h b/source/core/lighting/photons.h index 8937e6712..1156c6e2e 100644 --- a/source/core/lighting/photons.h +++ b/source/core/lighting/photons.h @@ -8,7 +8,7 @@ /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -31,6 +31,8 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** #ifndef POVRAY_CORE_PHOTONS_H @@ -39,7 +41,7 @@ // Module config header file must be the first file included within POV-Ray unit header files #include "core/configcore.h" -// C++ standard header files +// Standard C++ header files #include // POV-Ray header files (core module) @@ -410,6 +412,6 @@ void ChooseRay(BasicRay &NewRay, const Vector3d& Normal, const Vector3d& Raw_Nor /// //############################################################################## -} +} // end of namespace #endif // POVRAY_CORE_PHOTONS_H diff --git a/source/core/material/blendmap.h b/source/core/material/blendmap.h index b138fd5ce..8bcc5dd68 100644 --- a/source/core/material/blendmap.h +++ b/source/core/material/blendmap.h @@ -4,13 +4,11 @@ /// /// Declarations related to blend maps. /// -/// @note `frame.h` contains other colour stuff. -/// /// @copyright /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2017 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -33,6 +31,8 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** #ifndef POVRAY_CORE_BLENDMAP_H @@ -108,6 +108,6 @@ shared_ptr Copy_Blend_Map (shared_ptr& Old); /// //############################################################################## -} +} // end of namespace #endif // POVRAY_CORE_BLENDMAP_H diff --git a/source/core/precomp.h b/source/core/precomp.h index d412cbd84..46c6a7a67 100644 --- a/source/core/precomp.h +++ b/source/core/precomp.h @@ -8,7 +8,7 @@ /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2017 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -31,6 +31,8 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** /// @file @@ -45,8 +47,10 @@ /// absolute minimum when precompiled headers are _not_ used. /// @endparblock -#include "base/configbase.h" +// Module config header file must be the first file included within POV-Ray unit header files +#include "core/configcore.h" +// C++ variants of standard C header files #include #include #include @@ -56,6 +60,7 @@ #include #include +// Standard C++ header files #include #include #include @@ -68,16 +73,16 @@ #include #include +// Boost header files #include #include #include -#include #include #include #include +#include +#include #if POV_MULTITHREADED #include #include #endif -#include - diff --git a/source/core/scene/object.h b/source/core/scene/object.h index dc246dc34..f4f07253f 100644 --- a/source/core/scene/object.h +++ b/source/core/scene/object.h @@ -4,13 +4,11 @@ /// /// Declarations related to geometric shapes. /// -/// @note `frame.h` contains other object stuff. -/// /// @copyright /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -33,6 +31,8 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** #ifndef POVRAY_CORE_OBJECT_H @@ -41,6 +41,7 @@ // Module config header file must be the first file included within POV-Ray unit header files #include "core/configcore.h" +// POV-Ray header files (core module) #include "core/bounding/boundingbox.h" #include "core/material/texture.h" @@ -409,6 +410,6 @@ void Destroy_Single_Object(ObjectPtr *ObjectPtr); /// //############################################################################## -} +} // end of namespace #endif // POVRAY_CORE_OBJECT_H diff --git a/source/core/scene/scenedata.cpp b/source/core/scene/scenedata.cpp index bae199b82..4f634f31f 100644 --- a/source/core/scene/scenedata.cpp +++ b/source/core/scene/scenedata.cpp @@ -31,17 +31,20 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** // Unit header file must be the first file included within POV-Ray *.cpp files (pulls in config) #include "core/scene/scenedata.h" -#include - +// Boost header files #include +// POV-Ray header files (base module) #include "base/version_info.h" +// POV-Ray header files (core module) #include "core/material/pattern.h" #include "core/material/noise.h" #include "core/scene/atmosphere.h" @@ -130,4 +133,4 @@ SceneData::~SceneData() delete tree; } -} +} // end of namespace diff --git a/source/core/shape/sphere.cpp b/source/core/shape/sphere.cpp index 9a61b90a6..13982b04f 100644 --- a/source/core/shape/sphere.cpp +++ b/source/core/shape/sphere.cpp @@ -8,7 +8,7 @@ /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -31,11 +31,14 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** // Unit header file must be the first file included within POV-Ray *.cpp files (pulls in config) #include "core/shape/sphere.h" +// POV-Ray header files (core module) #include "core/bounding/boundingbox.h" #include "core/math/matrix.h" #include "core/render/ray.h" @@ -631,18 +634,7 @@ void Sphere::Transform(const TRANSFORM *tr) ******************************************************************************/ Sphere::~Sphere() -{ -#if(DUMP_OBJECT_DATA == 1) - Debug_Info("{ // SPHERE \n"); - DUMP_OBJECT_FIELDS(this); - Debug_Info("\t{ %f, %f, %f }, // Center\n", \ - (DBL)Center[X], \ - (DBL)Center[Y], \ - (DBL)Center[Z]); \ - Debug_Info("\t%f // Radius\n", (DBL)Radius); - Debug_Info("}\n"); -#endif -} +{} @@ -788,4 +780,4 @@ bool Sphere::Intersect_BBox(BBoxDirection, const BBoxVector3d&, const BBoxVector return true; } -} +} // end of namespace diff --git a/source/frontend/precomp.h b/source/frontend/precomp.h index c593b2096..94cdd437b 100644 --- a/source/frontend/precomp.h +++ b/source/frontend/precomp.h @@ -8,7 +8,7 @@ /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2017 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -31,6 +31,8 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** /// @file @@ -45,8 +47,10 @@ /// absolute minimum when precompiled headers are _not_ used. /// @endparblock -#include "base/configbase.h" +// Module config header file must be the first file included within POV-Ray unit header files +#include "frontend/configfrontend.h" +// C++ variants of standard C header files #include #include #include @@ -56,6 +60,7 @@ #include #include +// Standard C++ header files #include #include #include @@ -68,16 +73,16 @@ #include #include +// Boost header files #include #include #include -#include #include #include #include +#include +#include #if POV_MULTITHREADED #include #include #endif -#include - diff --git a/source/parser/parser.cpp b/source/parser/parser.cpp index 0b6489ed7..ab0b313ec 100644 --- a/source/parser/parser.cpp +++ b/source/parser/parser.cpp @@ -31,19 +31,21 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** // Unit header file must be the first file included within POV-Ray *.cpp files (pulls in config) #include "parser/parser.h" -// C++ variants of C standard header files +// C++ variants of standard C header files #include #include #include #include #include -// C++ standard header files +// Standard C++ header files #include // Boost header files @@ -9579,7 +9581,7 @@ void Parser::Destroy_Ident_Data(void *Data, int Type) Destroy_Vector_4D(reinterpret_cast(Data)); break; case FLOAT_ID_TOKEN: - Destroy_Float(reinterpret_cast(Data)); + delete reinterpret_cast(Data); break; case PIGMENT_ID_TOKEN: case DENSITY_ID_TOKEN: @@ -11335,4 +11337,4 @@ void Parser::POV_ARRAY::Shrink() } } -} +} // end of namespace diff --git a/source/parser/parser_expressions.cpp b/source/parser/parser_expressions.cpp index ef1c70ba9..1d4f56bfb 100644 --- a/source/parser/parser_expressions.cpp +++ b/source/parser/parser_expressions.cpp @@ -31,6 +31,8 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** // Unit header file must be the first file included within POV-Ray *.cpp files (pulls in config) @@ -40,7 +42,7 @@ #include #include -// C++ standard header files +// Standard C++ header files #include // Boost header files @@ -4010,4 +4012,4 @@ DBL Parser::Parse_Signed_Float(void) return(Val); } -} +} // end of namespace diff --git a/source/parser/precomp.h b/source/parser/precomp.h index a8a89c6b3..0db6e7d89 100644 --- a/source/parser/precomp.h +++ b/source/parser/precomp.h @@ -8,7 +8,7 @@ /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2017 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -31,6 +31,8 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** /// @file @@ -45,8 +47,10 @@ /// absolute minimum when precompiled headers are _not_ used. /// @endparblock +// Module config header file must be the first file included within POV-Ray unit header files #include "parser/configparser.h" +// C++ variants of standard C header files #include #include #include @@ -56,6 +60,7 @@ #include #include +// Standard C++ header files #include #include #include @@ -68,16 +73,16 @@ #include #include +// Boost header files #include #include #include -#include #include #include #include +#include +#include #if POV_MULTITHREADED #include #include #endif -#include - diff --git a/source/povmain.cpp b/source/povmain.cpp index 6e0eb3a0c..ca3406caa 100644 --- a/source/povmain.cpp +++ b/source/povmain.cpp @@ -8,7 +8,7 @@ /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -31,20 +31,32 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** -#include -#include +// This unit source file is a special case, as it bundles both back- and front-end; +// also, it does not have an associated unit header file, so it must pull in +// config itself. +#include "backend/configbackend.h" +#include "frontend/configfrontend.h" +// C++ variants of standard C header files #include -// configfrontend.h must always be the first POV file included in frontend sources (pulls in platform config) -#include "frontend/configfrontend.h" +// Boost header files +#include +#if POV_MULTITHREADED +#include +#endif +// POV-Ray header files (base module) #include "base/timer.h" +// POV-Ray header files (backend module) #include "backend/povray.h" +// POV-Ray header files (frontend module) #include "frontend/console.h" #include "frontend/display.h" #include "frontend/filemessagehandler.h" diff --git a/vfe/vfedisplay.cpp b/vfe/vfedisplay.cpp index fdf59bc4d..e448d59b3 100644 --- a/vfe/vfedisplay.cpp +++ b/vfe/vfedisplay.cpp @@ -10,7 +10,7 @@ /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -33,9 +33,10 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** -#include "backend/frame.h" #include "vfe.h" // this must be the last file included @@ -105,4 +106,4 @@ void vfeDisplay::Clear() m_Pixels.clear(); } -} +} // end of namespace diff --git a/vfe/win/syspovimage.h b/vfe/win/syspovimage.h index 7f2d568ed..15be3b8d3 100644 --- a/vfe/win/syspovimage.h +++ b/vfe/win/syspovimage.h @@ -8,7 +8,7 @@ /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8. -/// Copyright 1991-2017 Persistence of Vision Raytracer Pty. Ltd. +/// Copyright 1991-2021 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 @@ -31,12 +31,17 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** #ifndef POVRAY_VFE_WIN_SYSPOVIMAGE_H #define POVRAY_VFE_WIN_SYSPOVIMAGE_H #ifdef POV_VIDCAP_IMPL + +#include "base/image/image.h" + namespace pov { class WinCapture; @@ -45,7 +50,7 @@ public: VideoCaptureImpl(); ~VideoCaptureImpl(); - Image *Init(const char *params, Image::ReadOptions& options, bool doubleBuffer); + pov_base::Image *Init(const char *params, pov_base::Image::ReadOptions& options, bool doubleBuffer); void UpdateImage(); bool WaitFrame(int count, unsigned int timeout); @@ -54,6 +59,7 @@ int m_WaitFrames; }; } + #endif // POV_VIDCAP_IMPL #endif // POVRAY_VFE_WIN_SYSPOVIMAGE_H diff --git a/windows/pvengine.h b/windows/pvengine.h index 2bab3300f..c85b68241 100644 --- a/windows/pvengine.h +++ b/windows/pvengine.h @@ -33,6 +33,8 @@ /// /// @endparblock /// +//------------------------------------------------------------------------------ +// SPDX-License-Identifier: AGPL-3.0-or-later //****************************************************************************** #ifndef PVENGINE_H_INCLUDED @@ -64,7 +66,6 @@ #include #include "pvfrontend.h" -#include "backend/frame.h" #include "backend/povray.h" #include diff --git a/windows/vs2015/povbackend.vcxproj b/windows/vs2015/povbackend.vcxproj index 3c82d64d3..75651b809 100644 --- a/windows/vs2015/povbackend.vcxproj +++ b/windows/vs2015/povbackend.vcxproj @@ -435,7 +435,6 @@ - diff --git a/windows/vs2015/povbackend.vcxproj.filters b/windows/vs2015/povbackend.vcxproj.filters index a489a0c79..033dd7252 100644 --- a/windows/vs2015/povbackend.vcxproj.filters +++ b/windows/vs2015/povbackend.vcxproj.filters @@ -116,9 +116,6 @@ Backend Headers - - Backend Headers - Backend Headers