Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Core / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- HtmlInputSubmit.cs
- odbcmetadatafactory.cs
- EntityContainerEmitter.cs
- NativeActivityAbortContext.cs
- File.cs
- CompilationPass2TaskInternal.cs
- TargetControlTypeCache.cs
- Vector3DAnimationUsingKeyFrames.cs
- InkPresenterAutomationPeer.cs
- FamilyMapCollection.cs
- SelectorAutomationPeer.cs
- PeerApplication.cs
- QilName.cs
- UpdatePanelControlTrigger.cs
- serverconfig.cs
- SiteMapNodeCollection.cs
- AnimationTimeline.cs
- PropertyGeneratedEventArgs.cs
- AccessDataSourceView.cs
- BaseCollection.cs
- XmlNavigatorStack.cs
- DataGridLinkButton.cs
- SQLSingleStorage.cs
- ScrollPattern.cs
- WriteTimeStream.cs
- EdmFunctionAttribute.cs
- SetterBase.cs
- RNGCryptoServiceProvider.cs
- Control.cs
- AttributeQuery.cs
- Attributes.cs
- UriScheme.cs
- HtmlTextArea.cs
- DesignerSerializerAttribute.cs
- NetPipeSectionData.cs
- GraphicsContext.cs
- StatusBar.cs
- HandleScope.cs
- ControlParameter.cs
- SaveWorkflowCommand.cs
- DataGridViewLinkColumn.cs
- CultureInfo.cs
- ToolStripDropDownClosingEventArgs.cs
- KeyFrames.cs
- Keywords.cs
- MulticastOption.cs
- CorrelationQueryBehavior.cs
- NamespaceEmitter.cs
- ErrorWebPart.cs
- PermissionRequestEvidence.cs
- FieldNameLookup.cs
- PolygonHotSpot.cs
- WindowPatternIdentifiers.cs
- recordstate.cs
- ProtocolsConfigurationHandler.cs
- _RequestLifetimeSetter.cs
- TTSEngineTypes.cs
- VisualStyleTypesAndProperties.cs
- AssertFilter.cs
- OracleParameterCollection.cs
- ServiceContractGenerator.cs
- Helpers.cs
- TextTreeTextNode.cs
- StylusPoint.cs
- GlyphElement.cs
- SerializationAttributes.cs
- OdbcConnectionString.cs
- XPathParser.cs
- AuthorizationRule.cs
- LoopExpression.cs
- TextRenderer.cs
- PipelineModuleStepContainer.cs
- ListViewUpdateEventArgs.cs
- ExpressionDumper.cs
- TickBar.cs
- SchemaElement.cs
- UIElement.cs
- ReadContentAsBinaryHelper.cs
- ExpressionValueEditor.cs
- UiaCoreApi.cs
- EntityTypeEmitter.cs
- XmlTextReaderImplHelpers.cs
- BitmapPalette.cs
- HttpModuleAction.cs
- TextLineBreak.cs
- CryptoStream.cs
- HttpClientCertificate.cs
- odbcmetadatacolumnnames.cs
- AppSettingsReader.cs
- StoreContentChangedEventArgs.cs
- SessionParameter.cs
- ObjectComplexPropertyMapping.cs
- PackageDigitalSignatureManager.cs
- HitTestDrawingContextWalker.cs
- LineBreakRecord.cs
- SharedPerformanceCounter.cs
- SHA384Managed.cs
- Int64Storage.cs
- TransformerConfigurationWizardBase.cs
- PersistNameAttribute.cs