[vtkusers] exporting scene to vrml format
Philippe PhD. David
pdavid at scconsultants.com
Wed Feb 22 11:37:41 EST 2017
Hi,
Nobody faced this situation ? Where the exported objects do no apply the
SetPosition() et SetOrientation() as in the interactive Window ?
I have a hard to fix this ... Any help is very much welcomed.
Thanks in advance
-------- Message transféré --------
Sujet : exporting scene to vrml format
Date : Thu, 16 Feb 2017 14:31:15 +0100
:
hello,
I am currently trying to export a scene using vtkVRMLExporter() from my
vtk application.
My scene is built from a set of geometries which are then moved/rotated
internally to my application (with user input) using
vtkAssembly::SetPosition(...) and vtkAssembly::SetOrientation(...)
Unfortunately, the exported scene reports only the initial
position/orientation of my differents objects. Any suggestions on how to
take into accounts those move/orientation in the exported scene ? Also
the view type (surface, wireframe, mesh, opacity) is not correctly
exported.
thanks in advance for help
Philippe
// my function to export the scene
bool VisualisationVtk::Visualisation::SaveVRML(String^ Filename)
{
vtkVRMLExporter *Exporter;
Exporter= vtkVRMLExporter::New();
Exporter->SetRenderWindow(Window);
pin_ptr<const wchar_t> wch = PtrToStringChars(Filename);
char file[256];
size_t convertedChars = 0;
size_t sizeInBytes = ((Filename->Length + 1) * 2);
wcstombs_s (&convertedChars,file, sizeInBytes,wch, sizeInBytes);
Exporter->SetFileName(file);
draw(); // loops on all objects and hide/view update surface/mesh
view move/rotate upon users requests
Exporter->Write();
Exporter->Delete();
return true;
}
--
---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170222/f90b4af1/attachment.html>
More information about the vtkusers
mailing list