Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / wpf / src / Core / CSharp / System / Windows / Media3D / Transform3D.cs / 1 / Transform3D.cs
//---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // // Description: 3D transform implementation. // // See spec at http://avalon/medialayer/Specifications/Avalon3D%20API%20Spec.mht // // History: // 06/04/2003 : t-gregr - Created // //--------------------------------------------------------------------------- using MS.Internal.Media3D; using MS.Internal.PresentationCore; using System; using System.Diagnostics; using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Media.Composition; namespace System.Windows.Media.Media3D { ////// 3D transformation. /// [Localizability(LocalizationCategory.None, Readability = Readability.Unreadable)] // cannot be read & localized as string public abstract partial class Transform3D : GeneralTransform3D { //----------------------------------------------------- // // Constructors // //----------------------------------------------------- #region Constructors // Prevent 3rd parties from extending this abstract base class. internal Transform3D() {} #endregion Constructors //------------------------------------------------------ // // Public Methods // //----------------------------------------------------- #region Public Methods ////// Transforms the given point. /// /// Point to transform. ///Transformed point. public new Point3D Transform(Point3D point) { // this function is included due to forward compatability reasons return base.Transform(point); } ////// Transforms the given vector. /// /// Vector to transform. ///Transformed vector. public Vector3D Transform(Vector3D vector) { return Value.Transform(vector); } ////// Transforms the given point. /// /// Point to transform. ///Transformed point. public Point4D Transform(Point4D point) { return Value.Transform(point); } ////// Transforms the given list of points. /// /// List of points. public void Transform(Point3D[] points) { Value.Transform(points); } ////// Transforms the given list of vectors. /// /// List of vectors. public void Transform(Vector3D[] vectors) { Value.Transform(vectors); } ////// Transforms the given list of points. /// /// List of points. public void Transform(Point4D[] points) { Value.Transform(points); } ////// Transform a point /// /// Input point /// Output point ///True if the point was transformed successfuly, false otherwise public override bool TryTransform(Point3D inPoint, out Point3D result) { result = Value.Transform(inPoint); return true; } ////// Transforms the bounding box to the smallest axis aligned bounding box /// that contains all the points in the original bounding box /// /// Bounding box ///The transformed bounding box public override Rect3D TransformBounds(Rect3D rect) { return M3DUtil.ComputeTransformedAxisAlignedBoundingBox(ref rect, this); } ////// Returns the inverse transform if it has an inverse, null otherwise /// public override GeneralTransform3D Inverse { get { ReadPreamble(); Matrix3D matrix = Value; if (!matrix.HasInverse) { return null; } matrix.Invert(); return new MatrixTransform3D(matrix); } } ////// Returns a best effort affine transform /// internal override Transform3D AffineTransform { [FriendAccessAllowed] // Built into Core, also used by Framework. get { return this; } } #endregion Public Methods //------------------------------------------------------ // // Public Properties // //------------------------------------------------------ #region Public Properties ////// Identity transformation. /// public static Transform3D Identity { get { // Make sure identity matrix is initialized. if (s_identity == null) { MatrixTransform3D identity = new MatrixTransform3D(); identity.Freeze(); s_identity = identity; } return s_identity; } } ////// Determines whether the matrix is affine. /// public abstract bool IsAffine {get;} ////// Return the current transformation value. /// public abstract Matrix3D Value { get; } #endregion Public Properties internal abstract void Append(ref Matrix3D matrix); //----------------------------------------------------- // // Private Fields // //------------------------------------------------------ #region Private Fields private static Transform3D s_identity; #endregion Private Fields } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // // Description: 3D transform implementation. // // See spec at http://avalon/medialayer/Specifications/Avalon3D%20API%20Spec.mht // // History: // 06/04/2003 : t-gregr - Created // //--------------------------------------------------------------------------- using MS.Internal.Media3D; using MS.Internal.PresentationCore; using System; using System.Diagnostics; using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Media.Composition; namespace System.Windows.Media.Media3D { ////// 3D transformation. /// [Localizability(LocalizationCategory.None, Readability = Readability.Unreadable)] // cannot be read & localized as string public abstract partial class Transform3D : GeneralTransform3D { //----------------------------------------------------- // // Constructors // //----------------------------------------------------- #region Constructors // Prevent 3rd parties from extending this abstract base class. internal Transform3D() {} #endregion Constructors //------------------------------------------------------ // // Public Methods // //----------------------------------------------------- #region Public Methods ////// Transforms the given point. /// /// Point to transform. ///Transformed point. public new Point3D Transform(Point3D point) { // this function is included due to forward compatability reasons return base.Transform(point); } ////// Transforms the given vector. /// /// Vector to transform. ///Transformed vector. public Vector3D Transform(Vector3D vector) { return Value.Transform(vector); } ////// Transforms the given point. /// /// Point to transform. ///Transformed point. public Point4D Transform(Point4D point) { return Value.Transform(point); } ////// Transforms the given list of points. /// /// List of points. public void Transform(Point3D[] points) { Value.Transform(points); } ////// Transforms the given list of vectors. /// /// List of vectors. public void Transform(Vector3D[] vectors) { Value.Transform(vectors); } ////// Transforms the given list of points. /// /// List of points. public void Transform(Point4D[] points) { Value.Transform(points); } ////// Transform a point /// /// Input point /// Output point ///True if the point was transformed successfuly, false otherwise public override bool TryTransform(Point3D inPoint, out Point3D result) { result = Value.Transform(inPoint); return true; } ////// Transforms the bounding box to the smallest axis aligned bounding box /// that contains all the points in the original bounding box /// /// Bounding box ///The transformed bounding box public override Rect3D TransformBounds(Rect3D rect) { return M3DUtil.ComputeTransformedAxisAlignedBoundingBox(ref rect, this); } ////// Returns the inverse transform if it has an inverse, null otherwise /// public override GeneralTransform3D Inverse { get { ReadPreamble(); Matrix3D matrix = Value; if (!matrix.HasInverse) { return null; } matrix.Invert(); return new MatrixTransform3D(matrix); } } ////// Returns a best effort affine transform /// internal override Transform3D AffineTransform { [FriendAccessAllowed] // Built into Core, also used by Framework. get { return this; } } #endregion Public Methods //------------------------------------------------------ // // Public Properties // //------------------------------------------------------ #region Public Properties ////// Identity transformation. /// public static Transform3D Identity { get { // Make sure identity matrix is initialized. if (s_identity == null) { MatrixTransform3D identity = new MatrixTransform3D(); identity.Freeze(); s_identity = identity; } return s_identity; } } ////// Determines whether the matrix is affine. /// public abstract bool IsAffine {get;} ////// Return the current transformation value. /// public abstract Matrix3D Value { get; } #endregion Public Properties internal abstract void Append(ref Matrix3D matrix); //----------------------------------------------------- // // Private Fields // //------------------------------------------------------ #region Private Fields private static Transform3D s_identity; #endregion Private Fields } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- HwndMouseInputProvider.cs
- ProviderConnectionPointCollection.cs
- TreeNodeBindingCollection.cs
- NameValueFileSectionHandler.cs
- InternalConfigEventArgs.cs
- diagnosticsswitches.cs
- BinaryWriter.cs
- MultiSelectRootGridEntry.cs
- IdnMapping.cs
- DataContractSerializer.cs
- UInt32.cs
- EventToken.cs
- XslVisitor.cs
- UnsafeNativeMethods.cs
- IApplicationTrustManager.cs
- RegistrySecurity.cs
- ListViewItem.cs
- StandardCommands.cs
- WriteTimeStream.cs
- MissingMemberException.cs
- DataSvcMapFileSerializer.cs
- TextBox.cs
- PointAnimationBase.cs
- GetPageNumberCompletedEventArgs.cs
- CheckBox.cs
- SimpleWebHandlerParser.cs
- ConnectionPointGlyph.cs
- SqlRemoveConstantOrderBy.cs
- PersonalizableTypeEntry.cs
- SafeRightsManagementSessionHandle.cs
- FixedLineResult.cs
- DbConnectionInternal.cs
- TextPattern.cs
- StorageComplexPropertyMapping.cs
- Figure.cs
- ObservableCollectionDefaultValueFactory.cs
- HyperLinkColumn.cs
- MenuEventArgs.cs
- QilReference.cs
- XMLDiffLoader.cs
- DragEvent.cs
- CommonRemoteMemoryBlock.cs
- DataGridViewSortCompareEventArgs.cs
- ComPlusSynchronizationContext.cs
- TripleDESCryptoServiceProvider.cs
- VariableBinder.cs
- SortExpressionBuilder.cs
- PropertyCondition.cs
- ServiceBusyException.cs
- CachedTypeface.cs
- ScriptingAuthenticationServiceSection.cs
- FormsAuthenticationConfiguration.cs
- JoinGraph.cs
- X500Name.cs
- LinqDataSourceDeleteEventArgs.cs
- AdapterUtil.cs
- WpfWebRequestHelper.cs
- ManagementObjectSearcher.cs
- ResourcePermissionBaseEntry.cs
- CalloutQueueItem.cs
- StyleModeStack.cs
- WebUtil.cs
- InteropTrackingRecord.cs
- KeyedCollection.cs
- URLIdentityPermission.cs
- XamlTemplateSerializer.cs
- FixedPosition.cs
- SortableBindingList.cs
- CodeIndexerExpression.cs
- GZipDecoder.cs
- ClientSideQueueItem.cs
- SessionStateItemCollection.cs
- CatalogPartCollection.cs
- Enum.cs
- ConfigurationSchemaErrors.cs
- TdsParserHelperClasses.cs
- PointConverter.cs
- DesignerForm.cs
- XmlSchemaAttribute.cs
- PeerEndPoint.cs
- RangeValidator.cs
- SingleTagSectionHandler.cs
- Command.cs
- LicenseManager.cs
- CqlIdentifiers.cs
- Conditional.cs
- XmlSchemaImport.cs
- DataTableClearEvent.cs
- WebHttpEndpointElement.cs
- UnmanagedHandle.cs
- TranslateTransform.cs
- ByteRangeDownloader.cs
- DetailsViewDeletedEventArgs.cs
- ClrProviderManifest.cs
- ReferenceCountedObject.cs
- ServiceDebugBehavior.cs
- UnionCqlBlock.cs
- PeerNearMe.cs
- GuidTagList.cs
- SmtpFailedRecipientsException.cs