private SetCameraView ( float x, float y, float z ) : void | ||
x | float | |
y | float | |
z | float | |
Résultat | void |
private void SetCamera_Click(object sender, EventArgs e) { if (isRunning) { YamangDll.SetCameraView(Convert.ToInt32(GetNumber(CameraXVal)), Convert.ToInt32(GetNumber(CameraYVal)), Convert.ToInt32(GetNumber(CameraZVal))); } }
private void button1_Click(object sender, EventArgs e) { if (!isRunning) { isRunning = true; info = new YamangDll.MESHOBJECT(); infoPtr = Marshal.AllocHGlobal(Marshal.SizeOf(info)); Marshal.StructureToPtr(info, infoPtr, false); info = (YamangDll.MESHOBJECT)Marshal.PtrToStructure(infoPtr, typeof(YamangDll.MESHOBJECT)); string filename = "tiger.x"; YamangDll.InitGeometry(this.Window.Handle, filename, ref infoPtr); YamangDll.SetCameraView(0.0f, 1.0f, -10.0f); Render(); } }