Exemple #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);
        }
Exemple #2
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);
        }
Exemple #3
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();
 }
Exemple #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);
 }
Exemple #5
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();
 }
Exemple #6
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));
 }
Exemple #7
0
 public override void OnPositionChanged(ref GameOrigin origin)
 {
     base.OnPositionChanged(ref origin);
 }
Exemple #8
0
 /// <summary>
 /// The on position changed.
 /// </summary>
 /// <param name="position">
 /// The position.
 /// </param>
 public virtual void OnPositionChanged(ref GameOrigin position)
 {
 }
Exemple #9
0
 /// <summary>
 /// The on position changed.
 /// </summary>
 /// <param name="position">
 /// The position.
 /// </param>
 public virtual void OnPositionChanged(ref GameOrigin position)
 {
 }