1 Star 0 Fork 2

FantasyVR/position-based-dynamic-GPU

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
TimeManager.cpp 666 Bytes
一键复制 编辑 原始数据 按行查看 历史
李开诚 提交于 2020-06-04 13:39 +08:00 . first commit
#include "TimeManager.h"
using namespace PBD;
TimeManager* TimeManager::current = 0;
TimeManager::TimeManager ()
{
time = 0;
h = static_cast<Real>(0.005);
}
TimeManager::~TimeManager ()
{
current = 0;
}
TimeManager* TimeManager::getCurrent ()
{
if (current == 0)
{
current = new TimeManager ();
}
return current;
}
void TimeManager::setCurrent (TimeManager* tm)
{
current = tm;
}
bool TimeManager::hasCurrent()
{
return (current != 0);
}
Real TimeManager::getTime()
{
return time;
}
void TimeManager::setTime(Real t)
{
time = t;
}
Real TimeManager::getTimeStepSize()
{
return h;
}
void TimeManager::setTimeStepSize(Real tss)
{
h = tss;
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/fantasyvr/position-based-dynamic-GPU.git
git@gitee.com:fantasyvr/position-based-dynamic-GPU.git
fantasyvr
position-based-dynamic-GPU
position-based-dynamic-GPU
master

搜索帮助