BananaMpq.Geometry.Builders.SquareMeshBuilder.GetIndexAt C# (CSharp) Method

GetIndexAt() private method

private GetIndexAt ( int row, int col ) : int
row int
col int
return int
        private int GetIndexAt(int row, int col)
        {
            var vertexIndex = _jumpIndices[row, col];

            if (vertexIndex == -1)
            {
                _jumpIndices[row, col] = vertexIndex = _vertices.Count;

                var v = _offset + new Vector3(row * _tileSize, col * _tileSize, _heightMap[row, col]);
                if (_rootTransform.HasValue)
                    v = (Vector3)Vector3.Transform(v, _rootTransform.Value);
                _vertices.Add(v);
            }
            return vertexIndex;
        }