public VertexAnimationTrack _clone(Animation newParent) { global::System.IntPtr cPtr = OgrePINVOKE.VertexAnimationTrack__clone(swigCPtr, Animation.getCPtr(newParent)); VertexAnimationTrack ret = (cPtr == global::System.IntPtr.Zero) ? null : new VertexAnimationTrack(cPtr, false); if (OgrePINVOKE.SWIGPendingException.Pending) { throw OgrePINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public VertexAnimationTrack getVertexTrack(ushort handle) { global::System.IntPtr cPtr = OgrePINVOKE.Animation_getVertexTrack(swigCPtr, handle); VertexAnimationTrack ret = (cPtr == global::System.IntPtr.Zero) ? null : new VertexAnimationTrack(cPtr, false); if (OgrePINVOKE.SWIGPendingException.Pending) { throw OgrePINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public VertexAnimationTrack createVertexTrack(ushort handle, VertexData data, VertexAnimationType animType) { global::System.IntPtr cPtr = OgrePINVOKE.Animation_createVertexTrack__SWIG_1(swigCPtr, handle, VertexData.getCPtr(data), (int)animType); VertexAnimationTrack ret = (cPtr == global::System.IntPtr.Zero) ? null : new VertexAnimationTrack(cPtr, false); if (OgrePINVOKE.SWIGPendingException.Pending) { throw OgrePINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
protected override void CreateScene() { // Set ambient light scene.AmbientLight = new ColorEx(0.5f, 0.5f, 0.5f); // Create a light Light light = scene.CreateLight("MainLight"); // Accept default settings: point light, white diffuse, just set position // NB I could attach the light to a SceneNode if I wanted it to move automatically with // other objects, but I don't light.Position = new Vector3(20f, 80f, 50f); light.Diffuse = new ColorEx(1.0f, 1.0f, 1.0f); // Create a light light = scene.CreateLight("MainLight2"); // Accept default settings: point light, white diffuse, just set position // NB I could attach the light to a SceneNode if I wanted it to move automatically with // other objects, but I don't light.Position = new Vector3(-120f, -80f, -50f); light.Diffuse = new ColorEx(0.7f, 0.7f, 0.6f); // Debugging stuff - - load iraq-f.mesh //Mesh iraqf_mesh = MeshManager.Instance.Load("iraq-f.mesh"); //Entity iraqf = scene.CreateEntity("iraqf", "iraq-f.mesh"); // Pre-load the mesh so that we can tweak it with a manual animation Mesh mesh = MeshManager.Instance.Load("facial.mesh"); Animation anim = mesh.CreateAnimation("manual", 0); VertexAnimationTrack track = anim.CreateVertexTrack(4, VertexAnimationType.Pose); manualKeyFrame = track.CreateVertexPoseKeyFrame(0); // create pose references, initially zero for (int i = 0; i < (int)ScrollbarIndex.Count; ++i) { manualKeyFrame.AddPoseReference(poseIndexes[i], 0.0f); } Entity head = scene.CreateEntity("Head", "facial.mesh"); speakAnimState = head.GetAnimationState("Speak"); speakAnimState.IsEnabled = true; manualAnimState = head.GetAnimationState("manual"); manualAnimState.IsEnabled = false; manualAnimState.Time = 0; SceneNode headNode = scene.RootSceneNode.CreateChildSceneNode(); headNode.AttachObject(head); camera.Position = new Vector3(-20f, 50f, 150f); camera.LookAt(new Vector3(0f, 35f, 0f)); }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(VertexAnimationTrack obj) { return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr); }