示例#1
0
        public void RenderCoreHasFlagsSetCorrectlyForSpecialRenderPackage()
        {
            var ws = ViewModel.Model.CurrentWorkspace as HomeWorkspaceModel;
            var mockManipulator = new DynamoGeometryModel3D()
            {
                Transform                   = MatrixTransform3D.Identity,
                Material                    = PhongMaterials.Red,
                IsHitTestVisible            = true,
                RequiresPerVertexColoration = false,
            };

            Assert.False((mockManipulator.SceneNode.RenderCore as DynamoGeometryMeshCore).dataCore.IsSpecialRenderPackageData);
            AttachedProperties.SetIsSpecialRenderPackage(mockManipulator, true);
            //assert that setting this attached property updated the meshcore data.
            Assert.IsTrue((mockManipulator.SceneNode.RenderCore as DynamoGeometryMeshCore).dataCore.IsSpecialRenderPackageData);
        }