The Scenario Metrics example demonstrates the following:
- How to export backend scenario metrics to a text file for later use.
- How to create callbacks on the backend to collect the scenario metrics.
VR-Forces includes an architecture for registering callbacks on the backend( DtCgf class). This allows one to regestier pre and post tick callbacks.
This example creates a DtMetricCollector class. It registers a postTickCallback on the DtCgf class to be able to query for scenario metrics each tick.
Since this example is loaded as a plugin, it can be used in conjunction with the released VR-Forces application
How to Run the Example
- In the Launcher, click the Plug-ins button to bring up the Plug-ins Selection dialog. Enable the plugin. Then launch VR-Forces.
- To view the new behavior, load the scenario data\scenarios\developer_toolkit_examples\scenarioMetrics\scenarioMetrics.scn.
- Then with the scenario loaded the R 1 will move around with spot reports enabled and the metric collector will collect his location and his sensor contracts.
- After running the scenario open the "metrics.txt" to see the metrics collected from the scenario.
Classes
Plugin Entry Points
void tickMetricCollector()
{
}
extern "C" {
{
}
{
return true;
}
}