Changeset 1277
- Timestamp:
- Apr 23, 2012, 8:42:06 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/orbital/mesh.h
r1276 r1277 447 447 void Scale(vec3 const &s) 448 448 { 449 /* FIXME: this code breaks normals! */ 449 vec3 const invs = vec3(1) / s; 450 450 451 for (int i = m_vert_cursor; i < m_vert.Count(); i++) 451 452 { 452 453 m_vert[i].m1 *= s; 453 m_vert[i].m2 *= s; 454 } 455 456 // BH : TODO : not sure about this one 457 // Sam: not too sure either! 454 m_vert[i].m2 = normalize(m_vert[i].m2 * invs); 455 } 456 457 /* Flip winding if the scaling involves mirroring */ 458 458 if (s.x * s.y * s.z < 0) 459 459 {
Note: See TracChangeset
for help on using the changeset viewer.