diff options
author | Stijn Buys <ingar@osirion.org> | 2009-08-09 16:48:56 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2009-08-09 16:48:56 +0000 |
commit | 4f576711828f35179dc5d28cfda93eff47e80a74 (patch) | |
tree | 4dcf00d706c25e59f03ff99202b8ec2850aae12b | |
parent | 324f5431245f2a550acddea70ea72770430a19d1 (diff) |
slightly more usable fake normals
-rw-r--r-- | src/model/asefile.cc | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/model/asefile.cc b/src/model/asefile.cc index 182c58c..a267d9b 100644 --- a/src/model/asefile.cc +++ b/src/model/asefile.cc @@ -103,10 +103,18 @@ bool ASEFile::read_mesh_face_list(std::istream &is) (line >> word) && (line >> a) && (line >> word) && (line >> b) && (line >> word) && (line >> c)) { - - fragment->add_vertex(ase_vertexlist[a], ase_vertexlist[a], false); - fragment->add_vertex(ase_vertexlist[b], ase_vertexlist[b], false); - fragment->add_vertex(ase_vertexlist[c], ase_vertexlist[c], false); + + math::Vector3f n(ase_vertexlist[a]); + n.normalize(); + fragment->add_vertex(ase_vertexlist[a], n, false); + + n.assign(ase_vertexlist[b]); + n.normalize(); + fragment->add_vertex(ase_vertexlist[b], n, false); + + n.assign(ase_vertexlist[c]); + n.normalize(); + fragment->add_vertex(ase_vertexlist[c], n, false); model->model_tris_count++; model->model_tris_detail_count++; |