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
- Privilege.cs
- AdvancedBindingEditor.cs
- FigureHelper.cs
- Button.cs
- ImageDrawing.cs
- HierarchicalDataTemplate.cs
- PlanCompiler.cs
- VectorAnimationUsingKeyFrames.cs
- WindowsFormsSectionHandler.cs
- Drawing.cs
- PageBuildProvider.cs
- SliderAutomationPeer.cs
- ToolStripDropDownClosedEventArgs.cs
- ScriptingRoleServiceSection.cs
- SoapEnumAttribute.cs
- LinearQuaternionKeyFrame.cs
- HScrollBar.cs
- ErrorActivity.cs
- KerberosSecurityTokenParameters.cs
- ComponentGuaranteesAttribute.cs
- OletxCommittableTransaction.cs
- Parser.cs
- EncoderNLS.cs
- XmlNodeChangedEventArgs.cs
- XmlDeclaration.cs
- TCPListener.cs
- SafeBitVector32.cs
- FrameworkTemplate.cs
- WebPartEditVerb.cs
- EtwTrackingBehaviorElement.cs
- MetadataException.cs
- ConnectionManagementSection.cs
- BamlLocalizationDictionary.cs
- Symbol.cs
- OpenFileDialog.cs
- ReadOnlyDataSourceView.cs
- BypassElement.cs
- ComplusTypeValidator.cs
- ProjectionQueryOptionExpression.cs
- WebPartConnection.cs
- PathTooLongException.cs
- Enum.cs
- XmlSchemaChoice.cs
- FeatureManager.cs
- EventMetadata.cs
- CodeEventReferenceExpression.cs
- OracleParameter.cs
- SqlConnectionManager.cs
- MouseDevice.cs
- WebServiceMethodData.cs
- WebServiceFaultDesigner.cs
- ProcessModelSection.cs
- RevocationPoint.cs
- ParserContext.cs
- CurrentChangingEventManager.cs
- ControlParameter.cs
- Stream.cs
- Clause.cs
- MsmqHostedTransportManager.cs
- ConnectionManagementElementCollection.cs
- Visual3D.cs
- SineEase.cs
- XmlNodeList.cs
- ContentControl.cs
- EntityUtil.cs
- TraceListener.cs
- BaseParagraph.cs
- WindowsIdentity.cs
- FormViewPageEventArgs.cs
- TextServicesCompartmentEventSink.cs
- AssociationTypeEmitter.cs
- URLAttribute.cs
- StreamReader.cs
- SizeFConverter.cs
- MessageBox.cs
- ExpandCollapsePattern.cs
- StringArrayConverter.cs
- Size3DConverter.cs
- SettingsAttributes.cs
- PlaceHolder.cs
- GeneralTransform3DTo2DTo3D.cs
- SpinLock.cs
- StrongName.cs
- QilParameter.cs
- DispatcherEventArgs.cs
- ContainerUIElement3D.cs
- StackSpiller.Generated.cs
- PathSegment.cs
- Dynamic.cs
- MaterialCollection.cs
- IndentTextWriter.cs
- PassportPrincipal.cs
- ExtensionElementCollection.cs
- WinEventHandler.cs
- TableParaClient.cs
- SqlNodeAnnotations.cs
- _ShellExpression.cs
- ElementHostAutomationPeer.cs
- SafeNativeMethods.cs
- XmlSerializerSection.cs