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
- ServiceDescription.cs
- CallbackWrapper.cs
- InputScopeConverter.cs
- MenuItem.cs
- XpsDigitalSignature.cs
- AuthenticationService.cs
- Int64Converter.cs
- QfeChecker.cs
- DataGridViewCellStyleContentChangedEventArgs.cs
- AssemblyBuilderData.cs
- ViewLoader.cs
- BinHexDecoder.cs
- DictionaryChange.cs
- CodeArgumentReferenceExpression.cs
- PathData.cs
- HotSpot.cs
- LongTypeConverter.cs
- ControlCachePolicy.cs
- WindowsScrollBar.cs
- TagPrefixAttribute.cs
- PassportAuthentication.cs
- BitmapEffectGroup.cs
- FrameworkObject.cs
- DataColumn.cs
- XmlValidatingReader.cs
- Vector3DCollectionConverter.cs
- BatchServiceHost.cs
- ObjectCloneHelper.cs
- ScriptComponentDescriptor.cs
- FacetEnabledSchemaElement.cs
- StackOverflowException.cs
- SessionParameter.cs
- TransactionManager.cs
- StreamWriter.cs
- Signature.cs
- TextBounds.cs
- TransactionState.cs
- printdlgexmarshaler.cs
- HitTestResult.cs
- XPathBinder.cs
- DSASignatureDeformatter.cs
- ConfigurationManagerHelperFactory.cs
- SpeakProgressEventArgs.cs
- CompressionTransform.cs
- Button.cs
- TextReader.cs
- AggregateNode.cs
- ThemeableAttribute.cs
- LiteralDesigner.cs
- SecureEnvironment.cs
- MethodToken.cs
- FullTextLine.cs
- WebEvents.cs
- DetailsViewPagerRow.cs
- CodeNamespaceCollection.cs
- Interlocked.cs
- SevenBitStream.cs
- HandlerMappingMemo.cs
- OneWayElement.cs
- Membership.cs
- EmptyQuery.cs
- MissingFieldException.cs
- DataViewManager.cs
- ComponentEditorPage.cs
- ActivityWithResultWrapper.cs
- UmAlQuraCalendar.cs
- Normalization.cs
- TreeView.cs
- InstallerTypeAttribute.cs
- StoragePropertyMapping.cs
- ReadOnlyDictionary.cs
- FieldAccessException.cs
- WorkflowServiceHost.cs
- XPathExpr.cs
- MasterPageBuildProvider.cs
- Renderer.cs
- XmlEncodedRawTextWriter.cs
- SqlInternalConnectionSmi.cs
- MiniMapControl.xaml.cs
- IItemContainerGenerator.cs
- DataRelationCollection.cs
- ContentPlaceHolderDesigner.cs
- FormsAuthenticationModule.cs
- TreeBuilderXamlTranslator.cs
- DataBoundControl.cs
- NativeMethodsCLR.cs
- Models.cs
- SingleAnimationUsingKeyFrames.cs
- Debug.cs
- SpeechRecognizer.cs
- PtsHelper.cs
- TextPointerBase.cs
- SiteOfOriginContainer.cs
- RemoteWebConfigurationHostStream.cs
- NamespaceTable.cs
- GenericsInstances.cs
- StateBag.cs
- DateTimeConverter.cs
- XmlCodeExporter.cs
- UriSectionData.cs