Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Core / System / Windows / Media3D / DiffuseMaterial.cs / 1 / DiffuseMaterial.cs
//----------------------------------------------------------------------------
//
//
// Copyright (C) Microsoft Corporation. All rights reserved.
//
//
//
// Description: 3D diffuse material
//
// See spec at *** FILL IN LATER ***
//
// History:
// 06/25/2003 : [....] - Created
// 01/28/2005 : [....] - Renamed BrushMaterial to DiffuseMaterial
//
//---------------------------------------------------------------------------
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
{
///
/// DiffuseMaterial allows a 2d brush to be used on a 3d model that has been lit
/// with a diffuse lighting model
///
public sealed partial class DiffuseMaterial : Material
{
//-----------------------------------------------------
//
// Constructors
//
//-----------------------------------------------------
#region Constructors
///
/// Constructs a DiffuseMaterial
///
public DiffuseMaterial()
{
}
///
/// Constructor that sets the Brush property to "brush"
///
/// The new material's brush
public DiffuseMaterial(Brush brush)
{
Brush = brush;
}
#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
- SimpleMailWebEventProvider.cs
- LogEntrySerialization.cs
- Viewport3DAutomationPeer.cs
- SystemIPv4InterfaceProperties.cs
- HistoryEventArgs.cs
- DesignTimeParseData.cs
- Group.cs
- XmlJsonWriter.cs
- JsonSerializer.cs
- UnhandledExceptionEventArgs.cs
- IImplicitResourceProvider.cs
- XmlSchemaInferenceException.cs
- MemberListBinding.cs
- CalendarTable.cs
- PropertyGridView.cs
- IdentityReference.cs
- RefType.cs
- StoreContentChangedEventArgs.cs
- RtfControlWordInfo.cs
- GenericEnumerator.cs
- ObjectStateManager.cs
- XmlLangPropertyAttribute.cs
- Wildcard.cs
- Rectangle.cs
- webproxy.cs
- InternalCache.cs
- PointAnimationUsingPath.cs
- ImagingCache.cs
- BitArray.cs
- LinqDataSourceDisposeEventArgs.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- InvalidAsynchronousStateException.cs
- ContextStack.cs
- ConvertEvent.cs
- KernelTypeValidation.cs
- NotFiniteNumberException.cs
- Buffer.cs
- Binding.cs
- SctClaimSerializer.cs
- SelectionWordBreaker.cs
- DataGridViewRowsAddedEventArgs.cs
- HwndSourceKeyboardInputSite.cs
- StaticExtensionConverter.cs
- SmtpFailedRecipientsException.cs
- InternalsVisibleToAttribute.cs
- MarkupExtensionParser.cs
- AnnotationMap.cs
- dataSvcMapFileLoader.cs
- FormsAuthenticationTicket.cs
- SamlAuthenticationClaimResource.cs
- DataServiceQueryProvider.cs
- MonitoringDescriptionAttribute.cs
- Part.cs
- HttpResponseInternalWrapper.cs
- DateTimeUtil.cs
- OutputScopeManager.cs
- LinkDescriptor.cs
- LinqDataSourceContextEventArgs.cs
- UnknownBitmapEncoder.cs
- State.cs
- XPathNode.cs
- _ShellExpression.cs
- XmlLanguage.cs
- ContentFileHelper.cs
- unsafeIndexingFilterStream.cs
- CatalogZoneBase.cs
- BulletedList.cs
- LinearGradientBrush.cs
- AssemblyEvidenceFactory.cs
- EditBehavior.cs
- ProgressBarRenderer.cs
- TemplateControlBuildProvider.cs
- ObjectConverter.cs
- TypeElementCollection.cs
- DateBoldEvent.cs
- querybuilder.cs
- DataGridViewRowPostPaintEventArgs.cs
- ToolStripDropDownDesigner.cs
- WebPartZoneCollection.cs
- DataControlFieldCollection.cs
- MethodResolver.cs
- DataSourceCache.cs
- HostingEnvironmentSection.cs
- SiteMapNode.cs
- commandenforcer.cs
- TextPointerBase.cs
- ServiceMetadataContractBehavior.cs
- ContextStaticAttribute.cs
- DynamicPropertyHolder.cs
- Funcletizer.cs
- DataRowView.cs
- EventProviderClassic.cs
- DelegatingChannelListener.cs
- UnsafeNativeMethodsPenimc.cs
- ImageCodecInfoPrivate.cs
- NetStream.cs
- SoapCodeExporter.cs
- DataGridCaption.cs
- ImageCollectionCodeDomSerializer.cs
- CodeRemoveEventStatement.cs