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
- Light.cs
- ObjectQuery.cs
- BmpBitmapDecoder.cs
- HostElement.cs
- DataTemplate.cs
- LockRecursionException.cs
- EntityViewContainer.cs
- Unit.cs
- XmlWrappingReader.cs
- StylusOverProperty.cs
- TemplateControlBuildProvider.cs
- PageParserFilter.cs
- TextProviderWrapper.cs
- UriTemplateEquivalenceComparer.cs
- OdbcRowUpdatingEvent.cs
- CompiledXpathExpr.cs
- DocumentViewerAutomationPeer.cs
- FastPropertyAccessor.cs
- SpeakInfo.cs
- IndentedWriter.cs
- GroupJoinQueryOperator.cs
- DataFormat.cs
- TreeView.cs
- ColorMatrix.cs
- ListViewCancelEventArgs.cs
- SecUtil.cs
- NeedSkipTokenVisitor.cs
- DataRowCollection.cs
- XmlTextWriter.cs
- FixedSOMTextRun.cs
- AspCompat.cs
- DbConnectionStringCommon.cs
- OleAutBinder.cs
- CompoundFileStreamReference.cs
- TableSectionStyle.cs
- StringUtil.cs
- WebPartZoneCollection.cs
- IdentityModelDictionary.cs
- ManifestResourceInfo.cs
- EventLogTraceListener.cs
- ZipPackagePart.cs
- SolidBrush.cs
- LookupNode.cs
- AppDomainAttributes.cs
- DataError.cs
- TableAutomationPeer.cs
- AssemblyHash.cs
- JsonReaderWriterFactory.cs
- HttpValueCollection.cs
- OperationInfoBase.cs
- NameScopePropertyAttribute.cs
- MenuItemBinding.cs
- SAPIEngineTypes.cs
- columnmapfactory.cs
- BitmapFrameEncode.cs
- CodeRemoveEventStatement.cs
- MediaElementAutomationPeer.cs
- SoapIgnoreAttribute.cs
- GACIdentityPermission.cs
- SMSvcHost.cs
- TableAdapterManagerGenerator.cs
- TopClause.cs
- NameValuePair.cs
- IxmlLineInfo.cs
- DictionaryContent.cs
- ArrayExtension.cs
- WinInet.cs
- RadioButton.cs
- PinnedBufferMemoryStream.cs
- XmlWriter.cs
- DtdParser.cs
- ProfileSection.cs
- InvalidFilterCriteriaException.cs
- SqlBulkCopyColumnMappingCollection.cs
- GridViewHeaderRowPresenterAutomationPeer.cs
- ServiceBuildProvider.cs
- WindowsButton.cs
- XmlSchemaElement.cs
- EventlogProvider.cs
- DataRelation.cs
- Win32Exception.cs
- EpmCustomContentWriterNodeData.cs
- OwnerDrawPropertyBag.cs
- XamlTemplateSerializer.cs
- COM2Properties.cs
- Constant.cs
- CustomError.cs
- _SslSessionsCache.cs
- SystemIPGlobalProperties.cs
- OleDbEnumerator.cs
- ToolStripSeparator.cs
- HttpCapabilitiesSectionHandler.cs
- Dispatcher.cs
- BitmapEffectInputData.cs
- MsmqVerifier.cs
- TcpHostedTransportConfiguration.cs
- ContainerParaClient.cs
- ValidatorAttribute.cs
- ColumnWidthChangedEvent.cs
- TypedAsyncResult.cs