From 4d4e01c8c9fb9b9dbbefa2e135b21778c9cd331e Mon Sep 17 00:00:00 2001 From: Cary Phillips Date: Sun, 13 Aug 2023 16:40:57 -0700 Subject: [PATCH] Remove unnecessary files (#341) - PortingGuide2-3.md is now PortingGuide.rst - zlib is probably copypasta from OpenEXR? - website/Makefile probably added by mistake Signed-off-by: Cary Phillips --- .github/workflows/ci_workflow.yml | 3 - share/ci/scripts/windows/install_zlib.ps1 | 36 -- website/Makefile | 177 ------- website/PortingGuide2-3.md | 547 ---------------------- 4 files changed, 763 deletions(-) delete mode 100755 share/ci/scripts/windows/install_zlib.ps1 delete mode 100644 website/Makefile delete mode 100644 website/PortingGuide2-3.md diff --git a/.github/workflows/ci_workflow.yml b/.github/workflows/ci_workflow.yml index 70a74fe1..f3190ea3 100644 --- a/.github/workflows/ci_workflow.yml +++ b/.github/workflows/ci_workflow.yml @@ -494,7 +494,6 @@ jobs: # run: | # share/ci/scripts/windows/install_python.ps1 ${{ matrix.python-version }} $HOME # share/ci/scripts/windows/install_boost.ps1 ${{ matrix.boost-version }} $HOME 3.8 - # share/ci/scripts/windows/install_zlib.ps1 ${{ matrix.zlib-version }} $HOME # shell: powershell - name: Configure run: | @@ -507,8 +506,6 @@ jobs: -DBUILD_SHARED_LIBS=${{ matrix.build-shared }} # NB: removed trailing slash from these lines # -DBOOST_ROOT:FILEPATH=$BOOST_ROOT - # -DZLIB_ROOT:FILEPATH="$ZLIB_ROOT" - # -DZLIB_LIBRARY:FILEPATH="$ZLIB_ROOT/lib/${{ matrix.zlib-lib }}" # -DPYTHON='ON' # -DPython_EXECUTABLE:FILEPATH="$PYTHON_ROOT" # -DPython_INCLUDE_DIR:FILEPATH="$PYTHON_ROOT/include" diff --git a/share/ci/scripts/windows/install_zlib.ps1 b/share/ci/scripts/windows/install_zlib.ps1 deleted file mode 100755 index 4c3bea20..00000000 --- a/share/ci/scripts/windows/install_zlib.ps1 +++ /dev/null @@ -1,36 +0,0 @@ -$homeDir = (pwd) - -$zlibVersion = $Args[0] -$zlibWorkingDir = $Args[1] - -$zlibMajorMinor = [io.path]::GetFileNameWithoutExtension("$zlibVersion") -$zlibVersionConcise = $zlibVersion -replace '[.]','' -$zlibArchive = "https://www.zlib.net/zlib${zlibVersionConcise}.zip" - -$zlibRoot = "${zlibWorkingDir}\_zlib" -$zlibBuildPath = "${zlibWorkingDir}\zlib-${zlibVersion}" -$zlibDllPath = "${zlibRoot}\bin" -$msbuild = "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe" - -Write-Host "Retrieving ${zlibArchive}" -Invoke-WebRequest "${zlibArchive}" -OutFile "${zlibBuildPath}.zip" -Write-Host "Expanding archive ${zlibBuildPath}.zip" -Expand-Archive "${zlibBuildPath}.zip" -DestinationPath "${zlibWorkingDir}" - -if (-NOT (Test-Path $zlibRoot)) -{ - New-Item -ItemType Directory $zlibRoot -} - -cd $zlibBuildPath -mkdir _build -cd _build -cmake .. -G"Visual Studio 16 2019" -DCMAKE_INSTALL_PREFIX="${zlibRoot}" - -Write-Host "Building ${zlibBuildPath}\_build\INSTALL.vcxproj" -foregroundcolor green -& "${msbuild}" "${zlibBuildPath}\_build\INSTALL.vcxproj" /P:Configuration=Release - -cd $homeDir - -echo "::set-env name=ZLIB_ROOT::$zlibRoot" -echo "::add-path::$zlibDllPath" diff --git a/website/Makefile b/website/Makefile deleted file mode 100644 index 9e86a0dc..00000000 --- a/website/Makefile +++ /dev/null @@ -1,177 +0,0 @@ -# Makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -PAPER = -BUILDDIR = _build - -# User-friendly check for sphinx-build -ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) -$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) -endif - -# Internal variables. -PAPEROPT_a4 = -D latex_paper_size=a4 -PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . -# the i18n builder cannot share the environment and doctrees with the others -I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . - -.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext - -help: - @echo "Please use \`make ' where is one of" - @echo " html to make standalone HTML files" - @echo " dirhtml to make HTML files named index.html in directories" - @echo " singlehtml to make a single large HTML file" - @echo " pickle to make pickle files" - @echo " json to make JSON files" - @echo " htmlhelp to make HTML files and a HTML help project" - @echo " qthelp to make HTML files and a qthelp project" - @echo " devhelp to make HTML files and a Devhelp project" - @echo " epub to make an epub" - @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" - @echo " latexpdf to make LaTeX files and run them through pdflatex" - @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" - @echo " text to make text files" - @echo " man to make manual pages" - @echo " texinfo to make Texinfo files" - @echo " info to make Texinfo files and run them through makeinfo" - @echo " gettext to make PO message catalogs" - @echo " changes to make an overview of all changed/added/deprecated items" - @echo " xml to make Docutils-native XML files" - @echo " pseudoxml to make pseudoxml-XML files for display purposes" - @echo " linkcheck to check all external links for integrity" - @echo " doctest to run all doctests embedded in the documentation (if enabled)" - -clean: - rm -rf $(BUILDDIR)/* - -html: - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." - -dirhtml: - $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." - -singlehtml: - $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml - @echo - @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." - -pickle: - $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle - @echo - @echo "Build finished; now you can process the pickle files." - -json: - $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json - @echo - @echo "Build finished; now you can process the JSON files." - -htmlhelp: - $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp - @echo - @echo "Build finished; now you can run HTML Help Workshop with the" \ - ".hhp project file in $(BUILDDIR)/htmlhelp." - -qthelp: - $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp - @echo - @echo "Build finished; now you can run "qcollectiongenerator" with the" \ - ".qhcp project file in $(BUILDDIR)/qthelp, like this:" - @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/ReadTheDocs-Breathe.qhcp" - @echo "To view the help file:" - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/ReadTheDocs-Breathe.qhc" - -devhelp: - $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp - @echo - @echo "Build finished." - @echo "To view the help file:" - @echo "# mkdir -p $$HOME/.local/share/devhelp/ReadTheDocs-Breathe" - @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/ReadTheDocs-Breathe" - @echo "# devhelp" - -epub: - $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub - @echo - @echo "Build finished. The epub file is in $(BUILDDIR)/epub." - -latex: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo - @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." - @echo "Run \`make' in that directory to run these through (pdf)latex" \ - "(use \`make latexpdf' here to do that automatically)." - -latexpdf: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through pdflatex..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -latexpdfja: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through platex and dvipdfmx..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -text: - $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text - @echo - @echo "Build finished. The text files are in $(BUILDDIR)/text." - -man: - $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man - @echo - @echo "Build finished. The manual pages are in $(BUILDDIR)/man." - -texinfo: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo - @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." - @echo "Run \`make' in that directory to run these through makeinfo" \ - "(use \`make info' here to do that automatically)." - -info: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo "Running Texinfo files through makeinfo..." - make -C $(BUILDDIR)/texinfo info - @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." - -gettext: - $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale - @echo - @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." - -changes: - $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes - @echo - @echo "The overview file is in $(BUILDDIR)/changes." - -linkcheck: - $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck - @echo - @echo "Link check complete; look for any errors in the above output " \ - "or in $(BUILDDIR)/linkcheck/output.txt." - -doctest: - $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest - @echo "Testing of doctests in the sources finished, look at the " \ - "results in $(BUILDDIR)/doctest/output.txt." - -xml: - $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml - @echo - @echo "Build finished. The XML files are in $(BUILDDIR)/xml." - -pseudoxml: - $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml - @echo - @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." diff --git a/website/PortingGuide2-3.md b/website/PortingGuide2-3.md deleted file mode 100644 index 851b64c2..00000000 --- a/website/PortingGuide2-3.md +++ /dev/null @@ -1,547 +0,0 @@ -# OpenEXR/Imath 2.x to 3.x Porting Guide - -This porting guide outlines the several areas where switching from OpenEXR -2.x to OpenEXR 3.x + Imath 3.x will require source code or build changes of -downstream software. - -In each case, we will often explain both how to change if you are expecting -3.x only hereafter, or usually a more complex accommodation if you want to -keep compatibility with both 2.x and 3.x. - -## OpenEXR and Imath Are Different Packages - -If your use of OpenEXR was only for the sake of using the math classes and -utilities, maybe you were unhappy that you needed to download and build the -full OpenEXR dependency. You are in luck -- now Imath is a separate, very -lightweight open source package. You can use Imath functionality without -needing any of OpenEXR, which as of 3.x only includes the parts you need to -read and write OpenEXR image files. - -The parts of "IlmBase" that were `Imath` and `half` are now repackaged -as the `Imath` library. The `IlmThread` and `Iex` libraries have been -folded into the OpenEXR package, since they were were not necessary to -the rest of Imath. - -When building OpenEXR 3.x, note that if Imath 3.x library is not found -already installed at build time, it will be automatically downloaded and -built as part of the OpenEXR build. - -## Background - -Why is this happening? Here is the relevant history. - -The OpenEXR project has historically consisted of four separate subprojects: - -* OpenEXR - the Imf image format -* IlmBase - supporting utilities (Imath, Half, Iex, IlmThread) -* PyIlmBase - python bindings for the IlmBase libraries -* OpenEXR_Viewers - code for an example EXR image viewer - -Prior to the 2.4 release in 2019, OpenEXR relied primarily on the Gnu -autotools build system and was released as four separate tarballs -(ilmbase, pyilmbase, openexr, openexr_viewers) that were constructed -via the Gnu tools. This gave direct access to the "IlmBase" libraries -independent of the OpenEXR format library. The project also included -CMake files but CMake support was incomplete. - -With the adoption of OpenEXR by the Academy Software Foundation in -2019, the technical steering committee made several key changes: - -1. Drop support for autotools in favor of CMake. A significant portion - of the OpenEXR user base uses Windows, which the Gnu autotools does - not support. Supporting two build systems is a maintenance burden - that the TSC opted to avoid. We now assume that all modern users of - OpenEXR can reasonably be expected to rely on CMake. - -2. Rely on GitHub's automatic release packaging mechanism. This - packages the entire contents of package in a single - tarball. Separate tarballs are no longer generated by the Gnu - autotools setup. - -3. Deprecate the OpenEXR_Viewers code. It was impossibly out of date - and of little modern value. - -Thus, with the 2.4 release, the "IlmBase" libraries are no longer -distributed in a form that is readily separable from the rest of -OpenEXR. The build and installation process for the overall OpenEXR -project is complicated by the fact it consists of four separate -projects, which added signifcant complexity to the CMake setup. - -Because Imath is generally useful to the community, the TSC decided to -simplify the configuration by separating Imath into its own independent -project, maintained and released independently of OpenEXR, and -introducing it as a new external dependency of OpenEXR. - -To further simplify matters, the new Imath library includes the half -data type directly, rather than maintaining it in a separate -library. Also, the community at large has a strong desire for simple -vector/matrix utilities that are unencumbered by Iex, the IlmBase -library that provides higher-level exception classes, and even -further, a clear delineation between functionality that (1) relies on -exception handlings and (2) is free from exceptions. As a result, -support for Iex has been removed from Imath, and the Iex library is -now packaged as a component of OpenEXR. - -The Imath python bindings are a part of Imath as a configuration -option, although support is off by default to simplify the build process -for most users. - -## New Library Names and Repository Structures - -The new repositories place all source code under the `src` top-level -subdirectory. - -### Imath: - - src - ├── Imath - ├── ImathTest - └── python - ├── config - ├── PyImath - ├── PyImathNumpy - ├── PyImathTest - ├── PyImathNumpyTest - └── PyImathSpeedTest - - -### OpenEXR: - -The 'IlmImf' library has been renamed 'OpenEXR'. No header files have -changed names, only their locations in the repo have changes. - - src - ├── bin - │ ├── exr2aces - │ ├── exrbuild - │ ├── exrcheck - │ ├── exrenvmap - │ ├── exrheader - │ ├── exrmakepreview - │ ├── exrmaketiled - │ ├── exrmultipart - │ ├── exrmultiview - │ └── exrstdattr - ├── lib - │ ├── Iex - │ ├── IexMath - │ ├── IlmThread - │ ├── OpenEXR - │ └── OpenEXRUtil - ├── examples - └── test - ├── IexTest - ├── OpenEXRTest - ├── OpenEXRUtilTest - └── OpenEXRFuzzTest - - -## Finding and Using OpenEXR and Imath CMake Configs - -### OpenEXR/Imath 3.x only - -If you are *only* concerned with OpenEXR/Imath 3.x going forward, this is -the recommended way to find the libraries in a downstream project that uses -the CMake build system: - - find_package(Imath CONFIG) - find_package(OpenEXR CONFIG) - -Note that the second line may be omitted if you only need the Imath -portions. - -And then your project can reference the imported targets like this: - - target_link_libraries (my_target - PRIVATE - OpenEXR::OpenEXR - Imath::Imath - Imath::Half - ) - -You only need the parts you use, so for example, if you only need Half and -Imath, you can omit the OpenEXR target. Also note that in our example above, -we have used the `PRIVATE` label, but you should specify them as `PUBLIC` if -you are exposing those classes in your own package's public interface. - - -### Accommodating OpenEXR/Imath 3.x or OpenEXR 2.x - -On the other hand, to accommodate both 2.x and 3.x, it's admittedly -inconvenient because the packages and the import targets have changed their -names. We have found the following idioms to work: - -Finding either/both packages: - - # First, try to find just the right config files - find_package(Imath CONFIG) - if (NOT TARGET Imath::Imath) - # Couldn't find Imath::Imath, maybe it's older and has IlmBase? - find_package(IlmBase CONFIG) - endif () - find_package(OpenEXR CONFIG) - -To link against them, we use CMake generator expressions so that we can -reference *both* sets of targets, but it will only use the ones -corresponding to the package version that was found. - - target_link_libraries (my_target - PRIVATE - # For OpenEXR/Imath 3.x: - $<$:OpenEXR::OpenEXR> - $<$:Imath::Imath> - $<$:Imath::Half> - # For OpenEXR 2.4/2.5: - $<$:OpenEXR::IlmImf> - $<$:IlmBase::Imath> - $<$:IlmBase::Half> - $<$:IlmBase::IlmThread> - $<$:IlmBase::Iex> - ) - -Again, you can eliminate the references to any of the individual libaries -that you don't actually need for your application. - -### Simultaneous Static/Shared Build - -The OpenEXR 2.x CMake configuration had options to simultaneously -build both shared and statically linked libraries. This has been -deprecated. A CMake configuration setting specifies whether to build -static or shared, but if you want both, you will need to run cmake and -build twice. - -### Simultaneous Python 2/3 Build - -The PyIlmBase 2.x CMake configuration had options to simultaneously -build both python2 and python3 bindings. This has been deprecated. -A CMake configuration setting specifies whether to build for -python 2 or python 3, but if you want both, you will need to run -cmake and build twice. - -## Imath Include Files Are in a Different Subdirectory - -Imath 3.0 will copy its headers to some `include/Imath` subdirectory -instead of the old `include/OpenEXR`. - -### OpenEXR/Imath 3.x only - -If you know that you are only using Imath 3.x, then just change any -include directions, like this: - - #include - #include - -to the new locations: - - #include - #include - -### Accommodating OpenEXR/Imath 3.x or OpenEXR 2.x - -If you want your software to be able to build against either OpenEXR 2.x or -3.x (depending on which dependency is available at build time), we recommend -using a more complicated idiom: - - // The version can reliably be found in this header file from OpenEXR, - // for both 2.x and 3.x: - #include - #define COMBINED_OPENEXR_VERSION ((10000*OPENEXR_VERSION_MAJOR) + \ - (100*OPENEXR_VERSION_MINOR) + \ - OPENEXR_VERSION_PATCH) - - // There's just no easy way to have an `#include` that works in both - // cases, so we use the version to switch which set of include files we - // use. - #if COMBINED_OPENEXR_VERSION >= 20599 /* 2.5.99: pre-3.0 */ - # include - # include - #else - // OpenEXR 2.x, use the old locations - # include - # include - #endif - -## Include Files Include Fewer Other Headers - -Extraneous ``#include`` statements have been removed from some header -files, which can lead to compile failures in application code that -previously included certain headers indirectly. - -For example, the Imath header files no longer include ``float.h``, so -application code that references symbols such as ``FLT_MAX`` may need -to add an explicit ``#include `` or equivalent. - -If your application code reports compile errors due to undefined or -incompletely-defined Imath or OpenEXR data types, locate the Imath or -OpenEXR header file that defines the type and include it explicitly. - -## Symbols Are Hidden by Default - -To reduce library size and make linkage behavior similar across -platforms, Imath and OpenEXR now build with directives that make -symbol visibility hidden by default, with specific externally-visible -symbols explicitly marked for export. See the [Symbol -Visibility](https://github.com/AcademySoftwareFoundation/openexr/blob/main/docs/SymbolVisibility.md) -doc and the appropriate ``*Export.h`` header file for more details. - -## Imath Now Uses Standard C++ Exceptions and `noexcept` - -In OpenEXR 2.x, the Imath functions that threw exceptions used to throw -various Iex varieties. - -In Imath 3.x, these functions just throw `std::exception` varieties that -correspond to the failure (e.g., `std::invalid_argument`, -`std::domain_error`, etc.). For that reason, all of the Iex exceptions are -now only part of the OpenEXR library (where they are still used in the same -manner they were for OpenEXR 2.x). - -Imath 3.x has very few functions that throw exceptions. Each is clearly -marked as such, and each has a version that does not throw exceptions (so -that it may be used from code where exceptions are avoided). The functions -that do not throw exceptions are now marked `noexcept`. - -## Some Headers and Classes Have Been Removed from Imath 3.x - -* The `Math` class (and `ImathMath.h` header file) are - deprecated. All of the `Math` functionality is subsumed by C++11 - `std::` math functions. For example, calls to - `Imath::Math::abs(x)` should be replaced with `std::abs(x)`. - -* The `Limits` class (and the `ImathLimits.h` and - `ImathHalfLimits.h` headers) have been removed entirely. All uses of - `Limits<>` should be replaced with the appropriate - `std::numeric_limits<>` method call. The Imath-specific versions - predated C++11, and were not only redundant in a C++11 world, but - also potentially confusing because some of their functions behaved - quite differently than the `std::numeric_limits` method with the - same name. We are following the precept that if C++11 does something - in a standard way, we should not define our own equivalent function - (and especially not define it in a way that doesn't match the - standard behavior). - -* `Vec::normalize()` and `length()` methods, for integer `T` types, - have been removed. Also the standalone `project()` and - `orthogonal()` functions are no longer defined for vectors made of - integer elements. These all had behavior that was hard to understand - and probably useless. They still work as expected for vectors of - floating-point types. - -* The ``Int64`` and ``SInt64`` types are deprecated in favor of the - now-standard ``int64_t`` and ``uint64_t``. - -## File/Class-specific changes: - -### `half` in half.h - -* The half type is now in the `Imath` namespace, but a compile-time - option puts it in the global namespace, except when compiling for - CUDA, in which case the 'half' type refers to the CUDA type: - - #ifndef __CUDACC__ - using half = IMATH_INTERNAL_NAMESPACE::half; - #else - #include - #endif - - If you desire to use Imath::half inside a CUDA kernal, you can refer - to it via the namespace, or define `CUDA_NO_HALF` to avoid the CUDA - type altogether. - -* `HALF_MIN` has changed value. It is now the smallest **normalized** - positive value, returned by `std::numeric_limits::min()`. - -* New constructor from a bit pattern: - - enum FromBitsTag - { - FromBits - }; - - constexpr half(FromBitsTag, unsigned short bits) noexcept; - -### `Imath::Box` in ImathBox.h - -* `baseTypeMin()` is replaced with `baseTypeLowest()` - -### `Color3`, `Color4` in ImathColor.h - -* `baseTypeMin()` is replaced with `baseTypeLowest()` - -### `Imath::Frustum` in ImathFrustum.h - -Akin to the `Vec` classes, there are now seperate API calls for -throwing and non-throwing functions: - -These functions previously threw exceptions but now do not throw and -are marked `noexcept`: - -* `Frustum::projectionMatrix() noexcept` - -* `Frustum::aspect() noexcept` - -* `Frustum::set() noexcept` - -* `Frustum::projectPointToScreen() noexcept` - -* `Frustum::ZToDepth() noexcept` - -* `Frustum::DepthToZ() noexcept` - -* `Frustum::screenRadius() noexcept` - -* `Frustum::localToScreen() noexcept` - -These functions throw `std::domain_error` exceptions when the -associated frustum is degenerate: - -* `Frustum::projectionMatrixExc()` - -* `Frustum::aspectExc()` - -* `Frustum::setExc()` - -* `Frustum::projectPointToScreenExc()` - -* `Frustum::ZToDepthExc()` - -* `Frustum::DepthToZExc()` - -* `Frustum::screenRadiusExc()` - -* `Frustum::localToScreenExc()` - -### `Imath::Interval` in ImathInterval.h - -New methods/functions: - -* `Interval::operator !=` - -* `Interval::makeInfinite()` - -* `IntervalisInfinite()` - -* `operator<< (std::ostream& s, const Interval&)` - -### ImathMatrixAlgo.h - -* `checkForZeroScaleInRow()` and `extractAndRemoveScalingAndShear()` - throw `std::domain_error` exceptions instead of `Iex::ZeroScale` - -### `Matrix22`, `Matrix33`, `Matrix44` in ImathMatrix.h - -* `baseTypeMin()` is replaced with `baseTypeLowest()` - -* `invert(bool singExc = false)` is replace by: - - - `invert() noexcept` - - - `invert(bool)` which optionally throws an `std::invalid_argument` - exception. - -* `inverse(bool singExc = false)` is replace by: - - - `inverse() noexcept` - - - `inverse(bool)` which optionally throws an `std::invalid_argument` - exception. - -* `gjInvert(bool singExc = false)` is replace by: - - - `gjInvert()` noexcept - - - `gjInvert(bool)` which optionally throws an - `std::invalid_argument` exception. - -* `gJinverse(bool singExc = false)` is replace by: - - - `gjInverse()` noexcept - - - `gjInverse(bool)` which optionally throws an - `std::invalid_argument` exception. - -New functions: - -* `operator<< (std::ostream& s, const Matrix22&)` - -* `operator<< (std::ostream& s, const Matrix33&)` - -* `operator<< (std::ostream& s, const Matrix44&)` - -Other changes: - -* Initialization loops unrolled for efficiency - -* inline added where appropriate - -### ImathRoots.h - -* When compiling for CUDA, the `complex` type comes from `thrust` - rather than `std` - -### `Shear6` in ImathShear.h - -* `baseTypeMin()` is replaced with `baseTypeLowest()` - -### ImathVecAlgo.h - -The following functions are no longer defined for integer-based -vectors, because such behavior is not clearly defined: - -* `project (const Vec& s, const Vec& t)` - -* `orgthogonal (const Vec& s, const Vec& t)` - -* `reflect (const Vec& s, const Vec& t)` - -### `Vec2`, `Vec3`, `Vec4` in ImathVec.h - -* `baseTypeMin()` is replaced with `baseTypeLowest()` - -* The following methods are removed (via `= delete`) for integer-based - vectors because the behavior is not clearly defined and thus prone - to confusion: - - - `length()` - although the length is indeed defined, its proper value - is floating point and can thus not be represented by the 'T' - return type. - - - `normalize()` - - - `normalizeExc()` - - - `normalizeNonNull()` - - - `normalized()` - - - `normalizedExc()` - - - `normalizedNonNull()` - -* Interoperability Constructors: The Vec and Matrix classes now have - constructors that take as an argument any data object of similar - size and layout. - -## Python Changes: - -In general, the changes at the C++ level are reflected in the python -bindings. In particular: - -* The following methods are removed for integer-based - vector and matrix objects and arrays: - - - `length()` - - `normalize()` - - `normalizeExc()` - - `normalizeNonNull()` - - `normalized()` - - `normalizedExc()` - - `normalizedNonNull()` - -* `baseTypeMin()` is replaced with `baseTypeLowest()` for: - - - `Vec2`, `Vec3`, `Vec4` - - `Color3`, `Color4` - - `Matrix22`, `Matrix33`, `Matrix44` - - `Box` - - `Shear6` -