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
- WebPartConnectionsConnectVerb.cs
- MessageLoggingFilterTraceRecord.cs
- ViewCellRelation.cs
- InputScope.cs
- Atom10FormatterFactory.cs
- OciLobLocator.cs
- ControlValuePropertyAttribute.cs
- SessionStateModule.cs
- KeyTime.cs
- EasingFunctionBase.cs
- ConnectionManagementElement.cs
- PostBackTrigger.cs
- KnownBoxes.cs
- Thickness.cs
- _DisconnectOverlappedAsyncResult.cs
- XPathEmptyIterator.cs
- XmlSignificantWhitespace.cs
- ExpressionsCollectionEditor.cs
- EventInfo.cs
- ToolBarButtonClickEvent.cs
- WindowsPen.cs
- CroppedBitmap.cs
- UnauthorizedAccessException.cs
- HostingPreferredMapPath.cs
- TableItemProviderWrapper.cs
- Bold.cs
- DataGridViewLinkCell.cs
- BidirectionalDictionary.cs
- FilterQueryOptionExpression.cs
- InvalidPropValue.cs
- WindowsPrincipal.cs
- WindowsFormsSectionHandler.cs
- InputProcessorProfilesLoader.cs
- PolicyException.cs
- WindowsAuthenticationEventArgs.cs
- SqlHelper.cs
- ToolBarButton.cs
- NativeObjectSecurity.cs
- RunWorkerCompletedEventArgs.cs
- RawStylusInput.cs
- iisPickupDirectory.cs
- ToolStripSettings.cs
- TableItemStyle.cs
- SemanticValue.cs
- ProxyWebPartConnectionCollection.cs
- ObfuscateAssemblyAttribute.cs
- NameSpaceExtractor.cs
- ValidationSummary.cs
- FaultFormatter.cs
- PolygonHotSpot.cs
- XmlSerializerNamespaces.cs
- DataGridLength.cs
- LayoutSettings.cs
- ValidationHelpers.cs
- HighlightComponent.cs
- SmtpReplyReader.cs
- OdbcConnection.cs
- DataSourceBooleanViewSchemaConverter.cs
- ProfessionalColors.cs
- ReadOnlyNameValueCollection.cs
- SessionStateContainer.cs
- BamlLocalizer.cs
- XslCompiledTransform.cs
- EntityEntry.cs
- HtmlEncodedRawTextWriter.cs
- ContentDisposition.cs
- CommandEventArgs.cs
- StringInfo.cs
- Object.cs
- HttpValueCollection.cs
- FrugalMap.cs
- DiagnosticStrings.cs
- BCryptSafeHandles.cs
- ConfigurationPermission.cs
- MemberNameValidator.cs
- ReflectionUtil.cs
- TemplateColumn.cs
- XmlDocumentFragment.cs
- HttpApplication.cs
- Int16Animation.cs
- ValueTable.cs
- ProfilePropertySettings.cs
- ConfigXmlWhitespace.cs
- GroupItem.cs
- ColumnMapCopier.cs
- TraceProvider.cs
- SqlDataSourceSelectingEventArgs.cs
- InternalCache.cs
- SafeReadContext.cs
- XPathNodeInfoAtom.cs
- Console.cs
- FrameworkContentElementAutomationPeer.cs
- ProfileParameter.cs
- AssociationSetEnd.cs
- ToolstripProfessionalRenderer.cs
- FormatVersion.cs
- MergablePropertyAttribute.cs
- AnonymousIdentificationModule.cs
- PeerReferralPolicy.cs
- LongValidatorAttribute.cs