Ejemplo n.º 1
0
 public LdrBuilder Line(string name, Colour32 colour, float width, bool smooth, IEnumerable <v4> points)
 {
     if (!points.Any())
     {
         return(this);
     }
     return(Append("*LineStrip ", name, " ", colour, " {", Ldr.Width(width), Ldr.Smooth(smooth), points.Select(x => Ldr.Vec3(x)), "}\n"));
 }
Ejemplo n.º 2
0
        public LdrBuilder Arrow(string name, Colour32 colour, Ldr.EArrowType type, float width, bool smooth, Func <int, v4?> points)
        {
            int idx = 0;

            Append("*Arrow ", name, " ", colour, " {");
            for (v4?pt; (pt = points(idx++)) != null;)
            {
                Append(Ldr.Vec3(pt.Value));
            }
            Append(Ldr.Width(width), Ldr.Smooth(smooth), type.ToString(), "}\n");
            return(this);
        }
Ejemplo n.º 3
0
        public LdrBuilder Line(string name, Colour32 colour, float width, bool smooth, Func <int, v4?> points)
        {
            int idx = 0;

            Append("*LineStrip ", name, " ", colour, " {", Ldr.Width(width), Ldr.Smooth(smooth));
            for (v4?pt; (pt = points(idx++)) != null;)
            {
                Append(Ldr.Vec3(pt.Value));
            }
            Append("}\n");
            return(this);
        }
Ejemplo n.º 4
0
 public LdrBuilder Ribbon(string name, Colour32 colour, IEnumerable <v4> points, AxisId axis_id, float width, bool smooth, m4x4?o2w = null)
 {
     return(Append("*Ribbon ", name, " ", colour, " {", points, " ", axis_id, Ldr.Width(width), Ldr.Smooth(smooth), Ldr.Transform(o2w), "}\n"));
 }
Ejemplo n.º 5
0
 public LdrBuilder Arrow(string name, Colour32 colour, Ldr.EArrowType type, float width, bool smooth, IEnumerable <v4> points)
 {
     if (!points.Any())
     {
         return(this);
     }
     return(Append("*Arrow ", name, " ", colour, " {", type.ToString(), points.Select(x => Ldr.Vec3(x)), Ldr.Width(width), Ldr.Smooth(smooth), "}\n"));
 }
Ejemplo n.º 6
0
 public LdrBuilder LineD(string name, Colour32 colour, v4 start, v4 direction, float width)
 {
     return(Append("*LineD ", name, " ", colour, " {", Ldr.Width(width), start, " ", direction, "}"));
 }