Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- ReferentialConstraint.cs
- GraphicsPathIterator.cs
- HashRepartitionStream.cs
- SubclassTypeValidator.cs
- XmlAggregates.cs
- BindingElementExtensionElement.cs
- PathGeometry.cs
- NavigatingCancelEventArgs.cs
- StatusBarAutomationPeer.cs
- RadioButtonRenderer.cs
- TraceSection.cs
- PersonalizationDictionary.cs
- UnrecognizedAssertionsBindingElement.cs
- PageRanges.cs
- MimeFormReflector.cs
- TextElementCollection.cs
- SingleStorage.cs
- ItemCollection.cs
- TrackBar.cs
- ConnectionManagementElementCollection.cs
- CreateRefExpr.cs
- Rect3DConverter.cs
- UnauthorizedWebPart.cs
- XmlToDatasetMap.cs
- EmbossBitmapEffect.cs
- FaultPropagationRecord.cs
- embossbitmapeffect.cs
- HtmlTableRowCollection.cs
- SecurityCriticalDataForSet.cs
- FastPropertyAccessor.cs
- WorkflowApplicationTerminatedException.cs
- Misc.cs
- CachedFontFamily.cs
- SafeThemeHandle.cs
- AuditLog.cs
- TextParagraph.cs
- GeometryModel3D.cs
- TypeBuilderInstantiation.cs
- ObjectStorage.cs
- Collection.cs
- CharacterString.cs
- RadioButtonBaseAdapter.cs
- OleDbConnection.cs
- DBSqlParserTableCollection.cs
- WindowsRebar.cs
- CompModSwitches.cs
- CheckBoxBaseAdapter.cs
- DataTableReaderListener.cs
- FixedSOMLineCollection.cs
- EnumerableWrapperWeakToStrong.cs
- TextRunTypographyProperties.cs
- RangeEnumerable.cs
- ChannelPool.cs
- DLinqDataModelProvider.cs
- IMembershipProvider.cs
- DataGridViewRowConverter.cs
- Ray3DHitTestResult.cs
- PeerCollaborationPermission.cs
- RowUpdatingEventArgs.cs
- FontInfo.cs
- FloaterBaseParaClient.cs
- VersionConverter.cs
- Regex.cs
- CapabilitiesRule.cs
- CheckBoxAutomationPeer.cs
- CrossAppDomainChannel.cs
- ProviderMetadataCachedInformation.cs
- SiteMapProvider.cs
- TextDocumentView.cs
- SafeHandles.cs
- DelayedRegex.cs
- BaseTemplateCodeDomTreeGenerator.cs
- TemplateFactory.cs
- ViewPort3D.cs
- ServiceDescription.cs
- DebugViewWriter.cs
- DateTimeOffsetStorage.cs
- GPStream.cs
- QilGeneratorEnv.cs
- TextSearch.cs
- LoadedEvent.cs
- LookupBindingPropertiesAttribute.cs
- ScriptIgnoreAttribute.cs
- BlockingCollection.cs
- DataGridViewRow.cs
- WindowsFormsSynchronizationContext.cs
- StringSorter.cs
- MenuCommand.cs
- Mutex.cs
- SendingRequestEventArgs.cs
- TypeContext.cs
- MinMaxParagraphWidth.cs
- GeometryModel3D.cs
- UnmanagedMarshal.cs
- UTF8Encoding.cs
- PropertyConverter.cs
- WindowInteractionStateTracker.cs
- UserControlCodeDomTreeGenerator.cs
- FloaterParagraph.cs
- FormsAuthenticationCredentials.cs