I try to use the ILNumerics to visualize some surfaces.
- How can I access to the camera children at run time. For example, what exactly changes when I use the mouse to rotate a surface?
- Another problem is, when I use the mouse to rotate the plot, I have no longer control on it. for example, I have added a camera and a surface to the ILPanel scene. when I click a button the position of the camera changes as given below, however, if I rotate the surface and then click the button, nothing happens.
Another thing is, how can I replace a surface added to a camera with another surface?
int pos = 200; private void button1_Click(object sender, EventArgs e) { pos -= 10; var cam = ilPanel1.Scene.Camera; cam.Reset(); cam.Position = new Vector3(15, -200, pos); cam.LookAt = new Vector3(15, 15, 65); ilPanel1.Refresh(); }
When the plot cube is given to any driver, that driver will maintain its own copy (!) of the plotcube. Mouse interactions are done on the copy only. The copy is done efficiently without any buffrer copies and is constantly synchronized with its original on every rendering frame. If you want to inspect the parameter of the scene WITH the result of interaction, fetch the drivers copy by panel.GetCurrentScene().
Changes to the global scene may conflict with changes introduced by interaction. However, I think, global changes should get priority. If they are not synchronized to the driver copy, you may experience a bug. We will look into that.
The ILGroup.Children property allows access to any child within a group. Use it to remove an object. Use the common Add() method to add new objects to a group.