Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Core / CSharp / System / Windows / Media3D / Geometry3D.cs / 1 / 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
- documentsequencetextpointer.cs
- MappingItemCollection.cs
- BamlResourceSerializer.cs
- AnnotationResourceCollection.cs
- mansign.cs
- InstanceLockedException.cs
- DataRowCollection.cs
- COM2PropertyBuilderUITypeEditor.cs
- ToolboxItemCollection.cs
- OdbcException.cs
- ContainerControl.cs
- odbcmetadatacollectionnames.cs
- FtpWebRequest.cs
- FormViewPageEventArgs.cs
- DataSourceControlBuilder.cs
- TextViewBase.cs
- IItemProperties.cs
- _ListenerResponseStream.cs
- StorageBasedPackageProperties.cs
- ErrorHandlerFaultInfo.cs
- NoneExcludedImageIndexConverter.cs
- TimeEnumHelper.cs
- ChildrenQuery.cs
- ValidatedControlConverter.cs
- CodeCompileUnit.cs
- Debug.cs
- SizeKeyFrameCollection.cs
- CodeAttributeDeclarationCollection.cs
- UdpContractFilterBehavior.cs
- MapPathBasedVirtualPathProvider.cs
- ProfilePropertySettings.cs
- HideDisabledControlAdapter.cs
- ImageButton.cs
- BuildProvider.cs
- BitVector32.cs
- FontFamily.cs
- SiteMapNodeItem.cs
- HtmlMeta.cs
- DockProviderWrapper.cs
- RoutedPropertyChangedEventArgs.cs
- Vector3DConverter.cs
- WebBrowser.cs
- HttpCachePolicyElement.cs
- DataGridViewMethods.cs
- XmlSchemaSequence.cs
- DelegateBodyWriter.cs
- SamlSecurityTokenAuthenticator.cs
- OracleConnectionStringBuilder.cs
- SubpageParaClient.cs
- DocumentViewerAutomationPeer.cs
- ChannelServices.cs
- TriggerActionCollection.cs
- _SslSessionsCache.cs
- SmtpReplyReader.cs
- CodeExporter.cs
- MsmqIntegrationSecurityElement.cs
- DataView.cs
- Stream.cs
- DiscoveryEndpointValidator.cs
- Reference.cs
- FollowerQueueCreator.cs
- Native.cs
- WriteableBitmap.cs
- GACMembershipCondition.cs
- InteropAutomationProvider.cs
- UInt16.cs
- UrlMappingCollection.cs
- WindowsTreeView.cs
- WebPartActionVerb.cs
- StackOverflowException.cs
- WebConfigurationFileMap.cs
- LocalizabilityAttribute.cs
- ComponentChangingEvent.cs
- PerformanceCounterPermissionAttribute.cs
- InplaceBitmapMetadataWriter.cs
- RuntimeConfigurationRecord.cs
- FileCodeGroup.cs
- followingquery.cs
- MatrixAnimationUsingKeyFrames.cs
- ListView.cs
- SiteMapNodeItem.cs
- SafeProcessHandle.cs
- XmlSchemaCollection.cs
- X500Name.cs
- XmlQueryOutput.cs
- AuthenticationSection.cs
- ListBoxItemAutomationPeer.cs
- UInt64.cs
- TypeExtensionSerializer.cs
- FocusTracker.cs
- QuotedPrintableStream.cs
- ButtonFieldBase.cs
- SQLDouble.cs
- EntitySet.cs
- ISessionStateStore.cs
- MobileCategoryAttribute.cs
- CryptoStream.cs
- DataGridViewSelectedCellCollection.cs
- Baml2006SchemaContext.cs
- DbDataSourceEnumerator.cs