Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Media3D / Ray3DHitTestResult.cs / 1305600 / Ray3DHitTestResult.cs
//---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // // History: // 06/22/2005 : [....] - Integrated from RayHitTestResult. // //--------------------------------------------------------------------------- using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; namespace System.Windows.Media.Media3D { ////// The HitTestResult of a Visual3D.HitTest(...) where the parameter /// was a RayHitTestParameter. /// /// NOTE: This might have originated as a PointHitTest on a 2D Visual /// which was extended into 3D. /// public abstract class RayHitTestResult : HitTestResult { //----------------------------------------------------- // // Constructors // //----------------------------------------------------- #region Constructors // Prevent 3rd parties from extending this abstract base class. internal RayHitTestResult(Visual3D visualHit, Model3D modelHit) : base (visualHit) { _modelHit = modelHit; } #endregion Constructors //------------------------------------------------------ // // Public Methods // //----------------------------------------------------- ////// Re-expose Visual property strongly typed to Visual3D. /// public new Visual3D VisualHit { get { return (Visual3D) base.VisualHit; } } ////// The Model3D intersected by the ray. /// public Model3D ModelHit { get { return _modelHit; } } ////// This is a point in 3-space at which the ray intersected /// the geometry of the hit Model3D. This point is in the /// local coordinate system of the Model3D. /// public abstract Point3D PointHit { get; } ////// This is the distance between the ray's origin and the /// point hit. /// public abstract double DistanceToRayOrigin { get; } //------------------------------------------------------ // // Public Properties // //------------------------------------------------------ //----------------------------------------------------- // // Public Events // //------------------------------------------------------ //----------------------------------------------------- // // Internal Methods // //----------------------------------------------------- internal abstract void SetDistanceToRayOrigin(double distance); internal static int CompareByDistanceToRayOrigin(RayHitTestResult x, RayHitTestResult y) { return Math.Sign(x.DistanceToRayOrigin - y.DistanceToRayOrigin); } //----------------------------------------------------- // // Private Fields // //------------------------------------------------------ #region Private Fields private readonly Model3D _modelHit; #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. // // // // History: // 06/22/2005 : [....] - Integrated from RayHitTestResult. // //--------------------------------------------------------------------------- using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; namespace System.Windows.Media.Media3D { ////// The HitTestResult of a Visual3D.HitTest(...) where the parameter /// was a RayHitTestParameter. /// /// NOTE: This might have originated as a PointHitTest on a 2D Visual /// which was extended into 3D. /// public abstract class RayHitTestResult : HitTestResult { //----------------------------------------------------- // // Constructors // //----------------------------------------------------- #region Constructors // Prevent 3rd parties from extending this abstract base class. internal RayHitTestResult(Visual3D visualHit, Model3D modelHit) : base (visualHit) { _modelHit = modelHit; } #endregion Constructors //------------------------------------------------------ // // Public Methods // //----------------------------------------------------- ////// Re-expose Visual property strongly typed to Visual3D. /// public new Visual3D VisualHit { get { return (Visual3D) base.VisualHit; } } ////// The Model3D intersected by the ray. /// public Model3D ModelHit { get { return _modelHit; } } ////// This is a point in 3-space at which the ray intersected /// the geometry of the hit Model3D. This point is in the /// local coordinate system of the Model3D. /// public abstract Point3D PointHit { get; } ////// This is the distance between the ray's origin and the /// point hit. /// public abstract double DistanceToRayOrigin { get; } //------------------------------------------------------ // // Public Properties // //------------------------------------------------------ //----------------------------------------------------- // // Public Events // //------------------------------------------------------ //----------------------------------------------------- // // Internal Methods // //----------------------------------------------------- internal abstract void SetDistanceToRayOrigin(double distance); internal static int CompareByDistanceToRayOrigin(RayHitTestResult x, RayHitTestResult y) { return Math.Sign(x.DistanceToRayOrigin - y.DistanceToRayOrigin); } //----------------------------------------------------- // // Private Fields // //------------------------------------------------------ #region Private Fields private readonly Model3D _modelHit; #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
- Point4D.cs
- AssemblyInfo.cs
- TypeExtension.cs
- PeerCredential.cs
- NotificationContext.cs
- MimeImporter.cs
- FormsAuthenticationEventArgs.cs
- ResolveMatchesMessageCD1.cs
- Oid.cs
- XmlText.cs
- SystemTcpConnection.cs
- FixUp.cs
- ProviderIncompatibleException.cs
- RadioButton.cs
- GridView.cs
- BaseCodeDomTreeGenerator.cs
- StrongNameHelpers.cs
- BaseProcessProtocolHandler.cs
- SQLBytesStorage.cs
- BaseCollection.cs
- TableRow.cs
- SingleSelectRootGridEntry.cs
- DrawingDrawingContext.cs
- RegexWorker.cs
- DataGridViewComboBoxCell.cs
- RouteTable.cs
- JavaScriptString.cs
- TransformValueSerializer.cs
- ListSortDescriptionCollection.cs
- PropertyMetadata.cs
- AddIn.cs
- MultipleViewPattern.cs
- EdmPropertyAttribute.cs
- IHttpResponseInternal.cs
- DynamicPropertyHolder.cs
- HttpCapabilitiesBase.cs
- CustomTypeDescriptor.cs
- GetTokenRequest.cs
- StaticResourceExtension.cs
- CanExecuteRoutedEventArgs.cs
- SettingsPropertyValueCollection.cs
- MonitoringDescriptionAttribute.cs
- TableLayoutPanelCellPosition.cs
- ManagementObject.cs
- TraceHandler.cs
- WindowsGraphicsWrapper.cs
- CharacterString.cs
- Semaphore.cs
- PaperSize.cs
- XmlDataSource.cs
- ForwardPositionQuery.cs
- WindowsSlider.cs
- SqlMethodAttribute.cs
- InstanceDataCollectionCollection.cs
- HtmlShim.cs
- ComAdminInterfaces.cs
- DefaultTextStoreTextComposition.cs
- IChannel.cs
- DataGridViewCellParsingEventArgs.cs
- TextDecorationCollectionConverter.cs
- ValidatedControlConverter.cs
- TextEditorContextMenu.cs
- ReaderWriterLockSlim.cs
- TypeDescriptionProvider.cs
- ColumnHeaderCollectionEditor.cs
- EnglishPluralizationService.cs
- HashStream.cs
- RepeaterItem.cs
- ByeOperationAsyncResult.cs
- RadioButton.cs
- XmlSchemaGroupRef.cs
- ErrorStyle.cs
- ItemsPresenter.cs
- StreamReader.cs
- UrlPropertyAttribute.cs
- SystemColors.cs
- Page.cs
- InkSerializer.cs
- TransactionManager.cs
- WebPartMenu.cs
- CheckBox.cs
- StringArrayEditor.cs
- ThrowOnMultipleAssignment.cs
- path.cs
- HttpConfigurationContext.cs
- StaticDataManager.cs
- FragmentQueryProcessor.cs
- Sorting.cs
- ArraySortHelper.cs
- TemplateXamlParser.cs
- ListBase.cs
- FileLoadException.cs
- DebugView.cs
- ReliableReplySessionChannel.cs
- FixedSOMSemanticBox.cs
- MasterPageBuildProvider.cs
- Security.cs
- DispatcherTimer.cs
- ElementUtil.cs
- externdll.cs