Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- Point3DIndependentAnimationStorage.cs
- BitmapEffectCollection.cs
- TextEffectCollection.cs
- TransferRequestHandler.cs
- DiscreteKeyFrames.cs
- DataObjectMethodAttribute.cs
- HttpProcessUtility.cs
- InstanceCompleteException.cs
- SignatureSummaryDialog.cs
- TextEditorThreadLocalStore.cs
- EtwTrace.cs
- RepeaterItemCollection.cs
- WebPartZoneCollection.cs
- TransactionFlowOption.cs
- MdImport.cs
- FontStyles.cs
- ExpressionReplacer.cs
- WebExceptionStatus.cs
- SpinWait.cs
- TextFormatter.cs
- ListViewItem.cs
- InternalCache.cs
- TreeViewImageIndexConverter.cs
- XPathDocumentNavigator.cs
- objectresult_tresulttype.cs
- FunctionImportElement.cs
- tabpagecollectioneditor.cs
- ObjectAnimationUsingKeyFrames.cs
- BooleanSwitch.cs
- DesignerVerbCollection.cs
- DBProviderConfigurationHandler.cs
- ClientRuntimeConfig.cs
- OutputCacheSettings.cs
- TrustManagerPromptUI.cs
- PackageFilter.cs
- XmlWriterDelegator.cs
- ControlValuePropertyAttribute.cs
- AssociatedControlConverter.cs
- GC.cs
- FormsAuthenticationTicket.cs
- DataSetMappper.cs
- Imaging.cs
- TextViewElement.cs
- TemplateLookupAction.cs
- AmbientLight.cs
- PropertyTab.cs
- BamlTreeUpdater.cs
- DefaultAsyncDataDispatcher.cs
- DesignBindingValueUIHandler.cs
- DataServiceQueryContinuation.cs
- ASCIIEncoding.cs
- TextLine.cs
- AnnotationResourceChangedEventArgs.cs
- SoapReflectionImporter.cs
- Grant.cs
- TemplateEditingFrame.cs
- RunInstallerAttribute.cs
- Validator.cs
- ListSurrogate.cs
- OuterGlowBitmapEffect.cs
- ExpressionBinding.cs
- RoleManagerSection.cs
- DataFieldConverter.cs
- ControllableStoryboardAction.cs
- _SingleItemRequestCache.cs
- DefaultClaimSet.cs
- CardSpaceException.cs
- HtmlTextArea.cs
- FieldBuilder.cs
- GorillaCodec.cs
- Brush.cs
- CommandDevice.cs
- FormViewDeleteEventArgs.cs
- DataGridViewCellConverter.cs
- Formatter.cs
- CodeGenerator.cs
- CodeTryCatchFinallyStatement.cs
- ClonableStack.cs
- ListBoxItemWrapperAutomationPeer.cs
- ReadOnlyPropertyMetadata.cs
- SqlHelper.cs
- StorageMappingItemCollection.cs
- Int16.cs
- TabRenderer.cs
- LayoutSettings.cs
- XmlReflectionImporter.cs
- FormViewRow.cs
- EntityDataSourceContextDisposingEventArgs.cs
- BCLDebug.cs
- CodeGenerator.cs
- GridViewUpdatedEventArgs.cs
- DataGridRow.cs
- ReflectionServiceProvider.cs
- LineBreakRecord.cs
- HttpFileCollection.cs
- WebPartEditorOkVerb.cs
- PeerApplicationLaunchInfo.cs
- RowCache.cs
- WorkflowApplicationTerminatedException.cs
- IconBitmapDecoder.cs