/// <summary> /// /// </summary> protected override void SetupContent() { this.ptex = TextureManager.Instance.CreateManual("DynaTex", ResourceGroupManager.DefaultResourceGroupName, TextureType.ThreeD, 64, 64, 64, 0, Media.PixelFormat.A8R8G8B8, TextureUsage.Default, null); SceneManager.AmbientLight = new ColorEx(0.6f, 0.6f, 0.6f); SceneManager.SetSkyBox(true, "Examples/MorningSkyBox", 50); Light light = SceneManager.CreateLight("VolumeTextureSampleLight"); light.Diffuse = new ColorEx(0.75f, 0.75f, 0.80f); light.Specular = new ColorEx(0.9f, 0.9f, 1); light.Position = new Vector3(-100, 80, 50); SceneManager.RootSceneNode.AttachObject(light); // Create volume renderable this.snode = SceneManager.RootSceneNode.CreateChildSceneNode(Vector3.Zero); this.vrend = new VolumeRendable(32, 750, "DynaTex"); this.snode.AttachObject(this.vrend); this.trend = new ThingRendable(90, 32, 7.5f); this.trend.Material = (Material)MaterialManager.Instance.GetByName("Examples/VTDarkStuff"); this.trend.Material.Load(); this.snode.AttachObject(this.trend); this.fnode = SceneManager.RootSceneNode.CreateChildSceneNode(); Entity head = SceneManager.CreateEntity("head", "ogrehead.mesh"); this.fnode.AttachObject(head); Animation anim = SceneManager.CreateAnimation("OgreTrack", 10); anim.InterpolationMode = InterpolationMode.Spline; NodeAnimationTrack track = anim.CreateNodeTrack(0, this.fnode); TransformKeyFrame key = track.CreateNodeKeyFrame(0); key.Translate = new Vector3(0, -15, 0); key = track.CreateNodeKeyFrame(5); key.Translate = new Vector3(0, 15, 0); key = track.CreateNodeKeyFrame(10); key.Translate = new Vector3(0, -15, 0); this.animState = SceneManager.CreateAnimationState("OgreTrack"); this.animState.IsEnabled = true; this.globalReal = 0.4f; this.globalImag = 0.6f; this.globalTheta = 0.0f; CreateControls(); DragLook = true; Generate(); }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SimpleRenderable obj) { return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr); }