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
- ValidationError.cs
- StorageComplexTypeMapping.cs
- CleanUpVirtualizedItemEventArgs.cs
- TextEncodedRawTextWriter.cs
- AssociationProvider.cs
- EmptyTextWriter.cs
- SqlDependencyUtils.cs
- sqlnorm.cs
- SafeRightsManagementPubHandle.cs
- BufferModeSettings.cs
- StackBuilderSink.cs
- DecimalConstantAttribute.cs
- MultiByteCodec.cs
- UnsafeNativeMethods.cs
- ResourceSetExpression.cs
- DockPatternIdentifiers.cs
- HandlerBase.cs
- CqlErrorHelper.cs
- InputQueueChannel.cs
- InstanceLockLostException.cs
- Win32.cs
- BrowserCapabilitiesFactory35.cs
- sortedlist.cs
- ServiceModelDictionary.cs
- RelatedCurrencyManager.cs
- NamedElement.cs
- CompilerCollection.cs
- ColumnMap.cs
- DataGridViewRowStateChangedEventArgs.cs
- SmtpException.cs
- TaskFileService.cs
- BlurBitmapEffect.cs
- DataIdProcessor.cs
- StringInfo.cs
- PathTooLongException.cs
- AttributeXamlType.cs
- TypedReference.cs
- ViewGenResults.cs
- Decorator.cs
- XmlMemberMapping.cs
- Win32SafeHandles.cs
- RefExpr.cs
- ItemChangedEventArgs.cs
- HandlerBase.cs
- WebPartDescriptionCollection.cs
- TemplateXamlParser.cs
- StylusCollection.cs
- JapaneseLunisolarCalendar.cs
- DoubleLink.cs
- EncoderBestFitFallback.cs
- Scanner.cs
- FontFamilyConverter.cs
- HashHelper.cs
- DataGridHeaderBorder.cs
- Visual3DCollection.cs
- Latin1Encoding.cs
- UnsafeNativeMethods.cs
- Misc.cs
- SQLInt32.cs
- SystemUdpStatistics.cs
- SystemUnicastIPAddressInformation.cs
- NativeMethodsOther.cs
- listitem.cs
- TableItemPatternIdentifiers.cs
- HelloOperation11AsyncResult.cs
- GenerateTemporaryAssemblyTask.cs
- latinshape.cs
- SchemaCollectionPreprocessor.cs
- ExpressionBuilderContext.cs
- DateTimePickerDesigner.cs
- ConditionalExpression.cs
- MSAAEventDispatcher.cs
- ResourceDefaultValueAttribute.cs
- MenuItemStyleCollection.cs
- LineUtil.cs
- XmlElementList.cs
- StatusBar.cs
- InputProcessorProfilesLoader.cs
- Nodes.cs
- AutomationPeer.cs
- TemplateContent.cs
- FunctionUpdateCommand.cs
- listitem.cs
- BindUriHelper.cs
- BamlTreeMap.cs
- OutOfProcStateClientManager.cs
- XPathEmptyIterator.cs
- MultiByteCodec.cs
- CollectionViewGroupRoot.cs
- RC2CryptoServiceProvider.cs
- XamlSerializer.cs
- Hash.cs
- BindingBase.cs
- CachedFontFamily.cs
- Random.cs
- FragmentNavigationEventArgs.cs
- SmtpNegotiateAuthenticationModule.cs
- ValidationErrorCollection.cs
- MenuItemBinding.cs
- TracedNativeMethods.cs