- const EntityModel::Normal &VertexNormal(size_t idx) const noexcept { return vtx_nrm[idx]; }
- EntityModel::Normal VertexNormal(
- size_t idx, const glm::mat4 &transform
- ) const noexcept {
- return EntityModel::Normal(transform * glm::vec4(vtx_nrm[idx], 0.0f));
+
+public:
+ Shape();
+
+ void Read(TokenStreamReader &);
+
+ bool FaceFilled(Block::Face face) const noexcept {
+ return fill[face];
+ }
+
+ std::size_t VertexCount() const noexcept { return vertices.size(); }
+ std::size_t IndexCount() const noexcept { return indices.size(); }
+
+ const glm::vec3 &VertexNormal(size_t idx) const noexcept {
+ return vertices[idx].normal;
+ }
+ glm::vec3 VertexNormal(size_t idx, const glm::mat4 &M) const noexcept {
+ return glm::vec3(M * glm::vec4(VertexNormal(idx), 0.0f));