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
- OracleConnectionFactory.cs
- EvidenceBase.cs
- DockAndAnchorLayout.cs
- PipelineModuleStepContainer.cs
- StringAnimationBase.cs
- ObservableDictionary.cs
- RandomNumberGenerator.cs
- SqlDependency.cs
- HttpHandler.cs
- Metafile.cs
- activationcontext.cs
- ObjectViewListener.cs
- EventQueueState.cs
- ToolStripComboBox.cs
- XmlSecureResolver.cs
- COM2ComponentEditor.cs
- ISAPIRuntime.cs
- FixedFindEngine.cs
- GroupQuery.cs
- ResourceExpression.cs
- SetIterators.cs
- ViewEvent.cs
- RelationshipEntry.cs
- SoapServerMethod.cs
- SplineKeyFrames.cs
- PrintDialog.cs
- DefaultHttpHandler.cs
- WindowsFormsHost.cs
- SqlFlattener.cs
- ToolStripContentPanel.cs
- DrawingDrawingContext.cs
- DynamicResourceExtensionConverter.cs
- unitconverter.cs
- Identifier.cs
- Padding.cs
- UserControlBuildProvider.cs
- DBConnection.cs
- ListBindingHelper.cs
- TypeBuilderInstantiation.cs
- NameTable.cs
- BatchServiceHost.cs
- SerialStream.cs
- BoolExpressionVisitors.cs
- DoubleAnimationUsingKeyFrames.cs
- SqlBulkCopyColumnMappingCollection.cs
- EventProviderWriter.cs
- GlyphsSerializer.cs
- MailDefinition.cs
- HebrewCalendar.cs
- ObjectDataSourceView.cs
- SourceLineInfo.cs
- CombinedGeometry.cs
- ExpressionsCollectionEditor.cs
- DocumentGridContextMenu.cs
- DataColumnChangeEvent.cs
- BmpBitmapEncoder.cs
- RemoteWebConfigurationHostStream.cs
- ListBoxChrome.cs
- SystemColors.cs
- KeyboardNavigation.cs
- UserControlParser.cs
- StoreContentChangedEventArgs.cs
- InvokeGenerator.cs
- BitVector32.cs
- XmlStringTable.cs
- Reference.cs
- JsonFormatWriterGenerator.cs
- DnsPermission.cs
- ActiveXHost.cs
- TemplateControl.cs
- NamedPipeConnectionPoolSettings.cs
- OutputCacheSettingsSection.cs
- QueryPageSettingsEventArgs.cs
- MergablePropertyAttribute.cs
- ZoneMembershipCondition.cs
- CookieParameter.cs
- MetadataAssemblyHelper.cs
- ReaderContextStackData.cs
- OdbcEnvironmentHandle.cs
- _IPv4Address.cs
- ImageClickEventArgs.cs
- DependencyObjectProvider.cs
- SQLSingle.cs
- ManagementInstaller.cs
- XmlFormatExtensionPrefixAttribute.cs
- DataBindingHandlerAttribute.cs
- OleDbParameter.cs
- BooleanAnimationBase.cs
- AnnotationComponentChooser.cs
- EmptyCollection.cs
- ResourceReferenceExpressionConverter.cs
- TrailingSpaceComparer.cs
- Registration.cs
- EventArgs.cs
- BackStopAuthenticationModule.cs
- CheckableControlBaseAdapter.cs
- XmlQueryRuntime.cs
- CommonXSendMessage.cs
- ProfileGroupSettings.cs
- CompressionTransform.cs