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
- BamlRecords.cs
- Mouse.cs
- SqlBinder.cs
- SamlSubject.cs
- invalidudtexception.cs
- SQLBytesStorage.cs
- Expr.cs
- XmlCustomFormatter.cs
- HttpPostClientProtocol.cs
- TransactionScope.cs
- OperationContractGenerationContext.cs
- ListViewUpdateEventArgs.cs
- StylusPlugInCollection.cs
- Switch.cs
- AssociativeAggregationOperator.cs
- DataViewSettingCollection.cs
- Soap.cs
- Matrix3D.cs
- HtmlContainerControl.cs
- FileDialog_Vista_Interop.cs
- DependsOnAttribute.cs
- DateTimeOffsetStorage.cs
- VariableQuery.cs
- IpcClientManager.cs
- TypeHelpers.cs
- ByteStorage.cs
- MultiBinding.cs
- AssemblyInfo.cs
- ToggleButton.cs
- DataProviderNameConverter.cs
- HtmlTableRowCollection.cs
- CompilerError.cs
- PointValueSerializer.cs
- TextUtf8RawTextWriter.cs
- Debug.cs
- TdsParserSafeHandles.cs
- ProjectionCamera.cs
- TextTreeInsertElementUndoUnit.cs
- DoubleConverter.cs
- UndirectedGraph.cs
- UnsignedPublishLicense.cs
- WaitForChangedResult.cs
- DefaultObjectMappingItemCollection.cs
- DbParameterHelper.cs
- ISAPIRuntime.cs
- ToolStripDropDown.cs
- DataObjectSettingDataEventArgs.cs
- StandardCommandToolStripMenuItem.cs
- Model3DGroup.cs
- JavaScriptObjectDeserializer.cs
- ConstraintCollection.cs
- DirectoryNotFoundException.cs
- PenThread.cs
- MenuAutomationPeer.cs
- RoutedEventHandlerInfo.cs
- MapPathBasedVirtualPathProvider.cs
- Completion.cs
- XmlMapping.cs
- ListControlConvertEventArgs.cs
- printdlgexmarshaler.cs
- ProtocolState.cs
- SelectionHighlightInfo.cs
- PropertyValueUIItem.cs
- ComponentSerializationService.cs
- NullReferenceException.cs
- EventDescriptorCollection.cs
- DataGridLength.cs
- SelectionItemProviderWrapper.cs
- ConfigurationPropertyAttribute.cs
- IImplicitResourceProvider.cs
- DbConnectionPoolGroup.cs
- StrokeCollectionConverter.cs
- AutomationPatternInfo.cs
- CachedCompositeFamily.cs
- SafePipeHandle.cs
- DockPattern.cs
- ProgressChangedEventArgs.cs
- ViewKeyConstraint.cs
- ListControlConvertEventArgs.cs
- ResXResourceReader.cs
- DataGridViewTextBoxColumn.cs
- OdbcParameter.cs
- XhtmlMobileTextWriter.cs
- XmlTextWriter.cs
- ExtensionDataObject.cs
- ListViewHitTestInfo.cs
- PenThreadWorker.cs
- Zone.cs
- TableProviderWrapper.cs
- ControlUtil.cs
- EmptyReadOnlyDictionaryInternal.cs
- ControlUtil.cs
- DataGridCaption.cs
- KnownTypesProvider.cs
- CompilerGlobalScopeAttribute.cs
- MiniLockedBorderGlyph.cs
- SmtpClient.cs
- WebBrowserNavigatedEventHandler.cs
- SignedInfo.cs
- XpsColorContext.cs