예제 #1
0
        public void AddComponentTriangle(MyNavigationTriangle triangle, Vector3 center)
        {
            MyIntervalList list = this.m_components[this.m_componentNum];

            list.Add(triangle.Index);
            float num2 = 1f / ((float)list.Count);

            this.m_lastCellComponentCenters[this.m_componentNum] = (center * num2) + (this.m_lastCellComponentCenters[this.m_componentNum] * (1f - num2));
        }
예제 #2
0
        public void AddComponentTriangle(MyNavigationTriangle triangle, Vector3 center)
        {
            Debug.Assert(m_componentOpen, "Adding a triangle to a component in TriangleComponentMapping, when no component is open!");

            int triIndex = triangle.Index;

            MyIntervalList triList = m_components[m_componentNum];

            triList.Add(triIndex);

            float t = 1.0f / triList.Count;

            m_lastCellComponentCenters[m_componentNum] = center * t + m_lastCellComponentCenters[m_componentNum] * (1.0f - t);
        }
 public void AddTriangle(int triIndex)
 {
     m_triangleList.Add(triIndex);
 }