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
- MSHTMLHostUtil.cs
- SymbolEqualComparer.cs
- SqlFactory.cs
- DataGridToolTip.cs
- CompilationUnit.cs
- MenuItemStyleCollection.cs
- __FastResourceComparer.cs
- PenCursorManager.cs
- DbCommandTree.cs
- RowCache.cs
- StackBuilderSink.cs
- _TLSstream.cs
- ConfigXmlDocument.cs
- BitStream.cs
- TextRangeAdaptor.cs
- TransactionScope.cs
- Models.cs
- ReferenceConverter.cs
- unsafeIndexingFilterStream.cs
- WindowsFormsHostPropertyMap.cs
- ToolboxDataAttribute.cs
- BCryptHashAlgorithm.cs
- RequestBringIntoViewEventArgs.cs
- WindowManager.cs
- OpCopier.cs
- DesignerProperties.cs
- validation.cs
- InplaceBitmapMetadataWriter.cs
- ReverseQueryOperator.cs
- Link.cs
- TraceHandler.cs
- ShaderRenderModeValidation.cs
- DbInsertCommandTree.cs
- RegexMatchCollection.cs
- ToolBarButtonClickEvent.cs
- PingOptions.cs
- TextModifier.cs
- HtmlInputText.cs
- StoreAnnotationsMap.cs
- InputLangChangeEvent.cs
- Point3DAnimationBase.cs
- WebPartHelpVerb.cs
- MinimizableAttributeTypeConverter.cs
- RunClient.cs
- PageThemeParser.cs
- LinqDataSourceDeleteEventArgs.cs
- UpdatePanelTrigger.cs
- XmlIlVisitor.cs
- PanelStyle.cs
- RemoteWebConfigurationHostServer.cs
- ConstantSlot.cs
- ListenerBinder.cs
- JavaScriptString.cs
- MasterPageBuildProvider.cs
- ItemsChangedEventArgs.cs
- CultureTableRecord.cs
- ThemeDictionaryExtension.cs
- InvokeProviderWrapper.cs
- LambdaValue.cs
- Visitors.cs
- ExpandableObjectConverter.cs
- CollectionType.cs
- DBConnection.cs
- PartManifestEntry.cs
- SkipStoryboardToFill.cs
- EmptyReadOnlyDictionaryInternal.cs
- DateTimeFormatInfo.cs
- Constraint.cs
- FlowLayoutSettings.cs
- RuntimeVariablesExpression.cs
- WsdlInspector.cs
- InfiniteIntConverter.cs
- CodeNamespace.cs
- CompilerScopeManager.cs
- NonNullItemCollection.cs
- TemplateManager.cs
- LinqDataSourceUpdateEventArgs.cs
- TableColumnCollection.cs
- _NegoStream.cs
- GridViewEditEventArgs.cs
- WebPermission.cs
- EventBindingService.cs
- PersonalizationAdministration.cs
- HtmlInputHidden.cs
- SynchronizationValidator.cs
- _IPv6Address.cs
- ScaleTransform3D.cs
- SecurityResources.cs
- DockPanel.cs
- TreeIterator.cs
- CodeBlockBuilder.cs
- LocalClientSecuritySettings.cs
- MetafileHeaderWmf.cs
- AnimationException.cs
- LocalTransaction.cs
- XamlGridLengthSerializer.cs
- TableLayoutSettingsTypeConverter.cs
- FunctionNode.cs
- SubclassTypeValidatorAttribute.cs
- PackageProperties.cs