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

Table of Contents

This document describes the public API changes in the vrfmodel library between VR-Forces 5.2 and 5.3.

vrfmodel contains the simulation controllers, actuators, and sensor components that toolkit and plug-in developers most often subclass, so a change to a virtual function signature in this library is a compile-time break for any derived class that overrides it.

The following public headers changed in a way that affects application source code:

New headers and removed headers are listed in the Additions and Removed Headers sections. Changes that are internal to an implementation or limited to comments are not listed.

Breaking Changes

Fire tasks now carry a hit-zone function

VR-Forces 5.3 introduces hit zones, which let a weapon aim at a named functional region of a target entity rather than at its center. Every createFireTask entry point therefore takes an additional DtU8 hitZoneFunction argument. This is the single most widely felt break in this library: the method is virtual on eight controllers, and any override must be updated or it will silently stop participating in dispatch.

// 5.2
virtual DtSimTask* createFireTask(const DtRwLocationReference& locRef) const;
// 5.3
virtual DtSimTask* createFireTask(const DtRwLocationReference& locRef,
const DtU8 hitZoneFunction) const;

Pass 0 for hitZoneFunction to request the previous behavior of aiming at the entity as a whole. The affected declarations are:

Class Header
DtGenericWeaponInfo::createFireTask genericWeaponInfo.h
DtBallisticGunController::createFireTask ballisticGunController.h
DtLauncherController::createFireTask launcherController.h
DtIndirectFireWeaponController::createFireTask indirectFireWeaponController.h
DtCruiseMissileLaunchController::createFireTask cruiseMissileLaunchController.h
DtLoiterMunitionLaunchController::createFireTask loiterMunitionLaunchController.h
DtJavelinLauncherController::createFireTask javelinLauncherController.h

DtGenericWeaponInfo::FireTaskFcn changed in step. Any code that installs a fire-task callback with setFireTaskFcn must supply a callable with the new three-argument shape:

// 5.2
typedef std::function<DtSimTask*(const DtRwLocationReference&)> FireTaskFcn;
// 5.3
typedef std::function<DtSimTask*(const DtRwLocationReference&,
const DtU8 hitZoneFunction, const DtEntityType& munitionType)> FireTaskFcn;

munitionType is the caller's preferred munition, normally the result of a prior bestMunitionForTarget query. Pass DtEntityType::nullType() when there is no preference. Controllers whose task type has no ammunition field ignore the argument.

Ammunition selection replaced by location-aware munition selection

The type-only ammunition predicate was removed throughout the weapon controller hierarchy and replaced by a location-aware selector that reports both the chosen munition and the reason each candidate was accepted or rejected.

DtGenericWeaponInfo lost targetAmmunition and setTargetAmmunitionFcn, along with the TargetAmmunitionFcn typedef and the myTargetAmmunitionFcn member:

// 5.2
typedef std::function<bool(const DtEntityType&)> TargetAmmunitionFcn;
virtual bool targetAmmunition(const DtEntityType& type) const override;
virtual void setTargetAmmunitionFcn(TargetAmmunitionFcn fcn);
// 5.3
typedef std::map<DtEntityType, DtString> MunitionEvaluationReasons;
typedef std::function<bool(const DtRwLocationReference&, DtEntityType&,
MunitionEvaluationReasons&)> BestMunitionForTargetFcn;
virtual bool bestMunitionForTarget(
const DtRwLocationReference& targetLocation,
DtEntityType& chosenMunitionOut,
MunitionEvaluationReasons& reasonsOut) const;
virtual void setBestMunitionForTargetFcn(BestMunitionForTargetFcn fcn);

MunitionEvaluationReasons maps each evaluated munition type to a human-readable string. The selected munition maps to "selected"; rejected munitions map to a rejection reason such as "no stock", "OutOfRange", or "NoSolution".

DtWeaponController::targetAmmunition and DtBallisticGunController::targetAmmunition were removed outright. A subclass that overrode either one must delete the override and, if it supplied custom selection logic, reimplement it as an override of bestMunitionForTargetNoSideEffects on the relevant controller. That method is new in 5.3 and is declared on DtBallisticGunController, DtIndirectFireWeaponController, DtLauncherController, DtCruiseMissileLaunchController, DtLaserGuidedLauncherController, DtIntegratedLaserGuidedLauncherController, and DtLoiterMunitionLaunchController:

virtual bool bestMunitionForTargetNoSideEffects(
const DtRwLocationReference& targetLocation,
DtEntityType& munitionTypeOut,

Unlike the older chooseAmmo path, this query has no side effects: it does not set the current munition type, manipulate loaders, set status bits, or log warnings.

DtBallisticGunController declares its own MunitionEvaluationReasons typedef with the same definition, and its bestMunitionForTargetNoSideEffects is non-const.

Target-region gating is deprecated in favor of the engageability chain

withinTargetRegion, setTargetRegionFcn, and positionWithinTargetRegion are still present but are now marked [[deprecated]]. They are no longer installed through setTargetRegionFcn by the built-in controllers, and are retained only so that existing subclasses continue to compile and so that indirect-fire and cruise-missile controllers keep working until they migrate.

Deprecated declaration Replacement
DtGenericWeaponInfo::withinTargetRegion bestMunitionForTarget / canEngageTarget on the PSR
DtGenericWeaponInfo::setTargetRegionFcn setCanEngageTargetFcn on DtVrfTurretedBalGunPSR
DtWeaponController::positionWithinTargetRegion canEngageTarget on the PSR
DtBallisticGunController::positionWithinTargetRegion canEngageTarget on the PSR

Builds that treat deprecation warnings as errors will fail until the call sites are moved to the canEngageTarget / canAcquireTarget / canFaceTarget chain installed on the process state repository.

DtGenericWeaponInfo mount part list and priority

createMountPartList was replaced by a setter that takes the whole list at once, and it is no longer virtual:

// 5.2
virtual void createMountPartList(const DtArtPartType partType);
// 5.3
void setMountPartList(const std::list<DtArtPartType>& parts);

Code that called createMountPartList once per part must accumulate the parts into a std::list<DtArtPartType> and make a single setMountPartList call.

The weapon priority accessors and their backing member were removed entirely:

// removed in 5.3
virtual int priority() const override;
virtual void setPriority(int p);
int myPriority;

There is no replacement. Weapon ordering is now decided by the engageability chain and by bestMunitionForTarget rather than by a static priority value.

DtDamageAdjudicationActuator kill determination is now hit-zone aware

The three kill predicates changed signature and became pure virtual, so every derived damage adjudication actuator must implement all three:

// 5.2
virtual bool isFirepowerKilled() const;
virtual bool isMobilityKilled() const;
virtual bool isSensorsKilled() const;
// 5.3
virtual bool isFirepowerKilled(DtPrbValueList& probabilities,
DtSymbolString firepowerKillString) const = 0;
virtual bool isMobilityKilled(DtPrbValueList& probabilities,
DtSymbolString mobilityKillString) const = 0;
virtual bool isSensorsKilled(DtPrbValueList& probabilities,
DtSymbolString sensorsKillString) const = 0;

Code that previously called isMobilityKilled() to query the entity's current state should call the new state accessors instead. These are not pure virtual and carry the meaning the old is...Killed methods had for callers:

virtual bool firepowerKilled() const;
virtual bool mobilityKilled() const;
virtual bool sensorsKilled() const;

In the opposite direction, adjudicateDirectDamage and adjudicateCollateralDamage are no longer pure virtual and now have base-class implementations. A derived class that only existed to satisfy those two pure virtuals can drop its overrides.

The base class also gained determineMobilityKilled, determineFirepowerKilled, and determineSensorsKilled, which check for hit zones associated with each function, apply the damage rules to them, and fall back to the corresponding set...Killed call when no such zone exists. These are the methods that invoke the pure virtual is...Killed predicates.

DtMultipleHitDamageActuator damage accounting methods changed

Three protected virtuals changed shape. Results that were previously written to member state are now returned through out parameters.

// 5.2
virtual void checkDamageType(const DtDetonationContext& detonationContext,
bool isDirectDamage = true);
virtual bool assessDamagePoints(const DtDetonationContext& detContext);
virtual void setDamagePoints(double current);
// 5.3
virtual void checkDamageType(const DtDetonationContext& detonationContext, bool isDirectDamage,
bool& isDestroyed, bool& isMobKilled, bool& isFPKilled, bool& isSensKilled);
virtual bool assessDamagePoints(const DtDetonationContext& detContext, double& newDamagePoints);
virtual void addDamagePoints(double newDamage, double& newTotalDamage);

Note that checkDamageType also lost the default argument on isDirectDamage, so single-argument calls no longer compile. setDamagePoints was replaced by addDamagePoints, which takes the increment* rather than the new absolute total and returns the resulting total.

DtLocalEntitySetController::setLocation and its overrides

The three-argument setLocation overload replaced its bool keepOnGround flag with an integer mode flag plus an explicit altitude:

// 5.2
virtual void setLocation(DtVector geocentricLocation, bool keepOnGround, bool& dataAvailable);
// 5.3
virtual void setLocation(DtVector geocentricLocation, int flag, double altAboveTerrain,
bool& dataAvailable);

The two-argument setLocation(DtVector, bool keepOnGround) overload is unchanged. The same change applies to the overrides in DtAirVehicleSetController and DtFixedWingEntitySetController, and DtTacticalGraphicSetController gained an override with the new signature. Any subclass of these controllers that overrides setLocation must be updated.

DtVrfSensorFieldOfView tracking mode enumeration and virtualization

vrfSensorFieldOfView.h now includes vrfExtObjects/aimableSystemEnums.h instead of vrfExtObjects/sensorFieldOfViewEnums.h, and the tracking-mode accessors changed type:

// 5.2
virtual void setTrackingMode(DtSensorTrackingMode mode);
virtual DtSensorTrackingMode trackingMode() const;
// 5.3
virtual DtAimableSystemTrackingMode trackingMode() const;
virtual void setTrackingMode(DtAimableSystemTrackingMode mode);

DtObjectSensor::trackingMode changed in the same way, and objectSensor.h switched to the same header. Code that stores a tracking mode in a variable of type DtSensorTrackingMode, or that switches on its enumerators, must move to DtAimableSystemTrackingMode.

Almost every accessor on DtVrfSensorFieldOfView also became virtual, and several changed their return type to add a top-level const:

// 5.2
bool init();
DtString id() const;
DtVector relativeLocation() const;
DtTaitBryan relativeOrientation() const;
virtual DtVector targetedLocation() const;
// 5.3
virtual bool init();
virtual const DtString id() const;
virtual const DtVector relativeLocation() const;
virtual const DtTaitBryan relativeOrientation() const;
virtual const DtVector targetedLocation() const;

The radius, half-angle, azimuth limit, elevation limit, zoom, and color accessors were virtualized the same way. Existing call sites compile unchanged; classes that derive from DtVrfSensorFieldOfView and shadowed these names now override them instead.

Aggregate weapon controllers rebased on DtAggregateWeaponPowerController

DtAggregateIndirectFireController, DtAggregateAntiAirController, and DtAggregateReleaseBombController no longer derive directly from DtScriptEnableController:

DtAggregateWeaponPowerController is itself derived from DtScriptEnableController, so upcasts to that type still work. What changed is the extension point. Each of the three controllers removed its preFirstTickInit override and now implements two pure virtuals from the new base:

virtual DtString weaponName() const override;
virtual void setIndirectPowerBindings(DtRwPropertiesStructure& power) override;

A subclass of any of the three that overrode preFirstTickInit to set up weapon power must move that logic into setIndirectPowerBindings and report its weapon name from weaponName. A subclass that derives directly from DtAggregateWeaponPowerController must implement both, because they are pure virtual.

DtLaunchExpendableResourceController auto-launch support removed

The automatic countermeasure launch feature was removed from this controller. The following protected virtuals and members no longer exist:

virtual void preFirstTickInit() override;
virtual void taskComplete(bool success = true) override;
virtual bool autoLaunchTriggered();
virtual DtEntityType selectResourceForAutoLaunch(const DtEntityType& missileType) const;
virtual void setupAutoLaunchTriggerList();
virtual void setUpAutoLaunchTaskFromDescriptor();
DtManagedObjectListConstPtr myAutoDetectObjectsList;

setAutoLaunchEnabledCallback and processSetAutoLaunchEnabled survive but moved from the public to the protected section and are themselves deprecated; the implementation now only prints a warning. There is no replacement within this controller. Applications that relied on automatic countermeasure release must drive it from a task or script.

DtIndirectFireWeaponController::initializeController signature changed

The aim point is now resolved internally from the target reference and hit-zone function rather than being passed in pre-computed. Passing a pre-baked, hit-zone-adjusted location caused the point to go stale for moving targets, so that input was removed.

// 5.2
virtual bool initializeController(const DtEntityType& ammoType,
DtReal heightAboveTerrain, const DtUUID& targetName, DtVector targetLocation,
bool& waitingForTerrain, DtDetonatorFuze fuseType,
bool generateKnownTargetPoint = false, const DtString& knownTargetPointName = "");
// 5.3
virtual bool initializeController(const DtEntityType& ammoType,
bool applyHeightAboveTerrain, DtReal heightAboveTerrain, bool allowTargetInsideStructure,
const DtSimObjectReference& target, DtU8 hitZoneFunction,
bool& waitingForTerrain, DtDetonatorFuze fuseType,
bool generateKnownTargetPoint = false, const DtString& knownTargetPointName = "");

When target is valid the aim point is taken from the target's current position and the hit-zone function. When target is invalid the aim point comes from the fire mission's currentTargetLocation(), which is the pure-location fire case.

Two further changes in the same class:

// 5.2
virtual void processFFETask(DtFireForEffectTask* task, const DtUUID& targetObj,
const DtVector& targetLoc);
virtual const DtVector& muzzleLocalPosition();
// 5.3
virtual void processFFETask(DtFireForEffectTask* task, const DtUUID& targetObj,
const DtVector& targetLoc, DtU8 hitZoneFunction = 0);
virtual DtVector muzzleLocalPosition();

muzzleLocalPosition now returns by value. Code that bound its result to a const DtVector& reference still compiles, but the reference no longer aliases controller state.

DtAimWeaponController::myAllowElevationAimingPort removed

The allow-elevation-aiming input port and its protected member were removed:

// removed in 5.3
DtBooleanInputPort* myAllowElevationAimingPort;

myAllowAzimuthAimingPort is unchanged. Subclasses that read the elevation-aiming port must be updated; there is no replacement port.

DtGroundMoveToObstacleAvoider scoring and obstacle interfaces changed

The obstacle avoider was reworked to score several hypothetical paths rather than a single heading, and its protected virtuals changed accordingly. Every one of the following is virtual, so overrides must be updated.

// 5.2
virtual double computeSpeedAndScoreForPathHeading(const double pathHeading,
double refHeading, SpeedConstraint& refConstraint, const bool maybeYieldRow,
const std::list<struct EntityObstacleData>& vehicles, ...
double& outSpeed, SpeedConstraint& resultConstraint);
// 5.3
virtual double computeSpeedAndScoreForPathHeading(const DtString& label, const double pathHeading,
double refHeading, SpeedConstraint& refConstraint, const bool maybeYieldRow,
const std::list<struct EntityObstacleData>& vehicles, ...
bool goalIsInThisDirection, double& outSpeed, SpeedConstraint& resultConstraint);
5.2 declaration 5.3 change
computeSpeedAndScoreForStraightAhead(...) Added bool goalIsInThisDirection before the out parameters
computeSpeedConstraintFromDynamicObstacle(...) Added leading DtString label, double currentMinTurnRadius, and trailing DynamicObstacleInfo& info
computeSpeedConstraintFromStaticObstacle(...) Added trailing double distanceOfGoalAhead; method is now const
updateBestScoreAndSpeed(...) Trailing applyYield / isStatic flags replaced by const SpeedConstraint& constraint
combinedScore(...) Trailing yieldTo / isStatic flags replaced by const SpeedConstraint& constraints
putFeatureInCache(const MAKVRinTerra::DtFeature&) Now takes const MAKVRinTerra::DtFeatureGeometry&
dynamicObstacleVisualization(DtExtent&) Removed; see the new visualization methods below

The obstacle set member changed type in line with the features library rework:

// 5.2
std::shared_ptr<MAKVRinTerra::DtFeatureSet> myObstacleFeatureSet;
// 5.3
std::shared_ptr<DtAreaFeatureSetOperation> myObstacleFeatureSet;

dynamicObstacleVisualization was replaced by a set of narrower virtuals that report their results through out parameters: pathSearchVisualization, entityReferenceFrameVisualization, entityBoundingBoxVisualization, entityTurnRadiusVisualization, and entityPathVisualization. The DynamicObstacleInfo, HypotheticalPathInfo, and StraightPathInfo structs used by these methods are new nested types on the class.

DtLaneSegment is now final and non-polymorphic

DtLaneSegment in roadSegment.h was declared final, its destructor is no longer virtual, and every member function lost the virtual keyword:

// 5.2
{
virtual ~DtLaneSegment();
virtual DtLaneSegment* clone();
virtual DtLaneGeometry& laneGeometry();
// ...
};
// 5.3
{
DtLaneSegment* clone();
DtLaneGeometry& laneGeometry();
// ...
};

Any class deriving from DtLaneSegment will fail to compile. Lane behavior must be customized through the road driving logic and path functions instead. The full set of devirtualized members is clone, laneGeometry (both overloads), trafficControlDevice, setTrafficControlDevice, laneNumber, setLaneNumber, parentRoadSegment, setParentRoadSegment, generateFirstHalfLanePoints, generateSecondHalfLanePoints, connectingDownstreamLane, setConnectingDownstreamLane, connectingUpstreamLane, setConnectingUpstreamLane, calculateInsideEntryCurveGeometry, calculateEntryCurveGeometry, calculateInsideExitCurveGeometry, and calculateExitCurveGeometry. Signatures are otherwise unchanged.

DtRoadMovementController::entryLanePosition renamed

// 5.2
virtual int entryLanePosition(double heading, unsigned int numLanes);
// 5.3
virtual int entryLaneNumber(double heading, unsigned int numLanes);

The signature and behavior are unchanged; the name now reflects that the return value is a lane number rather than a position along the lane.

DtNavigationPreferenceController::setUseRoadsForPathPlanning takes a string

The road preference is no longer a Boolean; it names the preference to apply.

// 5.2
void setUseRoadsForPathPlanning(bool useRoads);
// 5.3
void setUseRoadsForPathPlanning(const DtString& useRoads);

Because bool does not implicitly convert to DtString, existing calls will fail to compile rather than silently change meaning.

DtGroundAutoControllerComponent::setThrottleFromAcceleration renamed

// 5.2
virtual void setThrottleFromAcceleration(const double signedAccel);
// 5.3
virtual void setThrottleFromSignedThrottle(const double signedAccel);

The argument is interpreted as a signed throttle value rather than an acceleration. Overrides must be renamed.

DtWarheadDetonationActuator::checkEntityForCollision signature changed

The missile path and bounding-box center are now derived internally:

// 5.2
virtual bool checkEntityForCollision(const DtSimObject* collidee, const DtVector& missilePath,
const DtVector& missileBoxCenter, DtVector& detonLocationOut, double& distToImpactSqrd);
// 5.3
virtual bool checkEntityForCollision(const DtSimObject* collidee,
DtVector& detonLocationOut, double& distToImpactSqrd);

DtProvideIndirectFireController initialization hooks changed

// 5.2
virtual void preFirstTickInit() override;
virtual void lookupAndCachePSR();
// 5.3
virtual bool postAddComponentsInit() override;
virtual bool lookupAndCachePSR();

Initialization moved from preFirstTickInit to postAddComponentsInit, and lookupAndCachePSR now reports whether the lookup succeeded. Overrides of either must be updated; a lookupAndCachePSR override must return true on success.

DtRotaryWingActuatorComponent protected members removed

The body-velocity cache and the disabled pitch and roll calculation stubs were removed:

// removed in 5.3
virtual void calculateNormalizedBodyVelocity();
DtVector myBodyVelocity;
DtVector myNormalizedBodyVelocity;

The calculatePitchAcceleration, calculatePitchRate, calculateRollAcceleration, and calculateRollRate declarations, which were already inside an #if 0 block, were deleted as well. Subclasses that read myBodyVelocity must compute it from the entity's velocity and orientation.

DtDisaggregatedSetController TDL messaging replaced by SIDC handling

The TDL messaging message handler was removed and replaced by a symbol-code handler:

// 5.2
static void setTDLMessagingCallback(DtSimMessage* msg, void* usrData);
virtual void processSetTDLMessaging(DtSimMessage* msg);
// 5.3
static void setSidcCallback(DtSimMessage* msg, void* usrData);
virtual void processSetSidc(DtSimMessage* msg);

This is part of the removal of the internal Tactical Data Link subsystem described under Removed Headers**.

DtFixedWingActuatorComponent::updateAirspeedToRepository takes ground speed

// 5.2
virtual void updateAirspeedToRepository(const DtVector& newLocalPosition, const double altitude);
// 5.3
virtual void updateAirspeedToRepository(const DtVector& newLocalPosition, const double altitude,
const double groundSpeed);

Const-qualification changes

Three accessors became const. Overrides that are not const-qualified no longer override the base declaration and will be flagged by the override specifier, or silently hide the base method if the specifier is absent.

Class 5.2 5.3
DtAirRefuelSupplierController virtual double selfRefuelMaxRate(); virtual double selfRefuelMaxRate() const;
DtResupplyReceiverController virtual double lookupMaxRate(const DtEntityType& type); virtual double lookupMaxRate(const DtEntityType& type) const;
DtRoadObstructionFinder void getBoxPointsFromVolume(Dt3dBoundingVolume&, DtVector&, DtDcm&, ...) void getBoxPointsFromVolume(const Dt3dBoundingVolume&, const DtVector&, const DtDcm&, ...)

DtRoadDrivingLogic speed computation gained a parameter

A new allowOverrideSpeedLimit flag was inserted before the trailing debug argument, so calls that passed debug positionally now bind it to the wrong parameter:

// 5.2
... const double dt, const double currentSpeed, bool debug = false);
// 5.3
... const double dt, const double currentSpeed, bool allowOverrideSpeedLimit = false,
bool debug = false);

Review every call site that passed an explicit debug value.

DtSimpleRotaryWingPilot::limitAccelForFixedFlightSlope is now virtual

// 5.2
void limitAccelForFixedFlightSlope(DtVector& topoEntToGoal,
DtVector& topoCurrentVel, double period, DtVector& desiredTopoAccel);
// 5.3
virtual void limitAccelForFixedFlightSlope(DtVector& topoEntToGoal, DtVector& topoCurrentVel,
double period, DtVector& desiredTopoAccel);

Existing call sites are unaffected. A derived class that previously defined a same-named method now overrides the base method rather than hiding it, which changes which implementation runs through a base-class pointer.

Additions

DtAggregateWeaponPowerController

vrfmodel/aggregateWeaponPowerController.h defines a new abstract base for aggregate weapon controllers, derived from DtScriptEnableController. It centralizes indirect-fire power bookkeeping that was previously duplicated in each aggregate controller's preFirstTickInit. Derived classes implement weaponName and setIndirectPowerBindings; the base provides preFirstTickInit, postAddComponentsInit, and the protected updateIndirectFirePower(bool overwriteExistingValues).

Search light and laser light components

Five new headers implement controllable search lights and laser lights as first-class aimable systems:

DtRotaryWingFlyIntoController

vrfmodel/rotaryWingFlyIntoController.h defines a rotary-wing counterpart to the existing fixed-wing fly-into controller. It derives from DtRotaryWingMoveToControllerComponent and handles the crash-into task for both object and location targets, exposing processCrashInto, processCrashIntoObject, and processCrashIntoLocation along with overrides for velocity control and desired position.

DtPlaySoundController

vrfmodel/playSoundController.h defines a DtSingleTaskControllerComponent that plays a sound event for a given entity type. It exposes sendSoundEvent(const DtEntityType&), durationForSoundType(const DtEntityType&) const, and a request handler processRequestSoundList(const DtVrfObjectMessage*) that reports the available sounds.

DtSignalFlagsSetController

vrfmodel/signalFlagsSetController.h defines a DtSetController that handles the set-signal-flags message, maintains a DtSignalFlagControllerPSR, and publishes the flag state as a state property through publishSignalFlagsStateProperty.

vrfmodel/hitZoneUtils.h

A new header with two free functions supporting the hit-zone feature:

DtU8 targetZoneFunction);
const DtVector& hitZoneOffset);

Engageability queries on weapon-aiming controllers

Two new virtuals answer whether a target can be engaged, without the side effects of the old target-region path:

// aimWeaponController.h
virtual bool canFaceTarget(const DtRwLocationReference& target, DtString& reasonOut) const;
// turretAcquireController.h
virtual bool canAcquireTarget(const DtRwLocationReference& target, DtString& reasonOut);

Both are registered on the process state repository from postAddComponentsInit, so engagement gating can query them without holding a pointer to the controller. canFaceTarget is permissive: it returns true when the required articulated parts cannot be resolved.

Hit-zone targeting on weapon and sensor components

DtWeaponController gained a target-with-offset path that combines entity and location targeting:

virtual const DtSimObject* chooseTargetWithOffset(DtVector& offset);
virtual bool acquireTargetWithOffset(const DtSimObject* target, const DtVector& offset);

DtMunitionLaunchController gained provider callbacks for the target hit-zone offset and function (provideTargetHitZoneOffset, targetHitZoneFunction, processProvideTargetHitZoneOffset, processTargetHitZoneFunction), and DtMissileMoveToControllerComponent gained setTargetEntityAndHitZone(const DtUUID&, const DtVector&) and targetHitZone().

DtObjectSensor gained targetObjectOffset() and a matching target-object-offset input port, so a sensor can be aimed at a point relative to its target rather than at the target's origin.

DtBallisticGunController munition preload and loader queries

New protected virtuals support peacetime preloading and per-loader munition selection:

virtual bool findMunitionForLoader(const DtString& loaderName,
DtSimMunition& outMunition, int& outRoundsAvailable);
virtual bool preferLoadedIfApplicable(const DtEntityType& targetType,
DtSimMunition& outMunition, int& outRoundsAvailable);
virtual bool hasSingleAvailableMunition() const;
virtual bool shouldPreloadNow(DtTime currentTime) const;
virtual void resetPreloadDeadline(DtTime currentTime);
virtual void preloadAllLoaders(DtTime currentTime);

preferLoadedIfApplicable lets a selector keep the round that is already in the tube when it is applicable to the target, avoiding a wasteful unload and reload cycle. The hysteresis window used by shouldPreloadNow is exposed as the static constant PreloadHoldSeconds.

DtVrfBallisticGun ballistic solution helpers

ballisticGun.h gained methods for computing and executing a ballistic solution directly:

bool computeBallisticElevationAngle(const DtVector& localMuzzlePosition,
const DtVector& localImpactPosition, double minElevation, double maxElevation,
const DtEntityType& munitionType, double& angleOut, DtString& reasonOut) const;
virtual void computeBallisticMuzzleVelocity(const DtVector& localMuzzlePosition,
const DtVector& localImpactPosition, DtVector& geocentricMuzzleVelocity) const;
virtual void addAdditionalWeaponRangeItems();
virtual void spawnFlyoutMunition(const DtVector& geocentricMuzzlePosition,
const DtVector& geocentricMuzzleVelocity, const DtEntityType& munitionEntityType,
const DtString& eventId);

DtDamageAdjudicationActuator hit-zone accessors and task visualization

Beyond the breaking changes above, the actuator gained hit-zone queries and debug visualization:

virtual const std::vector<const DtRwHitZone*> mobilityHitZones() const;
virtual const std::vector<const DtRwHitZone*> firepowerHitZones() const;
virtual const std::vector<const DtRwHitZone*> sensorsHitZones() const;
virtual const std::vector<const DtRwHitZone*> hitZonesByFunctionType(DtU8 hitZoneFunction) const;
virtual bool checkHitZonesDamagedUsingRule(const std::vector<const DtRwHitZone*>& hitZoneList);
DtSymbolString zoneKillString() const;
bool getPowerDirectKillProbabilities(const DtSimMunition& munition, const DtString& surface,
DtReal angleOfIncidence, DtReal range, const std::map<DtString, double>& powers,
DtPrbValueList* probabilities) const;
virtual DtVector bodyToWorldWithEntityWOM(const DtVector& bodyLocation);

It also overrides updateTaskVisualizations and updateImgui, returns true from taskVisualizationsActive, and adds updateDirectHitTaskVis, updateCollateralHitTaskVis, and updateHitZoneTaskVis, together with the nested DtDamageAdjudicationDirectHitTaskVisInformation and DtDamageAdjudicationCollateralHitTaskVisInformation structs that hold the pending visualization data. Hit-zone status notifications arrive through the new setHitZoneStatusNotificationCallback / processSetHitZoneStatusNotification pair.

Set controller message handlers

DtLocalEntitySetController gained handlers for symbol code and hit-zone status:

virtual void processSetSidc(DtSimMessage* msg);
virtual void processSetHitZoneStatus(DtSimMessage* msg);
static void setSidcCallback(DtSimMessage* msg, void* usrData);
static void setHitZoneStatusCallback(DtSimMessage* msg, void* usrData);

DtTacticalGraphicSetController gained the same processSetSidc / setSidcCallback pair, plus createPSR, tick, and the setLocation override described above. DtSpotReportGeneratorController gained adjustSidc(const DtString& sidc, const DtRwSensorContactInfo&, const DtAppearance&) const so derived classes can refine the reported symbol code.

DtRoadObstructionFinder::findImmediateObstruction

virtual bool findImmediateObstruction(double& obstacleDistance,
std::vector<DtVector>& debugLocations,
std::vector<std::vector<DtVector>>& debugBoxes, bool debug = false) const;

Tests a rectangle directly ahead of the vehicle, the width of the vehicle and a portion of its body length, and reports the distance from the front bumper to the first obstruction.

Road and ground movement additions

Rotary-wing and fixed-wing additions

Human and DI-Guy additions

Resupply bin lookup

DtResupplySupplierController and DtResupplyReceiverController both gained virtual int lookupBin(const DtEntityType&) const, and DtLauncherActuator and DtLauncherController gained munition bin ports, so resupply can address individual munition bins.

DtShipAisController set-variable name constants

Six public static constants name the AIS set variables:

static const DtString DtAisMmsiSetVariableName;
static const DtString DtAisImoSetVariableName;
static const DtString DtAisEtaSetVariableName;
static const DtString DtAisDestinationSetVariableName;
static const DtString DtAisStatusSetVariableName;
static const DtString DtAisShipClassSetVariableName;

Miscellaneous additions

Removed Headers

The internal Tactical Data Link subsystem was removed from VR-Forces in 5.3. The following headers no longer exist, and the classes they declared are gone:

Removed header Removed class Replacement
vrfmodel/tdlMessageGeneratorController.h DtTDLMessageGeneratorController None
vrfmodel/vrfTDLMessageGeneratorController.h DtVrfTDLMessageGeneratorController None
vrfmodel/tdlPPLIMessageGeneratorController.h DtTDLPPLIMessageGeneratorController None
vrfmodel/tdlContactMessageGeneratorController.h DtTDLContactMessageGeneratorController None
vrfmodel/tdlStatusMessageGeneratorController.h DtTDLStatusMessageGeneratorController None

There is no in-library replacement. Applications that derived from any of these controllers, or that registered them with the component factory, must remove that code. The related setTDLMessagingCallback / processSetTDLMessaging handlers on DtDisaggregatedSetController were removed at the same time, as described under Breaking Changes. Tactical data link functionality is now provided outside the core vrfmodel library.

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)