Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Core / CSharp / System / Windows / Media3D / Matrix3DStack.cs / 1 / Matrix3DStack.cs
//----------------------------------------------------------------------------
//
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// Description: This is a super simple Matrix3DStack implementation.
// MatrixStack (2D) is optimized to avoid boxig and copying
// of structs. This was written as a stop-gap to address
// a bug until we can use CodeGen here.
//
// History:
// 1/19/2004 : [....] - Created
//
//---------------------------------------------------------------------------
using System;
using System.Collections;
using System.Collections.Generic;
namespace System.Windows.Media.Media3D
{
//
internal class Matrix3DStack
{
//-----------------------------------------------------
//
// Constructors
//
//-----------------------------------------------------
//------------------------------------------------------
//
// Public Methods
//
//-----------------------------------------------------
public void Clear()
{
_stack.Clear();
}
public Matrix3D Pop()
{
Matrix3D top = Top;
_stack.RemoveAt(_stack.Count - 1);
return top;
}
///
/// Empty => [matrix]
/// tail | [top] => tail | [top] | [matrix * top]
///
public void Push(Matrix3D matrix)
{
if (_stack.Count > 0)
{
matrix.Append(Top);
}
_stack.Add(matrix);
}
///
/// stack = stack | [matrix]
///
public void PushWithoutAccumulating(Matrix3D matrix)
{
_stack.Add(matrix);
}
//------------------------------------------------------
//
// Public Properties
//
//------------------------------------------------------
public int Count
{
get
{
return _stack.Count;
}
}
public bool IsEmpty
{
get
{
return (_stack.Count == 0);
}
}
public Matrix3D Top
{
get
{
return _stack[_stack.Count - 1];
}
}
//-----------------------------------------------------
//
// Public Events
//
//------------------------------------------------------
//-----------------------------------------------------
//
// Private Fields
//
//-----------------------------------------------------
#region Private Fields
private readonly List _stack = new List();
#endregion Private Fields
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//----------------------------------------------------------------------------
//
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// Description: This is a super simple Matrix3DStack implementation.
// MatrixStack (2D) is optimized to avoid boxig and copying
// of structs. This was written as a stop-gap to address
// a bug until we can use CodeGen here.
//
// History:
// 1/19/2004 : [....] - Created
//
//---------------------------------------------------------------------------
using System;
using System.Collections;
using System.Collections.Generic;
namespace System.Windows.Media.Media3D
{
//
internal class Matrix3DStack
{
//-----------------------------------------------------
//
// Constructors
//
//-----------------------------------------------------
//------------------------------------------------------
//
// Public Methods
//
//-----------------------------------------------------
public void Clear()
{
_stack.Clear();
}
public Matrix3D Pop()
{
Matrix3D top = Top;
_stack.RemoveAt(_stack.Count - 1);
return top;
}
///
/// Empty => [matrix]
/// tail | [top] => tail | [top] | [matrix * top]
///
public void Push(Matrix3D matrix)
{
if (_stack.Count > 0)
{
matrix.Append(Top);
}
_stack.Add(matrix);
}
///
/// stack = stack | [matrix]
///
public void PushWithoutAccumulating(Matrix3D matrix)
{
_stack.Add(matrix);
}
//------------------------------------------------------
//
// Public Properties
//
//------------------------------------------------------
public int Count
{
get
{
return _stack.Count;
}
}
public bool IsEmpty
{
get
{
return (_stack.Count == 0);
}
}
public Matrix3D Top
{
get
{
return _stack[_stack.Count - 1];
}
}
//-----------------------------------------------------
//
// Public Events
//
//------------------------------------------------------
//-----------------------------------------------------
//
// Private Fields
//
//-----------------------------------------------------
#region Private Fields
private readonly List _stack = new List();
#endregion Private Fields
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ListViewTableRow.cs
- CacheDependency.cs
- EdmProperty.cs
- AssemblyAssociatedContentFileAttribute.cs
- GPRECTF.cs
- SynchronizingStream.cs
- HotSpotCollection.cs
- Pair.cs
- OutputCacheProviderCollection.cs
- LingerOption.cs
- IgnoreSection.cs
- NameNode.cs
- TemplatedWizardStep.cs
- CodeIdentifiers.cs
- Animatable.cs
- EntitySetBase.cs
- XmlSchemaSimpleTypeRestriction.cs
- SqlProviderManifest.cs
- IdnMapping.cs
- columnmapkeybuilder.cs
- embossbitmapeffect.cs
- CharEntityEncoderFallback.cs
- DotExpr.cs
- StringFunctions.cs
- Cloud.cs
- DataGridColumnCollection.cs
- ObjectNotFoundException.cs
- CancellationTokenRegistration.cs
- MethodBuilderInstantiation.cs
- MetadataItemEmitter.cs
- CollectionBase.cs
- ToReply.cs
- webbrowsersite.cs
- SerializerProvider.cs
- SafeReversePInvokeHandle.cs
- SmtpReplyReader.cs
- SoapMessage.cs
- ToolStripItemGlyph.cs
- PrintPreviewControl.cs
- StorageRoot.cs
- GridViewSortEventArgs.cs
- ConfigurationStrings.cs
- SecurityPolicySection.cs
- TraceInternal.cs
- ImageAnimator.cs
- FillBehavior.cs
- DoubleAnimationUsingKeyFrames.cs
- Drawing.cs
- HandlerMappingMemo.cs
- GridView.cs
- OrderedDictionary.cs
- RangeValidator.cs
- FontConverter.cs
- SqlDataSourceConfigureSortForm.cs
- ValueTypeFixupInfo.cs
- MailMessage.cs
- NativeMethods.cs
- ISFClipboardData.cs
- StrokeFIndices.cs
- SHA1CryptoServiceProvider.cs
- AutoGeneratedField.cs
- LayoutEditorPart.cs
- JulianCalendar.cs
- ExtentJoinTreeNode.cs
- BitmapEffectInput.cs
- HwndHostAutomationPeer.cs
- WebPartsSection.cs
- KernelTypeValidation.cs
- Content.cs
- ADRoleFactory.cs
- Bits.cs
- Verify.cs
- XmlHierarchyData.cs
- XamlSerializer.cs
- TabRenderer.cs
- StrokeNodeData.cs
- oledbmetadatacolumnnames.cs
- MessageAction.cs
- AttachInfo.cs
- MobileUITypeEditor.cs
- nulltextcontainer.cs
- UserUseLicenseDictionaryLoader.cs
- RegisteredScript.cs
- StrongName.cs
- SerializationSectionGroup.cs
- TextContainerHelper.cs
- HttpModuleActionCollection.cs
- ObjectStateEntryDbDataRecord.cs
- ITreeGenerator.cs
- RSAPKCS1KeyExchangeFormatter.cs
- SafeHandles.cs
- Int64.cs
- ListViewContainer.cs
- TypeResolver.cs
- _ConnectStream.cs
- DataGridViewHitTestInfo.cs
- InvokeBinder.cs
- OutputCacheProfile.cs
- DataGridViewCellValueEventArgs.cs
- OperationParameterInfo.cs