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
- EntityClassGenerator.cs
- ListBase.cs
- ExtenderControl.cs
- SchemeSettingElementCollection.cs
- SymmetricKeyWrap.cs
- SecurityElement.cs
- CodeIterationStatement.cs
- Comparer.cs
- OpacityConverter.cs
- Asn1IntegerConverter.cs
- OperationPickerDialog.cs
- IDispatchConstantAttribute.cs
- XslVisitor.cs
- SendingRequestEventArgs.cs
- _IPv4Address.cs
- TextComposition.cs
- Int16.cs
- InternalBufferOverflowException.cs
- ObjectRef.cs
- ConfigurationPropertyAttribute.cs
- ObjectView.cs
- PropertyGridView.cs
- MasterPageCodeDomTreeGenerator.cs
- MonthCalendarDesigner.cs
- ContextMenuStrip.cs
- ScriptDescriptor.cs
- DataTable.cs
- FormsAuthentication.cs
- ProxyFragment.cs
- EdmFunction.cs
- DataControlButton.cs
- BooleanKeyFrameCollection.cs
- TCPClient.cs
- InputGestureCollection.cs
- KnowledgeBase.cs
- AggregateNode.cs
- InputLanguageCollection.cs
- TypeDependencyAttribute.cs
- NodeInfo.cs
- PreviewPrintController.cs
- DurableMessageDispatchInspector.cs
- StandardToolWindows.cs
- StylusPlugInCollection.cs
- SID.cs
- DbProviderFactory.cs
- RtfControls.cs
- RowUpdatedEventArgs.cs
- QilLoop.cs
- CLRBindingWorker.cs
- TemplateInstanceAttribute.cs
- SortedList.cs
- CheckableControlBaseAdapter.cs
- AdapterUtil.cs
- EntityParameter.cs
- DataExpression.cs
- Dump.cs
- PrivilegedConfigurationManager.cs
- PathFigure.cs
- ProvideValueServiceProvider.cs
- BamlRecordWriter.cs
- FormsAuthenticationUserCollection.cs
- CompModSwitches.cs
- DrawingContext.cs
- ConnectionProviderAttribute.cs
- StickyNoteAnnotations.cs
- CodePageEncoding.cs
- InstallerTypeAttribute.cs
- QueryLifecycle.cs
- DataGridViewRowPrePaintEventArgs.cs
- DataAdapter.cs
- SqlFunctions.cs
- XmlSchemaCompilationSettings.cs
- ErrorTableItemStyle.cs
- IsolatedStorageException.cs
- Registry.cs
- basemetadatamappingvisitor.cs
- OdbcConnectionString.cs
- TreeWalkHelper.cs
- PipeConnection.cs
- NameTable.cs
- UxThemeWrapper.cs
- DrawingState.cs
- GrammarBuilderWildcard.cs
- HtmlShim.cs
- KerberosRequestorSecurityToken.cs
- HttpCacheVary.cs
- ConfigurationValues.cs
- XmlDigitalSignatureProcessor.cs
- List.cs
- DataGridSortCommandEventArgs.cs
- _CacheStreams.cs
- GeneralTransform3DTo2DTo3D.cs
- DetailsViewInsertEventArgs.cs
- RectAnimation.cs
- ValueUtilsSmi.cs
- webclient.cs
- PerformanceCounterManager.cs
- TextEditorParagraphs.cs
- FilterElement.cs
- FixedPage.cs