mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 00:27:43 +00:00
3DFileViewer: Calculate face-normal from vertex-normals of the triangle
This change calculates the face-normal of the triangle by adding the three vertex-normals and then normalizing. This results in an average of the three vertex-normals.
This commit is contained in:
parent
5fd58a2663
commit
ed41f48ea4
2 changed files with 26 additions and 4 deletions
|
@ -27,6 +27,8 @@ public:
|
|||
|
||||
bool is_textured() const { return m_tex_coords.size() > 0; }
|
||||
|
||||
bool has_normals() const { return m_normal_list.size() > 0; }
|
||||
|
||||
private:
|
||||
Vector<Vertex> m_vertex_list;
|
||||
Vector<TexCoord> m_tex_coords;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue