Пример #1
0
        /// <summary>
        /// The update world position.
        /// </summary>
        /// <param name="origin">
        /// The origin.
        /// </param>
        public void UpdateWorldPosition(ref GameOrigin origin)
        {
            Vector3.Transform(ref this.position, ref origin.worldRotation, out this.worldPosition);

            // TODO: check if the order is right
            Quaternion.Multiply(ref this.rotation, ref origin.worldRotation, out this.worldRotation);
        }
Пример #2
0
 /// <summary>
 /// The update local position.
 /// </summary>
 /// <param name="parent">
 /// The parent.
 /// </param>
 /// <exception cref="NotImplementedException">
 /// </exception>
 public void UpdateLocalPosition(GameOrigin parent)
 {
     throw new NotImplementedException();
 }
Пример #3
0
 public override void OnPositionChanged(ref GameOrigin origin)
 {
     base.OnPositionChanged(ref origin);
 }
Пример #4
0
 /// <summary>
 /// The equals.
 /// </summary>
 /// <param name="other">
 /// The other.
 /// </param>
 /// <returns>
 /// The equals.
 /// </returns>
 public bool Equals(GameOrigin other)
 {
     return other.position.Equals(this.position) && other.rotation.Equals(this.rotation);
 }
Пример #5
0
 /// <summary>
 /// The on position changed.
 /// </summary>
 /// <param name="position">
 /// The position.
 /// </param>
 public virtual void OnPositionChanged(ref GameOrigin position)
 {
 }