Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Core / CSharp / System / Windows / Media3D / Ray3DHitTestResult.cs / 1 / 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
- ManagedIStream.cs
- CodeFieldReferenceExpression.cs
- AppDomainManager.cs
- StickyNoteContentControl.cs
- PrinterUnitConvert.cs
- ToolStripGrip.cs
- CategoriesDocumentFormatter.cs
- CodeAccessPermission.cs
- ExpressionDumper.cs
- HwndSubclass.cs
- DBCSCodePageEncoding.cs
- IPAddressCollection.cs
- ReferenceService.cs
- PairComparer.cs
- VerificationAttribute.cs
- WebPartExportVerb.cs
- CurrentChangingEventArgs.cs
- ObjectQuery.cs
- RSAPKCS1SignatureDeformatter.cs
- BamlTreeMap.cs
- ToolTipService.cs
- SerTrace.cs
- InstanceData.cs
- AutoResizedEvent.cs
- IfJoinedCondition.cs
- DatatypeImplementation.cs
- DbConnectionFactory.cs
- CorePropertiesFilter.cs
- InvalidProgramException.cs
- xmlsaver.cs
- HttpMethodAttribute.cs
- GridToolTip.cs
- WebPartExportVerb.cs
- RegistrationServices.cs
- Message.cs
- DateTimeParse.cs
- BStrWrapper.cs
- ImageButton.cs
- Effect.cs
- TraversalRequest.cs
- TreeViewItem.cs
- Attributes.cs
- XsdDateTime.cs
- SqlParameterizer.cs
- Substitution.cs
- PathSegmentCollection.cs
- DataAccessor.cs
- RtfControls.cs
- KnownTypeAttribute.cs
- Typeface.cs
- HostedHttpContext.cs
- altserialization.cs
- SocketInformation.cs
- OleDbInfoMessageEvent.cs
- SchemaDeclBase.cs
- StorageMappingFragment.cs
- XmlSchemaSimpleType.cs
- CodeGotoStatement.cs
- MarkerProperties.cs
- WrappingXamlSchemaContext.cs
- ChangeProcessor.cs
- EmptyControlCollection.cs
- GridViewHeaderRowPresenterAutomationPeer.cs
- AutoGeneratedField.cs
- SafeCoTaskMem.cs
- TargetException.cs
- Literal.cs
- AttributeUsageAttribute.cs
- DataGridViewTextBoxColumn.cs
- ProcessHostFactoryHelper.cs
- RefreshInfo.cs
- XPathMessageFilter.cs
- AllMembershipCondition.cs
- GlyphShapingProperties.cs
- DetailsViewCommandEventArgs.cs
- Highlights.cs
- LambdaCompiler.Logical.cs
- ImageKeyConverter.cs
- TypedTableHandler.cs
- PropertyFilterAttribute.cs
- ComponentChangingEvent.cs
- MediaPlayer.cs
- Fonts.cs
- TypeDescriptionProviderAttribute.cs
- ListArgumentProvider.cs
- SqlDependencyListener.cs
- StringPropertyBuilder.cs
- SystemException.cs
- WebPartExportVerb.cs
- BindingElementExtensionElement.cs
- CheckoutException.cs
- HttpModuleCollection.cs
- RestClientProxyHandler.cs
- MenuEventArgs.cs
- SafeCryptContextHandle.cs
- EntityDataSourceDesignerHelper.cs
- SiteMapDataSourceView.cs
- RoutedPropertyChangedEventArgs.cs
- ObjectAnimationBase.cs
- ConditionalAttribute.cs