![]() |
VR-Forces Developer's Guide
|
This document describes the public API changes in the vrfNavigation library between VR-Forces 5.2 and 5.3.
It covers the following public headers:
The changes in this library center on a single theme: nav tag volumes now carry an altitude extent, and the navigation data generator now reads the navigation profiles file directly. Headers whose only differences are comments or version-control properties are not listed.
The pure virtual updateGeometry method gained two parameters describing the vertical extent of the tag volume. Every class that derives from DtNavTagVolume must update its override, or it will no longer compile as a concrete class.
The points parameter retains its previous meaning: the horizontal footprint of the volume. minAlt and maxAlt supply the lower and upper bounds, in meters, that were previously derived implicitly from the terrain under the footprint. An implementation that wants to preserve 5.2 behavior can ignore the two new parameters, but the recommended update is to apply them when building the volume geometry so that the volume only affects navigation within that altitude band.
Call sites must be updated as well, since there is no overload taking the original single-argument form.
A navigationProfilesFile parameter was inserted into initialize. Because it sits in the middle of the parameter list, calls that were previously correct will either fail to compile or, in the case of calls that pass convertible arguments positionally, bind the wrong files. Review every call site rather than relying on the compiler to catch the change.
The new argument is the path to the navigation profiles file that describes the profiles to be generated. The generator stores it in the new protected member myNavigationProfilesFile. Classes that derive from DtNavDataGenerator and override initialize must change their signature to match or the override will silently become an unrelated overload; declaring the override with the override specifier will surface the problem at compile time.
DtInputNavTagVolume is an aggregate with no declared constructor. A new altitudeBuffer member was inserted between the existing points and navTagDataIndex members.
Code that brace-initializes the struct positionally must be updated, because the second initializer is now interpreted as altitudeBuffer rather than navTagDataIndex. Assign the members by name instead:
The struct still has no default member initializers, so altitudeBuffer is uninitialized unless it is assigned explicitly. altitudeBuffer is the vertical padding, in meters, applied above and below the volume when it is converted to navigation data; use 0.f to reproduce the 5.2 behavior.
DtGeneratorInputProducer exposes its data members publicly, so this change affects any code that reads or writes the member directly, as well as derived classes.
The producer no longer owns a copy of the tag volume set; it holds a non-owning pointer to a set supplied by the caller, and the pointer is initialized to nullptr in the constructor. Member access must be changed from . to ->, the pointer must be checked before use, and the referenced DtNavTagVolumeSet must outlive the producer. Set the member through setTagVolumes rather than assigning to it directly:
Because the member is now const-qualified, the producer can no longer modify the tag volume set through it. Code that mutated the set in place after handing it to the producer must mutate the caller-owned object instead.
A float member that specifies the vertical padding, in meters, applied to a tag volume when it is converted into navigation data. It is described above under Breaking Changes because its position in the aggregate affects existing initialization code.
A new protected DtFilename member holding the path to the navigation profiles file passed to initialize. Derived classes can read it to locate the profile definitions that are in effect for the current generation run.
| Header | Breaking | Additions |
|---|---|---|
generatorInputProducer.h | myInputTagVolumes changed from DtNavTagVolumeSet to const DtNavTagVolumeSet* | None |
navGeneration.h | DtNavDataGenerator::initialize gained a navigationProfilesFile parameter; DtInputNavTagVolume member inserted mid-struct | DtInputNavTagVolume::altitudeBuffer; protected DtNavDataGenerator::myNavigationProfilesFile |
navTagVolume.h | DtNavTagVolume::updateGeometry gained minAlt and maxAlt parameters | None |
Return to VR-Forces 5.3 API Migration Guide.
[Home]