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
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- GlyphingCache.cs
- ScrollContentPresenter.cs
- Funcletizer.cs
- BasePropertyDescriptor.cs
- XsltInput.cs
- TextChange.cs
- SequentialUshortCollection.cs
- SizeValueSerializer.cs
- CommandDevice.cs
- DateBoldEvent.cs
- DesignSurfaceEvent.cs
- XsdBuilder.cs
- CustomAttributeBuilder.cs
- autovalidator.cs
- DeploymentSection.cs
- WizardSideBarListControlItemEventArgs.cs
- TableParagraph.cs
- PhysicalOps.cs
- StorageMappingItemCollection.cs
- Point3DCollection.cs
- TreeNodeBinding.cs
- CodeBlockBuilder.cs
- Message.cs
- HTTPNotFoundHandler.cs
- XmlJsonReader.cs
- NestPullup.cs
- RelAssertionDirectKeyIdentifierClause.cs
- UserPersonalizationStateInfo.cs
- BooleanSwitch.cs
- FileDialog.cs
- DataMemberConverter.cs
- InputScopeConverter.cs
- IdentifierCollection.cs
- FormViewUpdatedEventArgs.cs
- ByteAnimation.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- IsolatedStoragePermission.cs
- OleDbPermission.cs
- TypeConverterHelper.cs
- StackOverflowException.cs
- HtmlInputRadioButton.cs
- CharAnimationBase.cs
- RenderTargetBitmap.cs
- RawStylusInput.cs
- MarkupExtensionParser.cs
- XmlSchemaAnnotation.cs
- StyleXamlTreeBuilder.cs
- Subtree.cs
- ConnectivityStatus.cs
- EntityDataSourceReferenceGroup.cs
- TypeConstant.cs
- WebAdminConfigurationHelper.cs
- RuntimeHandles.cs
- Composition.cs
- StoreItemCollection.Loader.cs
- VectorCollectionConverter.cs
- CodePropertyReferenceExpression.cs
- CalendarDesigner.cs
- IndexingContentUnit.cs
- EventListenerClientSide.cs
- XmlStringTable.cs
- UserNameSecurityToken.cs
- DataGridCommandEventArgs.cs
- ItemsControlAutomationPeer.cs
- StatusBarPanelClickEvent.cs
- cryptoapiTransform.cs
- GeometryGroup.cs
- ImageSource.cs
- CorrelationManager.cs
- InvalidChannelBindingException.cs
- LinqDataSourceContextData.cs
- DbConnectionHelper.cs
- SubstitutionList.cs
- SEHException.cs
- TargetParameterCountException.cs
- ClientRuntimeConfig.cs
- VersionConverter.cs
- WebReferencesBuildProvider.cs
- TreeViewImageIndexConverter.cs
- XmlNamedNodeMap.cs
- DbMetaDataCollectionNames.cs
- ResourcesChangeInfo.cs
- UnsafeNativeMethods.cs
- ScrollBar.cs
- DataGridViewRowCancelEventArgs.cs
- DbModificationClause.cs
- MergeFailedEvent.cs
- ReadWriteSpinLock.cs
- InterleavedZipPartStream.cs
- TableAutomationPeer.cs
- StylusEditingBehavior.cs
- XmlBoundElement.cs
- WaitForChangedResult.cs
- BindableTemplateBuilder.cs
- WindowsPen.cs
- DbMetaDataCollectionNames.cs
- StylusButtonEventArgs.cs
- HtmlInputButton.cs
- TimeSpanOrInfiniteValidator.cs
- ToolStripItemCollection.cs