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
- TdsValueSetter.cs
- FactorySettingsElement.cs
- PropertyValue.cs
- DbProviderSpecificTypePropertyAttribute.cs
- Matrix.cs
- VariableAction.cs
- SelectionItemProviderWrapper.cs
- RuntimeHandles.cs
- CodeCastExpression.cs
- VisualStyleInformation.cs
- OleDbError.cs
- KnownTypesHelper.cs
- FieldValue.cs
- SessionEndingEventArgs.cs
- ImageClickEventArgs.cs
- HttpResponseHeader.cs
- QueryConverter.cs
- ListViewDeletedEventArgs.cs
- AuthenticationModuleElementCollection.cs
- BinaryUtilClasses.cs
- OleDbCommandBuilder.cs
- SocketException.cs
- ImageSource.cs
- GridPatternIdentifiers.cs
- GeneralTransform3D.cs
- OdbcHandle.cs
- XamlGridLengthSerializer.cs
- WindowCollection.cs
- VarRefManager.cs
- PropertyPathWorker.cs
- PerfCounters.cs
- SafeIUnknown.cs
- Queue.cs
- OneToOneMappingSerializer.cs
- FontSourceCollection.cs
- WebEventCodes.cs
- Int64AnimationBase.cs
- fixedPageContentExtractor.cs
- SelectionService.cs
- GenericPrincipal.cs
- FtpCachePolicyElement.cs
- LineSegment.cs
- Array.cs
- FrameworkContentElement.cs
- Stack.cs
- EventManager.cs
- serverconfig.cs
- UnauthorizedAccessException.cs
- GeneralTransform3DTo2DTo3D.cs
- DataSetViewSchema.cs
- DetailsViewUpdatedEventArgs.cs
- PolicyUnit.cs
- NetworkCredential.cs
- TextContainerHelper.cs
- PointHitTestParameters.cs
- SHA512Managed.cs
- FixedTextView.cs
- TransformValueSerializer.cs
- Models.cs
- cryptoapiTransform.cs
- ObservableDictionary.cs
- ContextItemManager.cs
- CacheRequest.cs
- NamespaceEmitter.cs
- PropertyManager.cs
- PageAsyncTask.cs
- HttpSocketManager.cs
- MobileContainerDesigner.cs
- RtfToXamlReader.cs
- TemplatePropertyEntry.cs
- DataException.cs
- HttpWrapper.cs
- XmlSchemaNotation.cs
- XmlAttributeCache.cs
- CodeSnippetTypeMember.cs
- TableLayoutSettingsTypeConverter.cs
- versioninfo.cs
- DeclaredTypeValidatorAttribute.cs
- XmlSortKey.cs
- Separator.cs
- SrgsOneOf.cs
- RuleRefElement.cs
- HtmlInputText.cs
- InfoCardRSAOAEPKeyExchangeDeformatter.cs
- TabItem.cs
- QilReference.cs
- XslTransform.cs
- OdbcParameterCollection.cs
- UICuesEvent.cs
- OdbcRowUpdatingEvent.cs
- ACE.cs
- DataGridViewRowHeaderCell.cs
- QualifiedCellIdBoolean.cs
- RectAnimation.cs
- XmlSchemaComplexContent.cs
- ConfigurationLocation.cs
- FileSystemWatcher.cs
- HttpFileCollection.cs
- ListViewDataItem.cs
- OdbcHandle.cs