Exemplo n.º 1
0
        /// <summary>
        /// Create new interaction data with values copied from this interaction data.
        /// </summary>
        public IInteractionData Clone()
        {
            InteractionData i = new InteractionData();

            i.InteractionType  = InteractionType;
            i.Velocity         = Velocity;
            i.Point            = Point;
            i.Normal           = Normal;
            i.TagMask          = TagMask;
            i.CompositionValue = CompositionValue;
            i.PriorityOverride = PriorityOverride;
            i.ThisObject       = ThisObject;
            i.OtherObject      = OtherObject;

            return(i);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Converts the given IInteractionData implementation to InteractionData.
        /// </summary>
        /// <typeparam name="T">The IInteractionData type.</typeparam>
        /// <param name="original">The original IInteractionData object.</param>
        /// <returns>A new InteractionData object.</returns>
        public static InteractionData ToInteractionData <T>(T original) where T : IInteractionData
        {
            InteractionData i = new InteractionData();

            i.InteractionType  = original.InteractionType;
            i.Velocity         = original.Velocity;
            i.Point            = original.Point;
            i.Normal           = original.Normal;
            i.TagMask          = original.TagMask;
            i.CompositionValue = original.CompositionValue;
            i.PriorityOverride = original.PriorityOverride;
            i.ThisObject       = original.ThisObject;
            i.OtherObject      = original.OtherObject;

            return(i);
        }