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
- CipherData.cs
- HttpResponseHeader.cs
- EnumType.cs
- MarkerProperties.cs
- ExpressionBindingCollection.cs
- ListArgumentProvider.cs
- StringFreezingAttribute.cs
- DataPagerFieldCommandEventArgs.cs
- wgx_render.cs
- BuildProvider.cs
- WindowsImpersonationContext.cs
- ContractUtils.cs
- SiteMapNodeCollection.cs
- ToolboxDataAttribute.cs
- _DomainName.cs
- AssemblyAssociatedContentFileAttribute.cs
- CurrentChangedEventManager.cs
- ContextStaticAttribute.cs
- SynthesizerStateChangedEventArgs.cs
- HtmlTableRowCollection.cs
- TableProviderWrapper.cs
- _NestedMultipleAsyncResult.cs
- InstancePersistenceException.cs
- DbConnectionPoolOptions.cs
- ListViewInsertionMark.cs
- DiscoveryServerProtocol.cs
- CodeConditionStatement.cs
- CatchBlock.cs
- FixedSOMPageElement.cs
- ConversionContext.cs
- AppDomainAttributes.cs
- FileUpload.cs
- WebSysDefaultValueAttribute.cs
- ValidatingPropertiesEventArgs.cs
- NonBatchDirectoryCompiler.cs
- TransactionTraceIdentifier.cs
- InvariantComparer.cs
- SqlXml.cs
- ErrorTableItemStyle.cs
- Util.cs
- MimeTypeAttribute.cs
- BezierSegment.cs
- FontEmbeddingManager.cs
- WebControlAdapter.cs
- GridViewEditEventArgs.cs
- NativeWindow.cs
- DataControlCommands.cs
- DesignTimeTemplateParser.cs
- EntityTransaction.cs
- ByteFacetDescriptionElement.cs
- PropertyTabAttribute.cs
- SourceLineInfo.cs
- SoapIgnoreAttribute.cs
- HttpSysSettings.cs
- SoapAttributes.cs
- Table.cs
- MenuCommand.cs
- WindowsFormsDesignerOptionService.cs
- PixelFormatConverter.cs
- EUCJPEncoding.cs
- BuildResult.cs
- TextEditorMouse.cs
- CapabilitiesState.cs
- ImageDesigner.cs
- ComponentFactoryHelpers.cs
- EnterpriseServicesHelper.cs
- QueryAccessibilityHelpEvent.cs
- PointCollection.cs
- OracleTimeSpan.cs
- AdCreatedEventArgs.cs
- PieceNameHelper.cs
- VersionedStream.cs
- BinaryObjectInfo.cs
- ContentControl.cs
- Converter.cs
- _IPv4Address.cs
- PrinterResolution.cs
- assertwrapper.cs
- MetadataItem_Static.cs
- NumericPagerField.cs
- webclient.cs
- UrlPath.cs
- PrinterUnitConvert.cs
- MetadataItemEmitter.cs
- JavaScriptString.cs
- TransactionFlowElement.cs
- PolyLineSegment.cs
- FontFamilyIdentifier.cs
- TypefaceMap.cs
- DocumentViewerHelper.cs
- DocumentViewerAutomationPeer.cs
- ResponseStream.cs
- EmissiveMaterial.cs
- DataPagerFieldCollection.cs
- InfoCardTrace.cs
- SqlCacheDependency.cs
- ActivityScheduledRecord.cs
- SignedPkcs7.cs
- DataServices.cs
- ReceiveReply.cs