mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-11 17:59:02 +00:00
Changed: Added particle system animation.
This commit is contained in:
parent
0edf2cd522
commit
dc367b7f43
2 changed files with 18 additions and 1 deletions
|
@ -262,7 +262,7 @@ namespace NLQT
|
||||||
|
|
||||||
|
|
||||||
//updateAnimation(_AnimationDialog->getTime());
|
//updateAnimation(_AnimationDialog->getTime());
|
||||||
|
updateAnimatePS();
|
||||||
// 10. Update Camera (depends on entities)
|
// 10. Update Camera (depends on entities)
|
||||||
// ...
|
// ...
|
||||||
|
|
||||||
|
@ -720,6 +720,19 @@ namespace NLQT
|
||||||
return icon;
|
return icon;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CObjectViewerWidget::updateAnimatePS(uint64 deltaTime)
|
||||||
|
{
|
||||||
|
static sint64 firstTime = NLMISC::CTime::getLocalTime();
|
||||||
|
static sint64 lastTime = NLMISC::CTime::getLocalTime();
|
||||||
|
if (deltaTime == 0)
|
||||||
|
{
|
||||||
|
deltaTime = NLMISC::CTime::getLocalTime() - lastTime;
|
||||||
|
}
|
||||||
|
lastTime += deltaTime;
|
||||||
|
float fdelta = 0.001f * (float) (lastTime - firstTime);
|
||||||
|
_Scene->animate ( fdelta);
|
||||||
|
}
|
||||||
|
|
||||||
#if defined(NL_OS_WINDOWS)
|
#if defined(NL_OS_WINDOWS)
|
||||||
|
|
||||||
typedef bool (*winProc)(NL3D::IDriver *driver, HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
|
typedef bool (*winProc)(NL3D::IDriver *driver, HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
|
||||||
|
|
|
@ -179,6 +179,10 @@ namespace NLQT
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
/// Update the animation time for Particle System animation.
|
||||||
|
/// @param deltaTime - set the manual animation time.
|
||||||
|
void updateAnimatePS(uint64 deltaTime = 0);
|
||||||
|
|
||||||
static CObjectViewerWidget *_objectViewerWidget;
|
static CObjectViewerWidget *_objectViewerWidget;
|
||||||
|
|
||||||
NLMISC::CLibraryContext *_LibContext;
|
NLMISC::CLibraryContext *_LibContext;
|
||||||
|
|
Loading…
Reference in a new issue