Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Media3D / Matrix3DStack.cs / 1305600 / 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); } //------------------------------------------------------ // // 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
- LabelAutomationPeer.cs
- CacheRequest.cs
- CachedTypeface.cs
- PlacementWorkspace.cs
- ImageAnimator.cs
- TemplatedAdorner.cs
- StaticContext.cs
- SqlDependencyUtils.cs
- SystemIdentity.cs
- ExtensionQuery.cs
- ExternalDataExchangeService.cs
- DataBindingCollectionConverter.cs
- ColorPalette.cs
- HttpRequestCacheValidator.cs
- MdbDataFileEditor.cs
- ListViewCommandEventArgs.cs
- ModifierKeysValueSerializer.cs
- Literal.cs
- ExpanderAutomationPeer.cs
- ZoneIdentityPermission.cs
- Slider.cs
- ValidationError.cs
- XmlIlGenerator.cs
- ClientRuntime.cs
- CallbackTimeoutsBehavior.cs
- Brush.cs
- TypedTableBase.cs
- GenerateTemporaryTargetAssembly.cs
- ScrollData.cs
- SecUtil.cs
- AdRotator.cs
- EditorPart.cs
- SchemaSetCompiler.cs
- ControlEvent.cs
- TypeDelegator.cs
- SHA256.cs
- MultipartContentParser.cs
- BaseDataListDesigner.cs
- XXXOnTypeBuilderInstantiation.cs
- ExpressionCopier.cs
- ClientTarget.cs
- ListControl.cs
- CompareInfo.cs
- DebugInfoExpression.cs
- NotSupportedException.cs
- EntityDataSourceWrapper.cs
- HtmlAnchor.cs
- IChannel.cs
- DocumentApplicationJournalEntry.cs
- BufferedMessageWriter.cs
- DocumentStatusResources.cs
- SqlTypesSchemaImporter.cs
- documentation.cs
- SafeRegistryHandle.cs
- DragDrop.cs
- SchemaImporterExtensionElementCollection.cs
- URL.cs
- ExpressionPrefixAttribute.cs
- FunctionUpdateCommand.cs
- DataGridViewElement.cs
- Misc.cs
- QilCloneVisitor.cs
- TypefaceCollection.cs
- AppSecurityManager.cs
- ResourceDisplayNameAttribute.cs
- ClientRolePrincipal.cs
- DataServiceEntityAttribute.cs
- CompiledQuery.cs
- PLINQETWProvider.cs
- AccessedThroughPropertyAttribute.cs
- AttachedPropertyBrowsableAttribute.cs
- BaseTemplateParser.cs
- Rect3D.cs
- OverlappedAsyncResult.cs
- IISUnsafeMethods.cs
- CodeDirectoryCompiler.cs
- BaseParaClient.cs
- FragmentQueryProcessor.cs
- WindowsComboBox.cs
- XmlSchemaExporter.cs
- WindowsListViewGroupSubsetLink.cs
- ReversePositionQuery.cs
- QilInvokeLateBound.cs
- DoubleAnimation.cs
- ScriptResourceDefinition.cs
- WeakRefEnumerator.cs
- Zone.cs
- safePerfProviderHandle.cs
- TextServicesContext.cs
- KeySplineConverter.cs
- ResourceCategoryAttribute.cs
- ToolStripAdornerWindowService.cs
- ObjectTag.cs
- SoapTypeAttribute.cs
- CDSsyncETWBCLProvider.cs
- InfoCardArgumentException.cs
- CodeRegionDirective.cs
- FunctionMappingTranslator.cs
- ParamArrayAttribute.cs
- ToolBar.cs