Example #1
0
 public static void InsertValue <T>(CompositionPropertySet prop, string name, T value) where T : struct
 {
     { if (value is float v)
       {
           prop.InsertScalar(name, v);
       }
     }
     { if (value is Vector2 v)
       {
           prop.InsertVector2(name, v);
       }
     }
     { if (value is Vector3 v)
       {
           prop.InsertVector3(name, v);
       }
     }
     { if (value is Vector4 v)
       {
           prop.InsertVector4(name, v);
       }
     }
     { if (value is Quaternion v)
       {
           prop.InsertQuaternion(name, v);
       }
     }
 }
Example #2
0
 public static CompositionPropertySet SetValue(this CompositionPropertySet set, string name, Quaternion value)
 {
     set.InsertQuaternion(name, value);
     return set;
 }