opengl draw surface volume from data set
The code is loading a bin fi开发者_高级运维le which contains (x,y,z) coordinates for a set of points. Let say the points form a cube and that there are some points in the cube as well, how do i make the cube look like a surface cube instead of a set of points?
I read about marching cubes and barycentric coordinates, but i don't understand how to do that in C++ and opengl. Thanks.
If they form an axis-aligned cube all you need to do is draw a cube from min(x), min(y), min(z)
to max(x), max(y), max(z)
where min(x)
represents the minimum of all x
coordinates.
精彩评论