Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- ContextBase.cs
- SchemaTypeEmitter.cs
- SmiTypedGetterSetter.cs
- TextElement.cs
- PathTooLongException.cs
- DragEvent.cs
- AdapterDictionary.cs
- CookielessHelper.cs
- CancellationHandler.cs
- TemplateBaseAction.cs
- DeflateInput.cs
- TextEffect.cs
- Part.cs
- CrossAppDomainChannel.cs
- Int32Collection.cs
- QueryOutputWriterV1.cs
- SoundPlayerAction.cs
- OwnerDrawPropertyBag.cs
- VectorCollection.cs
- AnalyzedTree.cs
- SerTrace.cs
- Label.cs
- GeometryConverter.cs
- Font.cs
- EdgeProfileValidation.cs
- DesignerHelpers.cs
- ChangeInterceptorAttribute.cs
- CriticalFinalizerObject.cs
- ContentPathSegment.cs
- Wildcard.cs
- DocumentGrid.cs
- SmiEventSink.cs
- NavigationPropertySingletonExpression.cs
- CachingHintValidation.cs
- FragmentNavigationEventArgs.cs
- XPathArrayIterator.cs
- BuildResult.cs
- TextSelectionHelper.cs
- EventSinkHelperWriter.cs
- DataGridViewCellStyleConverter.cs
- Lookup.cs
- ValidatingReaderNodeData.cs
- MsmqIntegrationAppDomainProtocolHandler.cs
- EpmContentDeSerializerBase.cs
- DataGridViewLinkColumn.cs
- PanelDesigner.cs
- CompilerError.cs
- WorkflowMarkupSerializationManager.cs
- BuildProviderCollection.cs
- DataGridViewButtonColumn.cs
- XPathScanner.cs
- PropertyConverter.cs
- MultiBinding.cs
- StateValidator.cs
- OracleTimeSpan.cs
- ListViewUpdatedEventArgs.cs
- HighlightVisual.cs
- TextTreeExtractElementUndoUnit.cs
- EntityContainerRelationshipSetEnd.cs
- TextChangedEventArgs.cs
- GridViewSelectEventArgs.cs
- SharedPerformanceCounter.cs
- WebRequestModuleElement.cs
- WebRequest.cs
- sqlinternaltransaction.cs
- SerialStream.cs
- Delegate.cs
- ConfigXmlElement.cs
- ChameleonKey.cs
- TableItemProviderWrapper.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- WebBrowserProgressChangedEventHandler.cs
- DataColumnMappingCollection.cs
- ConsoleCancelEventArgs.cs
- StringArrayConverter.cs
- SafeProcessHandle.cs
- MetafileHeaderWmf.cs
- BinHexEncoder.cs
- FixedSOMFixedBlock.cs
- DeviceContexts.cs
- DataTableExtensions.cs
- DummyDataSource.cs
- InputEventArgs.cs
- OrthographicCamera.cs
- ArrayElementGridEntry.cs
- DrawListViewColumnHeaderEventArgs.cs
- EntityContainerRelationshipSet.cs
- Utility.cs
- SystemNetworkInterface.cs
- IDQuery.cs
- SerializationEventsCache.cs
- Button.cs
- HyperlinkAutomationPeer.cs
- Rotation3DAnimation.cs
- DataServiceClientException.cs
- TextRangeAdaptor.cs
- LoginNameDesigner.cs
- BrowserTree.cs
- ContextDataSourceView.cs
- ExtendedTransformFactory.cs