PeriDyno 1.0.0
Loading...
Searching...
No Matches
dyno::PSimulationThread Class Reference

#include <PSimulationThread.h>

Inheritance diagram for dyno::PSimulationThread:
Collaboration diagram for dyno::PSimulationThread:

Public Slots

void resetNode (std::shared_ptr< Node > node)
 
void resetQtNode (Qt::QtNode &node)
 
void syncNode (std::shared_ptr< Node > node)
 

Signals

void sceneGraphChanged ()
 
void oneFrameFinished (int frame)
 
void simulationFinished ()
 

Public Member Functions

void pause ()
 
void resume ()
 
void stop ()
 
void createNewScene ()
 
void createNewScene (std::shared_ptr< SceneGraph > scn)
 
void closeCurrentScene ()
 
void closeAllScenes ()
 
void run () override
 
void reset (int num)
 Reset the simulation.
 
void proceed (int num)
 Continue the simulation from the current frame.
 
void startUpdatingGraphicsContext ()
 
void stopUpdatingGraphicsContext ()
 
void setTotalFrames (int num)
 
int getTotalFrames ()
 
void takeOneStep ()
 
int getCurrentFrameNum ()
 
bool isPaused ()
 
bool isRunning ()
 

Static Public Member Functions

static PSimulationThreadinstance ()
 

Private Member Functions

 PSimulationThread ()
 
void notify ()
 

Private Attributes

std::atomic< int > mTotalFrame
 
bool mReset
 
bool mFinished
 
bool mOneStep = false
 
std::atomic< bool > mPaused
 
std::atomic< bool > mRunning
 
std::atomic< bool > mUpdatingGraphicsContext
 
std::shared_ptr< NodemActiveNode
 
std::chrono::milliseconds mTimeOut
 
std::timed_mutex mMutex
 
std::condition_variable_any mCond
 

Static Private Attributes

static std::atomic< PSimulationThread * > pInstance
 
static std::mutex mInstanceMutex
 

Detailed Description

Definition at line 19 of file PSimulationThread.h.

Constructor & Destructor Documentation

◆ PSimulationThread()

dyno::PSimulationThread::PSimulationThread ( )
private

Definition at line 20 of file PSimulationThread.cpp.

Here is the caller graph for this function:

Member Function Documentation

◆ closeAllScenes()

void dyno::PSimulationThread::closeAllScenes ( )

Definition at line 120 of file PSimulationThread.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ closeCurrentScene()

void dyno::PSimulationThread::closeCurrentScene ( )

Definition at line 103 of file PSimulationThread.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createNewScene() [1/2]

void dyno::PSimulationThread::createNewScene ( )

Definition at line 67 of file PSimulationThread.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createNewScene() [2/2]

void dyno::PSimulationThread::createNewScene ( std::shared_ptr< SceneGraph > scn)

Definition at line 85 of file PSimulationThread.cpp.

Here is the call graph for this function:

◆ getCurrentFrameNum()

int dyno::PSimulationThread::getCurrentFrameNum ( )

Definition at line 291 of file PSimulationThread.cpp.

Here is the call graph for this function:

◆ getTotalFrames()

int dyno::PSimulationThread::getTotalFrames ( )
inline

Definition at line 53 of file PSimulationThread.h.

Here is the caller graph for this function:

◆ instance()

PSimulationThread * dyno::PSimulationThread::instance ( )
static

Definition at line 35 of file PSimulationThread.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isPaused()

bool dyno::PSimulationThread::isPaused ( )
inline

Definition at line 59 of file PSimulationThread.h.

◆ isRunning()

bool dyno::PSimulationThread::isRunning ( )
inline

Definition at line 63 of file PSimulationThread.h.

◆ notify()

void dyno::PSimulationThread::notify ( )
private

Definition at line 137 of file PSimulationThread.cpp.

Here is the caller graph for this function:

◆ oneFrameFinished

void dyno::PSimulationThread::oneFrameFinished ( int frame)
signal
Here is the caller graph for this function:

◆ pause()

void dyno::PSimulationThread::pause ( )

Definition at line 50 of file PSimulationThread.cpp.

Here is the caller graph for this function:

◆ proceed()

void dyno::PSimulationThread::proceed ( int num)

Continue the simulation from the current frame.

Definition at line 218 of file PSimulationThread.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reset()

void dyno::PSimulationThread::reset ( int num)

Reset the simulation.

Definition at line 200 of file PSimulationThread.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ resetNode

void dyno::PSimulationThread::resetNode ( std::shared_ptr< Node > node)
slot

Definition at line 229 of file PSimulationThread.cpp.

Here is the call graph for this function:

◆ resetQtNode

void dyno::PSimulationThread::resetQtNode ( Qt::QtNode & node)
slot

Definition at line 237 of file PSimulationThread.cpp.

Here is the caller graph for this function:

◆ resume()

void dyno::PSimulationThread::resume ( )

Definition at line 55 of file PSimulationThread.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ run()

void dyno::PSimulationThread::run ( )
override

Definition at line 141 of file PSimulationThread.cpp.

Here is the call graph for this function:

◆ sceneGraphChanged

void dyno::PSimulationThread::sceneGraphChanged ( )
signal
Here is the caller graph for this function:

◆ setTotalFrames()

void dyno::PSimulationThread::setTotalFrames ( int num)

Definition at line 278 of file PSimulationThread.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ simulationFinished

void dyno::PSimulationThread::simulationFinished ( )
signal
Here is the caller graph for this function:

◆ startUpdatingGraphicsContext()

void dyno::PSimulationThread::startUpdatingGraphicsContext ( )

Definition at line 267 of file PSimulationThread.cpp.

Here is the caller graph for this function:

◆ stop()

void dyno::PSimulationThread::stop ( )

Definition at line 61 of file PSimulationThread.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ stopUpdatingGraphicsContext()

void dyno::PSimulationThread::stopUpdatingGraphicsContext ( )

Definition at line 272 of file PSimulationThread.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ syncNode

void dyno::PSimulationThread::syncNode ( std::shared_ptr< Node > node)
slot

Definition at line 249 of file PSimulationThread.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ takeOneStep()

void dyno::PSimulationThread::takeOneStep ( )

Definition at line 284 of file PSimulationThread.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ mActiveNode

std::shared_ptr<Node> dyno::PSimulationThread::mActiveNode
private

Definition at line 100 of file PSimulationThread.h.

◆ mCond

std::condition_variable_any dyno::PSimulationThread::mCond
private

Definition at line 104 of file PSimulationThread.h.

◆ mFinished

bool dyno::PSimulationThread::mFinished
private

Definition at line 92 of file PSimulationThread.h.

◆ mInstanceMutex

std::mutex dyno::PSimulationThread::mInstanceMutex
staticprivate

Definition at line 85 of file PSimulationThread.h.

◆ mMutex

std::timed_mutex dyno::PSimulationThread::mMutex
private

Definition at line 103 of file PSimulationThread.h.

◆ mOneStep

bool dyno::PSimulationThread::mOneStep = false
private

Definition at line 93 of file PSimulationThread.h.

◆ mPaused

std::atomic<bool> dyno::PSimulationThread::mPaused
private

Definition at line 95 of file PSimulationThread.h.

◆ mReset

bool dyno::PSimulationThread::mReset
private

Definition at line 91 of file PSimulationThread.h.

◆ mRunning

std::atomic<bool> dyno::PSimulationThread::mRunning
private

Definition at line 96 of file PSimulationThread.h.

◆ mTimeOut

std::chrono::milliseconds dyno::PSimulationThread::mTimeOut
private

Definition at line 102 of file PSimulationThread.h.

◆ mTotalFrame

std::atomic<int> dyno::PSimulationThread::mTotalFrame
private

Definition at line 89 of file PSimulationThread.h.

◆ mUpdatingGraphicsContext

std::atomic<bool> dyno::PSimulationThread::mUpdatingGraphicsContext
private

Definition at line 98 of file PSimulationThread.h.

◆ pInstance

std::atomic< PSimulationThread * > dyno::PSimulationThread::pInstance
staticprivate

Definition at line 84 of file PSimulationThread.h.


The documentation for this class was generated from the following files: