I am new to this forum and new to C programming in general, but having a lot of fun, so please bear with me.
Currently I am working with this great example:
Which I have understood and gotten to work properly. Now my problem is that I want to work with binary files - I am aware that this reader tool is capable of reading binary files, but the binary files I am working with have a very special structure in that they contain a lot of different data (position,velocity,density etc.) and small headers / comments in between - therefore the standard reader tool is not sufficient. Instead I have been working on a tool which can extract my data and place it in pointers - so my question is if someone could show me how to transform these lines of codes from the link;
vtkSmartPointer reader =
reader->SetFileName ( filePath.c_str() );
// if nothing gets displayed or totally wrong, swap the endianness
vtkSmartPointer mapper =
std::cout << "number of pieces: " << mapper->GetNumberOfPieces() << std::endl;
vtkSmartPointer actor =
So that instead of using the native reader, I would be able to point the mapper to some kind of pointer holding information for xyz etc. and do the correct vizualisation in VTK. If anybody with more knowledge and some spare time, could just show me how to do this with some arbitrary data in a pointer I would be happy.
P.S. please all do tell me how to format code correctly, I couldn’t get it to work sorry