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
- MultilineStringConverter.cs
- DbCommandDefinition.cs
- SortKey.cs
- FtpWebResponse.cs
- HMACSHA256.cs
- XamlStyleSerializer.cs
- MatrixTransform.cs
- PolyBezierSegment.cs
- SharedPerformanceCounter.cs
- NameTable.cs
- CacheSection.cs
- ChangePassword.cs
- CodeComment.cs
- TextEditorThreadLocalStore.cs
- CharEnumerator.cs
- TextBoxAutoCompleteSourceConverter.cs
- messageonlyhwndwrapper.cs
- ThreadStateException.cs
- CheckBoxFlatAdapter.cs
- CompilerScope.Storage.cs
- OdbcError.cs
- RoleGroupCollection.cs
- XsltLoader.cs
- MachineKeySection.cs
- DataGridViewBand.cs
- ValidatorCompatibilityHelper.cs
- NetCodeGroup.cs
- NumberAction.cs
- SystemTcpConnection.cs
- ExtendedTransformFactory.cs
- SqlDependencyUtils.cs
- shaper.cs
- PrivateUnsafeNativeCompoundFileMethods.cs
- AlternationConverter.cs
- _HTTPDateParse.cs
- XmlSchemaSimpleContentRestriction.cs
- AppDomainFactory.cs
- EntityCommand.cs
- Frame.cs
- _ListenerAsyncResult.cs
- DataObjectCopyingEventArgs.cs
- WebControlAdapter.cs
- HierarchicalDataTemplate.cs
- FieldAccessException.cs
- RegexCapture.cs
- EventMemberCodeDomSerializer.cs
- JsonWriterDelegator.cs
- PopupRoot.cs
- ExpressionBindingCollection.cs
- OperationResponse.cs
- Hyperlink.cs
- ImagingCache.cs
- EntityUtil.cs
- RegexCaptureCollection.cs
- FilterQuery.cs
- SetIndexBinder.cs
- SequentialUshortCollection.cs
- ResXBuildProvider.cs
- TemplateBuilder.cs
- SymmetricKeyWrap.cs
- COAUTHIDENTITY.cs
- Win32Interop.cs
- DataSetUtil.cs
- LambdaSerializationException.cs
- StringUtil.cs
- Signature.cs
- EditingMode.cs
- XPathNodeHelper.cs
- KernelTypeValidation.cs
- SByteStorage.cs
- ProxyWebPartManagerDesigner.cs
- UnsettableComboBox.cs
- SchemaMapping.cs
- __Error.cs
- MaterialGroup.cs
- WebHeaderCollection.cs
- AstNode.cs
- CngProvider.cs
- httpstaticobjectscollection.cs
- MtomMessageEncodingElement.cs
- InvalidPropValue.cs
- ServiceDebugBehavior.cs
- FunctionImportElement.cs
- TemplatePropertyEntry.cs
- FrameworkElementAutomationPeer.cs
- SerializationException.cs
- JsonEnumDataContract.cs
- TransformerConfigurationWizardBase.cs
- Soap.cs
- KnownBoxes.cs
- DrawingCollection.cs
- IncomingWebRequestContext.cs
- SqlGenerator.cs
- ToolStripMenuItem.cs
- WindowsGraphics2.cs
- CommandID.cs
- MD5HashHelper.cs
- SqlRemoveConstantOrderBy.cs
- EpmSyndicationContentDeSerializer.cs
- MaskInputRejectedEventArgs.cs