Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- ImageDrawing.cs
- VirtualDirectoryMapping.cs
- SignatureConfirmations.cs
- activationcontext.cs
- XmlSerializerVersionAttribute.cs
- GridLength.cs
- JoinTreeSlot.cs
- EncoderParameters.cs
- SubqueryTrackingVisitor.cs
- _SSPIWrapper.cs
- OdbcEnvironmentHandle.cs
- PathData.cs
- XmlLoader.cs
- PolyQuadraticBezierSegment.cs
- RijndaelManaged.cs
- SafeThemeHandle.cs
- RequiredFieldValidator.cs
- AppDomainProtocolHandler.cs
- ValueType.cs
- SafePEFileHandle.cs
- CommonGetThemePartSize.cs
- TextBox.cs
- TreeNodeBinding.cs
- CommandExpr.cs
- CustomBinding.cs
- ImageCodecInfoPrivate.cs
- SiteMapNode.cs
- BatchParser.cs
- ConstructorBuilder.cs
- DES.cs
- DelegatedStream.cs
- DataControlField.cs
- SqlExpander.cs
- WebBrowsableAttribute.cs
- KeyInterop.cs
- DigitalSignatureProvider.cs
- FontCacheLogic.cs
- XPathScanner.cs
- DataRowCollection.cs
- CharConverter.cs
- HtmlTableRowCollection.cs
- SplitterPanel.cs
- _NegotiateClient.cs
- Dynamic.cs
- SharedDp.cs
- CreateRefExpr.cs
- WebConfigurationFileMap.cs
- ApplicationTrust.cs
- DataViewSettingCollection.cs
- TextEditorThreadLocalStore.cs
- WhereQueryOperator.cs
- SimpleFileLog.cs
- NullEntityWrapper.cs
- XPathArrayIterator.cs
- InvalidEnumArgumentException.cs
- SqlCommandBuilder.cs
- VirtualPath.cs
- CheckedPointers.cs
- ISessionStateStore.cs
- AffineTransform3D.cs
- TextParagraph.cs
- Pens.cs
- StdValidatorsAndConverters.cs
- PersonalizableAttribute.cs
- XAMLParseException.cs
- LoadWorkflowAsyncResult.cs
- Viewport3DVisual.cs
- MimeWriter.cs
- RawStylusInputCustomData.cs
- StrokeNodeEnumerator.cs
- TextElementEnumerator.cs
- XamlWriter.cs
- IntSecurity.cs
- TabItemAutomationPeer.cs
- SymmetricAlgorithm.cs
- DataGridViewCellMouseEventArgs.cs
- WorkflowView.cs
- AnimationClock.cs
- DrawListViewColumnHeaderEventArgs.cs
- XsltLibrary.cs
- TemplateColumn.cs
- WebBrowserUriTypeConverter.cs
- mediaeventargs.cs
- Int16.cs
- TextServicesHost.cs
- TextControlDesigner.cs
- GetPageNumberCompletedEventArgs.cs
- BuilderElements.cs
- RIPEMD160Managed.cs
- AdapterDictionary.cs
- HostedTransportConfigurationBase.cs
- JsonEncodingStreamWrapper.cs
- CodeLabeledStatement.cs
- Canvas.cs
- ClusterSafeNativeMethods.cs
- JsonFormatGeneratorStatics.cs
- MimeReturn.cs
- CodeEventReferenceExpression.cs
- ProcessManager.cs
- AccessKeyManager.cs