VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
vrfNavigation Library API Changes

Table of Contents

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.

Breaking Changes

DtNavTagVolume::updateGeometry takes an altitude range

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.

// 5.2
virtual void updateGeometry(const PointList& points) = 0;
// 5.3
virtual void updateGeometry(const PointList& points, double minAlt, double maxAlt) = 0;

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.

DtNavDataGenerator::initialize takes the navigation profiles file

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.

// 5.2
virtual bool initialize(DtTerrainInterface* terrainInterface,
const DtFilename& navGenConfigFile,
const DtFilename& runtimeConfigFile,
const DtFilename& outputPath,
const DtFilename& terrainFile,
const DtFilename& regenDirectory,
bool generateFeatureTagVolumes);
// 5.3
virtual bool initialize(DtTerrainInterface* terrainInterface,
const DtFilename& navGenConfigFile,
const DtFilename& runtimeConfigFile,
const DtFilename& navigationProfilesFile,
const DtFilename& outputPath,
const DtFilename& terrainFile,
const DtFilename& regenDirectory,
bool generateFeatureTagVolumes);

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 gained a member in the middle of the struct

DtInputNavTagVolume is an aggregate with no declared constructor. A new altitudeBuffer member was inserted between the existing points and navTagDataIndex members.

// 5.2
{
std::vector<DtVector> points;
unsigned int navTagDataIndex;
};
// 5.3
{
std::vector<DtVector> points;
float altitudeBuffer;
unsigned int navTagDataIndex;
};

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:

volume.points = footprint;
volume.altitudeBuffer = 0.f;
volume.navTagDataIndex = index;

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::myInputTagVolumes changed from a value to a pointer

DtGeneratorInputProducer exposes its data members publicly, so this change affects any code that reads or writes the member directly, as well as derived classes.

// 5.2
DtNavTagVolumeSet myInputTagVolumes;
// 5.3
const DtNavTagVolumeSet* myInputTagVolumes;

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:

// 5.2
producer.myInputTagVolumes = tagVolumes;
size_t count = producer.myInputTagVolumes.navTagVolumeList.size();
// 5.3
producer.setTagVolumes(tagVolumes); // tagVolumes must outlive producer
size_t count = producer.myInputTagVolumes
? producer.myInputTagVolumes->navTagVolumeList.size()
: 0;

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.

Additions

DtInputNavTagVolume::altitudeBuffer

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.

DtNavDataGenerator::myNavigationProfilesFile

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.

Summary of Header Changes

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]


Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)