<div dir="ltr"><span style="font-size:12.8px">There are 2 factory options (at least) in VTK's cmake. With both of them active, the example you mentioned </span><span style="font-size:12.8px">(</span><a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/Cylinder" rel="noreferrer" target="_blank" style="font-size:12.8px">http://www.vtk.org/<wbr>Wiki/VTK/Examples/Cxx/<wbr>GeometricObjects/Cylinder</a><span style="font-size:12.8px">) works for me by only replacing the renderer, render window and interactor classes with their openVR counterparts.</span><br><div><span style="font-size:12.8px"><br></span></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 22, 2017 at 3:31 PM, Ricardo <span dir="ltr"><<a href="mailto:ricardo_morello@hotmail.com" target="_blank">ricardo_morello@hotmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Carlos, thanks for the answer!<br>
I also forgot to mention that i reduced the cylinder's radius and height to<br>
0.1, so it should not be inside the cylinder. I adjusted the tracking and<br>
now there are no more blue lines, just the blue circle the HTC compositor<br>
places. However, the cylinder is still not rendering in the scene. Here is<br>
the example with OpenVR classes:<br>
<br>
#include "stdafx.h"<br>
#include <vtkCylinderSource.h><br>
#include <vtkPolyData.h><br>
#include <vtkSmartPointer.h><br>
#include <vtkPolyDataMapper.h><br>
#include <vtkActor.h><br>
#include <vtkOpenVRRenderWindow.h><br>
#include <vtkOpenVRRenderer.h><br>
#include <<wbr>vtkOpenVRRenderWindowInteracto<wbr>r.h><br>
#include <vtkOpenVRCamera.h><br>
#include "vtkAutoInit.h"<br>
VTK_MODULE_INIT(<wbr>vtkRenderingOpenGL2);<br>
VTK_MODULE_INIT(<wbr>vtkInteractionStyle);<br>
<br>
int main(int, char *argv[])<br>
{<br>
// Create a sphere<br>
vtkSmartPointer<<wbr>vtkCylinderSource> cylinderSource =<br>
vtkSmartPointer<<wbr>vtkCylinderSource>::New();<br>
cylinderSource->SetCenter(0.0, 0.0, 0.0);<br>
cylinderSource->SetRadius(0.1)<wbr>;<br>
cylinderSource->SetHeight(0.1)<wbr>;<br>
cylinderSource->SetResolution(<wbr>100);<br>
<br>
// Create a mapper and actor<br>
vtkSmartPointer<<wbr>vtkPolyDataMapper> mapper =<br>
vtkSmartPointer<<wbr>vtkPolyDataMapper>::New();<br>
mapper->SetInputConnection(<wbr>cylinderSource->GetOutputPort(<wbr>));<br>
vtkSmartPointer<vtkActor> actor =<br>
vtkSmartPointer<vtkActor>::<wbr>New();<br>
actor->SetMapper(mapper);<br>
<br>
<br>
vtkSmartPointer< vtkOpenVRCamera > camera =<br>
vtkSmartPointer<<wbr>vtkOpenVRCamera>::New();<br>
<br>
//Create a renderer, render window, and interactor<br>
vtkSmartPointer<<wbr>vtkOpenVRRenderer> renderer =<br>
vtkSmartPointer<<wbr>vtkOpenVRRenderer>::New();<br>
<br>
renderer->SetActiveCamera(<wbr>camera);<br>
<br>
vtkSmartPointer<<wbr>vtkOpenVRRenderWindow> renderWindow =<br>
vtkSmartPointer<<wbr>vtkOpenVRRenderWindow>::New();<br>
renderWindow->AddRenderer(<wbr>renderer);<br>
vtkSmartPointer<<wbr>vtkOpenVRRenderWindowInteracto<wbr>r> renderWindowInteractor =<br>
vtkSmartPointer<<wbr>vtkOpenVRRenderWindowInteracto<wbr>r>::New();<br>
renderWindowInteractor-><wbr>SetRenderWindow(renderWindow);<br>
<br>
// Add the actor to the scene<br>
renderer->AddActor(actor);<br>
renderer->SetBackground(.1, .3, .2); // Background color dark green<br>
<br>
// Render and interact<br>
renderWindow->SetWindowName(<wbr>argv[0]);<br>
renderWindow->Render();<br>
renderWindowInteractor->Start(<wbr>);<br>
<br>
return EXIT_SUCCESS;<br>
}<br>
The demo room app works normally, so there might be a mistake with the code<br>
or the VS configuration, I'm not sure<br>
<br>
Thanks!<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/OpenVR-HTC-Vive-tp5743731p5743734.html" rel="noreferrer" target="_blank">http://vtk.1045678.n5.nabble.<wbr>com/OpenVR-HTC-Vive-<wbr>tp5743731p5743734.html</a><br>
<div class="HOEnZb"><div class="h5">Sent from the VTK - Dev mailing list archive at Nabble.com.<br>
______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtk-developers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtk-developers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtk-developers" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/vtk-<wbr>developers</a><br>
<br>
</div></div></blockquote></div><br></div>