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
- CreateUserWizardAutoFormat.cs
- OutputWindow.cs
- streamingZipPartStream.cs
- SettingsBase.cs
- WebPartVerbsEventArgs.cs
- XmlDataDocument.cs
- SqlMultiplexer.cs
- Argument.cs
- OrderingInfo.cs
- PointCollection.cs
- MemoryMappedFileSecurity.cs
- GatewayDefinition.cs
- ParameterBuilder.cs
- PasswordTextNavigator.cs
- ValueType.cs
- SerialPinChanges.cs
- EdmToObjectNamespaceMap.cs
- DbException.cs
- TextTreePropertyUndoUnit.cs
- SqlCacheDependencyDatabase.cs
- XamlToRtfParser.cs
- MultilineStringConverter.cs
- WebPartDescription.cs
- SemanticResultKey.cs
- DockingAttribute.cs
- ByteRangeDownloader.cs
- PathGeometry.cs
- UIElement.cs
- CopyOfAction.cs
- RangeValueProviderWrapper.cs
- Blend.cs
- WebPartConnectionCollection.cs
- HeaderLabel.cs
- HostingEnvironmentWrapper.cs
- PolicyManager.cs
- DataGridViewComponentPropertyGridSite.cs
- StrokeCollectionDefaultValueFactory.cs
- PackageDigitalSignature.cs
- FixUpCollection.cs
- WsiProfilesElementCollection.cs
- DuplicateWaitObjectException.cs
- AsymmetricSecurityProtocol.cs
- Descriptor.cs
- InstancePersistenceCommand.cs
- XmlArrayAttribute.cs
- ProgressBar.cs
- FunctionQuery.cs
- EnumMemberAttribute.cs
- RightsManagementProvider.cs
- EntityAdapter.cs
- AlignmentXValidation.cs
- MessagePropertyFilter.cs
- MembershipUser.cs
- SafeReadContext.cs
- ReadOnlyPropertyMetadata.cs
- VersionUtil.cs
- Converter.cs
- COMException.cs
- SessionParameter.cs
- SqlCachedBuffer.cs
- PageBreakRecord.cs
- CryptoHandle.cs
- HostAdapter.cs
- AssemblyAttributesGoHere.cs
- EventDriven.cs
- ServiceOperationWrapper.cs
- SizeConverter.cs
- UIElementPropertyUndoUnit.cs
- XmlSchemaSimpleType.cs
- XmlSchemaObjectTable.cs
- mediaeventargs.cs
- SafeNativeMethods.cs
- CodeCastExpression.cs
- Vector.cs
- FunctionMappingTranslator.cs
- Lasso.cs
- FontInfo.cs
- EventHandlersStore.cs
- EventWaitHandleSecurity.cs
- Nullable.cs
- DesignerProperties.cs
- HuffModule.cs
- DependencyObject.cs
- Parallel.cs
- BehaviorService.cs
- SoapSchemaImporter.cs
- StorageBasedPackageProperties.cs
- IpcServerChannel.cs
- ItemType.cs
- TableAdapterManagerNameHandler.cs
- KeyedHashAlgorithm.cs
- smtppermission.cs
- StrokeNode.cs
- PerformanceCounterManager.cs
- RuntimeConfigLKG.cs
- PeerConnector.cs
- sqlmetadatafactory.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- HtmlTableCellCollection.cs
- PropertyInformation.cs