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
- Accessors.cs
- QilCloneVisitor.cs
- HtmlShim.cs
- HtmlTableRow.cs
- WorkflowEventArgs.cs
- AllMembershipCondition.cs
- ValueTable.cs
- LongValidatorAttribute.cs
- XmlMtomReader.cs
- ACE.cs
- ApplyImportsAction.cs
- AuthenticationSection.cs
- XsltSettings.cs
- Memoizer.cs
- CheckBoxStandardAdapter.cs
- DesignTimeTemplateParser.cs
- Aes.cs
- ElapsedEventArgs.cs
- ToolStripPanel.cs
- WebPartZone.cs
- BoundField.cs
- ScaleTransform.cs
- AppendHelper.cs
- OutputCacheProfileCollection.cs
- Light.cs
- UpdatePanelControlTrigger.cs
- ButtonFieldBase.cs
- CryptoStream.cs
- DynamicActivityTypeDescriptor.cs
- XPathDescendantIterator.cs
- MaterialCollection.cs
- TreeNodeStyleCollection.cs
- PropertyNames.cs
- TagMapInfo.cs
- ToolStripContentPanelRenderEventArgs.cs
- AsymmetricSignatureFormatter.cs
- CorruptingExceptionCommon.cs
- DateTimeFormatInfo.cs
- HttpDictionary.cs
- SmtpTransport.cs
- AsynchronousChannel.cs
- NumberFunctions.cs
- IResourceProvider.cs
- VectorValueSerializer.cs
- WebServiceEndpoint.cs
- DragEventArgs.cs
- ManipulationDelta.cs
- UnsafeNativeMethodsCLR.cs
- ComAwareEventInfo.cs
- _ListenerRequestStream.cs
- TextEndOfLine.cs
- OleDbDataReader.cs
- MeshGeometry3D.cs
- DataContractFormatAttribute.cs
- Random.cs
- SqlInternalConnectionTds.cs
- ComplexType.cs
- SystemWebCachingSectionGroup.cs
- LambdaCompiler.Binary.cs
- EmissiveMaterial.cs
- BinaryCommonClasses.cs
- ObjectCloneHelper.cs
- FixedSOMGroup.cs
- ChangePasswordAutoFormat.cs
- RecipientServiceModelSecurityTokenRequirement.cs
- GenericAuthenticationEventArgs.cs
- HttpListenerRequest.cs
- TableRow.cs
- GridViewDeleteEventArgs.cs
- NavigationHelper.cs
- RecordConverter.cs
- GridViewAutomationPeer.cs
- StatusStrip.cs
- HuffCodec.cs
- DocumentAutomationPeer.cs
- ScrollableControlDesigner.cs
- ViewPort3D.cs
- ProfileSettingsCollection.cs
- FormViewActionList.cs
- QueryInterceptorAttribute.cs
- OwnerDrawPropertyBag.cs
- DiscreteKeyFrames.cs
- TdsParserStaticMethods.cs
- DataSourceXmlSubItemAttribute.cs
- _ConnectOverlappedAsyncResult.cs
- Encoder.cs
- LocationInfo.cs
- HierarchicalDataTemplate.cs
- EnumValAlphaComparer.cs
- HelpEvent.cs
- PerspectiveCamera.cs
- TransformerInfo.cs
- LostFocusEventManager.cs
- ListArgumentProvider.cs
- ColumnWidthChangingEvent.cs
- isolationinterop.cs
- TextCharacters.cs
- ProxyFragment.cs
- HtmlForm.cs
- TreeNode.cs