Reputation: 649
How do people visualize, in 3D, points, lines and triangles (not just triangles) that result from C++ code?
OpenGL is too low-level. Plus, I do not know how suitable OpenGL is for rendering points and lines. VTK is too complex for such a simple task and is not well-documented. X3D is not a lightweight file format. Plus, I have not found a viewer that convinces me. DirectX is not platform-independent.
I am really curious to learn what people do to solve this problem.
Upvotes: 4
Views: 1464
Reputation: 4283
Such libraries are rarely done by halves. If any such library exists, I would actually be interested myself.
First off: consider exporting to any old 3D (or 2D for that matter) file format. Check here in this case.
Otherwise you probably will want to use OpenGL as it has the most community support and it is platform-independent. Did you check out OpenSceneGraph? OSG will take some of that low-level burden away for you.
If you're looking for lightweight, go for OpenGL directly (glut + glew are relatively simple to setup and draw some vertexbuffers with i.e. points, lines or triangles): I find redbook a really nice resource for beginners (OpenGL < 3.1).
Upvotes: 2