6 const NullShape BlockType::DEFAULT_SHAPE;
8 void BlockType::FillModel(
10 const glm::vec3 &pos_offset,
11 Model::Index idx_offset
13 shape->Vertices(model.vertices, model.normals, model.indices, pos_offset, idx_offset);
14 model.colors.insert(model.colors.end(), shape->VertexCount(), color);
17 void BlockType::FillOutlineModel(
19 const glm::vec3 &pos_offset,
20 OutlineModel::Index idx_offset
22 shape->Outline(model.vertices, model.indices, pos_offset, idx_offset);
23 model.colors.insert(model.colors.end(), shape->OutlineCount(), outline_color);
27 BlockTypeRegistry::BlockTypeRegistry() {
31 Block::Type BlockTypeRegistry::Add(const BlockType &t) {
32 int id = types.size();