
本文共 2152 字,大约阅读时间需要 7 分钟。
VTK���Utilities���FrameRate
VTK���Utilities���FrameRate
-
FrameRate���������������
- FrameRate������������������������������������������������������
-
������������
- ������������������
- ���������������������
- ������������
- ������������������������
- ������������������
VTK������������FrameRate������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������3D������������������������������������������������������������������
������������������������������������������������������������������������������3D������������������������������������������������������������������������������������������������������������FrameRate������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������
���������������FrameRate.cxx
���������������VTK������������FrameRate������������������������
```cpp #includeclass 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 ���������������������������������
发表评论
最新留言
关于作者
