Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Media3D / Matrix3DStack.cs / 1305600 / 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); } //------------------------------------------------------ // // 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); } //------------------------------------------------------ // // 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
- WebConvert.cs
- TextDecorationCollection.cs
- InternalConfigSettingsFactory.cs
- ConfigurationSchemaErrors.cs
- HttpWebResponse.cs
- RuleSettingsCollection.cs
- EncoderReplacementFallback.cs
- MimeMultiPart.cs
- InputLanguageSource.cs
- HttpEncoderUtility.cs
- ProvidePropertyAttribute.cs
- PolicyLevel.cs
- BulletedList.cs
- HttpModuleActionCollection.cs
- PreparingEnlistment.cs
- RightsManagementInformation.cs
- X509Certificate2Collection.cs
- SynchronousReceiveBehavior.cs
- Base64Stream.cs
- Translator.cs
- HistoryEventArgs.cs
- CertificateReferenceElement.cs
- ObjectViewListener.cs
- SecurityTokenParametersEnumerable.cs
- DataGridToolTip.cs
- StrokeNodeOperations2.cs
- TemplateField.cs
- ToolboxDataAttribute.cs
- UnsafeNativeMethods.cs
- SignatureHelper.cs
- SqlNodeTypeOperators.cs
- PrintingPermission.cs
- CuspData.cs
- EntityPropertyMappingAttribute.cs
- XmlStringTable.cs
- DateTimeFormat.cs
- TokenBasedSet.cs
- mongolianshape.cs
- StringKeyFrameCollection.cs
- QualificationDataAttribute.cs
- PermissionSetEnumerator.cs
- PropertyEntry.cs
- IPPacketInformation.cs
- WorkflowApplicationCompletedEventArgs.cs
- ProfileGroupSettingsCollection.cs
- TabControlDesigner.cs
- FontCacheLogic.cs
- TaskFormBase.cs
- ContainerUtilities.cs
- QilUnary.cs
- XPathNodePointer.cs
- AutoResetEvent.cs
- WrappedReader.cs
- CompiledQueryCacheEntry.cs
- LiteralSubsegment.cs
- DataException.cs
- NodeLabelEditEvent.cs
- FrameworkContentElement.cs
- GlyphsSerializer.cs
- versioninfo.cs
- BatchParser.cs
- QueryPageSettingsEventArgs.cs
- BaseParagraph.cs
- DbConnectionPoolCounters.cs
- DataPagerCommandEventArgs.cs
- SpeechDetectedEventArgs.cs
- PanelContainerDesigner.cs
- SafeFileMappingHandle.cs
- WindowsToolbar.cs
- NotifyIcon.cs
- OledbConnectionStringbuilder.cs
- ViewManagerAttribute.cs
- DiscoveryDocument.cs
- RightsManagementInformation.cs
- cookiecontainer.cs
- FileSystemInfo.cs
- XmlJsonReader.cs
- DocumentViewer.cs
- LoadedOrUnloadedOperation.cs
- ArraySegment.cs
- WebScriptClientGenerator.cs
- ZipIOBlockManager.cs
- VisualStyleTypesAndProperties.cs
- NullPackagingPolicy.cs
- XmlComplianceUtil.cs
- translator.cs
- BezierSegment.cs
- TabControl.cs
- FacetChecker.cs
- BamlBinaryWriter.cs
- BaseTreeIterator.cs
- EnumerableRowCollectionExtensions.cs
- ValidationRuleCollection.cs
- MemberMemberBinding.cs
- BinaryOperationBinder.cs
- SlipBehavior.cs
- InputElement.cs
- ECDiffieHellman.cs
- GcHandle.cs
- GeneralTransform3D.cs