Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / wpf / src / Core / CSharp / System / Windows / Media3D / SpecularMaterial.cs / 1 / SpecularMaterial.cs
//---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // // Description: 3D specular material // // See spec at *** FILL IN LATER *** // //--------------------------------------------------------------------------- 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 { ////// SpecularMaterial allows a 2d brush to be used on a 3d model that has been lit /// with a specular lighting model /// public sealed partial class SpecularMaterial : Material { //----------------------------------------------------- // // Constructors // //----------------------------------------------------- #region Constructors ////// Constructs a SpecularMaterial /// public SpecularMaterial() { } ////// Constructor that sets the initial values /// /// The new material's brush /// The specular exponent. public SpecularMaterial(Brush brush, double specularPower) { Brush = brush; SpecularPower = specularPower; } #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 specular material // // See spec at *** FILL IN LATER *** // //--------------------------------------------------------------------------- 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 { ////// SpecularMaterial allows a 2d brush to be used on a 3d model that has been lit /// with a specular lighting model /// public sealed partial class SpecularMaterial : Material { //----------------------------------------------------- // // Constructors // //----------------------------------------------------- #region Constructors ////// Constructs a SpecularMaterial /// public SpecularMaterial() { } ////// Constructor that sets the initial values /// /// The new material's brush /// The specular exponent. public SpecularMaterial(Brush brush, double specularPower) { Brush = brush; SpecularPower = specularPower; } #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
- EngineSite.cs
- Msec.cs
- SpecularMaterial.cs
- WindowsServiceCredential.cs
- ClassValidator.cs
- TextRangeEditTables.cs
- DocumentPaginator.cs
- XmlIncludeAttribute.cs
- _HTTPDateParse.cs
- UriSection.cs
- Paragraph.cs
- NeutralResourcesLanguageAttribute.cs
- SqlInternalConnectionSmi.cs
- TypeDescriptorContext.cs
- Utils.cs
- DependencyObjectProvider.cs
- PrePrepareMethodAttribute.cs
- XmlDeclaration.cs
- CodeThrowExceptionStatement.cs
- RepeatBehaviorConverter.cs
- ServiceX509SecurityTokenProvider.cs
- Rotation3DAnimationBase.cs
- ReferencedCollectionType.cs
- Match.cs
- XsltLoader.cs
- Constraint.cs
- OleDbDataReader.cs
- RuntimeHandles.cs
- ParagraphResult.cs
- CodeSnippetExpression.cs
- BitmapPalette.cs
- DeflateStream.cs
- AnnotationDocumentPaginator.cs
- InputQueueChannelAcceptor.cs
- SqlCommand.cs
- CommandHelpers.cs
- AlphabeticalEnumConverter.cs
- HealthMonitoringSectionHelper.cs
- SortableBindingList.cs
- InputLanguageEventArgs.cs
- ISAPIApplicationHost.cs
- ItemCollection.cs
- StringConverter.cs
- ComProxy.cs
- DataSvcMapFileSerializer.cs
- CornerRadius.cs
- ObjectStorage.cs
- ConfigErrorGlyph.cs
- _ChunkParse.cs
- util.cs
- NotifyParentPropertyAttribute.cs
- HttpListenerContext.cs
- ExpandoClass.cs
- DelegateArgumentReference.cs
- Crc32.cs
- AtomParser.cs
- XPathArrayIterator.cs
- ExternalCalls.cs
- InheritanceUI.cs
- CustomWebEventKey.cs
- LabelDesigner.cs
- ActivitySurrogate.cs
- SoapAttributeOverrides.cs
- PagerSettings.cs
- EntityDataSourceSelectedEventArgs.cs
- UriTemplateClientFormatter.cs
- DictionaryEntry.cs
- Pen.cs
- WSIdentityFaultException.cs
- Tile.cs
- RelationshipEntry.cs
- DecimalStorage.cs
- Canvas.cs
- TextCompositionEventArgs.cs
- XPathNavigatorKeyComparer.cs
- PersonalizationStateInfoCollection.cs
- CodeDirectionExpression.cs
- DataGridViewLayoutData.cs
- SoapReflectionImporter.cs
- BehaviorDragDropEventArgs.cs
- HttpStreamXmlDictionaryWriter.cs
- FacetChecker.cs
- GregorianCalendarHelper.cs
- SourceItem.cs
- CompareValidator.cs
- RadioButtonBaseAdapter.cs
- ContainerUtilities.cs
- SoapIgnoreAttribute.cs
- OutputWindow.cs
- XpsColorContext.cs
- DictionaryEntry.cs
- linebase.cs
- TypeName.cs
- MessageBox.cs
- EdmType.cs
- Label.cs
- UrlPath.cs
- ObjectFullSpanRewriter.cs
- RightsManagementErrorHandler.cs
- WebServiceHandlerFactory.cs