namespace blank {
Chunk::Chunk()
-: blocks(Size())
+: blocks()
, model()
+, position(0, 0, 0)
, dirty(false) {
}
}
+void Chunk::Allocate() {
+ blocks.resize(Size());
+}
+
+
void Chunk::Draw() {
if (dirty) {
Update();
return true;
}
-void Chunk::Position(const glm::vec3 &pos) {
+void Chunk::Position(const glm::tvec3<int> &pos) {
position = pos;
}
-glm::mat4 Chunk::Transform(const glm::vec3 &offset) const {
+glm::mat4 Chunk::Transform(const glm::tvec3<int> &offset) const {
return glm::translate((position - offset) * Extent());
}