示例#1
0
 public LdrBuilder Append(object part)
 {
     if (part is string str)
     {
         m_sb.Append(str);
     }
     else if (part is Color col)
     {
         m_sb.Append(Ldr.Colour(col));
     }
     else if (part is v4 vec4)
     {
         m_sb.Append(Ldr.Vec3(vec4));
     }
     else if (part is v2 vec2)
     {
         m_sb.Append(Ldr.Vec2(vec2));
     }
     else if (part is m4x4 o2w)
     {
         m_sb.Append(Ldr.Mat4x4(o2w));
     }
     else if (part is AxisId axisid)
     {
         m_sb.Append(Ldr.AxisId(axisid.Id));
     }
     else if (part is EAxisId axisid2)
     {
         m_sb.Append(Ldr.AxisId(axisid2));
     }
     else if (part is IEnumerable)
     {
         foreach (var x in (IEnumerable)part)
         {
             Append(" ").Append(x ?? string.Empty);
         }
     }
     else if (part != null)
     {
         m_sb.Append(part.ToString());
     }
     return(this);
 }