//public NavigationTriangle(Vector3 a, Vector3 b, Vector3 c) public NavigationTriangle(Edge e1, Edge e2, Edge e3) { //m_neighbours[0] = null; // neighbour on a -> b side //m_neighbours[1] = null; // neighbour on b -> c side //m_neighbours[2] = null; // neighbour on c -> a side m_edge1 = e1; m_edge2 = e2; m_edge3 = e3; Vector3 a,b,c; m_edge1.getCommonVertex(m_edge3, out a); m_edge1.getCommonVertex(m_edge2, out b); m_edge2.getCommonVertex(m_edge3, out c); m_corners[0] = a; m_corners[1] = b; m_corners[2] = c; m_dirs[0] = Vector3.Subtract(c, a); m_dirs[1] = Vector3.Subtract(b, a); m_normal = Vector3.Cross(m_dirs[0], m_dirs[1]); m_normal.Normalize(); }