|
AGXDynamics
2.31.1.0
|
Frame reader that supports the files-and-foldes prototype format. More...
#include <FileTrack.h>
Inheritance diagram for agxData::FileFrameReader:Public Types | |
| enum | BinaryReadStrategy { FSTREAM, CACHED, DIRECT } |
| Controls how the binary data of a frame is read from disk. More... | |
| typedef agx::observer_ptr< const Event > | EventConstObserver |
| typedef agx::ref_ptr< const Event > | EventConstRef |
| typedef agx::observer_ptr< Event > | EventObserver |
| typedef agx::ref_ptr< Event > | EventRef |
Public Member Functions | |
| FileFrameReader (agxData::JournalArchive::Session *session) | |
| void | addDataBinding (const agx::Path &internalPath, const agx::Path &externalPath, bool recursive=false) |
| Register a data binding. More... | |
| void | addDataBinding (const agx::Path &path, bool recursive=false) |
| Alias for addDataBinding(path, path) More... | |
| void | addListener (EventListener *listener) |
| virtual void | advanceToNextFrame () override |
| AGX_DECLARE_VECTOR_TYPES (Event) | |
| template<typename T > | |
| T * | as () |
| Subclass casting. More... | |
| template<typename T > | |
| const T * | as () const |
| template<typename T > | |
| T * | asSafe () |
| Safe subclass casting, return nullptr if template type does not match. More... | |
| template<typename T > | |
| const T * | asSafe () const |
| virtual void | buildNavigationTree (agxJson::Value &eNode) const |
| void | clearDataBindings () |
| Remove all data bindings. More... | |
| virtual void | configure (TiXmlElement *) |
| agx::UInt | findFrameAtTime (agx::Real time) |
| agx::String | fullName () const |
| agx::String | fullPath () const |
| agx::String | fullPath (const agx::Object *root) const |
| agx::Object * | getAutoScopedResource (const agx::Path &path, agx::Model *model=nullptr) |
| const agx::Object * | getAutoScopedResource (const agx::Path &path, agx::Model *model=nullptr) const |
| template<typename T > | |
| T * | getAutoScopedResource (const agx::Path &path) |
| template<typename T > | |
| const T * | getAutoScopedResource (const agx::Path &path) const |
| BinaryReadStrategy | getBinaryReadStrategy () const |
| agx::Object * | getContext () |
| const agx::Object * | getContext () const |
| template<typename T > | |
| T * | getContext () |
| template<typename T > | |
| const T * | getContext () const |
| const Frame::DataBindingRefVector & | getDataBindings () const |
| agx::UInt | getFrameIndexToRead () const |
| agx::UInt | getFrameOffset () const |
| virtual agx::UInt | getFrameStride () override |
| SerializedFrame::HeaderFormat | getHeaderFormat () const |
| agx::UInt32 | getId () const |
| const agx::Name & | getImplementationName () const |
| agx::Model * | getModel () |
| const agx::Model * | getModel () const |
| const agx::Name & | getName () const |
| virtual agx::UInt | getNextFrameIndex () override |
| agx::Object * | getNextSibling () |
| const agx::Object * | getNextSibling () const |
| agx::Path | getPath () const |
| agx::Path | getPath (const agx::Object *root) const |
| int | getReferenceCount () const |
| agx::Object * | getResource (const agx::Path &path, agx::Model *model=nullptr) |
| const agx::Object * | getResource (const agx::Path &path, agx::Model *model=nullptr) const |
| template<typename T > | |
| T * | getResource (const agx::Path &path) |
| template<typename T > | |
| const T * | getResource (const agx::Path &path) const |
| virtual agx::Object * | getResourceImpl (const agx::Path &path, agx::Model *model) |
| agx::Object * | getRootContext () |
| const agx::Object * | getRootContext () const |
| virtual const agxData::JournalArchive::Session * | getSession () const override |
| virtual agx::Real | getTimeStep () override |
| Track * | getTrack () |
| const Track * | getTrack () const |
| bool | hasListener (EventListener *listener) |
| bool | hasParent (const agx::Object *node) const |
| template<typename T > | |
| bool | is () const |
| Subclass test. More... | |
| bool | isActive () const |
| bool | isUnique () const |
| virtual bool | jumpToFrame (agx::UInt frameIndex) override |
| Select which frame that should be returned by the next call to 'readFrame'. More... | |
| virtual bool | jumpToTime (agx::Real time) override |
| void | loadDataBindings (const agx::String &xmlFilePath) |
| Load bindings from an xml file. More... | |
| bool | loadDataBindingsJSON (const agx::String &jsonFilePath) |
| virtual void | printSubtree () const |
| virtual Frame * | readFrame () override |
| Reads the next frame from disk using the virtual readFrame(UInt) method. More... | |
| virtual void | rebind () |
| void | reference (void *ptr=nullptr) const |
| Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it. More... | |
| bool | removeDataBinding (const agx::Path &path) |
| bool | removeDataBinding (const agx::Path &internalPath, const agx::Path &externalPath) |
| void | removeListener (EventListener *listener) |
| virtual void | save (TiXmlElement *) const |
| void | setBinaryReadStrategy (BinaryReadStrategy strategy) |
| virtual void | setContext (agx::Object *context) |
| void | setHeaderFormat (SerializedFrame::HeaderFormat format) |
| void | setId (UInt32 id) |
| void | setModel (agx::Model *model) |
| Set the object model (handled automatically). More... | |
| void | setName (const agx::Name &name) |
| Set the name of the object. More... | |
| virtual bool | shouldExtract (const agx::Path &path) override |
| virtual void | snapshot (TiXmlNode *, const String &) const |
| void | unreference (void *ptr=nullptr) const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
| void | unreference_nodelete () const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
Static Public Member Functions | |
| static agx::Model * | ClassModel () |
| static agx::String | generateName (const agx::String &bindPath) |
| static const HashSet< Object * > & | getActiveObjects () |
| static bool | getEnableRebind () |
| Should rebinding be allowed? Right now a global setting. More... | |
| static Object * | load (TiXmlElement *eObject, Device *device) |
| template<typename T > | |
| static T * | load (TiXmlElement *eObject, Device *device) |
| static Object * | load (const String &path, Device *device, const String &type="", size_t instance=0) |
| static Object * | load (const String &path, Device *device, const String &type, const String &attribute, const String &value) |
| static void | load (const String &path, Device *device, ObjectPtrVector &loadedObjects) |
| template<typename T > | |
| static T * | load (const String &path, Device *device, const String &type="", size_t instance=0) |
| template<typename T > | |
| static T * | load (const String &path, Device *device, const String &type, const String &attribute, const String &value) |
| static TiXmlDocument | openDocument (const String &path) |
| static void | setEnableRebind (bool flag) |
| Sets if rebinding of objects should be allowed (Right now a global setting). More... | |
| template<typename T > | |
| static bool | ValidateCast (const Referenced *object) |
Protected Types | |
| typedef agx::HashSet< agx::Path > | BindingTable |
Protected Member Functions | |
| virtual | ~FileFrameReader () |
| void | addDataBinding (Frame::DataBinding *binding) |
| void | allocateObserverVector () const |
| void | deleteUsingDeleteHandler () const |
| virtual void | endSequence () override |
| virtual void | prepareSequence (agx::UInt startFrame, agx::UInt lastFrame) override |
Static Protected Member Functions | |
| static DeleteHandler * | getDeleteHandler () |
| static void | setDeleteHandler (DeleteHandler *handler) |
| Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to. More... | |
Protected Attributes | |
| BindingTable | m_bindingTable |
| FrameRef | m_currentFrame |
| BindingTable | m_exclusions |
| FrameRefVector | m_frameMergeSequence |
| agx::UInt | m_frameToRead |
| agx::Mutex | m_mutex |
| ObserverContainer | m_observers |
| AtomicValue | m_refCount |
Frame reader that supports the files-and-foldes prototype format.
Definition at line 48 of file FileTrack.h.
|
protectedinherited |
Definition at line 94 of file DiskTrack.h.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Controls how the binary data of a frame is read from disk.
| Enumerator | |
|---|---|
| FSTREAM | |
| CACHED | |
| DIRECT | |
Definition at line 67 of file FileTrack.h.
| agxData::FileFrameReader::FileFrameReader | ( | agxData::JournalArchive::Session * | session | ) |
|
protectedvirtual |
|
inherited |
Register a data binding.
The external path is implementation specific. The internal path is where the data element is stored in the frame.
Eg. a data buffer may be imported from disk using the external path "RigidBody.velocity", and then pushed to a data track with the internal path "foo". The corresponding outputs connected to the track must then bind to "foo" to retrieve the data.
Alias for addDataBinding(path, path)
|
protectedinherited |
|
inherited |
|
overridevirtualinherited |
Reimplemented from agxData::FrameReader.
|
inherited |
|
protectedinherited |
|
inherited |
Subclass casting.
Template type must match actual type, dynamic_cast assertion will fail otherwise.
Referenced by agx::InternalData::get(), agxVehicle::Track::getNode(), agx::InternalData::getOrCreate(), and agx::InternalData::hasData().
|
inherited |
|
inherited |
Safe subclass casting, return nullptr if template type does not match.
Referenced by agxUtil::CollectBodiesAndWiresVisitor::visit().
|
inherited |
|
virtualinherited |
Reimplemented in agxData::Buffer, agxData::Value, agx::Model, agx::Component, and agx::Pointer.
|
staticinherited |
|
inherited |
Remove all data bindings.
|
inlinevirtualinherited |
|
protectedinherited |
|
overrideprotectedvirtual |
Reimplemented from agxData::DiskFrameReader.
|
inherited |
|
inherited |
|
inherited |
|
staticinherited |
|
staticinherited |
|
inherited |
|
inherited |
|
inherited |
Definition at line 428 of file Object.h.
References agx::Referenced::is().
|
inherited |
| BinaryReadStrategy agxData::FileFrameReader::getBinaryReadStrategy | ( | ) | const |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
staticprotectedinherited |
|
staticinherited |
Should rebinding be allowed? Right now a global setting.
|
inherited |
| agx::UInt agxData::FileFrameReader::getFrameOffset | ( | ) | const |
Definition at line 203 of file FileTrack.h.
|
overridevirtualinherited |
Reimplemented from agxData::FrameReader.
|
inherited |
|
inherited |
Definition at line 370 of file Object.h.
Referenced by agxData::EntityStorage::indexToId().
|
inherited |
|
inherited |
|
inherited |
Definition at line 369 of file Object.h.
Referenced by agxData::EntityStorage::get(), agxData::FormatBinding< T >::getFormat(), and agxData::EntityPtr::operator()().
|
overridevirtualinherited |
Reimplemented from agxData::FrameReader.
|
inherited |
|
inherited |
|
inherited |
Referenced by agxData::EntityStorage::dereferenceMultipliedAttribute(), and agxData::EntityInstance::verifyIndex().
|
inherited |
| root | A node along the parent path from this object. |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Definition at line 414 of file Object.h.
References agx::Referenced::is().
|
inherited |
|
virtualinherited |
|
inherited |
|
inherited |
|
overridevirtual |
Implements agxData::DiskFrameReader.
|
overridevirtualinherited |
Reimplemented from agxData::FrameReader.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Subclass test.
Referenced by agx::Object::getAutoScopedResource(), agxData::EntityStorage::getInstances(), and agx::Object::getResource().
|
inherited |
|
overridevirtual |
Select which frame that should be returned by the next call to 'readFrame'.
Reimplemented from agxData::FrameReader.
|
overridevirtual |
Reimplemented from agxData::FrameReader.
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
inherited |
Load bindings from an xml file.
Syntax example:
<DataFrame> <DataBinding internal="foo" external="bar"/> <DataBinding path="baz"/> </DataFrame>
|
inherited |
|
staticinherited |
|
overrideprotectedvirtual |
Reimplemented from agxData::DiskFrameReader.
|
inlinevirtualinherited |
Reimplemented in agx::Component.
|
overridevirtualinherited |
Reads the next frame from disk using the virtual readFrame(UInt) method.
Does frame merging from previous key frame when needed.
Implements agxData::FrameReader.
|
inlinevirtualinherited |
Reimplemented in agx::Task, agx::Clock, agx::Parameter, agxData::Value, agx::Component, agxIO::KeyEvent, and agxData::FunctionValue.
Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it.
This method should be used with care, always balanced with the same number of calls to unreference.
|
inherited |
|
inherited |
|
inherited |
|
inlinevirtualinherited |
Reimplemented in agx::Clock.
| void agxData::FileFrameReader::setBinaryReadStrategy | ( | BinaryReadStrategy | strategy | ) |
|
virtualinherited |
Reimplemented in agx::Task, and agxData::FunctionValue.
|
staticprotectedinherited |
Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.
|
staticinherited |
Sets if rebinding of objects should be allowed (Right now a global setting).
Allowing it when adding larger parts to the system tree might hit performance, so it might be smarter to disable it first, then add, and then enable again.
|
inherited |
|
inherited |
Set the object model (handled automatically).
|
overridevirtualinherited |
Reimplemented from agxData::FrameReader.
Reimplemented in agx::Component.
Definition at line 106 of file Object.h.
References agx::getModel(), and agx::root().
Decrement the reference count by one, indicating that a pointer to this object is referencing it.
If the reference count goes to zero, it is assumed that this object is no longer referenced and is automatically deleted.
This method should be used with care, always balanced with the same number of calls to reference.
Referenced by agxData::EntityRef< ContactMaterialPtr >::~EntityRef().
|
inherited |
Decrement the reference count by one, indicating that a pointer to this object is referencing it.
However, do not delete it, even if ref count goes to 0. Warning, unref_nodelete() should only be called if the user knows exactly who will be responsible for, one should prefer unref() over unref_nodelete() as the later can lead to memory leaks.
|
staticinherited |
|
protectedinherited |
Definition at line 97 of file DiskTrack.h.
|
protectedinherited |
Definition at line 90 of file DiskTrack.h.
|
protectedinherited |
Definition at line 98 of file DiskTrack.h.
|
protectedinherited |
Definition at line 92 of file DiskTrack.h.
|
protectedinherited |
Definition at line 89 of file DiskTrack.h.
|
protectedinherited |
Definition at line 88 of file DiskTrack.h.
|
mutableprotectedinherited |
Definition at line 239 of file Referenced.h.
|
mutableprotectedinherited |
Definition at line 241 of file Referenced.h.