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
- RegexRunner.cs
- SoapMessage.cs
- FormViewInsertEventArgs.cs
- RubberbandSelector.cs
- HealthMonitoringSection.cs
- Convert.cs
- GeneralTransform3D.cs
- StrokeNodeData.cs
- ReadingWritingEntityEventArgs.cs
- CodeMemberProperty.cs
- WindowsEditBoxRange.cs
- QuaternionKeyFrameCollection.cs
- NonPrimarySelectionGlyph.cs
- AuthenticationService.cs
- cookieexception.cs
- XmlSchemaAnnotated.cs
- WebPartZoneBase.cs
- TailCallAnalyzer.cs
- PrintingPermissionAttribute.cs
- BlurBitmapEffect.cs
- StrongNameIdentityPermission.cs
- SecurityManager.cs
- AppAction.cs
- XmlTypeMapping.cs
- TextInfo.cs
- SimpleBitVector32.cs
- UnmanagedBitmapWrapper.cs
- PermissionAttributes.cs
- GZipDecoder.cs
- FilterException.cs
- ExpressionConverter.cs
- TraceLevelStore.cs
- StylusPointCollection.cs
- ResourceSet.cs
- SystemDiagnosticsSection.cs
- RubberbandSelector.cs
- DirectionalLight.cs
- FormViewPageEventArgs.cs
- HuffCodec.cs
- NamedPipeConnectionPool.cs
- OpenFileDialog.cs
- TextMarkerSource.cs
- Brush.cs
- EntityClientCacheEntry.cs
- XmlNamespaceDeclarationsAttribute.cs
- LayoutTableCell.cs
- TableCellAutomationPeer.cs
- Number.cs
- MobileTemplatedControlDesigner.cs
- ReadOnlyMetadataCollection.cs
- LinqDataSourceUpdateEventArgs.cs
- VisualStyleInformation.cs
- Contracts.cs
- IOThreadTimer.cs
- AllMembershipCondition.cs
- UTF8Encoding.cs
- SqlDependency.cs
- MachineKeyConverter.cs
- SplineKeyFrames.cs
- FontInfo.cs
- PlacementWorkspace.cs
- FileSystemInfo.cs
- TextElementCollection.cs
- TcpConnectionPool.cs
- Propagator.JoinPropagator.cs
- ValidationErrorEventArgs.cs
- SpecularMaterial.cs
- BevelBitmapEffect.cs
- XmlEncodedRawTextWriter.cs
- AlternationConverter.cs
- dataprotectionpermissionattribute.cs
- TableLayoutPanelDesigner.cs
- BuildResultCache.cs
- WindowsFormsHostAutomationPeer.cs
- DefaultBinder.cs
- KeyInterop.cs
- DataBoundControlAdapter.cs
- SHA256Managed.cs
- UserControl.cs
- XsdCachingReader.cs
- EnumerableValidator.cs
- URLMembershipCondition.cs
- DbDataReader.cs
- FloaterParagraph.cs
- GridViewRowCollection.cs
- ReaderWriterLock.cs
- PointAnimationUsingPath.cs
- XmlDomTextWriter.cs
- RemoteWebConfigurationHostServer.cs
- RemotingException.cs
- FocusManager.cs
- XmlFormatExtensionPrefixAttribute.cs
- SqlProcedureAttribute.cs
- MediaScriptCommandRoutedEventArgs.cs
- Transform3D.cs
- MeasurementDCInfo.cs
- FullTextBreakpoint.cs
- HwndProxyElementProvider.cs
- DbMetaDataFactory.cs
- BaseCodeDomTreeGenerator.cs