Nez.Portable/ECS/Components/Renderables/LineRenderer.cs
/// <summary>
/// special case for just 2 points, one line segment
/// </summary>
/// <param name="segment">Segment.</param>
special case for just 2 points, one line segment
special case for just 2 points one line segment
[MethodImpl(MethodImplOptions.AggressiveInlining)]
        void addSingleSegmentLine(ref Segment segment, Color nextPointColor)
        {
            _indices.add(0);
            _indices.add(1);
            _indices.add(2);
            _indices.add(0);
            _indices.add(2);
            _indices.add(3);
            addVert(0, segment.tl, new Vector2(0, 1), _useStartEndColors ? _startColor : segment.point.color);
            addVert(1, segment.tr, new Vector2(1, 1), nextPointColor);
            addVert(2, segment.br, new Vector2(1, 0), nextPointColor);
            addVert(3, segment.bl, new Vector2(0, 0), _useStartEndColors ? _startColor : segment.point.color);
        }
[ MethodImpl ( MethodImplOptions . AggressiveInlining ) ] void addSingleSegmentLine ( ref Segment segment , Color nextPointColor ) { _indices . add ( 0 ) ; _indices . add ( 1 ) ; _indices . add ( 2 ) ; _indices . add ( 0 ) ; _indices . add ( 2 ) ; _indices . add ( 3 ) ; addVert ( 0 , segment . tl , new Vector2 ( 0 , 1 ) , _useStartEndColors ? _startColor : segment . point . color ) ; addVert ( 1 , segment . tr , new Vector2 ( 1 , 1 ) , nextPointColor ) ; addVert ( 2 , segment . br , new Vector2 ( 1 , 0 ) , nextPointColor ) ; addVert ( 3 , segment . bl , new Vector2 ( 0 , 0 ) , _useStartEndColors ? _startColor : segment . point . color ) ; }
special case for just 2 points, one line segment
special case for just 2 points one line segment
Segment
ref
nextPointColor
Color
segment
None