|
TrueReality
v0.1.1912
|
Class which encapsulates the frame number, reference time and calendar time of specific frame, used to synchronize operations on the scene graph and other machines when using a graphics cluster. More...
#include <FrameStamp.h>


Public Types | |
| using | BaseClass = trBase::Base |
Public Types inherited from trBase::Base | |
| using | BaseClass = trBase::SmrtClass |
Public Types inherited from trBase::SmrtClass | |
| using | BaseClass = osg::Referenced |
Public Member Functions | |
| FrameStamp (const std::string name=CLASS_TYPE) | |
| Holds the class type name for efficient comparisons. More... | |
| FrameStamp (const osg::FrameStamp fs, const std::string name=CLASS_TYPE) | |
| Constructor. More... | |
| virtual const std::string & | GetType () const override |
| Returns the class type. More... | |
| virtual void | SetName (const std::string &name) |
| Sets this instances name. More... | |
| virtual osg::FrameStamp * | AsOSGClass () |
| Returns a pointer to the internal OSG FrameStamp. More... | |
| virtual const osg::FrameStamp * | AsOSGClass () const |
| Returns a constant pointer to the internal OSG FrameStamp. More... | |
| void | SetFrameNumber (unsigned int fnum) |
| Sets frame number. More... | |
| unsigned int | GetFrameNumber () const |
| Gets frame number. More... | |
| void | SetReferenceTime (double refTime) |
| Sets reference time. More... | |
| double | GetReferenceTime () const |
| Gets reference time. More... | |
| void | SetSimulationTime (double refTime) |
| Sets simulation time. More... | |
| double | GetSimulationTime () const |
| Gets simulation time. More... | |
| void | SetCalendarTime (const tm &calendarTime) |
| Sets calendar time. More... | |
| void | GetCalendarTime (tm &calendarTime) const |
| Gets calendar time. More... | |
| FrameStamp & | operator= (const FrameStamp &fs) |
| Assignment operator. More... | |
Public Member Functions inherited from trBase::Base | |
| Base (const std::string &name=CLASS_TYPE) | |
| Holds the class type name for efficient comparisons. More... | |
| virtual const std::string & | GetName () |
| Returns this instances name. More... | |
| virtual const std::string & | GetName () const |
| Returns this instances name. More... | |
| virtual void | SetUUID (const trBase::UniqueId &id) |
| Overwrites the default internal UUID with the passed in one. More... | |
| virtual const trBase::UniqueId & | GetUUID (void) |
| Returns the instances Universally Unique ID. More... | |
Public Member Functions inherited from trBase::SmrtClass | |
| SmrtClass () | |
| Adds an easy and swappable access to the base class. More... | |
| SmrtClass (bool threadSafeRefUnref) | |
| Constructor. More... | |
| SmrtClass (const SmrtClass &inst) | |
| Copy constructor. More... | |
| virtual bool | GetThreadSafeRefUnref () |
| Get whether a mutex is used to ensure Ref() and UnRef() are thread safe. More... | |
| OpenThreads::Mutex * | GetRefMutex () const |
| Get the mutex used to ensure thread safety of Ref()/UnRef(). More... | |
| int | Ref () const |
| Increment the reference count by one, indicating that this object has another pointer which is referencing it. More... | |
| int | Unref () const |
| Decrement the reference count by one, indicating that a pointer to this object is no longer referencing it. More... | |
| int | UnRefNoDelete () const |
| Decrement the reference count by one, indicating that a pointer to this object is no longer referencing it. More... | |
| int | ReferenceCount () const |
| Return the number of pointers currently referencing this object. More... | |
Static Public Attributes | |
| static const trUtil::RefStr | CLASS_TYPE = trUtil::RefStr("trCore::Nodes::FrameStamp") |
| Adds an easy and swappable access to the base class. More... | |
Static Public Attributes inherited from trBase::Base | |
| static const trUtil::RefStr | CLASS_TYPE = trUtil::RefStr("trBase::Base") |
| Adds an easy and swappable access to the base class. More... | |
Protected Member Functions | |
| ~FrameStamp () | |
| dtor. More... | |
Protected Member Functions inherited from trBase::Base | |
| ~Base () | |
| Base destructor. More... | |
Protected Member Functions inherited from trBase::SmrtClass | |
| ~SmrtClass () | |
Protected Attributes | |
| trBase::SmrtPtr< osg::FrameStamp > | mFrameStamp |
| The frame stamp. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from trBase::SmrtClass | |
| static OpenThreads::Mutex * | GetGlobalReferencedMutex () |
| Get the optional global Referenced mutex, this can be shared between all trBase::SmrtClass. More... | |
Class which encapsulates the frame number, reference time and calendar time of specific frame, used to synchronize operations on the scene graph and other machines when using a graphics cluster.
Note the calendar time can be an artificial simulation time or capture the real time of day etc.
Definition at line 54 of file FrameStamp.h.
Definition at line 58 of file FrameStamp.h.
| trCore::Nodes::FrameStamp::FrameStamp | ( | const std::string | name = CLASS_TYPE | ) |
Holds the class type name for efficient comparisons.
Constructor.
| name | (Optional) The name. |
Definition at line 33 of file FrameStamp.cpp.
References mFrameStamp, and trBase::Base::SetName().

| trCore::Nodes::FrameStamp::FrameStamp | ( | const osg::FrameStamp | fs, |
| const std::string | name = CLASS_TYPE |
||
| ) |
Constructor.
| fs | The file system. |
| name | (Optional) The name. |
Definition at line 40 of file FrameStamp.cpp.
References mFrameStamp, and trBase::Base::SetName().

|
protected |
dtor.
Definition at line 127 of file FrameStamp.cpp.
|
virtual |
Returns a pointer to the internal OSG FrameStamp.
Definition at line 59 of file FrameStamp.cpp.
References trBase::SmrtPtr< T >::Get(), and mFrameStamp.
Referenced by trCore::Nodes::NodeVisitor::SetFrameStamp().


|
virtual |
Returns a constant pointer to the internal OSG FrameStamp.
Definition at line 65 of file FrameStamp.cpp.
References trBase::SmrtPtr< T >::Get(), and mFrameStamp.

| void trCore::Nodes::FrameStamp::GetCalendarTime | ( | tm & | calendarTime | ) | const |
Gets calendar time.
| [in,out] | calendarTime | The calendar time. |
Definition at line 113 of file FrameStamp.cpp.
References mFrameStamp.
| unsigned int trCore::Nodes::FrameStamp::GetFrameNumber | ( | ) | const |
Gets frame number.
Definition at line 77 of file FrameStamp.cpp.
References mFrameStamp.
| double trCore::Nodes::FrameStamp::GetReferenceTime | ( | ) | const |
Gets reference time.
Definition at line 89 of file FrameStamp.cpp.
References mFrameStamp.
| double trCore::Nodes::FrameStamp::GetSimulationTime | ( | ) | const |
Gets simulation time.
Definition at line 101 of file FrameStamp.cpp.
References mFrameStamp.
|
overridevirtual |
Returns the class type.
Implements trBase::Base.
Definition at line 47 of file FrameStamp.cpp.
References CLASS_TYPE.
| FrameStamp & trCore::Nodes::FrameStamp::operator= | ( | const FrameStamp & | fs | ) |
Assignment operator.
| fs | The file system. |
Definition at line 119 of file FrameStamp.cpp.
References trBase::Base::GetName(), mFrameStamp, and SetName().

| void trCore::Nodes::FrameStamp::SetCalendarTime | ( | const tm & | calendarTime | ) |
Sets calendar time.
| calendarTime | The calendar time. |
Definition at line 107 of file FrameStamp.cpp.
References mFrameStamp.
| void trCore::Nodes::FrameStamp::SetFrameNumber | ( | unsigned int | fnum | ) |
Sets frame number.
| fnum | The fnum. |
Definition at line 71 of file FrameStamp.cpp.
References mFrameStamp.
|
virtual |
Sets this instances name.
| name | The name. |
Reimplemented from trBase::Base.
Definition at line 53 of file FrameStamp.cpp.
References trBase::Base::SetName().
Referenced by operator=().


| void trCore::Nodes::FrameStamp::SetReferenceTime | ( | double | refTime | ) |
Sets reference time.
| refTime | The reference time. |
Definition at line 83 of file FrameStamp.cpp.
References mFrameStamp.
| void trCore::Nodes::FrameStamp::SetSimulationTime | ( | double | refTime | ) |
Sets simulation time.
| refTime | The reference time. |
Definition at line 95 of file FrameStamp.cpp.
References mFrameStamp.
|
static |
Adds an easy and swappable access to the base class.
Definition at line 60 of file FrameStamp.h.
Referenced by GetType().
|
protected |
The frame stamp.
Definition at line 203 of file FrameStamp.h.
Referenced by AsOSGClass(), FrameStamp(), GetCalendarTime(), GetFrameNumber(), GetReferenceTime(), GetSimulationTime(), operator=(), SetCalendarTime(), SetFrameNumber(), SetReferenceTime(), and SetSimulationTime().