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