Esempio n. 1
0
		/// <summary>
		/// 	<para>Concatenate 'b' to 'a' and return the result: t' = a * b.</para>
		/// 	<para>Original signature is : CATransform3D CATransform3DConcat (CATransform3D a, CATransform3D b);</para>
		/// 	<para>Available in Mac OS X version 10.5 and later.</para>
		/// </summary>
		public static CATransform3D Concat (CATransform3D a, CATransform3D b)
		{
			// TODO: Check matrices at http://www.devmaster.net/wiki/Transformation_matrices
			return new CATransform3D (a.m11 * b.m11 + a.m12 * b.m21 + a.m13 * b.m31 + a.m14 * b.m41,
                                     a.m11 * b.m12 + a.m12 * b.m22 + a.m13 * b.m32 + a.m14 * b.m42,
                                     a.m11 * b.m13 + a.m12 * b.m23 + a.m13 * b.m33 + a.m14 * b.m43,
                                     a.m11 * b.m14 + a.m12 * b.m24 + a.m13 * b.m34 + a.m14 * b.m44,

                                     a.m21 * b.m11 + a.m22 * b.m21 + a.m23 * b.m31 + a.m24 * b.m41,
                                     a.m21 * b.m12 + a.m22 * b.m22 + a.m23 * b.m32 + a.m24 * b.m42,
                                     a.m21 * b.m13 + a.m22 * b.m23 + a.m23 * b.m33 + a.m24 * b.m43,
                                     a.m21 * b.m14 + a.m22 * b.m24 + a.m23 * b.m34 + a.m24 * b.m44,

                                     a.m31 * b.m11 + a.m32 * b.m21 + a.m33 * b.m31 + a.m34 * b.m41,
                                     a.m31 * b.m12 + a.m32 * b.m22 + a.m33 * b.m32 + a.m34 * b.m42,
                                     a.m31 * b.m13 + a.m32 * b.m23 + a.m33 * b.m33 + a.m34 * b.m43,
                                     a.m31 * b.m14 + a.m32 * b.m24 + a.m33 * b.m34 + a.m34 * b.m44,

                                     a.m41 * b.m11 + a.m42 * b.m21 + a.m43 * b.m31 + a.m44 * b.m41,
                                     a.m41 * b.m12 + a.m42 * b.m22 + a.m43 * b.m32 + a.m44 * b.m42,
                                     a.m41 * b.m13 + a.m42 * b.m23 + a.m43 * b.m33 + a.m44 * b.m43,
                                     a.m41 * b.m14 + a.m42 * b.m24 + a.m43 * b.m34 + a.m44 * b.m44);
		}
Esempio n. 2
0
		/// <summary>
		///     <para>Returns true if 't' can be exactly represented by an affine transform.</para>
		///     <para>Original signature is : bool CATransform3DIsAffine (CATransform3D t);</para>
		/// 	<para>Available in Mac OS X version 10.5 and later.</para>
		/// </summary>
		public static bool IsAffine (CATransform3D t)
		{
			// TODO : To implement
			throw new NotImplementedException ();
		}
Esempio n. 3
0
		/// <summary>
		///     <para>Invert 't' and return the result. Returns the original matrix if 't' has no inverse.</para>
		///     <para>Original signature is : CATransform3D CATransform3DInvert (CATransform3D t);</para>
		/// 	<para>Available in Mac OS X version 10.5 and later.</para>
		/// </summary>
		public static CATransform3D Invert (CATransform3D t)
		{
			// TODO : To implement
			throw new NotImplementedException ();
		}
Esempio n. 4
0
		/// <summary>
		///     <para>Returns the affine transform represented by 't'. If 't' can not be exactly represented as an affine transform the returned value is undefined.</para>
		///     <para>Original signature is : CGAffineTransform CATransform3DGetAffineTransform (CATransform3D t);</para>
		/// 	<para>Available in Mac OS X version 10.5 and later.</para>
		/// </summary>
		public static CGAffineTransform CATransform3DGetAffineTransform (CATransform3D t)
		{
			// TODO : To implement
			throw new NotImplementedException ();
		}
Esempio n. 5
0
		/// <summary>
		///     <para>Returns a Boolean value that indicates whether the two transforms are exactly equal.</para>
		///     <para>Original signature is : bool CATransform3DEqualToTransform (CATransform3D a, CATransform3D b);</para>
		/// 	<para>Available in Mac OS X version 10.5 and later.</para>
		/// </summary>
		public static bool EqualToTransform (CATransform3D a, CATransform3D b)
		{
			return Equals (a, b);
		}
Esempio n. 6
0
		/// <summary>
		/// 	<para>Translate 't' by '(tx, ty, tz)' and return the result: * t' = translate(tx, ty, tz) * t.</para>
		/// 	<para>Original signature is : CATransform3D CATransform3DTranslate (CATransform3D t, CGFloat tx, CGFloat ty, CGFloat tz);</para>
		/// 	<para>Available in Mac OS X version 10.5 and later.</para>
		/// </summary>
		public static CATransform3D Translate (CATransform3D t, float tx, float ty, float tz)
		{
			// TODO: Check matrices at http://www.devmaster.net/wiki/Transformation_matrices
			return new CATransform3D (t.m11 + t.m14 * tx, t.m12 + t.m14 * ty, t.m13 + t.m14 * tz, t.m14,
                                     t.m21 + t.m24 * tx, t.m22 + t.m24 * ty, t.m23 + t.m24 * tz, t.m24,
                                     t.m31 + t.m34 * tx, t.m32 + t.m34 * ty, t.m33 + t.m34 * tz, t.m34,
                                     t.m41 + t.m44 * tx, t.m42 + t.m44 * ty, t.m43 + t.m44 * tz, t.m44);
		}
Esempio n. 7
0
		/// <summary>
		///     <para>Scale 't' by '(sx, sy, sz)' and return the result: * t' = scale(sx, sy, sz) * t.</para>
		///     <para>Original signature is : CATransform3D CATransform3DScale (CATransform3D t, CGFloat sx, CGFloat sy, CGFloat sz)</para>
		/// 	<para>Available in Mac OS X version 10.5 and later.</para>
		/// </summary>
		public static CATransform3D Scale (CATransform3D t, float sx, float sy, float sz)
		{
			// TODO: Check matrices at http://www.devmaster.net/wiki/Transformation_matrices
			return new CATransform3D (t.m11 * sx, t.m12 * sy, t.m13 * sz, t.m14,
                                     t.m21 * sx, t.m22 * sy, t.m23 * sz, t.m24,
                                     t.m31 * sx, t.m32 * sy, t.m33 * sz, t.m34,
                                     t.m41 * sx, t.m42 * sy, t.m43 * sz, t.m44);
		}
Esempio n. 8
0
		/// <summary>
		///     <para>Rotate 't' by 'angle' radians about the vector '(x, y, z)' and return the result. If the vector has zero length the behavior is undefined: t' = rotation(angle, x, y, z) * t.</para>
		///     <para>Original signature is : CATransform3D CATransform3DRotate (CATransform3D t, CGFloat angle, CGFloat x, CGFloat y, CGFloat z)</para>
		/// 	<para>Available in Mac OS X version 10.5 and later.</para>
		/// </summary>
		public static CATransform3D Rotate (CATransform3D t, float angle, float x, float y, float z)
		{
			CATransform3D rotation = MakeRotation (angle, x, y, z);
			return Concat (t, rotation);
		}
Esempio n. 9
0
		/// <summary>
		///     <para>Returns a Boolean value that indicates whether the transform is the identity transform.</para>
		///     <para>Original signature is : bool CATransform3DIsIdentity (CATransform3D t);</para>
		/// 	<para>Available in Mac OS X version 10.5 and later.</para>
		/// </summary>
		public static bool IsIdentity (CATransform3D t)
		{
			return EqualToTransform (t, Identity);
		}