From 59d7c73c8991212e22972207c07cdd2d10a121ba Mon Sep 17 00:00:00 2001 From: Samuli Vuorinen Date: Sun, 7 Jul 2019 23:35:55 +0300 Subject: [PATCH 01/11] Fix acknowledgement links in readme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 88c6289..9650a8f 100644 --- a/README.md +++ b/README.md @@ -147,7 +147,7 @@ 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 related to this topic +- [Panu Lahtinen](https://github.com/pnuu) for additional Linux support - [Nuklear](https://github.com/vurtun/nuklear/) for enabling me get this project off the ground From 0fda718e0550dd08a4fdcbc242a0dd824699e708 Mon Sep 17 00:00:00 2001 From: Samuli Vuorinen Date: Sun, 7 Jul 2019 23:36:14 +0300 Subject: [PATCH 02/11] Add missing deployment options to Appveyor config --- appveyor.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index d4cbc10..86be837 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -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 From 6cd8ee6159d22bde3f0a51bfc3f186003ae113ee Mon Sep 17 00:00:00 2001 From: Samuli Vuorinen Date: Sun, 7 Jul 2019 23:44:57 +0300 Subject: [PATCH 03/11] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9650a8f..0790a74 100644 --- a/README.md +++ b/README.md @@ -147,7 +147,7 @@ Appveyor CI server. ## Acknowledgments -- [Lauri Kangas](https://github.com/lkangas) for providing tons of reading material related to this topic +- [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 - [Nuklear](https://github.com/vurtun/nuklear/) for enabling me get this project off the ground From 2cb6f8c1defc318cde304cbd2bfa53da3a54b351 Mon Sep 17 00:00:00 2001 From: Samuli Vuorinen Date: Sun, 7 Jul 2019 23:54:10 +0300 Subject: [PATCH 04/11] Add Jaakko Lehtinen to acknowledgements --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 0790a74..b588411 100644 --- a/README.md +++ b/README.md @@ -149,5 +149,6 @@ Appveyor CI server. - [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 +- [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 From e4d1b27a9c0366d77d49d044e34637cbbdbc8e40 Mon Sep 17 00:00:00 2001 From: Samuli Vuorinen Date: Mon, 8 Jul 2019 00:17:44 +0300 Subject: [PATCH 05/11] Update README.md --- README.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index b588411..5a9ad5e 100644 --- a/README.md +++ b/README.md @@ -46,8 +46,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 +56,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 +76,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 +84,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 From fd1adbb580e45e55c1ca8636b4d31c747d82d5a0 Mon Sep 17 00:00:00 2001 From: Samuli Vuorinen Date: Mon, 8 Jul 2019 00:19:06 +0300 Subject: [PATCH 06/11] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5a9ad5e..52f794a 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 From 4ce265c0d5d44c58153293ef7c4d2e9d8655ef90 Mon Sep 17 00:00:00 2001 From: Samuli Vuorinen Date: Mon, 8 Jul 2019 08:50:02 +0300 Subject: [PATCH 07/11] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 52f794a..444077f 100644 --- a/README.md +++ b/README.md @@ -151,6 +151,7 @@ Appveyor CI server. - [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 inspiring HaloRay with making HaloPoint 2.0 back in the day - [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 From bb275b8ff737d006aaa19ef2d8ee6a8ab9a5bedc Mon Sep 17 00:00:00 2001 From: Samuli Vuorinen Date: Mon, 8 Jul 2019 15:03:25 +0300 Subject: [PATCH 08/11] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 444077f..14d4864 100644 --- a/README.md +++ b/README.md @@ -151,7 +151,7 @@ Appveyor CI server. - [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 inspiring HaloRay with making HaloPoint 2.0 back in the day +- 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 From 3bcf274adaa0ba487bffa38dea38f2fc36b627e8 Mon Sep 17 00:00:00 2001 From: Samuli Vuorinen Date: Mon, 8 Jul 2019 15:07:12 +0300 Subject: [PATCH 09/11] Remove debug lines from packaging script --- scripts/build.ps1 | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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 From c3a716382f6e05940fb35f113ccae2246e754472 Mon Sep 17 00:00:00 2001 From: Samuli Vuorinen Date: Mon, 8 Jul 2019 17:51:25 +0300 Subject: [PATCH 10/11] Fix bug when removing last crystal population The crystal settings would stop affecting the simulation after the user tries to remove the last remaining crystal population. The problem was that the beginRemoveRows(...) method was being called on the CrystalModel even when a row didn't get removed. --- CHANGELOG.md | 5 +++++ src/gui/crystalModel.cpp | 13 ++++++------- src/simulation/crystalPopulationRepository.cpp | 10 ++-------- src/simulation/crystalPopulationRepository.h | 4 ++-- 4 files changed, 15 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a98116..5516e34 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). +## Unreleased + +### Changed +- Fixed bug where removing the only crystal population caused the UI controls not to work anymore + ## 2.1.0 - 2019-07-07 ### Added 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; From b4095ddfaf30122debb73213fe65d4e956c1a265 Mon Sep 17 00:00:00 2001 From: Samuli Vuorinen Date: Mon, 8 Jul 2019 18:05:12 +0300 Subject: [PATCH 11/11] Update version number and changelog --- CHANGELOG.md | 9 ++++++--- appveyor.yml | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5516e34..4d97fc6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,9 +5,9 @@ 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). -## Unreleased +## 2.1.1 - 2019-07-08 -### Changed +### Fixed - Fixed bug where removing the only crystal population caused the UI controls not to work anymore ## 2.1.0 - 2019-07-07 @@ -20,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 @@ -30,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/appveyor.yml b/appveyor.yml index 86be837..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