Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Media3D / Geometry3D.cs / 1305600 / Geometry3D.cs
//---------------------------------------------------------------------------- // //// Copyright (c) Microsoft Corporation. All rights reserved. // // // History: // 6/10/2004 : [....] - Created // //--------------------------------------------------------------------------- using MS.Internal.Media3D; using System; using System.Diagnostics; using System.Windows.Media.Animation; using System.Windows.Media.Composition; namespace System.Windows.Media.Media3D { ////// This is the base class for all 3D geometry classes. A geometry has /// bounds and can be rendered with a GeometryModel3D. /// [Localizability(LocalizationCategory.None, Readability = Readability.Unreadable)] // cannot be read & localized as string public abstract partial class Geometry3D : Animatable, DUCE.IResource { //----------------------------------------------------- // // Constructors // //----------------------------------------------------- #region Constructors // Prevent 3rd parties from extending this abstract base class. internal Geometry3D() {} #endregion Constructors //------------------------------------------------------ // // Public Methods // //----------------------------------------------------- #region Public Methods ////// Gets bounds for this Geometry3D. /// public abstract Rect3D Bounds { get; } #endregion Public Methods //------------------------------------------------------ // // Public Properties // //------------------------------------------------------ //----------------------------------------------------- // // Public Events // //------------------------------------------------------ //----------------------------------------------------- // // Internal Methods // //----------------------------------------------------- #region Internal Methods // NOTE: Geometry3D hit testing takes the rayParams in the outer space of the // Geometry3D. That is, RayHitTest() will apply this geometry's // transform to the ray for the caller. // // This is different than Visual hit testing which does not transform // the hit testing parameters by the Visual's transform. internal void RayHitTest(RayHitTestParameters rayParams, FaceType facesToHit) { Debug.Assert(facesToHit != FaceType.None, "Caller should make sure we're trying to hit something"); Rect3D bounds = Bounds; if (bounds.IsEmpty) { return; } // Point3D origin; Vector3D direction; rayParams.GetLocalLine(out origin, out direction); if (LineUtil.ComputeLineBoxIntersection(ref origin, ref direction, ref bounds, rayParams.IsRay)) { RayHitTestCore(rayParams, facesToHit); } // } internal abstract void RayHitTestCore(RayHitTestParameters rayParams, FaceType hitTestableFaces); #endregion Internal Methods } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //---------------------------------------------------------------------------- // //// Copyright (c) Microsoft Corporation. All rights reserved. // // // History: // 6/10/2004 : [....] - Created // //--------------------------------------------------------------------------- using MS.Internal.Media3D; using System; using System.Diagnostics; using System.Windows.Media.Animation; using System.Windows.Media.Composition; namespace System.Windows.Media.Media3D { ////// This is the base class for all 3D geometry classes. A geometry has /// bounds and can be rendered with a GeometryModel3D. /// [Localizability(LocalizationCategory.None, Readability = Readability.Unreadable)] // cannot be read & localized as string public abstract partial class Geometry3D : Animatable, DUCE.IResource { //----------------------------------------------------- // // Constructors // //----------------------------------------------------- #region Constructors // Prevent 3rd parties from extending this abstract base class. internal Geometry3D() {} #endregion Constructors //------------------------------------------------------ // // Public Methods // //----------------------------------------------------- #region Public Methods ////// Gets bounds for this Geometry3D. /// public abstract Rect3D Bounds { get; } #endregion Public Methods //------------------------------------------------------ // // Public Properties // //------------------------------------------------------ //----------------------------------------------------- // // Public Events // //------------------------------------------------------ //----------------------------------------------------- // // Internal Methods // //----------------------------------------------------- #region Internal Methods // NOTE: Geometry3D hit testing takes the rayParams in the outer space of the // Geometry3D. That is, RayHitTest() will apply this geometry's // transform to the ray for the caller. // // This is different than Visual hit testing which does not transform // the hit testing parameters by the Visual's transform. internal void RayHitTest(RayHitTestParameters rayParams, FaceType facesToHit) { Debug.Assert(facesToHit != FaceType.None, "Caller should make sure we're trying to hit something"); Rect3D bounds = Bounds; if (bounds.IsEmpty) { return; } // Point3D origin; Vector3D direction; rayParams.GetLocalLine(out origin, out direction); if (LineUtil.ComputeLineBoxIntersection(ref origin, ref direction, ref bounds, rayParams.IsRay)) { RayHitTestCore(rayParams, facesToHit); } // } internal abstract void RayHitTestCore(RayHitTestParameters rayParams, FaceType hitTestableFaces); #endregion Internal Methods } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TrackBarRenderer.cs
- RowUpdatingEventArgs.cs
- SslStream.cs
- ListBoxItemWrapperAutomationPeer.cs
- ResolveInfo.cs
- AppAction.cs
- SelectingProviderEventArgs.cs
- HwndHost.cs
- __Filters.cs
- SslStreamSecurityBindingElement.cs
- RuntimeVariablesExpression.cs
- IsolatedStorageException.cs
- ToolStripSettings.cs
- ContainerUIElement3D.cs
- AtomParser.cs
- UnsafeNativeMethods.cs
- Overlapped.cs
- CompilerError.cs
- ToolStripGrip.cs
- GridViewRowEventArgs.cs
- XsltCompileContext.cs
- Authorization.cs
- XmlSchemaInferenceException.cs
- FrameworkPropertyMetadata.cs
- MetaTableHelper.cs
- PackageRelationshipCollection.cs
- Point3DCollection.cs
- GeometryCollection.cs
- XmlFormatExtensionAttribute.cs
- NavigationProperty.cs
- WebPartZoneCollection.cs
- WebPartHeaderCloseVerb.cs
- CheckBoxBaseAdapter.cs
- DbModificationClause.cs
- HelpProvider.cs
- DSASignatureDeformatter.cs
- UrlMappingCollection.cs
- CreateUserWizardAutoFormat.cs
- LocalizeDesigner.cs
- PaintValueEventArgs.cs
- ScrollItemPattern.cs
- HandlerMappingMemo.cs
- DataServiceOperationContext.cs
- oledbconnectionstring.cs
- WebPartConnectionsCloseVerb.cs
- TextServicesManager.cs
- PointAnimation.cs
- SQLConvert.cs
- DrawingContextWalker.cs
- FileDialogCustomPlaces.cs
- RedirectionProxy.cs
- TargetPerspective.cs
- PointCollection.cs
- DocumentCollection.cs
- ProcessProtocolHandler.cs
- VBIdentifierTrimConverter.cs
- BindingCompleteEventArgs.cs
- SafeArrayRankMismatchException.cs
- DrawListViewColumnHeaderEventArgs.cs
- NavigationWindow.cs
- WinEventHandler.cs
- RotateTransform3D.cs
- ToggleProviderWrapper.cs
- TextInfo.cs
- ResourceDisplayNameAttribute.cs
- Panel.cs
- VBIdentifierName.cs
- SequentialUshortCollection.cs
- XmlSchemaAnyAttribute.cs
- XmlSchemas.cs
- DataGridViewCellStyle.cs
- BaseUriHelper.cs
- EventRouteFactory.cs
- QuadTree.cs
- XmlObjectSerializerReadContext.cs
- ResourcesBuildProvider.cs
- RepeatButtonAutomationPeer.cs
- ScaleTransform3D.cs
- LinkLabel.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- ControlCollection.cs
- Publisher.cs
- SectionVisual.cs
- UnmanagedMemoryStreamWrapper.cs
- WebPartDisplayMode.cs
- DataGridViewIntLinkedList.cs
- Popup.cs
- EventDescriptorCollection.cs
- Point3DCollection.cs
- TypeResolver.cs
- ObjectTypeMapping.cs
- LinearGradientBrush.cs
- ProgressBarAutomationPeer.cs
- SingleStorage.cs
- MemberDomainMap.cs
- PageParserFilter.cs
- DataGridViewCellToolTipTextNeededEventArgs.cs
- UseLicense.cs
- InputLangChangeRequestEvent.cs
- ToolStripSystemRenderer.cs