You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to use a vtkFollower object, I set it to the active camera then I passed the vtkRenderWindow to Panel, the object is render in the dashboard, but is not following the camera.
I guess a new camera is created in the process (and don't tell the vtkFollower object to follow it) ?
vtkFollower :
"vtkFollower is a subclass of vtkActor that always follows its specified camera. More specifically it will not change its position or scale, but it will continually update its orientation so that it is right side up and facing the camera."
ALL software version info
OS: Windows 10 Pro (64-bit) version 1909
Python: 3.8.3
Chrome: Version 83.0.4103.97 (Official Build) (64-bit)
Panel: 0.9.5
Bokeh: 2.0.1
Description of expected behavior and the observed behavior
Expected behavior:
The vtkFollower (the label/text "Origin" in the example) follow the camera and face it always.
Observed behavior:
The vtkFollower (the label/text "Origin" in the example) is render as a fix actor and does not follow the camera .
Complete, minimal, self-contained example code that reproduces the issue
# fmt: off## The 3 followings line are a temp solution until I upgrate to bokeh 2.0.2 (now it 2.0.1) and won't be necessary laterfrombokeh.settingsimportsettings# noqa isort:skipsettings.resources='cdn'# noqa isort:skipsettings.resources='inline'# noqa isort:skip# fmt: onimportpanelaspnimportvtk# Create the arrow and the associated mapper and actor.arrow=vtk.vtkArrowSource()
arrowMapper=vtk.vtkPolyDataMapper()
arrowMapper.SetInputConnection(arrow.GetOutputPort())
arrowActor=vtk.vtkActor()
arrowActor.SetMapper(arrowMapper)
# Create the 3D text and the associated mapper and follower (a type of actor). # Position the text so it is displayed over the origin of the arrow.atext=vtk.vtkVectorText()
atext.SetText("Origin")
textMapper=vtk.vtkPolyDataMapper()
textMapper.SetInputConnection(atext.GetOutputPort())
textActor=vtk.vtkFollower()
textActor.SetMapper(textMapper)
textActor.SetScale(0.2, 0.2, 0.2)
textActor.AddPosition(0, 0, 0)
# Create the Renderer, RenderWindow, and RenderWindowInteractor.renderer=vtk.vtkRenderer()
renderWindow=vtk.vtkRenderWindow()
renderWindow.AddRenderer(renderer)
# Add the actors to the renderer.renderer.AddActor(arrowActor)
renderer.AddActor(textActor)
renderer.GetActiveCamera().SetPosition(4, 0, 0)
# Set the camera of the follower.textActor.SetCamera(renderer.GetActiveCamera())
# Test Paneldash=pn.pane.VTK(renderWindow)
dash.show()
# Test VTK# interactor = vtk.vtkRenderWindowInteractor()# interactor.SetRenderWindow(renderWindow)# renderWindow.Render()# interactor.Start()
Screenshots or screencasts of the bug in action
In Panel
In VTK
The text was updated successfully, but these errors were encountered:
Interesting, I didn't expected something will be displayed since I never thought of supporting this.
However in the next panel version vtkFollower will be clearly not supported:
To support this there must be an equivalent in vtk.js.
I'll open a feature request there
Hi,
I tried to use a vtkFollower object, I set it to the active camera then I passed the vtkRenderWindow to Panel, the object is render in the dashboard, but is not following the camera.
I guess a new camera is created in the process (and don't tell the vtkFollower object to follow it) ?
vtkFollower :
"vtkFollower is a subclass of vtkActor that always follows its specified camera. More specifically it will not change its position or scale, but it will continually update its orientation so that it is right side up and facing the camera."
ALL software version info
Description of expected behavior and the observed behavior
Expected behavior:
The vtkFollower (the label/text "Origin" in the example) follow the camera and face it always.
Observed behavior:
The vtkFollower (the label/text "Origin" in the example) is render as a fix actor and does not follow the camera .
Complete, minimal, self-contained example code that reproduces the issue
Screenshots or screencasts of the bug in action
In Panel
In VTK
The text was updated successfully, but these errors were encountered: