Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Core / CSharp / System / Windows / Media3D / DiffuseMaterial.cs / 1 / DiffuseMaterial.cs
//---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // // Description: 3D diffuse material // // See spec at *** FILL IN LATER *** // // History: // 06/25/2003 : t-gregr - Created // 01/28/2005 : jordanpa - Renamed BrushMaterial to DiffuseMaterial // //--------------------------------------------------------------------------- using System; using System.Diagnostics; using System.Runtime.InteropServices; using System.Windows.Markup; using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Media.Composition; using MS.Internal; namespace System.Windows.Media.Media3D { ////// DiffuseMaterial allows a 2d brush to be used on a 3d model that has been lit /// with a diffuse lighting model /// public sealed partial class DiffuseMaterial : Material { //----------------------------------------------------- // // Constructors // //----------------------------------------------------- #region Constructors ////// Constructs a DiffuseMaterial /// public DiffuseMaterial() { } ////// Constructor that sets the Brush property to "brush" /// /// The new material's brush public DiffuseMaterial(Brush brush) { Brush = brush; } #endregion Constructors internal override bool PreCompute() { _requiresRealization = Material.PreCompute(Brush); return _requiresRealization; } internal override void UpdateRealizations( RealizationContext ctx, ref Rect bounds ) { Debug.Assert(_requiresRealization); Material.UpdateRealizations(Brush, ctx, ref bounds); } internal override bool RequiresRealization { get { return _requiresRealization; } } //------------------------------------------------------ // // Private Fields // //----------------------------------------------------- #region Private Fields private bool _requiresRealization = false; #endregion Private Fields } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // // Description: 3D diffuse material // // See spec at *** FILL IN LATER *** // // History: // 06/25/2003 : t-gregr - Created // 01/28/2005 : jordanpa - Renamed BrushMaterial to DiffuseMaterial // //--------------------------------------------------------------------------- using System; using System.Diagnostics; using System.Runtime.InteropServices; using System.Windows.Markup; using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Media.Composition; using MS.Internal; namespace System.Windows.Media.Media3D { ////// DiffuseMaterial allows a 2d brush to be used on a 3d model that has been lit /// with a diffuse lighting model /// public sealed partial class DiffuseMaterial : Material { //----------------------------------------------------- // // Constructors // //----------------------------------------------------- #region Constructors ////// Constructs a DiffuseMaterial /// public DiffuseMaterial() { } ////// Constructor that sets the Brush property to "brush" /// /// The new material's brush public DiffuseMaterial(Brush brush) { Brush = brush; } #endregion Constructors internal override bool PreCompute() { _requiresRealization = Material.PreCompute(Brush); return _requiresRealization; } internal override void UpdateRealizations( RealizationContext ctx, ref Rect bounds ) { Debug.Assert(_requiresRealization); Material.UpdateRealizations(Brush, ctx, ref bounds); } internal override bool RequiresRealization { get { return _requiresRealization; } } //------------------------------------------------------ // // Private Fields // //----------------------------------------------------- #region Private Fields private bool _requiresRealization = false; #endregion Private Fields } } // 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
- InvalidCastException.cs
- FilterableData.cs
- SmiRecordBuffer.cs
- XmlCharType.cs
- PopOutPanel.cs
- TemplateManager.cs
- StyleTypedPropertyAttribute.cs
- IndependentAnimationStorage.cs
- NodeLabelEditEvent.cs
- EntityContainerEmitter.cs
- LinqDataSourceDeleteEventArgs.cs
- BasicCellRelation.cs
- DataTableCollection.cs
- ProfileBuildProvider.cs
- UndoUnit.cs
- PropertyGroupDescription.cs
- WebControl.cs
- RelationshipWrapper.cs
- EventOpcode.cs
- namescope.cs
- EdmItemCollection.cs
- BufferAllocator.cs
- DetailsViewCommandEventArgs.cs
- GetKeyedHashRequest.cs
- RelatedPropertyManager.cs
- XmlNamedNodeMap.cs
- EmptyCollection.cs
- EditorPartChrome.cs
- ReferencedCollectionType.cs
- WorkflowItemPresenter.cs
- PeerApplicationLaunchInfo.cs
- ManualResetEvent.cs
- FileChangesMonitor.cs
- DataGridViewSelectedCellCollection.cs
- Model3DCollection.cs
- NativeActivityMetadata.cs
- DataGridParentRows.cs
- ExtenderHelpers.cs
- Context.cs
- XmlSchemas.cs
- HtmlHistory.cs
- ToolStripPanelRenderEventArgs.cs
- LineBreak.cs
- XPathPatternParser.cs
- CompilerResults.cs
- WebSysDefaultValueAttribute.cs
- EditorZoneDesigner.cs
- FileSystemWatcher.cs
- RepeaterItemEventArgs.cs
- CustomCredentialPolicy.cs
- VarRefManager.cs
- TokenBasedSetEnumerator.cs
- DynamicMethod.cs
- ThreadStartException.cs
- MaxSessionCountExceededException.cs
- SwitchLevelAttribute.cs
- ClientSideProviderDescription.cs
- PropertyItemInternal.cs
- SystemTcpConnection.cs
- AllMembershipCondition.cs
- XmlAttributeProperties.cs
- CodePageUtils.cs
- GridViewUpdatedEventArgs.cs
- RelationalExpressions.cs
- TableHeaderCell.cs
- BlurEffect.cs
- PolyBezierSegment.cs
- CompiledQuery.cs
- SectionUpdates.cs
- MetabaseServerConfig.cs
- LicFileLicenseProvider.cs
- PostBackTrigger.cs
- SqlEnums.cs
- BitmapEffectrendercontext.cs
- System.Data_BID.cs
- TimeoutException.cs
- AnnotationMap.cs
- UInt16.cs
- DataGridViewCellPaintingEventArgs.cs
- ScrollableControl.cs
- DataBoundLiteralControl.cs
- ServiceModelConfigurationSectionCollection.cs
- WebHostedComPlusServiceHost.cs
- GridViewDeleteEventArgs.cs
- CodeMethodReturnStatement.cs
- SourceSwitch.cs
- CounterSample.cs
- CommonGetThemePartSize.cs
- DynamicDiscoSearcher.cs
- GestureRecognizer.cs
- ObjectSet.cs
- DecoderExceptionFallback.cs
- DataBindingList.cs
- DynamicMethod.cs
- DomainLiteralReader.cs
- BinHexDecoder.cs
- CharacterMetrics.cs
- Resources.Designer.cs
- HostingPreferredMapPath.cs
- PaginationProgressEventArgs.cs