Reputation: 11
My friend just introduced XTK (www.goxtk.com) to me. Man, it is awesome.
I am now trying to visualize a VTK file which has VERTICES, LINES and POLYGONS. I notice that not all three kinds of objects can be displayed. I tried to shuffle their orders in the VTK file. Only the last one can be displayed. I could use three separate files, but one file will be better. Any way to do that?
==== The VTK file ====
# vtk DataFile Version 2.0
Cube example
ASCII
DATASET POLYDATA
POINTS 8 float
0.0 0.0 0.0
1.0 0.0 0.0
1.0 1.0 0.0
0.0 1.0 0.0
0.0 0.0 1.0
1.0 0.0 1.0
1.0 1.0 1.0
0.0 1.0 1.0
VERTICES 1 6
5 0 2 3 4 7
LINES 2 6
2 1 3
2 4 2
POLYGONS 1 4
3 1 2 3
Upvotes: 1
Views: 364
Reputation: 967
Alas, what you want to do is not possible right now. From an object oriented standpoint of view, this makes sense: if you type
var a = new X.object();
a.load('test.vtk');
you define one entity/one object/one thing in the scene.
So I am afraid that you need to split your vtk files right now.
If you find a good solution to this problem, please contribute it :)
Upvotes: 1