Esempio n. 1
0
 /// <summary> Add a vertex profile </summary>
 public void AddProfile(VertexProfile p)
 {
     m_Colors.Add(p.color);
     m_Uv0.Add(p.uv);
     m_Uv2.Add(p.uv2);
     m_Uv3.Add(p.uv3);
 }
Esempio n. 2
0
 /// <summary>
 /// Transform UV Profile
 /// </summary>
 public static VertexProfile Transform(Matrix4x4 t, VertexProfile profile, UnityEngine.Vector4 center)
 {
     return(new VertexProfile()
     {
         color = profile.color,
         uv = t * profile.uv + center,
         uv2 = t * profile.uv2 + center,
         uv3 = t * profile.uv3 + center,
     });
 }
Esempio n. 3
0
 /// <summary>
 /// Transform UV Profile
 /// </summary>
 public static VertexProfile Transform(Matrix4x4 t, VertexProfile profile)
 {
     return(new VertexProfile()
     {
         color = profile.color,
         uv = t * profile.uv,
         uv2 = t * profile.uv2,
         uv3 = t * profile.uv3,
     });
 }
Esempio n. 4
0
 /// <summary>
 /// Interpolate between two profile (without clamping)
 /// </summary>
 public static VertexProfile LerpUnclamped(VertexProfile a, VertexProfile b, float t)
 {
     return(new VertexProfile
     {
         color = Color.LerpUnclamped(a.color, b.color, t),
         uv = UnityEngine.Vector4.LerpUnclamped(a.uv, b.uv, t),
         uv2 = UnityEngine.Vector4.LerpUnclamped(a.uv2, b.uv2, t),
         uv3 = UnityEngine.Vector4.LerpUnclamped(a.uv3, b.uv3, t),
     });
 }
Esempio n. 5
0
 /// <summary> Add a new profile to remaining indice </summary>
 public void AddProfile(VertexProfile profile)
 {
     EnsureProfiles(1);
     m_Profiles[m_ProfilesCount++] = (profile);
 }
Esempio n. 6
0
 /// <summary>
 /// Interpolate between two profile
 /// </summary>
 public static VertexProfile Lerp(VertexProfile a, VertexProfile b, float t)
 {
     return(LerpUnclamped(a, b, Mathf.Clamp01(t)));
 }