VTK中模型刷新显示
tt
posted @ 2009年1月17日 23:12
in vtk
, 6036 阅读
本人基于VTK做数控切削仿真过程中,发现模型数据变化后,刷新渲染后模型并未更新到渲染区,本人最初的解决方法是,改变模型顶点坐标之后,通过设定模型颜色为变量,可以解决刷新渲染问题:
points->SetPoint(id, pp[0], pp[1], z); //更新顶点坐标
actor->GetProperty()->SetColor(0.194*tmp_i/(tmp_i+0.000001), 0.562, 0.75);
win->Render();
上面的方法看上去就是很拙劣,并非终极解决方案。一个偶然的机会,本人发现可以通过另一种方法解决,方法如下:
points->SetPoint(id, pp[0], pp[1], z); //更新顶点坐标
points->Modified();
win->Render();
不知道此种方法是否官方标准,但是看上去是那么回事,
呵呵,就这么点东西。。。
2022年9月26日 16:13
By knowing about history we may get aware of what kind of result we gain by doing what kind of things either good or evil. It inspires the students to understand their successes and failures. NCERT History Sample Paper Class 9 history shows the past patterns of behaviour or events and their outcome, which can help us avoid similar outcomes in the future. NCERT has introduced topic-wide study & learning material for all class 9th standard students for History.NCERT has introduced topic-wide study & learning material for all class 9th standard students for History.By knowing about history we may get aware of what kind of result we gain by doing what kind of things either good or evil. It inspires the students to understand their successes and failures.