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
- DeviceContexts.cs
- CrossAppDomainChannel.cs
- InputChannelBinder.cs
- ActivityWithResultWrapper.cs
- CheckBoxStandardAdapter.cs
- DropShadowBitmapEffect.cs
- Ref.cs
- FixedLineResult.cs
- Win32Interop.cs
- CursorInteropHelper.cs
- _NTAuthentication.cs
- StateBag.cs
- WebPartZone.cs
- _MultipleConnectAsync.cs
- RotateTransform.cs
- RepeatBehavior.cs
- OrthographicCamera.cs
- ToolboxDataAttribute.cs
- DbgCompiler.cs
- FormViewRow.cs
- CssClassPropertyAttribute.cs
- TargetConverter.cs
- MethodCallTranslator.cs
- MILUtilities.cs
- DateTimePickerDesigner.cs
- ComplexBindingPropertiesAttribute.cs
- RequestCachingSection.cs
- ScaleTransform3D.cs
- PolyQuadraticBezierSegment.cs
- TextCompositionEventArgs.cs
- EventToken.cs
- SynchronizationHandlesCodeDomSerializer.cs
- dataSvcMapFileLoader.cs
- EventlogProvider.cs
- WaitHandle.cs
- CodeSnippetExpression.cs
- ProcessThread.cs
- StylusPointPropertyId.cs
- ColorDialog.cs
- NetworkInterface.cs
- WebScriptEndpointElement.cs
- RuleSettings.cs
- WebServiceEnumData.cs
- SqlLiftIndependentRowExpressions.cs
- WSSecurityPolicy12.cs
- ResXResourceWriter.cs
- MetadataElement.cs
- SingleResultAttribute.cs
- OdbcConnectionString.cs
- HijriCalendar.cs
- WebControlToolBoxItem.cs
- MULTI_QI.cs
- RewritingValidator.cs
- NullableDecimalSumAggregationOperator.cs
- StyleCollection.cs
- Attribute.cs
- XmlResolver.cs
- Viewport3DAutomationPeer.cs
- AutoSizeToolBoxItem.cs
- CreateUserWizard.cs
- ScopeElement.cs
- DataGridViewAutoSizeModeEventArgs.cs
- VectorAnimationUsingKeyFrames.cs
- SerializationInfoEnumerator.cs
- LineGeometry.cs
- LocatorManager.cs
- XmlSchemaSimpleType.cs
- SpeechAudioFormatInfo.cs
- precedingsibling.cs
- StaticTextPointer.cs
- ChannelSinkStacks.cs
- FontFamilyIdentifier.cs
- SynchronizedRandom.cs
- DateTimeValueSerializerContext.cs
- AnnotationComponentChooser.cs
- CollectionViewGroupRoot.cs
- Root.cs
- FillBehavior.cs
- ViewCellRelation.cs
- TableRowGroup.cs
- EmptyReadOnlyDictionaryInternal.cs
- MultipartContentParser.cs
- ActiveDocumentEvent.cs
- EntityClientCacheEntry.cs
- SafePEFileHandle.cs
- SerializationStore.cs
- DataMemberFieldEditor.cs
- RegistrationServices.cs
- WebBrowser.cs
- HostedHttpContext.cs
- Crc32.cs
- Transform3D.cs
- QuotedPairReader.cs
- DataObjectMethodAttribute.cs
- DurableInstanceManager.cs
- EventLogPermissionHolder.cs
- EventLogPermissionEntry.cs
- QueryExpression.cs
- Type.cs
- VirtualizingPanel.cs