Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Core / CSharp / 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. // // // 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- InputDevice.cs
- SiblingIterators.cs
- CertificateManager.cs
- mediaeventargs.cs
- TextRangeEditTables.cs
- OptionalColumn.cs
- FormsAuthenticationCredentials.cs
- SystemIcmpV4Statistics.cs
- RuntimeEnvironment.cs
- linebase.cs
- NamespaceInfo.cs
- MimeReflector.cs
- EntityProxyTypeInfo.cs
- CalendarBlackoutDatesCollection.cs
- HttpProcessUtility.cs
- XPathScanner.cs
- ValueProviderWrapper.cs
- XmlSchemaObjectCollection.cs
- HwndPanningFeedback.cs
- Int32Rect.cs
- NamespaceCollection.cs
- ExpressionParser.cs
- TabItem.cs
- PaintEvent.cs
- CodeIndexerExpression.cs
- SmiMetaDataProperty.cs
- NamedObject.cs
- XpsInterleavingPolicy.cs
- TranslateTransform.cs
- MenuItem.cs
- Statements.cs
- PieceDirectory.cs
- ChangeBlockUndoRecord.cs
- PieceNameHelper.cs
- MultiView.cs
- RequestUriProcessor.cs
- ProtocolsSection.cs
- SecureStringHasher.cs
- Converter.cs
- columnmapfactory.cs
- DataControlImageButton.cs
- TreeViewImageGenerator.cs
- SortExpressionBuilder.cs
- NavigationPropertySingletonExpression.cs
- ISCIIEncoding.cs
- IntegerValidatorAttribute.cs
- NegotiateStream.cs
- SchemaCollectionPreprocessor.cs
- PerspectiveCamera.cs
- HttpCookieCollection.cs
- DataGridViewCellFormattingEventArgs.cs
- OrCondition.cs
- MenuItemBindingCollection.cs
- KeyValueConfigurationElement.cs
- HttpCapabilitiesSectionHandler.cs
- DynamicEndpointElement.cs
- OptimizedTemplateContent.cs
- DockAndAnchorLayout.cs
- BamlLocalizableResourceKey.cs
- SqlFacetAttribute.cs
- ArgumentException.cs
- Vector.cs
- ControlCommandSet.cs
- ObjectDataSourceSelectingEventArgs.cs
- SoapIncludeAttribute.cs
- StylusPointPropertyInfoDefaults.cs
- ValidationSummary.cs
- SharedUtils.cs
- DefaultTextStore.cs
- WinInetCache.cs
- ModelTreeEnumerator.cs
- ValidationRule.cs
- FileDialog_Vista_Interop.cs
- SystemUdpStatistics.cs
- DispatchWrapper.cs
- XmlDeclaration.cs
- XmlQueryTypeFactory.cs
- XmlSchemaSubstitutionGroup.cs
- dbdatarecord.cs
- HtmlFormParameterReader.cs
- SettingsPropertyWrongTypeException.cs
- ProfileSection.cs
- SqlNotificationRequest.cs
- GC.cs
- MediaEntryAttribute.cs
- DynamicDiscoSearcher.cs
- ExtendedProperty.cs
- AssertFilter.cs
- ConfigXmlDocument.cs
- WebPartTransformer.cs
- X509ClientCertificateCredentialsElement.cs
- validationstate.cs
- DependencyObjectCodeDomSerializer.cs
- JsonCollectionDataContract.cs
- MetadataCache.cs
- DocumentViewerAutomationPeer.cs
- Set.cs
- PaperSize.cs
- FormsAuthenticationUser.cs
- UnsafeNativeMethods.cs