Asked a lot, I wrote an example of how to select a cross-section A-B from 3D surface and how to calculate the points between A and B, and finally how to show them in 2D chart below.
The project is here:
I hope this helps you guys
3D surface cross-section
Moderator: Queue Moderators
- ArctionPasi
- Posts: 1367
- Joined: Tue Mar 26, 2013 10:57 pm
- Location: Finland
- Contact:
3D surface cross-section
LightningChart Support Team, PT
Re: 3D surface cross-section
Hi there !
I'm posting on this thread because I'm using this specific exemple as an inspiration for my internship project.
[What I'm trying to do]
I added a checkbox that should reset the default mouse events. The goal is that, when it's checked, left mouse button behave like in other exemples, allowing for the mesh surface to be turned when I click and move my mouse AND doen't trace the cross-section anymore. Right now I successfully disabled the cross-section tracing but I can't get this graph to move with my mouse.
[Why I'm doing this ?]
I'm trying to do this because right now, the only way to turn the mesh around is to click and move the mouse outside of the surface, but since I have very large sufaces and I need to zoom on them, they fill the entire chart area and I cannot move the chart using the mouse, I have to rely on trackbars that aren't very user-friendly.
I couldn't figure out how to simply get the default mouse handlers without coding the entire camera moves from scratch.
Any idea on how to solve this problem ? Thank you for any answer !
I'm posting on this thread because I'm using this specific exemple as an inspiration for my internship project.
[What I'm trying to do]
I added a checkbox that should reset the default mouse events. The goal is that, when it's checked, left mouse button behave like in other exemples, allowing for the mesh surface to be turned when I click and move my mouse AND doen't trace the cross-section anymore. Right now I successfully disabled the cross-section tracing but I can't get this graph to move with my mouse.
[Why I'm doing this ?]
I'm trying to do this because right now, the only way to turn the mesh around is to click and move the mouse outside of the surface, but since I have very large sufaces and I need to zoom on them, they fill the entire chart area and I cannot move the chart using the mouse, I have to rely on trackbars that aren't very user-friendly.
I couldn't figure out how to simply get the default mouse handlers without coding the entire camera moves from scratch.
Any idea on how to solve this problem ? Thank you for any answer !
- ArctionPasi
- Posts: 1367
- Joined: Tue Mar 26, 2013 10:57 pm
- Location: Finland
- Contact:
Re: 3D surface cross-section
Hello,
So... are you actually looking for a way to pan and zoom the 3D chart contents? By XZ plane?
Set
When not using panning and zooming, set it back to default mode:
and set
So... are you actually looking for a way to pan and zoom the 3D chart contents? By XZ plane?
Set
Code: Select all
_chart.View3D.ZoomPanOptions.LeftMouseButtonAction = MouseButtonAction3D.ZoomXZ;
_chart.View3D.ZoomPanOptions.RightMouseButtonAction = MouseButtonAction3D.PanPrimaryXZ;
Code: Select all
_chart.View3D.ZoomPanOptions.LeftMouseButtonAction = MouseButtonAction3D.Rotate;
_chart.View3D.ZoomPanOptions.RightMouseButtonAction = MouseButtonAction3D.Pan;
Code: Select all
View3D.ClipContents = true
LightningChart Support Team, PT
Re: 3D surface cross-section
It's not exactly what I meant but I admit my choice of word was poor.
On this example, when we generate the 3D mesh, we "overload" the mouse interaction on the 3D surface :
with surface_MouseDown and surface_MouseUp 2 functions that allow mouse interaction on the surface, so that we can trace a line on the mesh to have the profile.
I would like to create 2 mouse event functions which instead of doing the cross-section, move the graph the same way MouseButtonAction3D.Rotate works, but when interacting with the surface.
On this example, when we generate the 3D mesh, we "overload" the mouse interaction on the 3D surface :
Code: Select all
surface.MouseDown += new MouseEventHandler(surface_MouseDown);
surface.MouseUp += new MouseEventHandler(surface_MouseUp);
I would like to create 2 mouse event functions which instead of doing the cross-section, move the graph the same way MouseButtonAction3D.Rotate works, but when interacting with the surface.
Re: 3D surface cross-section
Nevermind, just found the solution, I have to set the surface.MouseInteraction property to false to allow camera control when clicking on the surface and set it to true to enable cross-section tracing.
- ArctionPasi
- Posts: 1367
- Joined: Tue Mar 26, 2013 10:57 pm
- Location: Finland
- Contact:
Re: 3D surface cross-section
Ok I'm sorry I was too slow as there are other support issues open.
LightningChart Support Team, PT
Re: 3D surface cross-section
That's no problem, I'll probably have some other issues so you'll have the occasion to make up for it .