Changes between Initial Version and Version 1 of Ticket #1987, comment 5
- Timestamp:
- Jun 21, 2013, 9:47:13 AM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #1987, comment 5
initial v1 1 Imho you can take out even more if you respect the equidistant natureof the Grid. (up - down) will lead to 1 component being 0, because they have equal X coordinate, and another component being 2*d where d is the Grid distance. The same goes for left-right. The 2*d factor can be left out, as you normalize anyway, so the normal should be something like (left.Z - right.Z; up.Z - down.Z; 2*d).normalize().1 Imho you can take out even more if you respect the regularity of the Grid. (up - down) will lead to 1 component being 0, because they have equal X coordinate, and another component being 2*d where d is the Grid distance. The same goes for left-right. The 2*d factor can be left out, as you normalize anyway, so the normal should be something like (left.Z - right.Z; up.Z - down.Z; 2*d).normalize().