- glm::mat4 ToTransform(const Pos &pos, int idx) const noexcept;
-
- Block::Pos ToSceneCoords(const Pos &base, const Block::Pos &pos) const noexcept {
- return Block::Pos((position - base) * Extent()) + pos;
+ /// get a chunk-local transform for block at given position and index
+ /// (position and index are redundant)
+ glm::mat4 ToTransform(const RoughLocation::Fine &position, int index) const noexcept;
+ /// same as above, but also apply offset to given reference
+ glm::mat4 ToTransform(const ExactLocation::Coarse &ref, const RoughLocation::Fine &pos, int idx) const noexcept;
+
+ ExactLocation::Fine ToSceneCoords(const ExactLocation::Coarse &base, const ExactLocation::Fine &pos) const noexcept {
+ return ExactLocation::Fine((position - base) * ExactLocation::Extent()) + pos;