Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Core / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TextParagraphProperties.cs
- ProxyHwnd.cs
- EndpointIdentityExtension.cs
- CorrelationManager.cs
- XmlSchemaSimpleContent.cs
- PropertyChangedEventArgs.cs
- UIElementParaClient.cs
- KnownTypesHelper.cs
- CallbackValidatorAttribute.cs
- HttpCookiesSection.cs
- ContentDisposition.cs
- HttpHandlerActionCollection.cs
- PolyBezierSegment.cs
- EntityDataSourceChangedEventArgs.cs
- SspiHelper.cs
- Classification.cs
- CustomAttributeFormatException.cs
- QuadTree.cs
- LeafCellTreeNode.cs
- AutomationElementCollection.cs
- WMIInterop.cs
- OleDbStruct.cs
- Tile.cs
- WmpBitmapEncoder.cs
- CodeAttributeDeclarationCollection.cs
- ErrorWebPart.cs
- DataReaderContainer.cs
- ComplusTypeValidator.cs
- EntityKey.cs
- ContainerUtilities.cs
- LayoutSettings.cs
- LayoutTable.cs
- Events.cs
- precedingsibling.cs
- ImageAnimator.cs
- EmptyReadOnlyDictionaryInternal.cs
- ImageKeyConverter.cs
- ResourceReader.cs
- BeginStoryboard.cs
- TcpSocketManager.cs
- DataMemberFieldConverter.cs
- LayoutEngine.cs
- Rect.cs
- CharConverter.cs
- updateconfighost.cs
- ValidationRule.cs
- AddInBase.cs
- NameValueConfigurationCollection.cs
- BaseCodeDomTreeGenerator.cs
- RangeValidator.cs
- DispatchWrapper.cs
- Package.cs
- GenerateTemporaryTargetAssembly.cs
- ClientSideQueueItem.cs
- TagNameToTypeMapper.cs
- MergeFailedEvent.cs
- TreePrinter.cs
- TextUtf8RawTextWriter.cs
- ExtensionQuery.cs
- PrimitiveCodeDomSerializer.cs
- GroupItemAutomationPeer.cs
- ClientRolePrincipal.cs
- CharacterMetricsDictionary.cs
- IndexedEnumerable.cs
- XPathQilFactory.cs
- XmlILModule.cs
- ScrollableControl.cs
- PopupControlService.cs
- ConfigXmlAttribute.cs
- IImplicitResourceProvider.cs
- UserNamePasswordValidator.cs
- _ConnectOverlappedAsyncResult.cs
- BevelBitmapEffect.cs
- OperatingSystem.cs
- ServiceProviders.cs
- LayoutEditorPart.cs
- RichTextBoxConstants.cs
- HotCommands.cs
- OpenTypeLayoutCache.cs
- SharedStatics.cs
- TableCell.cs
- Int64.cs
- XmlCharacterData.cs
- EventListenerClientSide.cs
- HtmlInputCheckBox.cs
- TextParagraphProperties.cs
- ToolStripDropDownClosingEventArgs.cs
- LinkButton.cs
- DesignTimeTemplateParser.cs
- initElementDictionary.cs
- CommonGetThemePartSize.cs
- DomainConstraint.cs
- WorkflowDesignerColors.cs
- CapabilitiesSection.cs
- EventHandlerList.cs
- StreamInfo.cs
- DataGridViewAdvancedBorderStyle.cs
- LoadedOrUnloadedOperation.cs
- MenuEventArgs.cs
- TypeInitializationException.cs