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
- HttpStaticObjectsCollectionWrapper.cs
- XsdValidatingReader.cs
- EventLogEntryCollection.cs
- Cloud.cs
- XPathNodeIterator.cs
- HtmlHead.cs
- ControlBuilderAttribute.cs
- DependencyPropertyAttribute.cs
- ButtonChrome.cs
- ObjectView.cs
- WCFServiceClientProxyGenerator.cs
- WebConfigurationManager.cs
- Atom10FormatterFactory.cs
- HandlerFactoryCache.cs
- OpacityConverter.cs
- RangeContentEnumerator.cs
- InlinedAggregationOperatorEnumerator.cs
- BasicBrowserDialog.designer.cs
- FrameworkContentElement.cs
- Win32KeyboardDevice.cs
- StrokeCollectionDefaultValueFactory.cs
- LogicalExpr.cs
- CollectionChangedEventManager.cs
- DataColumnMappingCollection.cs
- DetailsViewPageEventArgs.cs
- MDIClient.cs
- TrackBarRenderer.cs
- UInt32.cs
- PolyBezierSegment.cs
- UnsafeMethods.cs
- __ConsoleStream.cs
- AdjustableArrowCap.cs
- DataConnectionHelper.cs
- SystemWebSectionGroup.cs
- PeerToPeerException.cs
- Application.cs
- WindowsSolidBrush.cs
- _UncName.cs
- WebPartMenu.cs
- ConvertEvent.cs
- WebPartConnection.cs
- WinInetCache.cs
- CutCopyPasteHelper.cs
- CssClassPropertyAttribute.cs
- InfoCardRSAOAEPKeyExchangeDeformatter.cs
- StringExpressionSet.cs
- JobDuplex.cs
- DataGridViewTopRowAccessibleObject.cs
- ListViewUpdatedEventArgs.cs
- SqlTopReducer.cs
- KeyValuePair.cs
- MSAAWinEventWrap.cs
- GPStream.cs
- XsltContext.cs
- RuntimeIdentifierPropertyAttribute.cs
- AuthenticationConfig.cs
- SafeRightsManagementEnvironmentHandle.cs
- DispatcherObject.cs
- VersionPair.cs
- SchemaCollectionCompiler.cs
- WebConfigurationManager.cs
- DispatcherProcessingDisabled.cs
- SafeFileMappingHandle.cs
- UnsafeNativeMethods.cs
- SamlAuthorizationDecisionClaimResource.cs
- TemplateControl.cs
- PassportAuthenticationEventArgs.cs
- DefaultCommandConverter.cs
- TreeViewImageKeyConverter.cs
- DateTimeFormat.cs
- SqlConnectionPoolGroupProviderInfo.cs
- LocatorBase.cs
- ProvidePropertyAttribute.cs
- Grammar.cs
- WebEventCodes.cs
- DataGridViewCellPaintingEventArgs.cs
- TakeQueryOptionExpression.cs
- AuditLevel.cs
- TextSegment.cs
- FlowLayout.cs
- EntityClientCacheKey.cs
- CatalogPart.cs
- StandardCommands.cs
- InkCanvas.cs
- ContextMenuService.cs
- FragmentNavigationEventArgs.cs
- PeerObject.cs
- StructuralObject.cs
- AutomationPropertyInfo.cs
- FontFamilyValueSerializer.cs
- CatalogZoneBase.cs
- NameValuePermission.cs
- FontCollection.cs
- DataGridViewControlCollection.cs
- MarshalByRefObject.cs
- DirectionalLight.cs
- MeasureData.cs
- XPathParser.cs
- filewebrequest.cs
- XmlSchema.cs