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
- DeclaredTypeElementCollection.cs
- Image.cs
- ContainerUtilities.cs
- ZipIOCentralDirectoryFileHeader.cs
- CommittableTransaction.cs
- ModelItemCollection.cs
- NullableIntMinMaxAggregationOperator.cs
- StoreContentChangedEventArgs.cs
- TextPattern.cs
- ExtenderProvidedPropertyAttribute.cs
- PersonalizationStateInfo.cs
- RuleInfoComparer.cs
- JsonClassDataContract.cs
- ScrollProviderWrapper.cs
- TextChange.cs
- OSFeature.cs
- recordstatescratchpad.cs
- ThrowOnMultipleAssignment.cs
- AutoResetEvent.cs
- WmlSelectionListAdapter.cs
- EllipticalNodeOperations.cs
- ComponentEditorForm.cs
- StringBuilder.cs
- EngineSite.cs
- ChooseAction.cs
- BitmapEffectInput.cs
- TabletDevice.cs
- WebPartMenu.cs
- CurrentChangingEventArgs.cs
- ActivityInstanceReference.cs
- JsonWriterDelegator.cs
- GlyphsSerializer.cs
- DnsEndPoint.cs
- TranslateTransform3D.cs
- ButtonColumn.cs
- ZipPackagePart.cs
- FreeFormDragDropManager.cs
- PolicyLevel.cs
- _SslStream.cs
- MouseEventArgs.cs
- HandleCollector.cs
- TypeUtils.cs
- WebPartZoneCollection.cs
- KnownIds.cs
- BooleanConverter.cs
- EllipseGeometry.cs
- ListViewItemCollectionEditor.cs
- DataListItem.cs
- PropertyKey.cs
- Variable.cs
- CalculatedColumn.cs
- QEncodedStream.cs
- SerializerDescriptor.cs
- CodeIdentifiers.cs
- SystemIPGlobalProperties.cs
- AudioDeviceOut.cs
- SecurityDescriptor.cs
- DbParameterCollection.cs
- Transform3DCollection.cs
- CapabilitiesUse.cs
- ValidationHelpers.cs
- SemanticBasicElement.cs
- WebException.cs
- InputBinding.cs
- PageSetupDialog.cs
- CellTreeNodeVisitors.cs
- x509store.cs
- TextUtf8RawTextWriter.cs
- EntryWrittenEventArgs.cs
- MediaSystem.cs
- BufferedWebEventProvider.cs
- EventMappingSettingsCollection.cs
- BoundField.cs
- ContentPlaceHolder.cs
- HtmlMeta.cs
- PeerMessageDispatcher.cs
- ImageListStreamer.cs
- DNS.cs
- Renderer.cs
- SerializationStore.cs
- ICollection.cs
- Cursor.cs
- ZoneMembershipCondition.cs
- SqlInternalConnectionTds.cs
- AndMessageFilterTable.cs
- WindowsListViewItemStartMenu.cs
- DataService.cs
- Ref.cs
- InvalidDataException.cs
- RegistrationServices.cs
- DateTimeValueSerializerContext.cs
- GetWinFXPath.cs
- HtmlInputControl.cs
- Rfc2898DeriveBytes.cs
- ParentUndoUnit.cs
- ReadOnlyDictionary.cs
- PageRanges.cs
- DispatcherExceptionFilterEventArgs.cs
- DBBindings.cs
- SystemSounds.cs