Code:
/ 4.0 / 4.0 / 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. //---------------------------------------------------------------------------- // // // 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
- ComboBoxDesigner.cs
- TraceContextEventArgs.cs
- GridViewUpdatedEventArgs.cs
- WriteableBitmap.cs
- TemplateNodeContextMenu.cs
- DataServiceHostWrapper.cs
- HtmlTableCell.cs
- SpeechAudioFormatInfo.cs
- FileLevelControlBuilderAttribute.cs
- CollectionMarkupSerializer.cs
- BufferedConnection.cs
- InternalCache.cs
- ListItem.cs
- AssemblyBuilder.cs
- SplineKeyFrames.cs
- ToolZoneDesigner.cs
- basemetadatamappingvisitor.cs
- StaticSiteMapProvider.cs
- SessionStateUtil.cs
- ParserStreamGeometryContext.cs
- IPPacketInformation.cs
- WasEndpointConfigContainer.cs
- Delegate.cs
- KeyInterop.cs
- Point.cs
- ExpressionList.cs
- EncodingNLS.cs
- Contracts.cs
- NamespaceCollection.cs
- DbConnectionStringCommon.cs
- StoreItemCollection.cs
- QueryableDataSourceView.cs
- MultipartContentParser.cs
- Listbox.cs
- UserControlAutomationPeer.cs
- KeyedCollection.cs
- WindowsImpersonationContext.cs
- RuntimeArgumentHandle.cs
- RandomDelaySendsAsyncResult.cs
- BinaryObjectReader.cs
- SmiSettersStream.cs
- ExpressionBuilder.cs
- WindowsSpinner.cs
- Enlistment.cs
- TemplateControlBuildProvider.cs
- BinaryConverter.cs
- ExpressionBindingCollection.cs
- RelatedImageListAttribute.cs
- ManagementEventArgs.cs
- VarRefManager.cs
- WebPartHelpVerb.cs
- ToolTipService.cs
- EnvironmentPermission.cs
- KeyGesture.cs
- CompiledXpathExpr.cs
- FixedPosition.cs
- StringToken.cs
- TextBoxBase.cs
- OdbcParameterCollection.cs
- CodeConstructor.cs
- DataGridViewColumnEventArgs.cs
- ProfileBuildProvider.cs
- MessageHeader.cs
- ParseHttpDate.cs
- QilReference.cs
- FlagsAttribute.cs
- CodeSnippetExpression.cs
- ConnectionInterfaceCollection.cs
- HttpCachePolicyBase.cs
- Rijndael.cs
- HandoffBehavior.cs
- SessionStateUtil.cs
- DbConnectionPoolGroupProviderInfo.cs
- UiaCoreApi.cs
- MSAANativeProvider.cs
- TypefaceCollection.cs
- FlowDocumentView.cs
- DynamicMetaObject.cs
- BamlRecords.cs
- ConfigurationConverterBase.cs
- SuppressMergeCheckAttribute.cs
- ListViewItem.cs
- FrameworkElement.cs
- CorrelationService.cs
- JoinElimination.cs
- RequestCache.cs
- DoubleAverageAggregationOperator.cs
- DataControlLinkButton.cs
- WindowsTreeView.cs
- RectKeyFrameCollection.cs
- SiteMapPath.cs
- EncoderParameter.cs
- ServicesExceptionNotHandledEventArgs.cs
- HandleExceptionArgs.cs
- Vertex.cs
- RootNamespaceAttribute.cs
- XmlSchemaComplexContentExtension.cs
- ReadOnlyCollectionBase.cs
- MatchingStyle.cs
- TextSelection.cs