ClearVectors() public method

Clears all vectors from the primitive line object.
public ClearVectors ( ) : void
return void
示例#1
0
        void UpdatePoints()
        {
            mLinePrimitive.ClearVectors();

            float width  = mColumnWidth * mColumnCount;
            float height = mRowWidth * mRowCount;

            float currentY = 0;

            for (int i = 0; i < mRowCount + 1; i++)
            {
                currentY = i * mRowWidth;
                mLinePrimitive.Add(0, currentY);
                mLinePrimitive.Add(width, currentY);
            }

            float currentX = 0;

            for (int i = 0; i < mColumnCount + 1; i++)
            {
                currentX = i * mColumnWidth;
                mLinePrimitive.Add(currentX, 0);
                mLinePrimitive.Add(currentX, height);
            }
        }
示例#2
0
        public void SetPoints(ICollection <Vector2> points)
        {
            mLinePrimitive.ClearVectors();

            if (points != null)
            {
                foreach (var point in points)
                {
                    mLinePrimitive.Add(point);
                }
            }
        }