Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Core / CSharp / System / Windows / Media3D / Scene3D.cs / 1 / Scene3D.cs
//---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // // Description: Scene3D implementation. // // See spec at http://avalon/medialayer/Specifications/Avalon3D%20API%20Spec.mht //--------------------------------------------------------------------------- using System; using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Media.Composition; using MS.Internal; using System.ComponentModel.Design.Serialization; using System.Windows.Markup; using MS.Internal.Media3D; namespace System.Windows.Media.Media3D { internal partial class Scene3D : Animatable { internal Scene3D() { } ////// Marks the visible realizations of the Scene3D. /// internal void MarkVisibleRealizations(RealizationContext ctx) { Camera camera = Camera; if (Models != null && camera != null) { Matrix3D view = camera.GetViewMatrix(); Matrix3D proj = camera.GetProjectionMatrix(M3DUtil.GetAspectRatio(Viewport.Size)); Matrix3DStack stack3D = ctx.Transform3DStack; // // Update the 3D stack with the coordinate system change into // 2D space. stack3D.Push(proj); // Apply the projection transform (perspective, orthographic, etc.) stack3D.Push(view); // Position and orient camera. Models.MarkVisibleRealizations(ctx); stack3D.Pop(); // Projection. stack3D.Pop(); // Camera view. } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // // Description: Scene3D implementation. // // See spec at http://avalon/medialayer/Specifications/Avalon3D%20API%20Spec.mht //--------------------------------------------------------------------------- using System; using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Media.Composition; using MS.Internal; using System.ComponentModel.Design.Serialization; using System.Windows.Markup; using MS.Internal.Media3D; namespace System.Windows.Media.Media3D { internal partial class Scene3D : Animatable { internal Scene3D() { } ////// Marks the visible realizations of the Scene3D. /// internal void MarkVisibleRealizations(RealizationContext ctx) { Camera camera = Camera; if (Models != null && camera != null) { Matrix3D view = camera.GetViewMatrix(); Matrix3D proj = camera.GetProjectionMatrix(M3DUtil.GetAspectRatio(Viewport.Size)); Matrix3DStack stack3D = ctx.Transform3DStack; // // Update the 3D stack with the coordinate system change into // 2D space. stack3D.Push(proj); // Apply the projection transform (perspective, orthographic, etc.) stack3D.Push(view); // Position and orient camera. Models.MarkVisibleRealizations(ctx); stack3D.Pop(); // Projection. stack3D.Pop(); // Camera view. } } } } // 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
- WebPartConnectionsEventArgs.cs
- PersistenceMetadataNamespace.cs
- StaticTextPointer.cs
- AnonymousIdentificationSection.cs
- updateconfighost.cs
- LicenseProviderAttribute.cs
- MdiWindowListStrip.cs
- LinkDescriptor.cs
- PenLineCapValidation.cs
- ControlEvent.cs
- SoapInteropTypes.cs
- EventMetadata.cs
- SamlSubject.cs
- HostingEnvironmentException.cs
- DataPagerFieldCollection.cs
- Substitution.cs
- HashJoinQueryOperatorEnumerator.cs
- EntityModelBuildProvider.cs
- BamlRecordWriter.cs
- SizeAnimationUsingKeyFrames.cs
- SqlUserDefinedTypeAttribute.cs
- DisposableCollectionWrapper.cs
- SettingsPropertyCollection.cs
- GenericAuthenticationEventArgs.cs
- MDIControlStrip.cs
- Trace.cs
- FixedPageProcessor.cs
- XmlSchemaSimpleContent.cs
- RequestCachePolicyConverter.cs
- EventHandlersDesigner.cs
- InitiatorSessionSymmetricMessageSecurityProtocol.cs
- ResourceContainer.cs
- NetworkInformationPermission.cs
- GridViewItemAutomationPeer.cs
- StrongNamePublicKeyBlob.cs
- FlowNode.cs
- EventLogEntryCollection.cs
- BuildResultCache.cs
- AuthStoreRoleProvider.cs
- ApplicationDirectory.cs
- CodeSubDirectory.cs
- HtmlLiteralTextAdapter.cs
- MethodAccessException.cs
- DataBinding.cs
- PassportAuthentication.cs
- SequenceDesignerAccessibleObject.cs
- ReadOnlyTernaryTree.cs
- CapabilitiesUse.cs
- WebPartDisplayModeCancelEventArgs.cs
- FixedHyperLink.cs
- DbMetaDataColumnNames.cs
- UICuesEvent.cs
- InputMethodStateTypeInfo.cs
- ImageBrush.cs
- EntityDesignerDataSourceView.cs
- ToggleButtonAutomationPeer.cs
- CacheSection.cs
- JsonObjectDataContract.cs
- EntityClientCacheEntry.cs
- Token.cs
- HeaderCollection.cs
- ApplicationSecurityInfo.cs
- CollectionViewSource.cs
- ObjectViewEntityCollectionData.cs
- ObjectNotFoundException.cs
- TdsRecordBufferSetter.cs
- StrokeCollection.cs
- OleDbCommandBuilder.cs
- XmlILModule.cs
- DerivedKeySecurityToken.cs
- BidOverLoads.cs
- TargetPerspective.cs
- MenuScrollingVisibilityConverter.cs
- NominalTypeEliminator.cs
- ConfigXmlAttribute.cs
- XPathParser.cs
- RuntimeHelpers.cs
- ComboBox.cs
- ClientData.cs
- DefinitionUpdate.cs
- FontStyleConverter.cs
- ResourceReferenceKeyNotFoundException.cs
- ParameterToken.cs
- WorkflowTraceTransfer.cs
- DataSetMappper.cs
- IListConverters.cs
- SetIndexBinder.cs
- SpecialFolderEnumConverter.cs
- DesignTimeVisibleAttribute.cs
- ConnectionStringsExpressionBuilder.cs
- TagElement.cs
- FixedSOMPageConstructor.cs
- SourceChangedEventArgs.cs
- PrePrepareMethodAttribute.cs
- XmlNamedNodeMap.cs
- PreviewControlDesigner.cs
- BamlTreeNode.cs
- AssociationSetEnd.cs
- FormatException.cs
- WorkflowView.cs