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
- ManageRequest.cs
- DeferredBinaryDeserializerExtension.cs
- ArrayList.cs
- SvcFileManager.cs
- ScalarRestriction.cs
- PkcsUtils.cs
- HttpCookiesSection.cs
- PreviewPrintController.cs
- Int64.cs
- ClientUtils.cs
- dataprotectionpermissionattribute.cs
- DocumentPaginator.cs
- BaseCollection.cs
- RealizedColumnsBlock.cs
- ProfileEventArgs.cs
- Visual3D.cs
- dsa.cs
- wmiutil.cs
- StrokeNodeEnumerator.cs
- RadioButton.cs
- XPathNavigatorReader.cs
- Dynamic.cs
- Page.cs
- VerificationException.cs
- Int32CollectionValueSerializer.cs
- HwndPanningFeedback.cs
- DataPagerFieldCommandEventArgs.cs
- HttpListenerRequestTraceRecord.cs
- COAUTHINFO.cs
- OperatingSystem.cs
- UnknownBitmapDecoder.cs
- SimpleType.cs
- CryptoKeySecurity.cs
- WindowsTooltip.cs
- PenContext.cs
- TemplateBindingExpression.cs
- TableCellCollection.cs
- ChtmlLinkAdapter.cs
- CompositeCollectionView.cs
- DeleteIndexBinder.cs
- BuildProvider.cs
- CodeEntryPointMethod.cs
- AvTraceDetails.cs
- ResourceIDHelper.cs
- SelectorAutomationPeer.cs
- KnownTypesHelper.cs
- XmlElementAttributes.cs
- UIAgentMonitorHandle.cs
- SolidColorBrush.cs
- InOutArgument.cs
- OleDbDataAdapter.cs
- BindingRestrictions.cs
- InternalTransaction.cs
- CalendarItem.cs
- HashMembershipCondition.cs
- RayHitTestParameters.cs
- LassoSelectionBehavior.cs
- InternalTypeHelper.cs
- WorkflowOwnershipException.cs
- DbConvert.cs
- ValidationHelper.cs
- XmlWhitespace.cs
- ProcessThread.cs
- TextTreeTextNode.cs
- mediaclock.cs
- EmissiveMaterial.cs
- BamlRecordWriter.cs
- FrameSecurityDescriptor.cs
- SerialReceived.cs
- MinimizableAttributeTypeConverter.cs
- Types.cs
- XmlQuerySequence.cs
- DependencyProperty.cs
- DataSetMappper.cs
- RegexCode.cs
- AppendHelper.cs
- ManagedIStream.cs
- DrawingContextWalker.cs
- GAC.cs
- SignedXml.cs
- FilterEventArgs.cs
- XmlSecureResolver.cs
- HeaderedItemsControl.cs
- EventItfInfo.cs
- ConfigPathUtility.cs
- EdmFunctionAttribute.cs
- XmlnsCompatibleWithAttribute.cs
- BehaviorEditorPart.cs
- StorageMappingFragment.cs
- PropertyOverridesDialog.cs
- StylusPlugInCollection.cs
- FactorySettingsElement.cs
- OAVariantLib.cs
- NavigationProgressEventArgs.cs
- UrlPropertyAttribute.cs
- MetadataConversionError.cs
- ProgressBar.cs
- DataView.cs
- WebPartVerb.cs
- ObjectQuery.cs