Esempio n. 1
0
            public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType)
            {
                if (destinationType == typeof(System.String) &&
                    value is Vector3WithUnit)
                {
                    Vector3WithUnit vector3 = (Vector3WithUnit)value;

                    return(vector3.X.ToString() + "," + vector3.Y.ToString() + "," + vector3.Z.ToString());
                }

                return(base.ConvertTo(context, culture, value, destinationType));
            }
Esempio n. 2
0
 public Vector3WithUnit(Vector3WithUnit vector)
 {
     this.x = new Length(vector.X);
     this.y = new Length(vector.Y);
     this.z = new Length(vector.Z);
 }