protected virtual void Interpolation(ref McEdge edge) { McPoint p1 = m_Points[edge.pos[0]]; McPoint p2 = m_Points[edge.pos[1]]; if (Mathf.Abs(isolevel - p1.ios) < 0.00001f) { edge.v3 = p1.position; } else if (Mathf.Abs(isolevel - p2.ios) < 0.00001f) { edge.v3 = p2.position; } else if (Mathf.Abs(p1.ios - p2.ios) < 0.00001f) { edge.v3 = p1.position; } else { edge.v3 = p1.position + (isolevel - p1.ios) * (p2.position - p1.position) / (p2.ios - p1.ios); } }
protected abstract void AddEdge(ref McEdge edge);