VTK:Utilities之FrameRate
发布日期:2021-05-12 04:01:22 浏览次数:12 分类:精选文章

本文共 2152 字,大约阅读时间需要 7 分钟。

VTK���Utilities���FrameRate

VTK���Utilities���FrameRate

  • FrameRate���������������

    • FrameRate������������������������������������������������������
  • ������������

    • ������������������
      • ���������������������
    • ������������
      • ������������������������

VTK������������FrameRate������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������3D������������������������������������������������������������������

������������������������������������������������������������������������������3D������������������������������������������������������������������������������������������������������������FrameRate������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������

���������������FrameRate.cxx

���������������VTK������������FrameRate������������������������

```cpp #include
#include

class FrameRateUtil { private: int frameRate; int frameCount; double lastTime;

public: FrameRateUtil() { frameRate = 0; frameCount = 0; lastTime = 0; }

void Update() {
static double currentTime = vtkInteractor::GetTime();
frameCount++;
if (currentTime - lastTime >= 1.0 / 60) {
frameRate = 1000 / (currentTime - lastTime);
lastTime = currentTime;
}
}
void SetRenderMode(int mode) {
// ������������������������������������������
}

};

������������������������������������VTK������������������������������������FrameRateUtil������������������������CPU������������������5ms���������������������������������������������������������������������������������������������Update���������������������������������������������������������������

������������������VTK���FrameRate���������������������������������������������������������������������������������������������������������������������������������������3D������������������3D��������������������������������� Bharat ���������������������������������

上一篇:VTK:Utilities之FullScreen
下一篇:VTK:Utilities之FilenameFunctions

发表评论

最新留言

能坚持,总会有不一样的收获!
[***.219.124.196]2025年04月16日 19时20分10秒