Пример #1
0
 public Vector3 GetPosition()
 {
     if (this.Position == null)
     {
         throw new InvalidOperationException("Template has no position");
     }
     return(DetailHelper.ParseVector3(this.Position));
 }
Пример #2
0
 public Vector3 GetSize()
 {
     if (this.Size == null)
     {
         throw new InvalidOperationException("Template has no size");
     }
     return(DetailHelper.ParseVector3(this.Size));
 }
Пример #3
0
        public Quaternion GetRotation()
        {
            if (this.Rotation == null)
            {
                throw new InvalidOperationException("Template has no rotation");
            }
            var ang = DetailHelper.ParseVector3(this.Rotation);

            ang *= MathHelper.DegreesToRadians(1);
            return
                (Quaternion.FromAxisAngle(Vector3.UnitY, ang.Y));              // *
            // Quaternion.FromAxisAngle(Vector3.UnitY, ang.Y) *
            // Quaternion.FromAxisAngle(Vector3.UnitY, ang.Y);
        }