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 / 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
- Registry.cs
- PersonalizationProviderCollection.cs
- FigureHelper.cs
- Region.cs
- DataBinding.cs
- LoginUtil.cs
- SqlStream.cs
- EventLogPermissionAttribute.cs
- HttpEncoderUtility.cs
- WindowsFont.cs
- AssociationSetMetadata.cs
- DataColumn.cs
- ExceptionRoutedEventArgs.cs
- ObjectDataSourceFilteringEventArgs.cs
- DatatypeImplementation.cs
- AddressHeaderCollection.cs
- WebCategoryAttribute.cs
- ByteStack.cs
- OutKeywords.cs
- ActiveDocumentEvent.cs
- StateBag.cs
- PropertyInformation.cs
- SqlBinder.cs
- NameValueConfigurationElement.cs
- sqlnorm.cs
- SafeThreadHandle.cs
- ScriptIgnoreAttribute.cs
- TcpClientChannel.cs
- ApplicationDirectory.cs
- COM2Enum.cs
- HandleCollector.cs
- CommandValueSerializer.cs
- Persist.cs
- ExtendedProtectionPolicyElement.cs
- CurrentTimeZone.cs
- DescendantOverDescendantQuery.cs
- XmlQueryTypeFactory.cs
- SqlBulkCopy.cs
- ColorTranslator.cs
- LabelAutomationPeer.cs
- SimpleRecyclingCache.cs
- GridSplitter.cs
- ConfigXmlDocument.cs
- DescendentsWalkerBase.cs
- AspProxy.cs
- TemplateEditingService.cs
- DetailsViewUpdatedEventArgs.cs
- Geometry3D.cs
- TabControlAutomationPeer.cs
- ProfilePropertySettingsCollection.cs
- EditBehavior.cs
- KeysConverter.cs
- RoutedPropertyChangedEventArgs.cs
- ProtocolProfile.cs
- SystemGatewayIPAddressInformation.cs
- ToolStripDropTargetManager.cs
- BufferedGraphics.cs
- ListComponentEditorPage.cs
- Vector3DConverter.cs
- NullableLongMinMaxAggregationOperator.cs
- Transform3DGroup.cs
- CFStream.cs
- XmlWellformedWriter.cs
- Line.cs
- DocumentOrderQuery.cs
- FaultConverter.cs
- GrammarBuilderWildcard.cs
- EditingMode.cs
- XmlText.cs
- OutputBuffer.cs
- cryptoapiTransform.cs
- ListViewSelectEventArgs.cs
- TracePayload.cs
- CompModSwitches.cs
- NavigationHelper.cs
- SingleKeyFrameCollection.cs
- DbConnectionHelper.cs
- HTMLTextWriter.cs
- ModifierKeysConverter.cs
- StylusSystemGestureEventArgs.cs
- TreePrinter.cs
- CodeDomSerializerBase.cs
- GACIdentityPermission.cs
- ProfileSection.cs
- XmlSchemaSimpleTypeUnion.cs
- DataGridViewCellFormattingEventArgs.cs
- IISMapPath.cs
- WebScriptServiceHostFactory.cs
- EnvelopedSignatureTransform.cs
- ConnectionPoolManager.cs
- ZoneLinkButton.cs
- StoreUtilities.cs
- RenderDataDrawingContext.cs
- XPathChildIterator.cs
- ContainsRowNumberChecker.cs
- PreservationFileWriter.cs
- HiddenFieldPageStatePersister.cs
- HebrewNumber.cs
- RefExpr.cs
- Scheduling.cs