1 #ifndef BLANK_WORLD_BLOCKGRAVITY_HPP_
2 #define BLANK_WORLD_BLOCKGRAVITY_HPP_
4 #include "../graphics/glm.hpp"
11 class TokenStreamReader;
15 virtual ~BlockGravity();
17 /// get gravitational force for a unit mass at relative position diff
18 /// diff is target - block, i.e. pointing from block towards the target
19 /// orientation of the block in question is given by M
20 /// return value should be world absolute
21 virtual glm::vec3 GetGravity(const glm::vec3 &diff, const glm::mat4 &M) const noexcept = 0;
23 static std::unique_ptr<BlockGravity> Read(TokenStreamReader &in);