Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- SettingsProviderCollection.cs
- XmlNavigatorStack.cs
- ListenerElementsCollection.cs
- SecUtil.cs
- PowerModeChangedEventArgs.cs
- EditCommandColumn.cs
- ToolBarOverflowPanel.cs
- ScriptingSectionGroup.cs
- ACE.cs
- PrePostDescendentsWalker.cs
- RuleSettingsCollection.cs
- XslVisitor.cs
- XmlSerializerVersionAttribute.cs
- ListBoxItemAutomationPeer.cs
- NamedPermissionSet.cs
- DragAssistanceManager.cs
- ToolStrip.cs
- HttpServerUtilityWrapper.cs
- EventToken.cs
- DtdParser.cs
- CodeDelegateInvokeExpression.cs
- loginstatus.cs
- Converter.cs
- DesignerCapabilities.cs
- CompositeDuplexElement.cs
- PostBackTrigger.cs
- Function.cs
- CompositeClientFormatter.cs
- ExtendedPropertyDescriptor.cs
- EntityDataSourceChangingEventArgs.cs
- SafeNativeMethods.cs
- HttpProtocolImporter.cs
- Pair.cs
- SvcMapFile.cs
- xmlsaver.cs
- HtmlContainerControl.cs
- PersonalizationStateInfo.cs
- BufferedReadStream.cs
- PropertyDescriptorComparer.cs
- RSAProtectedConfigurationProvider.cs
- SqlSelectStatement.cs
- SchemaTypeEmitter.cs
- SqlXml.cs
- _UncName.cs
- SQLUtility.cs
- OrCondition.cs
- ItemList.cs
- SecurityDocument.cs
- SequenceFullException.cs
- UniformGrid.cs
- SafeCryptoKeyHandle.cs
- StructuredProperty.cs
- DerivedKeySecurityTokenStub.cs
- Trace.cs
- mediapermission.cs
- TransformPatternIdentifiers.cs
- DPAPIProtectedConfigurationProvider.cs
- SingleTagSectionHandler.cs
- DataPagerFieldCollection.cs
- HtmlTableCell.cs
- BamlLocalizabilityResolver.cs
- TextCompositionEventArgs.cs
- AppearanceEditorPart.cs
- _DigestClient.cs
- AuthenticationManager.cs
- UnknownMessageReceivedEventArgs.cs
- Documentation.cs
- RegexCapture.cs
- SafeHandles.cs
- BaseConfigurationRecord.cs
- DesignerView.xaml.cs
- DataServiceQueryOfT.cs
- Focus.cs
- AudioBase.cs
- PerformanceCounters.cs
- ObjectIDGenerator.cs
- XamlReaderHelper.cs
- ZipIOLocalFileHeader.cs
- SecurityElement.cs
- UnsafeNativeMethods.cs
- AnnotationHelper.cs
- TabPanel.cs
- APCustomTypeDescriptor.cs
- DBDataPermissionAttribute.cs
- FunctionImportMapping.cs
- HttpRawResponse.cs
- BaseTreeIterator.cs
- XmlSchemaAttributeGroup.cs
- DocumentAutomationPeer.cs
- SwitchAttribute.cs
- XmlQueryContext.cs
- DesignerForm.cs
- DataControlFieldCell.cs
- _AutoWebProxyScriptEngine.cs
- InternalConfigSettingsFactory.cs
- SrgsRulesCollection.cs
- Graphics.cs
- Int32Collection.cs
- GlobalizationAssembly.cs
- Pointer.cs