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 / 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
- ComNativeDescriptor.cs
- XmlQueryOutput.cs
- RegexRunner.cs
- remotingproxy.cs
- Atom10FormatterFactory.cs
- VirtualPathUtility.cs
- FormView.cs
- ButtonPopupAdapter.cs
- Message.cs
- TargetException.cs
- TypeConverterAttribute.cs
- SchemaCollectionPreprocessor.cs
- CultureSpecificStringDictionary.cs
- QueryRelOp.cs
- ColorAnimationUsingKeyFrames.cs
- SplitContainer.cs
- DefaultParameterValueAttribute.cs
- HebrewCalendar.cs
- NotificationContext.cs
- ToolStripOverflowButton.cs
- ConfigurationException.cs
- MemberDescriptor.cs
- XmlElementAttributes.cs
- TablePattern.cs
- XmlSchemaAttributeGroupRef.cs
- DataExpression.cs
- EntitySqlQueryCacheEntry.cs
- SqlReferenceCollection.cs
- SystemInformation.cs
- RegexStringValidator.cs
- Speller.cs
- SystemBrushes.cs
- ListItemCollection.cs
- MarkupObject.cs
- Journal.cs
- RequestQueryParser.cs
- EventRecordWrittenEventArgs.cs
- ClosableStream.cs
- TypeContext.cs
- WebPartPersonalization.cs
- HtmlTableRowCollection.cs
- SqlDependencyListener.cs
- Component.cs
- GridViewAutomationPeer.cs
- _TLSstream.cs
- SearchForVirtualItemEventArgs.cs
- PackagePart.cs
- DataServiceKeyAttribute.cs
- EnumType.cs
- WebSysDisplayNameAttribute.cs
- FragmentNavigationEventArgs.cs
- Group.cs
- DataConnectionHelper.cs
- PopOutPanel.cs
- DataServiceRequestArgs.cs
- TextDecoration.cs
- UserNameSecurityTokenProvider.cs
- XXXInfos.cs
- SelectionUIService.cs
- FileDetails.cs
- Line.cs
- WebPartActionVerb.cs
- EllipseGeometry.cs
- CompilerCollection.cs
- followingquery.cs
- ServiceObjectContainer.cs
- ApplicationServiceManager.cs
- ResourcePermissionBase.cs
- IResourceProvider.cs
- __Filters.cs
- Sequence.cs
- ChildDocumentBlock.cs
- VectorValueSerializer.cs
- SplayTreeNode.cs
- XamlPathDataSerializer.cs
- WebPartCloseVerb.cs
- TreeView.cs
- CodeRegionDirective.cs
- BitmapEffectInput.cs
- _RegBlobWebProxyDataBuilder.cs
- ComponentEditorForm.cs
- ByteAnimationBase.cs
- NaturalLanguageHyphenator.cs
- RestrictedTransactionalPackage.cs
- PrintPageEvent.cs
- _LazyAsyncResult.cs
- Expander.cs
- WizardPanel.cs
- BindingOperations.cs
- SafeHandles.cs
- MetadataItemEmitter.cs
- UnmanagedMemoryStreamWrapper.cs
- SemanticAnalyzer.cs
- FormatSettings.cs
- D3DImage.cs
- Rectangle.cs
- SourceChangedEventArgs.cs
- PersistenceTask.cs
- DelegateTypeInfo.cs
- WrappedReader.cs