Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Media3D / GeometryModel3D.cs / 1305600 / GeometryModel3D.cs
//---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // // Description: 3D geometry primitive implementation. // // See spec at http://avalon/medialayer/Specifications/Avalon3D%20API%20Spec.mht // // History: // 06/10/2004 : [....] - Created from MeshPrimitive3D.cs (deprecated) // //--------------------------------------------------------------------------- using MS.Internal; using MS.Internal.Media3D; using System; using System.Collections; using System.ComponentModel.Design.Serialization; using System.Diagnostics; using System.Windows.Media; using System.Windows.Media.Composition; using System.Windows.Media.Media3D; using System.Windows.Markup; namespace System.Windows.Media.Media3D { ////// GeometryModel3D is for modeling with a Geometry3D and a Material. /// public sealed partial class GeometryModel3D : Model3D { //----------------------------------------------------- // // Constructors // //----------------------------------------------------- ////// Builds a GeometryModel3D with empty Geometry3D and Material. /// public GeometryModel3D() {} ////// Constructor. /// /// Geometry of the new mesh primitive. /// Material of the new mesh primitive. public GeometryModel3D(Geometry3D geometry, Material material) { Geometry = geometry; Material = material; } //------------------------------------------------------ // // Public Methods // //----------------------------------------------------- //------------------------------------------------------ // // Internal Methods // //------------------------------------------------------ #region Internal Methods internal override Rect3D CalculateSubgraphBoundsInnerSpace() { Geometry3D geometry = Geometry; if (geometry == null) { return Rect3D.Empty; } return geometry.Bounds; } internal override void RayHitTestCore(RayHitTestParameters rayParams) { Geometry3D geometry = Geometry; if (geometry != null) { // If our Geometry3D hit test intersects anything we should return "this" Model3D // as the HitTestResult.ModelHit. rayParams.CurrentModel = this; FaceType facesToHit = FaceType.None; if (Material != null) { facesToHit |= FaceType.Front; } if (BackMaterial != null) { facesToHit |= FaceType.Back; } if (facesToHit != FaceType.None) { geometry.RayHitTest(rayParams, facesToHit); } } } internal void MaterialPropertyChangedHook(DependencyPropertyChangedEventArgs e) { } internal void BackMaterialPropertyChangedHook(DependencyPropertyChangedEventArgs e) { MaterialPropertyChangedHook(e); } #endregion Internal Methods } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Debug.cs
- JournalNavigationScope.cs
- XmlSchemaInfo.cs
- ColumnWidthChangingEvent.cs
- SqlCacheDependencySection.cs
- MeshGeometry3D.cs
- WorkflowRuntimeServicesBehavior.cs
- CurrentChangingEventManager.cs
- DesignTimeTemplateParser.cs
- ResolveNameEventArgs.cs
- DesignerForm.cs
- Baml2006KnownTypes.cs
- AttributeQuery.cs
- BrowserCapabilitiesCompiler.cs
- MarshalByValueComponent.cs
- CommandEventArgs.cs
- documentsequencetextcontainer.cs
- StoreContentChangedEventArgs.cs
- GeneralTransform3DGroup.cs
- IteratorFilter.cs
- EventLogTraceListener.cs
- _SecureChannel.cs
- SeverityFilter.cs
- Vector3DAnimationUsingKeyFrames.cs
- ProviderException.cs
- CompositeControl.cs
- NavigateEvent.cs
- ScriptResourceAttribute.cs
- TransformFinalBlockRequest.cs
- FactoryGenerator.cs
- PathSegment.cs
- MimeMapping.cs
- serverconfig.cs
- CurrentTimeZone.cs
- BevelBitmapEffect.cs
- ResolvedKeyFrameEntry.cs
- ComponentChangedEvent.cs
- SafeCryptHandles.cs
- ViewManager.cs
- AutomationPatternInfo.cs
- OleDbSchemaGuid.cs
- ButtonField.cs
- counter.cs
- ListDataBindEventArgs.cs
- CompilerCollection.cs
- HttpContext.cs
- ModuleBuilderData.cs
- AggregateException.cs
- ThreadLocal.cs
- SettingsPropertyValueCollection.cs
- NTAccount.cs
- Command.cs
- AutomationElementCollection.cs
- SmtpNegotiateAuthenticationModule.cs
- SQLGuidStorage.cs
- ContainerParagraph.cs
- StreamGeometryContext.cs
- CodeIndexerExpression.cs
- NavigationProperty.cs
- ScrollEventArgs.cs
- HttpClientCertificate.cs
- PrimitiveType.cs
- BatchWriter.cs
- QueryOperatorEnumerator.cs
- AuthenticationException.cs
- UIInitializationException.cs
- input.cs
- Code.cs
- PageCodeDomTreeGenerator.cs
- DocumentViewerConstants.cs
- AnnotationAuthorChangedEventArgs.cs
- ReflectionUtil.cs
- ObjectViewQueryResultData.cs
- TypeGeneratedEventArgs.cs
- OrderedDictionary.cs
- GlyphsSerializer.cs
- BitFlagsGenerator.cs
- COM2EnumConverter.cs
- InternalConfigRoot.cs
- _UncName.cs
- CheckBoxRenderer.cs
- HMACSHA1.cs
- PropertyInformation.cs
- SecurityTokenTypes.cs
- ShaderEffect.cs
- ReadWriteObjectLock.cs
- TextRunProperties.cs
- ProjectionPruner.cs
- EdmToObjectNamespaceMap.cs
- UIElementAutomationPeer.cs
- IEnumerable.cs
- MiniCustomAttributeInfo.cs
- CompilerParameters.cs
- RegexParser.cs
- SupportingTokenBindingElement.cs
- CommandBinding.cs
- XmlIncludeAttribute.cs
- AnnotationService.cs
- HttpRawResponse.cs
- AxHostDesigner.cs