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
- PropertyMapper.cs
- FormatConvertedBitmap.cs
- Semaphore.cs
- BitSet.cs
- ResourceWriter.cs
- OracleSqlParser.cs
- HtmlInputReset.cs
- ImageMapEventArgs.cs
- AndCondition.cs
- _Connection.cs
- SimpleWebHandlerParser.cs
- ScriptRegistrationManager.cs
- SizeChangedInfo.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- DataKey.cs
- Literal.cs
- TableCellAutomationPeer.cs
- BeginStoryboard.cs
- PrimitiveCodeDomSerializer.cs
- TypeLoadException.cs
- WebEventTraceProvider.cs
- EventLogTraceListener.cs
- DirtyTextRange.cs
- ColorAnimation.cs
- FontWeightConverter.cs
- InfiniteTimeSpanConverter.cs
- ComboBoxItem.cs
- DataTemplateSelector.cs
- HttpStreamXmlDictionaryReader.cs
- NamedPipeConnectionPoolSettings.cs
- DelayLoadType.cs
- SpecialNameAttribute.cs
- UnlockInstanceCommand.cs
- LowerCaseStringConverter.cs
- TableLayoutRowStyleCollection.cs
- isolationinterop.cs
- UIHelper.cs
- AtomParser.cs
- GreenMethods.cs
- ObjectStateManager.cs
- AsnEncodedData.cs
- Pens.cs
- XmlIncludeAttribute.cs
- basevalidator.cs
- BmpBitmapEncoder.cs
- OracleRowUpdatedEventArgs.cs
- AssemblyAttributesGoHere.cs
- OleDbMetaDataFactory.cs
- PointLight.cs
- FlowDocumentPageViewerAutomationPeer.cs
- MessageQueueAccessControlEntry.cs
- EncryptedType.cs
- NoneExcludedImageIndexConverter.cs
- UInt64.cs
- TextEditorTables.cs
- SerializationSectionGroup.cs
- InkCanvasSelection.cs
- Metadata.cs
- VoiceInfo.cs
- Vector3DCollectionConverter.cs
- LassoSelectionBehavior.cs
- CustomError.cs
- ContextMenuStripActionList.cs
- ItemsControlAutomationPeer.cs
- DataTableExtensions.cs
- ThreadSafeList.cs
- BitmapCacheBrush.cs
- SpeechUI.cs
- HandleCollector.cs
- HwndStylusInputProvider.cs
- XPathSelectionIterator.cs
- SqlTriggerAttribute.cs
- Expression.cs
- XmlValueConverter.cs
- FormCollection.cs
- TextView.cs
- SmtpCommands.cs
- TrackingLocation.cs
- OutOfMemoryException.cs
- Rules.cs
- SharedPersonalizationStateInfo.cs
- controlskin.cs
- UIAgentInitializationException.cs
- LingerOption.cs
- ContentFileHelper.cs
- SystemColors.cs
- MappedMetaModel.cs
- BitmapCodecInfo.cs
- DataGridColumn.cs
- AssemblyHelper.cs
- FilterQueryOptionExpression.cs
- AstTree.cs
- MatrixAnimationBase.cs
- NameValueCollection.cs
- TemplateManager.cs
- TypeTypeConverter.cs
- CompositeDataBoundControl.cs
- ToolStripLocationCancelEventArgs.cs
- QueryServiceConfigHandle.cs
- MergablePropertyAttribute.cs