Hi,
I want to create Computational mesh from a freeform mesh object by cubes (Making objects by cubes). the number of cubes in this case is very large and the speed of drawing is low.
By hiding the DC while making cubes, the speed of drawing is slightly higher, but still not desirable.
The number of cubes may reach up to a million and more.
What is your approach to doing this?
My code is below. Please guide if you know better method.
Thanks.
Hi Mostafa
Drawing large arrays of TGLCube objects will be slow, so if you need only to show positions of objects try to use TGLPoints instead. Use 1 point for cube centers or 8 points for corner vertices (may be plus 6 points for face centers and 12 points for edge centers etc.). In this case millions of such pointed cubes as voxels you will visualize very fast during a few seconds or less.
PW
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I want to create Computational mesh from a freeform mesh object by cubes (Making objects by cubes). the number of cubes in this case is very large and the speed of drawing is low.
By hiding the DC while making cubes, the speed of drawing is slightly higher, but still not desirable.
The number of cubes may reach up to a million and more.
What is your approach to doing this?
My code is below. Please guide if you know better method.
Thanks.
Last edit: Mostafa 2019-01-09
Hi Mostafa
Drawing large arrays of TGLCube objects will be slow, so if you need only to show positions of objects try to use TGLPoints instead. Use 1 point for cube centers or 8 points for corner vertices (may be plus 6 points for face centers and 12 points for edge centers etc.). In this case millions of such pointed cubes as voxels you will visualize very fast during a few seconds or less.
PW