标签:ar window text view ad rac return 初始化
# QVTKRenderWindowInteractor要求必须有初始化好的parent
def CreateScene(self, parent):
view = QVTKRenderWindowInteractor(parent)
renderer = vtkRenderer()
view.GetRenderWindow().AddRenderer(renderer)
renderer.SetBackground(1,1, 1)
view.GetRenderWindow().Render()
actor = vtkContextActor()
renderer.AddActor(actor)
scene = actor.GetScene()
scene.SetRenderer(renderer)
layout = QVBoxLayout()
layout.setContentsMargins(0,0,0,0)
layout.addWidget(view)
parent.setLayout(layout)
self.view = view
return scene
标签:ar window text view ad rac return 初始化
原文地址:http://my.oschina.net/txl/blog/295404