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
- HttpWebResponse.cs
- DetailsViewRowCollection.cs
- OracleConnectionFactory.cs
- TextParagraphCache.cs
- ContentElement.cs
- SynchronizingStream.cs
- OwnerDrawPropertyBag.cs
- RijndaelManagedTransform.cs
- SessionStateUtil.cs
- WorkflowInvoker.cs
- StreamSecurityUpgradeAcceptorBase.cs
- Image.cs
- MobileTextWriter.cs
- SqlFunctionAttribute.cs
- AsymmetricSignatureFormatter.cs
- DataGridHelper.cs
- FolderLevelBuildProvider.cs
- DebuggerService.cs
- SettingsBindableAttribute.cs
- NumericUpDownAccelerationCollection.cs
- Size3D.cs
- SafePointer.cs
- User.cs
- DiagnosticTrace.cs
- ZipPackage.cs
- MonthChangedEventArgs.cs
- StorageModelBuildProvider.cs
- ConfigUtil.cs
- ComponentCommands.cs
- RealizationDrawingContextWalker.cs
- CloudCollection.cs
- Utils.cs
- ConstraintCollection.cs
- HttpClientCertificate.cs
- _NetworkingPerfCounters.cs
- ApplicationServiceManager.cs
- CqlErrorHelper.cs
- TableLayoutSettings.cs
- _NegoStream.cs
- SystemBrushes.cs
- TypeHelpers.cs
- RangeValueProviderWrapper.cs
- ImageList.cs
- MultilineStringConverter.cs
- GridViewRowEventArgs.cs
- PolyBezierSegment.cs
- DrawingContextWalker.cs
- COM2AboutBoxPropertyDescriptor.cs
- SchemaCollectionPreprocessor.cs
- JsonUriDataContract.cs
- BindingExpression.cs
- Asn1IntegerConverter.cs
- ConfigXmlComment.cs
- FixedTextPointer.cs
- DomainUpDown.cs
- OutputCacheProfile.cs
- EntityType.cs
- RegexCharClass.cs
- LogSwitch.cs
- FilteredAttributeCollection.cs
- XmlConvert.cs
- MenuEventArgs.cs
- X509SecurityTokenAuthenticator.cs
- AsynchronousChannelMergeEnumerator.cs
- CqlParserHelpers.cs
- ClientCultureInfo.cs
- RecognizedAudio.cs
- _SslState.cs
- DataListDesigner.cs
- FormattedText.cs
- OdbcCommand.cs
- DataMemberListEditor.cs
- graph.cs
- CursorConverter.cs
- EncoderFallback.cs
- ClientFormsAuthenticationMembershipProvider.cs
- ViewEvent.cs
- DbExpressionBuilder.cs
- Serializer.cs
- SecurityPolicySection.cs
- XmlSchemaResource.cs
- ObjRef.cs
- ProtocolImporter.cs
- GlobalEventManager.cs
- HttpWriter.cs
- PagesChangedEventArgs.cs
- Vector3DCollectionConverter.cs
- ServiceModelInstallComponent.cs
- AutomationElementCollection.cs
- HostSecurityManager.cs
- SurrogateSelector.cs
- WorkflowViewService.cs
- ValidatedControlConverter.cs
- BStrWrapper.cs
- DBSchemaRow.cs
- EditorZoneBase.cs
- MarginCollapsingState.cs
- XmlLanguageConverter.cs
- FontSource.cs
- FormViewDeletedEventArgs.cs