How to display a simple point cloud in DXEngine - Printable Version
+- AB4D Forum (https://forum.ab4d.com)
+-- Forum: Products Forums (https://forum.ab4d.com/forumdisplay.php?fid=4)
+--- Forum: Ab3d.DXEngine (https://forum.ab4d.com/forumdisplay.php?fid=11)
+--- Thread: How to display a simple point cloud in DXEngine (/showthread.php?tid=4309)
How to display a simple point cloud in DXEngine - jimmie - 12-23-2021
I am a complete newbie to ab4d and just want to display (x,y,z) points in a Forms window. Ax example file of points is attached.
Is there a simple example showing how to use in a DXEngine Win Forms (the PixelVisual3D or whatever else is needed .....)?
Thanks in advance.
RE: How to display a simple point cloud in DXEngine - abenedik - 01-03-2022
I see that you have already found the "Need to display a 3D cloud in a .NET window" forum thread (https://forum.ab4d.com/showthread.php?tid=4289&pid=5907#pid5907) that provides some information on how to display point cloud.
To show that in WinForms application, please open the WinForms sample project (can be also get from GitHub: https://github.com/ab4d/Ab3d.DXEngine.WinForms.Sample). Strat the sample and check which DXEngine usage suites your application best (the recommended way is to use the ElementHost).
Then just replace the content of the Create3DScene or CreateObjectsScene or any other method that defines the 3D objects by your code that creates the PixelVisual3D objects.
I see that the attached file has a very simple structure - to parse it you can use System.IO.File.ReadAllLines method and then split each line by fixed positions (using Substring method). After calling Trim on each part you can parse each part into double or float value.