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