Suppose I plot a surface and at runtime I use the mouse to rotate the surface. Once the right rotation of the surface is achieved, how I can get its state?
How can you obtain the ilplotcube rotatation information at runtime?
201 views Asked by David At
2
There are 2 answers
0
On
The method pointed out in user492238s answer does work. However, GetCurrentScene() assembles a new scene as composition of the global and the local (to the current driver) scene. This can get costly if called frequently. If only individual objects / properties are needed, panel.SceneSyncRoot can be used instead.
Also, the rotation of a plot cube is exposed by the plotcube.Rotation property. So, in order to get the current rotation of a plot cube (including the rotation due to user input):
panel.SceneSyncRoot.First<ILPlotCube>().Rotation
Each driver creates a clone of the global scene which is constantly synched and updated with changes in its source. The rotation is done on the clone. I have not tested it, but I think, you can query objects (e.g. the plot cube) in the clone by
This instance will reflect all changes done by the user.