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
- AssemblyBuilderData.cs
- DataTemplate.cs
- SuppressIldasmAttribute.cs
- EditorPart.cs
- SmiEventSink_Default.cs
- GatewayIPAddressInformationCollection.cs
- EventHandlers.cs
- GroupStyle.cs
- TimestampInformation.cs
- IResourceProvider.cs
- ColumnWidthChangedEvent.cs
- HwndSource.cs
- Imaging.cs
- SimpleModelProvider.cs
- handlecollector.cs
- LongTypeConverter.cs
- RequestCachingSection.cs
- DataBoundControlAdapter.cs
- InputReportEventArgs.cs
- Propagator.JoinPropagator.JoinPredicateVisitor.cs
- PeerInvitationResponse.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- SystemKeyConverter.cs
- InsufficientMemoryException.cs
- Trace.cs
- CollectionBase.cs
- Timeline.cs
- DurationConverter.cs
- WindowsBrush.cs
- IgnoreFileBuildProvider.cs
- FixedSOMContainer.cs
- RelatedPropertyManager.cs
- Guid.cs
- DesignerVerbToolStripMenuItem.cs
- HtmlInputReset.cs
- DbSetClause.cs
- DashStyles.cs
- FrameworkTextComposition.cs
- CapabilitiesSection.cs
- DbProviderConfigurationHandler.cs
- MetadataAssemblyHelper.cs
- SoapIgnoreAttribute.cs
- SolidBrush.cs
- WeakEventTable.cs
- ControlCollection.cs
- StylusPointProperties.cs
- EntityAdapter.cs
- RadioButtonBaseAdapter.cs
- PolyQuadraticBezierSegment.cs
- DrawingContextWalker.cs
- OLEDB_Util.cs
- ModuleBuilderData.cs
- TdsEnums.cs
- COM2PictureConverter.cs
- StateDesigner.Helpers.cs
- XmlSchemaImporter.cs
- AggregateException.cs
- ParameterRefs.cs
- ComAdminInterfaces.cs
- DeadLetterQueue.cs
- RequestCacheManager.cs
- IndexerNameAttribute.cs
- Win32KeyboardDevice.cs
- GregorianCalendarHelper.cs
- XXXInfos.cs
- TransformCollection.cs
- LinearGradientBrush.cs
- MultiPageTextView.cs
- ExtenderProvidedPropertyAttribute.cs
- RuleSetBrowserDialog.cs
- CultureSpecificStringDictionary.cs
- Collection.cs
- SatelliteContractVersionAttribute.cs
- PrefixQName.cs
- ToolStripDropDownButton.cs
- RestClientProxyHandler.cs
- FixUp.cs
- HtmlLink.cs
- Pkcs7Recipient.cs
- ExceptionHandler.cs
- MulticastDelegate.cs
- HierarchicalDataSourceControl.cs
- DocumentSchemaValidator.cs
- _NegoStream.cs
- ObfuscateAssemblyAttribute.cs
- IntegerValidator.cs
- DataGridAutoFormat.cs
- IgnoreSectionHandler.cs
- DocumentSequence.cs
- BaseCAMarshaler.cs
- ModelChangedEventArgsImpl.cs
- ModelItemDictionaryImpl.cs
- EntityCommandDefinition.cs
- CompiledRegexRunnerFactory.cs
- HttpVersion.cs
- ContractMapping.cs
- SectionInformation.cs
- sitestring.cs
- ArrayHelper.cs
- DynamicMethod.cs