Git Product home page Git Product logo

verletsfml-multithread's Introduction

Verlet Multi thread

image

Compilation

SFML and CMake need to be installed.

Create a build directory

mkdir build
cd build

Configure and build the project

cmake ..
cmake --build .

On Windows it will build in debug by default. To build in release you need to use this command

cmake --build . --config Release

You will also need to add the res directory and the SFML dlls in the Release or Debug directory for the executable to run.

verletsfml-multithread's People

Contributors

cgringmuth avatar ioann44 avatar johnbuffer avatar mreinstein avatar pfedan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

verletsfml-multithread's Issues

Convergence

Been working on something similar and noticed that circles tend to stay in collision if not interesting sufficiently many times. I saw that in your implementation, you only iterate two times, not until convergence, correct?
However, the results seem to show pretty much perfect collision resolution, which doesn't make any sense to me. Is there any intuitive explanation?

Custom environment at the start

I was wondering if it would be possible to start the simulation with a given starting condition.
For instance, I want to see if I can simulate a galaxy colliding with another with this engine.
Is this possible with this repository?

Having problems building.

I get these build errors.

[aapo@aapo-fedora build]$ cmake --build .
[ 33%] Building CXX object CMakeFiles/VerletMulti.dir/src/main.cpp.o
In file included from /home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/utils.hpp:2,
                 from /home/aapo/Desktop/VerletSFML-Multithread/src/engine/window_context_handler.hpp:5,
                 from /home/aapo/Desktop/VerletSFML-Multithread/src/main.cpp:3:
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:8:12: error: ‘uint64_t’ does not name a type
    8 | using ID = uint64_t;
      |            ^~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:1:1: note: ‘uint64_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
  +++ |+#include <cstdint>
    1 | #pragma once
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:18:5: error: ‘ID’ does not name a type
   18 |     ID id;
      |     ^~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:19:5: error: ‘ID’ does not name a type
   19 |     ID data_id;
      |     ^~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:26:18: error: expected ‘)’ before ‘id_’
   26 |     ObjectSlot(ID id_, T* object_)
      |               ~  ^~~~
      |                  )
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:31:5: error: ‘ID’ does not name a type
   31 |     ID id;
      |     ^~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:43:23: error: ‘civ::ID’ has not been declared
   43 |     virtual void* get(civ::ID id) = 0;
      |                       ^~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:46:27: error: ‘civ::ID’ has not been declared
   46 |     virtual bool  isValid(civ::ID, uint64_t validity_id) const = 0;
      |                           ^~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:46:36: error: ‘uint64_t’ has not been declared
   46 |     virtual bool  isValid(civ::ID, uint64_t validity_id) const = 0;
      |                                    ^~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:53:23: error: expected ‘)’ before ‘id_’
   53 |     ObjectSlotConst(ID id_, const T* object_)
      |                    ~  ^~~~
      |                       )
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:58:5: error: ‘ID’ does not name a type
   58 |     ID    id;
      |     ^~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:65:5: error: ‘ID’ does not name a type
   65 |     ID rid;
      |     ^~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:66:5: error: ‘ID’ does not name a type
   66 |     ID op_id;
      |     ^~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:91:5: error: ‘ID’ does not name a type
   91 |     ID                 emplace_back(Args&&... args);
      |     ^~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:92:5: error: ‘ID’ does not name a type
   92 |     ID                 push_back(const T& obj);
      |     ^~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:94:5: error: ‘ID’ does not name a type
   94 |     ID                 getNextID() const;
      |     ^~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:95:30: error: ‘ID’ has not been declared
   95 |     void               erase(ID id);
      |                              ^~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:100:35: error: ‘ID’ has not been declared
  100 |     T&                 operator[](ID id);
      |                                   ^~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:101:35: error: ‘ID’ has not been declared
  101 |     const T&           operator[](ID id) const;
      |                                   ^~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:103:31: error: ‘ID’ has not been declared
  103 |     Ref<T>             getRef(ID id);
      |                               ^~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:105:32: error: ‘ID’ has not been declared
  105 |     PRef<U>            getPRef(ID id);
      |                                ^~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:107:34: error: ‘uint64_t’ has not been declared
  107 |     T&                 getDataAt(uint64_t i);
      |                                  ^~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:110:32: error: ‘ID’ has not been declared
  110 |     bool               isValid(ID id, ID validity) const override;
      |                                ^~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:110:39: error: ‘ID’ has not been declared
  110 |     bool               isValid(ID id, ID validity) const override;
      |                                       ^~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:112:5: error: ‘uint64_t’ does not name a type
  112 |     uint64_t           getOperationID(ID id) const;
      |     ^~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:112:5: note: ‘uint64_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:114:34: error: ‘uint64_t’ has not been declared
  114 |     ObjectSlot<T>      getSlotAt(uint64_t i);
      |                                  ^~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:115:34: error: ‘uint64_t’ has not been declared
  115 |     ObjectSlotConst<T> getSlotAt(uint64_t i) const;
      |                                  ^~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:123:5: error: ‘uint64_t’ does not name a type
  123 |     uint64_t size() const;
      |     ^~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:123:5: note: ‘uint64_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:126:5: error: ‘ID’ does not name a type
  126 |     ID getValidityID(ID id) const;
      |     ^~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:130:17: error: ‘uint64_t’ was not declared in this scope
  130 |     std::vector<uint64_t>     ids;
      |                 ^~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:130:17: note: ‘uint64_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:130:25: error: template argument 1 is invalid
  130 |     std::vector<uint64_t>     ids;
      |                         ^
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:130:25: error: template argument 2 is invalid
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:132:5: error: ‘uint64_t’ does not name a type
  132 |     uint64_t                  data_size;
      |     ^~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:132:5: note: ‘uint64_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:133:5: error: ‘uint64_t’ does not name a type
  133 |     uint64_t                  op_count;
      |     ^~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:133:5: note: ‘uint64_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:139:5: error: ‘ID’ does not name a type
  139 |     ID            getID(uint64_t i) const;
      |     ^~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:142:5: error: ‘uint64_t’ does not name a type
  142 |     uint64_t      getDataID(ID id) const;
      |     ^~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:142:5: note: ‘uint64_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:146:33: error: ‘ID’ has not been declared
  146 |     SlotMetadata& getMetadataAt(ID id);
      |                                 ^~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:147:25: error: ‘ID’ has not been declared
  147 |     const T&      getAt(ID id) const;
      |                         ^~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:149:23: error: ‘civ::ID’ has not been declared
  149 |     void*         get(civ::ID id) override;
      |                       ^~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp: In constructor ‘civ::Vector<T>::Vector()’:
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:74:11: error: class ‘civ::Vector<T>’ does not have any field named ‘data_size’
   74 |         : data_size(0)
      |           ^~~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:75:11: error: class ‘civ::Vector<T>’ does not have any field named ‘op_count’
   75 |         , op_count(0)
      |           ^~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp: In destructor ‘civ::Vector<T>::~Vector()’:
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:83:15: error: ‘uint64_t’ does not name a type
   83 |         const uint64_t capacity = data.size();
      |               ^~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:83:15: note: ‘uint64_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:84:14: error: ‘uint64_t’ was not declared in this scope
   84 |         for (uint64_t i{data_size}; i<capacity; ++i) {
      |              ^~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:84:14: note: ‘uint64_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:84:37: error: ‘i’ was not declared in this scope
   84 |         for (uint64_t i{data_size}; i<capacity; ++i) {
      |                                     ^
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:84:39: error: ‘capacity’ was not declared in this scope
   84 |         for (uint64_t i{data_size}; i<capacity; ++i) {
      |                                       ^~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:84:47: error: expected ‘)’ before ‘;’ token
   84 |         for (uint64_t i{data_size}; i<capacity; ++i) {
      |                                               ^
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:84:13: note: to match this ‘(’
   84 |         for (uint64_t i{data_size}; i<capacity; ++i) {
      |             ^
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:84:9: error: this ‘for’ clause does not guard... [-Werror=misleading-indentation]
   84 |         for (uint64_t i{data_size}; i<capacity; ++i) {
      |         ^~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:84:49: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
   84 |         for (uint64_t i{data_size}; i<capacity; ++i) {
      |                                                 ^~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:84:51: error: ‘i’ was not declared in this scope
   84 |         for (uint64_t i{data_size}; i<capacity; ++i) {
      |                                                   ^
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp: At global scope:
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:159:8: error: ‘uint64_t’ does not name a type
  159 | inline uint64_t Vector<T>::emplace_back(Args&& ...args)
      |        ^~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:159:8: note: ‘uint64_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:167:8: error: ‘uint64_t’ does not name a type
  167 | inline uint64_t Vector<T>::push_back(const T& obj)
      |        ^~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:167:8: note: ‘uint64_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:175:13: error: variable or field ‘erase’ declared void
  175 | inline void Vector<T>::erase(ID id)
      |             ^~~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:175:30: error: ‘ID’ was not declared in this scope
  175 | inline void Vector<T>::erase(ID id)
      |                              ^~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:194:11: error: declaration of ‘operator[]’ as non-function
  194 | inline T& Vector<T>::operator[](ID id)
      |           ^~~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:194:33: error: ‘ID’ was not declared in this scope
  194 | inline T& Vector<T>::operator[](ID id)
      |                                 ^~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:200:17: error: declaration of ‘operator[]’ as non-function
  200 | inline const T& Vector<T>::operator[](ID id) const
      |                 ^~~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:200:39: error: ‘ID’ was not declared in this scope
  200 | inline const T& Vector<T>::operator[](ID id) const
      |                                       ^~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:206:22: error: ‘civ::ObjectSlot<T> civ::Vector<T>::getSlotAt’ is not a static data member of ‘struct civ::Vector<T>’
  206 | inline ObjectSlot<T> Vector<T>::getSlotAt(uint64_t i)
      |                      ^~~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:206:43: error: template definition of non-template ‘civ::ObjectSlot<T> civ::Vector<T>::getSlotAt’
  206 | inline ObjectSlot<T> Vector<T>::getSlotAt(uint64_t i)
      |                                           ^~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:206:43: error: ‘uint64_t’ was not declared in this scope
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:206:43: note: ‘uint64_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:212:27: error: ‘civ::ObjectSlotConst<T> civ::Vector<T>::getSlotAt’ is not a static data member of ‘struct civ::Vector<T>’
  212 | inline ObjectSlotConst<T> Vector<T>::getSlotAt(uint64_t i) const
      |                           ^~~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:212:48: error: template definition of non-template ‘civ::ObjectSlotConst<T> civ::Vector<T>::getSlotAt’
  212 | inline ObjectSlotConst<T> Vector<T>::getSlotAt(uint64_t i) const
      |                                                ^~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:212:48: error: ‘uint64_t’ was not declared in this scope
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:212:48: note: ‘uint64_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:218:15: error: ‘civ::Ref<T> civ::Vector<T>::getRef’ is not a static data member of ‘struct civ::Vector<T>’
  218 | inline Ref<T> Vector<T>::getRef(ID id)
      |               ^~~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:218:33: error: template definition of non-template ‘civ::Ref<T> civ::Vector<T>::getRef’
  218 | inline Ref<T> Vector<T>::getRef(ID id)
      |                                 ^~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:218:33: error: ‘ID’ was not declared in this scope
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:225:9: error: ‘civ::PRef<U> civ::Vector<T>::getPRef’ is not a static data member of ‘struct civ::Vector<T>’
  225 | PRef<U> Vector<T>::getPRef(ID id) {
      |         ^~~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:225:28: error: template definition of non-template ‘civ::PRef<U> civ::Vector<T>::getPRef’
  225 | PRef<U> Vector<T>::getPRef(ID id) {
      |                            ^~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:225:28: error: ‘ID’ was not declared in this scope
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:230:11: error: ‘T& civ::Vector<T>::getDataAt’ is not a static data member of ‘struct civ::Vector<T>’
  230 | inline T& Vector<T>::getDataAt(uint64_t i)
      |           ^~~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:230:32: error: template definition of non-template ‘T& civ::Vector<T>::getDataAt’
  230 | inline T& Vector<T>::getDataAt(uint64_t i)
      |                                ^~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:230:32: error: ‘uint64_t’ was not declared in this scope
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:230:32: note: ‘uint64_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:236:8: error: ‘uint64_t’ does not name a type
  236 | inline uint64_t Vector<T>::getID(uint64_t i) const
      |        ^~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:236:8: note: ‘uint64_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:242:8: error: ‘uint64_t’ does not name a type
  242 | inline uint64_t Vector<T>::size() const
      |        ^~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:242:8: note: ‘uint64_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp: In member function ‘typename std::vector<T>::iterator civ::Vector<T>::end()’:
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:256:27: error: ‘data_size’ was not declared in this scope
  256 |     return data.begin() + data_size;
      |                           ^~~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp: In member function ‘typename std::vector<T>::const_iterator civ::Vector<T>::end() const’:
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:268:27: error: ‘data_size’ was not declared in this scope
  268 |     return data.begin() + data_size;
      |                           ^~~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp: In member function ‘bool civ::Vector<T>::isFull() const’:
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:274:12: error: ‘data_size’ was not declared in this scope
  274 |     return data_size == data.size();
      |            ^~~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp: In member function ‘civ::Slot civ::Vector<T>::createNewSlot()’:
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:281:9: error: request for member ‘push_back’ in ‘((civ::Vector<T>*)this)->civ::Vector<T>::ids’, which is of non-class type ‘int’
  281 |     ids.push_back(data_size);
      |         ^~~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:281:19: error: ‘data_size’ was not declared in this scope
  281 |     ids.push_back(data_size);
      |                   ^~~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:282:36: error: ‘op_count’ was not declared in this scope
  282 |     metadata.push_back({data_size, op_count++});
      |                                    ^~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:282:23: error: no matching function for call to ‘std::vector<civ::SlotMetadata>::push_back(<brace-enclosed initializer list>)’
  282 |     metadata.push_back({data_size, op_count++});
      |     ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/13/vector:66,
                 from /usr/include/SFML/Window/VideoMode.hpp:32,
                 from /usr/include/SFML/Window.hpp:43,
                 from /usr/include/SFML/Graphics.hpp:32,
                 from /home/aapo/Desktop/VerletSFML-Multithread/src/engine/window_context_handler.hpp:2:
/usr/include/c++/13/bits/stl_vector.h:1278:7: note: candidate: ‘void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = civ::SlotMetadata; _Alloc = std::allocator<civ::SlotMetadata>; value_type = civ::SlotMetadata]’
 1278 |       push_back(const value_type& __x)
      |       ^~~~~~~~~
/usr/include/c++/13/bits/stl_vector.h:1278:35: note:   no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘const std::vector<civ::SlotMetadata>::value_type&’ {aka ‘const civ::SlotMetadata&’}
 1278 |       push_back(const value_type& __x)
      |                 ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/stl_vector.h:1295:7: note: candidate: ‘void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = civ::SlotMetadata; _Alloc = std::allocator<civ::SlotMetadata>; value_type = civ::SlotMetadata]’
 1295 |       push_back(value_type&& __x)
      |       ^~~~~~~~~
/usr/include/c++/13/bits/stl_vector.h:1295:30: note:   no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘std::vector<civ::SlotMetadata>::value_type&&’ {aka ‘civ::SlotMetadata&&’}
 1295 |       push_back(value_type&& __x)
      |                 ~~~~~~~~~~~~~^~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:283:35: error: could not convert ‘{data_size, data_size}’ from ‘<brace-enclosed initializer list>’ to ‘civ::Slot’
  283 |     return { data_size, data_size };
      |                                   ^
      |                                   |
      |                                   <brace-enclosed initializer list>
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp: In member function ‘civ::Slot civ::Vector<T>::getFreeSlot()’:
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:289:11: error: ‘uint64_t’ does not name a type
  289 |     const uint64_t reuse_id = metadata[data_size].rid;
      |           ^~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:289:11: note: ‘uint64_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:290:14: error: ‘data_size’ was not declared in this scope
  290 |     metadata[data_size].op_id = op_count++;
      |              ^~~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:290:33: error: ‘op_count’ was not declared in this scope
  290 |     metadata[data_size].op_id = op_count++;
      |                                 ^~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:291:14: error: ‘reuse_id’ was not declared in this scope
  291 |     return { reuse_id, data_size };
      |              ^~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:291:34: error: could not convert ‘{<expression error>, data_size}’ from ‘<brace-enclosed initializer list>’ to ‘civ::Slot’
  291 |     return { reuse_id, data_size };
      |                                  ^
      |                                  |
      |                                  <brace-enclosed initializer list>
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp: In member function ‘civ::Slot civ::Vector<T>::getSlot()’:
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:298:7: error: ‘data_size’ was not declared in this scope
  298 |     ++data_size;
      |       ^~~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp: At global scope:
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:303:22: error: ‘civ::SlotMetadata& civ::Vector<T>::getMetadataAt’ is not a static data member of ‘struct civ::Vector<T>’
  303 | inline SlotMetadata& Vector<T>::getMetadataAt(ID id)
      |                      ^~~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:303:47: error: template definition of non-template ‘civ::SlotMetadata& civ::Vector<T>::getMetadataAt’
  303 | inline SlotMetadata& Vector<T>::getMetadataAt(ID id)
      |                                               ^~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:303:47: error: ‘ID’ was not declared in this scope
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:309:8: error: ‘uint64_t’ does not name a type
  309 | inline uint64_t Vector<T>::getDataID(ID id) const
      |        ^~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:309:8: note: ‘uint64_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:315:17: error: ‘const T& civ::Vector<T>::getAt’ is not a static data member of ‘struct civ::Vector<T>’
  315 | inline const T& Vector<T>::getAt(ID id) const
      |                 ^~~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:315:34: error: template definition of non-template ‘const T& civ::Vector<T>::getAt’
  315 | inline const T& Vector<T>::getAt(ID id) const
      |                                  ^~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:315:34: error: ‘ID’ was not declared in this scope
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:321:13: error: ‘bool civ::Vector<T>::isValid’ is not a static data member of ‘struct civ::Vector<T>’
  321 | inline bool Vector<T>::isValid(ID id, ID validity) const
      |             ^~~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:321:32: error: template definition of non-template ‘bool civ::Vector<T>::isValid’
  321 | inline bool Vector<T>::isValid(ID id, ID validity) const
      |                                ^~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:321:32: error: ‘ID’ was not declared in this scope
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:321:39: error: ‘ID’ was not declared in this scope
  321 | inline bool Vector<T>::isValid(ID id, ID validity) const
      |                                       ^~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:327:8: error: ‘uint64_t’ does not name a type
  327 | inline uint64_t Vector<T>::getOperationID(ID id) const
      |        ^~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:327:8: note: ‘uint64_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp: In member function ‘void civ::Vector<T>::remove_if(TPredicate&&)’:
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:336:10: error: ‘uint64_t’ was not declared in this scope
  336 |     for (uint64_t data_index{ 0 }; data_index < data_size;) {
      |          ^~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:336:10: note: ‘uint64_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:336:36: error: ‘data_index’ was not declared in this scope
  336 |     for (uint64_t data_index{ 0 }; data_index < data_size;) {
      |                                    ^~~~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:336:49: error: ‘data_size’ was not declared in this scope
  336 |     for (uint64_t data_index{ 0 }; data_index < data_size;) {
      |                                                 ^~~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:336:58: error: expected ‘)’ before ‘;’ token
  336 |     for (uint64_t data_index{ 0 }; data_index < data_size;) {
      |         ~                                                ^
      |                                                          )
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:336:5: error: this ‘for’ clause does not guard... [-Werror=misleading-indentation]
  336 |     for (uint64_t data_index{ 0 }; data_index < data_size;) {
      |     ^~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:336:59: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
  336 |     for (uint64_t data_index{ 0 }; data_index < data_size;) {
      |                                                           ^
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:336:59: error: expected primary-expression before ‘)’ token
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp: At global scope:
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:347:1: error: ‘ID’ does not name a type
  347 | ID Vector<T>::getNextID() const {
      | ^~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:352:7: error: ‘void* civ::Vector<T>::get’ is not a static data member of ‘struct civ::Vector<T>’
  352 | void *Vector<T>::get(civ::ID id)
      |       ^~~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:352:27: error: template definition of non-template ‘void* civ::Vector<T>::get’
  352 | void *Vector<T>::get(civ::ID id)
      |                           ^~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:352:27: error: ‘ID’ is not a member of ‘civ’
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp: In member function ‘void civ::Vector<T>::clear()’:
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:360:9: error: request for member ‘clear’ in ‘((civ::Vector<T>*)this)->civ::Vector<T>::ids’, which is of non-class type ‘int’
  360 |     ids.clear();
      |         ^~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:364:13: error: ‘struct civ::SlotMetadata’ has no member named ‘rid’
  364 |         slm.rid   = 0;
      |             ^~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:365:13: error: ‘struct civ::SlotMetadata’ has no member named ‘op_id’
  365 |         slm.op_id = ++op_count;
      |             ^~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:365:23: error: ‘op_count’ was not declared in this scope
  365 |         slm.op_id = ++op_count;
      |                       ^~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:367:5: error: ‘data_size’ was not declared in this scope
  367 |     data_size = 0;
      |     ^~~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp: In member function ‘void civ::Vector<T>::foreach(TCallback&&)’:
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:374:11: error: ‘uint64_t’ does not name a type
  374 |     const uint64_t current_size = data_size;
      |           ^~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:374:11: note: ‘uint64_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:375:10: error: ‘uint64_t’ was not declared in this scope
  375 |     for (uint64_t i{0}; i<current_size; i++) {
      |          ^~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:375:10: note: ‘uint64_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:375:25: error: ‘i’ was not declared in this scope
  375 |     for (uint64_t i{0}; i<current_size; i++) {
      |                         ^
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:375:27: error: ‘current_size’ was not declared in this scope
  375 |     for (uint64_t i{0}; i<current_size; i++) {
      |                           ^~~~~~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:375:39: error: expected ‘)’ before ‘;’ token
  375 |     for (uint64_t i{0}; i<current_size; i++) {
      |         ~                             ^
      |                                       )
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:375:5: error: this ‘for’ clause does not guard... [-Werror=misleading-indentation]
  375 |     for (uint64_t i{0}; i<current_size; i++) {
      |     ^~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:375:41: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
  375 |     for (uint64_t i{0}; i<current_size; i++) {
      |                                         ^
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:375:41: error: ‘i’ was not declared in this scope
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp: At global scope:
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:381:1: error: ‘ID’ does not name a type
  381 | ID Vector<T>::getValidityID(ID id) const
      | ^~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:395:11: error: expected ‘)’ before ‘id_’
  395 |     Ref(ID id_, Vector<T>* a, ID vid)
      |        ~  ^~~~
      |           )
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:421:10: error: ‘ID’ in namespace ‘civ’ does not name a type
  421 |     civ::ID getID() const
      |          ^~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:433:5: error: ‘ID’ does not name a type
  433 |     ID         id;
      |     ^~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:435:5: error: ‘ID’ does not name a type
  435 |     ID         validity_id;
      |     ^~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp: In constructor ‘civ::Ref<T>::Ref()’:
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:390:11: error: class ‘civ::Ref<T>’ does not have any field named ‘id’
  390 |         : id(0)
      |           ^~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:392:11: error: class ‘civ::Ref<T>’ does not have any field named ‘validity_id’
  392 |         , validity_id(0)
      |           ^~~~~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp: In member function ‘T* civ::Ref<T>::operator->()’:
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:403:26: error: ‘id’ was not declared in this scope
  403 |         return &(*array)[id];
      |                          ^~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp: In member function ‘const T* civ::Ref<T>::operator->() const’:
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:408:26: error: ‘id’ was not declared in this scope
  408 |         return &(*array)[id];
      |                          ^~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp: In member function ‘T& civ::Ref<T>::operator*()’:
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:413:25: error: ‘id’ was not declared in this scope
  413 |         return (*array)[id];
      |                         ^~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp: In member function ‘const T& civ::Ref<T>::operator*() const’:
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:418:25: error: ‘id’ was not declared in this scope
  418 |         return (*array)[id];
      |                         ^~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp: In member function ‘civ::Ref<T>::operator bool() const’:
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:429:40: error: ‘id’ was not declared in this scope
  429 |         return array && array->isValid(id, validity_id);
      |                                        ^~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:429:44: error: ‘validity_id’ was not declared in this scope
  429 |         return array && array->isValid(id, validity_id);
      |                                            ^~~~~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp: At global scope:
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:442:35: error: expected ‘;’ before ‘(’ token
  442 |     using ProviderCallback = T*(*)(ID, GenericProvider*);
      |                                   ^
      |                                   ;
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:452:12: error: expected ‘)’ before ‘index’
  452 |     PRef(ID index, Vector<U>* a, ID vid)
      |         ~  ^~~~~~
      |            )
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:455:9: error: expected unqualified-id before ‘,’ token
  455 |         , provider(a)
      |         ^
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:469:19: error: ‘ID’ has not been declared
  469 |     static T* get(ID index, GenericProvider* provider)
      |                   ^~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:489:10: error: ‘ID’ in namespace ‘civ’ does not name a type
  489 |     civ::ID getID() const
      |          ^~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:501:5: error: ‘ID’ does not name a type
  501 |     ID                  id;
      |     ^~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:502:5: error: ‘ProviderCallback’ does not name a type
  502 |     ProviderCallback    provider_callback;
      |     ^~~~~~~~~~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:504:5: error: ‘uint64_t’ does not name a type
  504 |     uint64_t            validity_id;
      |     ^~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:504:5: note: ‘uint64_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp: In constructor ‘civ::PRef<T>::PRef()’:
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:445:11: error: class ‘civ::PRef<T>’ does not have any field named ‘id’
  445 |         : id(0)
      |           ^~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:446:11: error: class ‘civ::PRef<T>’ does not have any field named ‘provider_callback’
  446 |         , provider_callback(nullptr)
      |           ^~~~~~~~~~~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:448:11: error: class ‘civ::PRef<T>’ does not have any field named ‘validity_id’
  448 |         , validity_id(0)
      |           ^~~~~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp: In constructor ‘civ::PRef<T>::PRef(const civ::PRef<U>&)’:
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:461:11: error: class ‘civ::PRef<T>’ does not have any field named ‘id’
  461 |         : id(other.id)
      |           ^~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:462:11: error: class ‘civ::PRef<T>’ does not have any field named ‘provider_callback’
  462 |         , provider_callback{PRef<T>::get<U>}
      |           ^~~~~~~~~~~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:464:11: error: class ‘civ::PRef<T>’ does not have any field named ‘validity_id’
  464 |         , validity_id(other.validity_id)
      |           ^~~~~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp: In member function ‘T* civ::PRef<T>::operator->()’:
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:476:34: error: ‘id’ was not declared in this scope
  476 |         return provider_callback(id, provider);
      |                                  ^~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:476:16: error: there are no arguments to ‘provider_callback’ that depend on a template parameter, so a declaration of ‘provider_callback’ must be available [-fpermissive]
  476 |         return provider_callback(id, provider);
      |                ^~~~~~~~~~~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:476:16: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp: In member function ‘T& civ::PRef<T>::operator*()’:
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:481:35: error: ‘id’ was not declared in this scope
  481 |         return *provider_callback(id, provider);
      |                                   ^~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:481:17: error: there are no arguments to ‘provider_callback’ that depend on a template parameter, so a declaration of ‘provider_callback’ must be available [-fpermissive]
  481 |         return *provider_callback(id, provider);
      |                 ^~~~~~~~~~~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp: In member function ‘const T& civ::PRef<T>::operator*() const’:
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:486:35: error: ‘id’ was not declared in this scope
  486 |         return *provider_callback(id, provider);
      |                                   ^~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:486:17: error: there are no arguments to ‘provider_callback’ that depend on a template parameter, so a declaration of ‘provider_callback’ must be available [-fpermissive]
  486 |         return *provider_callback(id, provider);
      |                 ^~~~~~~~~~~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp: In member function ‘civ::PRef<T>::operator bool() const’:
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:497:46: error: ‘id’ was not declared in this scope
  497 |         return provider && provider->isValid(id, validity_id);
      |                                              ^~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/common/index_vector.hpp:497:50: error: ‘validity_id’ was not declared in this scope
  497 |         return provider && provider->isValid(id, validity_id);
      |                                                  ^~~~~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/window_context_handler.hpp: At global scope:
/home/aapo/Desktop/VerletSFML-Multithread/src/engine/window_context_handler.hpp:129:28: error: ‘uint32_t’ has not been declared
  129 |     void setFramerateLimit(uint32_t framerate)
      |                            ^~~~~~~~
In file included from /home/aapo/Desktop/VerletSFML-Multithread/src/main.cpp:7:
/home/aapo/Desktop/VerletSFML-Multithread/src/physics/physics.hpp: In member function ‘uint64_t PhysicSolver::addObject(const PhysicObject&)’:
/home/aapo/Desktop/VerletSFML-Multithread/src/physics/physics.hpp:107:24: error: ‘CIVector<PhysicObject>’ {aka ‘struct civ::Vector<PhysicObject>’} has no member named ‘push_back’
  107 |         return objects.push_back(object);
      |                        ^~~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/physics/physics.hpp: In member function ‘uint64_t PhysicSolver::createObject(Vec2)’:
/home/aapo/Desktop/VerletSFML-Multithread/src/physics/physics.hpp:113:24: error: ‘CIVector<PhysicObject>’ {aka ‘struct civ::Vector<PhysicObject>’} has no member named ‘emplace_back’
  113 |         return objects.emplace_back(pos);
      |                        ^~~~~~~~~~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/physics/physics.hpp: In member function ‘void PhysicSolver::updateObjects_multi(float)’:
/home/aapo/Desktop/VerletSFML-Multithread/src/physics/physics.hpp:143:51: error: ‘CIVector<PhysicObject>’ {aka ‘struct civ::Vector<PhysicObject>’} has no member named ‘size’
  143 |         thread_pool.dispatch(to<uint32_t>(objects.size()), [&](uint32_t start, uint32_t end){
      |                                                   ^~~~
/home/aapo/Desktop/VerletSFML-Multithread/src/main.cpp: In function ‘int main()’:
/home/aapo/Desktop/VerletSFML-Multithread/src/main.cpp:47:28: error: ‘CIVector<PhysicObject>’ {aka ‘struct civ::Vector<PhysicObject>’} has no member named ‘size’
   47 |         if (solver.objects.size() < 80000 && emit) {
      |                            ^~~~
cc1plus: all warnings being treated as errors
gmake[2]: *** [CMakeFiles/VerletMulti.dir/build.make:76: CMakeFiles/VerletMulti.dir/src/main.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/VerletMulti.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2

Any ideas? I'm pretty sure I'm building correctly. I make a build folder in the main directory and then enter it. Then I do
cmake .. and cmake --build .. Thanks!

Edit: I'm on Fedora Linux. I have installed SFML and SFML-devel. Also CMake is installed.

Idea for a speedup - are there any issues with this?

So, this lags pretty badly on my computer when you make the world size much larger than 300x300, no matter how many particles there are. I think this is just because of the sheer number of cells it needs to loop through.

So i'm wondering, is there any reason you loop through every single cell? Seems super unnecessary, why not just loop through all the cells with particles in them? The way I would implement this is by having a vector in the PhysicsSolver class, to store all the cells with particles in them. This vector would get cleared at the beginning of each loop, and then in the method to add the particles to the grid, you could just push the index of the current particle in the grid to the back of this vector.

I guess there may be some issues with threading, but my approach is to 'pad' the vector of active cells until it's a multiple of the thread count.

So, is there any issue with doing this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.