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
- DbgUtil.cs
- HttpListener.cs
- SqlTopReducer.cs
- AsyncInvokeContext.cs
- PlanCompiler.cs
- GeneralTransform3DGroup.cs
- CodePropertyReferenceExpression.cs
- FrameworkObject.cs
- TimeoutValidationAttribute.cs
- TypeConverterAttribute.cs
- HttpCookieCollection.cs
- DownloadProgressEventArgs.cs
- PathSegmentCollection.cs
- ContextConfiguration.cs
- SelectionItemPattern.cs
- HttpStreamMessage.cs
- UnsafeNativeMethods.cs
- Size.cs
- WorkflowRuntimeBehavior.cs
- PinnedBufferMemoryStream.cs
- Int64Storage.cs
- PtsHost.cs
- XsdDateTime.cs
- SqlConnectionString.cs
- NamedPermissionSet.cs
- BorderGapMaskConverter.cs
- WebPartEditorOkVerb.cs
- RequestContext.cs
- NullableConverter.cs
- DataGridViewColumnConverter.cs
- CheckBox.cs
- XMLSyntaxException.cs
- RecipientInfo.cs
- AudioStateChangedEventArgs.cs
- WebPartZoneBase.cs
- GridViewUpdateEventArgs.cs
- __ConsoleStream.cs
- FieldBuilder.cs
- LoginCancelEventArgs.cs
- BodyGlyph.cs
- NullableFloatSumAggregationOperator.cs
- sortedlist.cs
- RowUpdatingEventArgs.cs
- PersistenceTask.cs
- DynamicPropertyReader.cs
- BrowserCapabilitiesCompiler.cs
- SymLanguageType.cs
- TransformGroup.cs
- BehaviorEditorPart.cs
- TextServicesContext.cs
- DataGridViewAutoSizeColumnsModeEventArgs.cs
- EtwTrace.cs
- ExecutionContext.cs
- SchemaType.cs
- EndpointNotFoundException.cs
- HuffModule.cs
- DefaultProxySection.cs
- ResourceDictionary.cs
- BrowserCapabilitiesCompiler.cs
- ScriptBehaviorDescriptor.cs
- ExceptionUtil.cs
- BufferedStream.cs
- SmiRecordBuffer.cs
- IISMapPath.cs
- MemberProjectedSlot.cs
- SelectionBorderGlyph.cs
- XmlSerializerFactory.cs
- XmlLinkedNode.cs
- NavigationProgressEventArgs.cs
- ComponentConverter.cs
- ClientRuntimeConfig.cs
- DateTime.cs
- Transform.cs
- TreeViewBindingsEditor.cs
- PropertyGridView.cs
- SystemFonts.cs
- DrawingCollection.cs
- HMACRIPEMD160.cs
- D3DImage.cs
- TypeBuilder.cs
- XmlValueConverter.cs
- Scripts.cs
- RectangleGeometry.cs
- HashCodeCombiner.cs
- MainMenu.cs
- HttpResponse.cs
- RoleManagerEventArgs.cs
- SharedPerformanceCounter.cs
- XmlCharacterData.cs
- TextEmbeddedObject.cs
- ComplusEndpointConfigContainer.cs
- RMEnrollmentPage3.cs
- DiagnosticTrace.cs
- VisualStyleInformation.cs
- ResourceContainer.cs
- Empty.cs
- InvalidCommandTreeException.cs
- AssemblySettingAttributes.cs
- ObjectDisposedException.cs
- EdgeProfileValidation.cs