Example #1
0
        private double ComputeTriangleArea(MeshData.Triangle t)
        {
            var A = m_cacheData.vertices[t.a].position;
            var B = m_cacheData.vertices[t.b].position;
            var C = m_cacheData.vertices[t.c].position;

            return(0.5f * Vector3.Cross(B - A, C - A).magnitude);
        }
Example #2
0
 protected MeshData.Vertex Interpolate(MeshData.Triangle triangle, Vector2 p)
 {
     return(Interpolate(m_cacheData.vertices[triangle.a], m_cacheData.vertices[triangle.b], m_cacheData.vertices[triangle.c], p));
 }