![]() |
VR-Forces 5.0.2 Developer's Guide
|
DtVrfParameterDb is the base object parameter database class.
It holds a collection of DtVrfObjectParameters entries, keyed on DtObjectType. It has member functions for adding, removing, and looking up DtVrfObjectParameters entries. It also includes an interface for load() and save(), but with an empty implementation. You can create derived types of object parameter database classes that know how to load and save themselves from file in whatever format you choose.
VR-Forces has one kind of derived DtVrfParameterDb type, DtMtlParameterDb. DtMtlParameterDb extends the base class by adding the ability to load from and save to DtReaderWriter (MTL) format. The DtMtlParameterDb class knows how to read and write object parameter database files in this format and in the (pre-VR-Forces 3.7) single file format.
The DtCgf class is responsible for creating the object parameter database object. By default, it creates an instance of type DtMtlParameterDb. You can override this behavior and have VR-Forces create some other kind of derived DtVrfObjectParametersDb. To do this, register a static creator function for the new kind of DtVrfObjectParametersDb with the DtDefaultVrfCreator class before initializing the DtCgf, for example:
The example createParamDbDynamically demonstrates how to use a different type of object parameter database with VR-Forces.