![]() |
VR-Forces Developer's Guide
|
This class will load in and return data from a movement file.
Classes | |
| struct | MovementFileLoader |
Public Types | |
| typedef boost::function < DtMovementFileLoaderInterface *()> | MovementFileLoaderInterfaceCreator |
| typedef std::vector < DtScriptedMovementFileConfiguration > | MovementFileConfigurations |
Public Member Functions | |
| DtMovementFile () | |
| virtual | ~DtMovementFile () |
| DtMovementFile (const DtMovementFile &) | |
| DtMovementFile & | operator= (const DtMovementFile &) |
| virtual double | simTime (int) const |
| virtual int | numRows () const |
| virtual bool | hasOffsetOrientation () const |
| virtual DtVector | bodyOffsetVector (int row) const |
| virtual DtTaitBryan | orientationOffset (int row) const |
| virtual bool | isLoaded () const |
| virtual bool | load (const DtFilename &file, const std::string &configuration, int rowsToLoad=-1) |
| virtual int | movementRow (double) const |
| virtual void | reset () |
| virtual void | setObjectOffsetLocation (int row, const DtVector &) |
| virtual void | setObjectOffsetOrientation (int row, const DtTaitBryan &) |
| virtual void | setTimeDelta (int forRow, double timeDelta) |
| virtual void | removeRow (int) |
| virtual void | setDefaultTimeScale (double) |
| virtual double | defaultTimeScale () const |
| const DtScriptedMovementFileConfiguration & | configuration () const |
| DtScriptedMovementFileConfiguration & | configuration () |
Static Public Member Functions | |
| static DtScriptedMovementFileConfiguration | defaultConfigurationForFile (const DtFilename &) |
| static std::vector< std::string > | dialogStrings () |
| static int | addLoadableFileType (std::string extension, std::string displayString, MovementFileLoaderInterfaceCreator) |
| static std::vector< std::string > | supportedExtensions () |
| static void | removeLoadableFileType (const DtString &extension) |
| static DtMovementFileLoaderInterface * | loader (const DtFilename &filename) |
| static std::vector< std::string > | formatsForFile (const DtFilename &) |
| static MovementFileConfigurations | loadMovementFileConfigurations (const DtFilename &directory) |
| static bool | saveMovementFileConfigurations (const MovementFileConfigurations &configs, const DtFilename &file) |
Protected Types | |
| typedef std::map< std::string, MovementFileLoader > | MovementFileLoaders |
Protected Attributes | |
| DtScriptedMovementFileConfiguration | myConfiguration |
| double | myDefaultTimeScale |
| DtMovementFileData | myMovementFileData |
| std::shared_ptr < DtMovementFileLoaderInterface > | myMovementFileInterface |
Static Protected Attributes | |
| static MovementFileLoaders * | theMovementFileLoaders |
| typedef boost::function<DtMovementFileLoaderInterface* ()> DtMovementFile::MovementFileLoaderInterfaceCreator |
| typedef std::vector<DtScriptedMovementFileConfiguration> DtMovementFile::MovementFileConfigurations |
|
protected |
| DtMovementFile::DtMovementFile | ( | ) |
CTOR.
|
virtual |
DTOR.
| DtMovementFile::DtMovementFile | ( | const DtMovementFile & | ) |
Copy constructor.
| DtMovementFile& DtMovementFile::operator= | ( | const DtMovementFile & | ) |
Assignemtn operator.
Returns the simTime at the given offset, or 0 if greater than current number of rows loaded or there is no configuration.
|
virtual |
Returns the number of rows currently read in.
|
virtual |
Returns true if there is an offset orientation defined in this file.
|
virtual |
Returns the body offset at the given row, or zero if the row is greater than the number of rows read or there is no configuration.
|
virtual |
Returns the orientation offset for a given row. Assumed to be offset from current orientation. The orientation returned is in topographic projection.
|
virtual |
Returns true if there are more than 0 rows read in.
|
virtual |
Loads from the specified file, given the configuration and the number of rows to load. If -1 reads all available rows.
Returns the row that matches the given sim time. If not loaded returns -1.
|
virtual |
Clears out data.
|
virtual |
If the row is -1 or > than the number of rows will add to the end, else will replace current value. Value is in body coordinates.
|
virtual |
If the row is -1 or > than the number of rows will add to the end, else will replace current value.
Sets the time delta for the current row from the previous row. Does not effect any other row.
|
virtual |
Removes the current row.
|
virtual |
Adjusts all the rows and sets a default timescale for each row. Will also apply this timescale to any future rows added.
|
virtual |
|
static |
Given a file, look at its extension and have the loader for that file (if registered) return the default configuration for that file type. If not registered returns default precision movement configruation.
|
static |
Returns a filter list of strings that can be put into a file dialog to choose amongst existing loadable file types.
|
static |
Adds a new loadable file type and the creator for that file. Returns the number of items now in the list.
Referenced by DtMovementFileAutoRegister::DtMovementFileAutoRegister().
|
static |
Returns a list of the supported extensions.
|
static |
Removes a loadable type.
Referenced by DtMovementFileAutoRegister::~DtMovementFileAutoRegister().
|
static |
Returns a new loader given the filename, or null if extension for the file does not exist. The return pointer must be freed by caller.
|
static |
Queries the appropriate file loader interface to see what the available formattings are for the particular file.
|
static |
Loads up the movement file configurations from the given directory and returns the list of items.
|
static |
Saves the list of movement file configurations to the given filename.
|
inline |
Returns the configuration for the file.
|
inline |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
protected |