private SceneNodeBase GetRootNode() { var group = new GroupNode(); group.RotationAxis = new vec3(-0.8343f, -0.0144f, -0.5512f); group.RotationAngle = 179.260315f; { string folder = System.Windows.Forms.Application.StartupPath; string tff = System.IO.Path.Combine(folder + @"\..\..\..\..\Infrastructure\CSharpGL.Models", "tff.dat"); Texture tffTexture = InitTFF1DTexture(tff); string head256 = System.IO.Path.Combine(folder + @"\..\..\..\..\Infrastructure\CSharpGL.Models", "head256.raw"); byte[] volumeData = GetVolumeData(head256); Texture volumeTexture = InitVolume3DTexture(volumeData, 256, 256, 225); int sliceCount = 512; StaticSlicesNode node = StaticSlicesNode.Create(sliceCount, tffTexture, volumeTexture); node.Scale = new vec3(1, 1, 225.0f / 256.0f); (new FormProperyGrid(node)).Show(); group.Children.Add(node); } { var node = AxisNode.Create(); node.Scale = new vec3(1, 1, 1) * 3; group.Children.Add(node); } return(group); }
private SceneNodeBase GetRootNode() { var group = new GroupNode(); group.RotationAxis = new vec3(-0.8343f, -0.0144f, -0.5512f); group.RotationAngle = 179.260315f; { Texture tffTexture = InitTFF1DTexture("tff.png"); int width = 128, height = 128, depth = 128; byte[] volumeData = VolumeDataGenerator.GetData(width, height, depth); Texture volumeTexture = InitVolume3DTexture(volumeData, width, height, depth); int sliceCount = 512; StaticSlicesNode node = StaticSlicesNode.Create(sliceCount, tffTexture, volumeTexture); node.Scale = new vec3(1, 1, 225.0f / 256.0f); (new FormPropertyGrid(node)).Show(); group.Children.Add(node); } { var node = AxisNode.Create(); node.Scale = new vec3(1, 1, 1) * 3; group.Children.Add(node); } return(group); }