{% else-1 %}
Есть также формула расчета нормали к полигону по нормали к
вершине (может приснилось * ). Кто найдет, тому[green]+[/green]

                        
public static Vector3D createNormal(Vector3D a, Vector3D b, Vector3D c, Vector3D nor) {
float x = (a.y-b.y)*(a.z-c.z) - (a.z-b.z)*(a.y-c.y);
float y = (a.z-b.z)*(a.x-c.x) - (a.x-b.x)*(a.z-c.z);
float z = (a.x-b.x)*(a.y-c.y) - (a.y-b.y)*(a.x-c.x);
float sqrt = Math.sqrt(x*x + y*y + z*z)*4096;
nor.set((int)(x*sqrt), (int)(y*sqrt), (int)(z*sqrt));
return nor;
}
1 15 0
Без комментариев...