diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a98116..4d97fc6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 2.1.1 - 2019-07-08 + +### Fixed +- Fixed bug where removing the only crystal population caused the UI controls not to work anymore + ## 2.1.0 - 2019-07-07 ### Added @@ -15,6 +20,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Made sidebar scrollable when the window is small enough - Made UI show field of view in degrees - Limited field of view for stereographic, rectilinear and orthographic projections + +### Fixed - Fixed bug where field of view sometimes did not update correctly when choosing a new projection ## 2.0.0 - 2019-07-02 @@ -25,9 +32,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## 1.1.0 - 2019-06-17 ### Changed +- Renamed C-axis orientation to simply C-axis tilt +### Fixed - Fixed bug where uniform C-axis orientation was messing with C-axis rotation -- Renamed C-axis orientation to simply C-axis tilt ## 1.0.0 - 2019-06-16 diff --git a/README.md b/README.md index 88c6289..14d4864 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,8 @@ Here are some general settings for the whole simulation. - **Sun altitude:** Sun altitude from the horizon in degrees - **Sun diameter:** Angular diameter of the sun in degrees -- **Rays per frame:** Number of traced rays per rendered frame +- **Rays per frame:** Number of rays traced through individual crystals per + rendered frame - If the user interface slows down a lot during rendering, lower this value - On an NVIDIA GeForce GTX 1070 a good value seems to be 500 000 - 1 000 000 - The maximum value for this parameter may be limited by your GPU @@ -46,8 +47,9 @@ HaloRay allows you to simulate multiple different ice crystal populations simultaneously. You give each population a name for easier reference by typing in the **Crystal population** dropdown menu. Each population has a relative weight, which can be changed by adjusting the **Population weight** spin box. -For example, giving weight 1 and 3 to two crystal populations would trace three -times as many rays through the latter population than the former. +For example, giving weights 1 and 3 to two crystal populations respectively +would trace three times as many rays through the latter population than the +former. The crystals are hexagonal, and have three named axes as shown in the image below. @@ -55,8 +57,8 @@ below. ![Graphic of the different crystallographic axes](images/crystal-axes.png) The orientation of the ice crystals in each population are defined by two -parameters: tilt of the crystal around the **a**-axis and rotation around the -**c**-axis. For each parameter you can currently choose between two different +parameters: tilt of the crystal around the A-axis and rotation around the +C-axis. For each parameter you can currently choose between two different random distributions: a uniform distribution and a Gaussian distribution. For the Gaussian distribution you can choose an average angle and the standard deviation of the distribution. @@ -75,7 +77,7 @@ known to happen in nature. The shape of the crystal can also be adjusted by changing the following parameters: -- **C/A ratio average:** Ratio between the **c**-axis and **a**-axis lengths of +- **C/A ratio average:** Ratio between the C-axis and A-axis lengths of of the crystal - **C/A ratio std:** Standard deviation of the C/A ratio @@ -83,8 +85,8 @@ parameters: Crystals with a large C/A ratio are look like pencil pieces, and are commonly called column crystals. Column crystals tend to orient themselves with the -**c**-axis horizontal. Crystals with a small C/A ratio are called plate -crystals. They tend to orient themselves with the **c**-axis vertical. Both +C-axis horizontal. Crystals with a small C/A ratio are called plate +crystals. They tend to orient themselves with the C-axis vertical. Both kinds of crystals are shown in the image above. ### View settings @@ -147,7 +149,9 @@ Appveyor CI server. ## Acknowledgments -- @lkangas for providing tons of reading material related to this topic -- @pnuu for additional Linux support +- [Lauri Kangas](https://github.com/lkangas) for providing tons of reading material and debugging help +- [Panu Lahtinen](https://github.com/pnuu) for additional Linux support +- Jukka Ruoskanen for making HaloPoint 2.0 back in the day and inspiring me to start working on HaloRay +- [Jaakko Lehtinen](https://users.aalto.fi/~lehtinj7/) for super valuable lessons in computer graphics - [Nuklear](https://github.com/vurtun/nuklear/) for enabling me get this project off the ground diff --git a/appveyor.yml b/appveyor.yml index d4cbc10..7bb54e6 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,4 @@ -version: '2.1.0-{build}' +version: '2.1.1-{build}' branches: only: - master @@ -17,7 +17,12 @@ artifacts: - path: '*.zip' deploy: - provider: GitHub + release: HaloRay $(appveyor_build_version) artifact: /.*\.zip/ draft: true + description: '' + skip_tags: true + auth_token: + secure: pb9keaNklmNgmLaw1doReZDdP5Oh/pLZPdwjt+anpcoi34MyqAbFoJbiHJMcWkgD on: branch: master diff --git a/scripts/build.ps1 b/scripts/build.ps1 index ceceda6..821a9ca 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -3,15 +3,12 @@ $ErrorActionPreference = "Stop"; $gitBranch = $env:APPVEYOR_REPO_BRANCH -$gitBranch $extraParameters = if ($gitBranch -eq "master") { "-DHALORAY_VERSION='${env:APPVEYOR_BUILD_VERSION}'" } else { "" } -$extraParameters - pushd mkdir build cd build @@ -29,4 +26,4 @@ cd .\src\Release\ -no-system-d3d-compiler ` --release ` haloray.exe -popd \ No newline at end of file +popd diff --git a/src/gui/crystalModel.cpp b/src/gui/crystalModel.cpp index 2019d8d..4be263f 100644 --- a/src/gui/crystalModel.cpp +++ b/src/gui/crystalModel.cpp @@ -109,19 +109,18 @@ void CrystalModel::addRow() { auto row = mCrystals->GetCount(); beginInsertRows(QModelIndex(), row, row); - - bool success = mCrystals->AddDefault(); - + mCrystals->AddDefault(); endInsertRows(); } bool CrystalModel::removeRow(int row) { - beginRemoveRows(QModelIndex(), row, row); - - bool success = mCrystals->Remove(row); + if (mCrystals->GetCount() <= 1) + return false; + beginRemoveRows(QModelIndex(), row, row); + mCrystals->Remove(row); endRemoveRows(); - return success; + return true; } diff --git a/src/simulation/crystalPopulationRepository.cpp b/src/simulation/crystalPopulationRepository.cpp index fe4e7af..eae9f8a 100644 --- a/src/simulation/crystalPopulationRepository.cpp +++ b/src/simulation/crystalPopulationRepository.cpp @@ -15,22 +15,16 @@ unsigned int CrystalPopulationRepository::GetCount() const return (unsigned int)mCrystals.size(); } -bool CrystalPopulationRepository::AddDefault() +void CrystalPopulationRepository::AddDefault() { mCrystals.push_back(DefaultCrystalPopulation()); mWeights.push_back(1); - return true; } -bool CrystalPopulationRepository::Remove(unsigned int index) +void CrystalPopulationRepository::Remove(unsigned int index) { - if (mCrystals.size() == 1) - return false; - mCrystals.erase(mCrystals.begin() + index); mWeights.erase(mWeights.begin() + index); - - return true; } CrystalPopulation &CrystalPopulationRepository::Get(unsigned int index) diff --git a/src/simulation/crystalPopulationRepository.h b/src/simulation/crystalPopulationRepository.h index 91f0d50..a740287 100644 --- a/src/simulation/crystalPopulationRepository.h +++ b/src/simulation/crystalPopulationRepository.h @@ -9,8 +9,8 @@ class CrystalPopulationRepository { public: CrystalPopulationRepository(); - bool AddDefault(); - bool Remove(unsigned int index); + void AddDefault(); + void Remove(unsigned int index); CrystalPopulation &Get(unsigned int index); double GetProbability(unsigned int index) const; unsigned int GetWeight(unsigned int index) const;