VR-Engage  2.3
Loading...
Searching...
No Matches
vreVrfmodel Library API Changes

This page covers simulation component and controller changes in vreVrfmodel. Update backend subclasses and role-state consumers together.

Breaking changes

Station and role state

objectProximitySensorMonitor.h changes the protected subscriber hooks onSubscriberList(), addToSubscriberList(), and removeFromSubscriberList() from DtU64 to const DtString&. DtSubscriberList now holds DtString. Update derived monitors and subscription IDs with the matching message API in vreVrfMessages Library API Changes.

vreSimComponent.h reads the published Roles state-property map rather than role-* extended-data entries. Use controllingStations(const std::string& role) and engagedRoles() to inspect current role occupancy. Do not build role-control logic around the removed extended-data representation. vreSetController.h now declares the role-control methods; their template definitions are in vreSetController.inl. Its SetVreControlledContent contains the station ID, role-type keys, and the new myRoleName field. Update subclasses that inspect queued control changes.

Air-vehicle location override

DtVreAirVehicleSetController::setLocation(DtVector, bool&) was replaced by setLocation(DtVector geocentricLocation, int flag, double altitudeAboveTerrain, bool& dataAvailable) in vreAirVehicleSetController.h. Update subclass overrides and call sites to pass the location flag and altitude above terrain. The old signature no longer overrides the base hook.

Stabilized articulated parts

DtVreStabilizedArtPartActuator::setCueToCurrent() now returns bool instead of void in artPartActuator.h. Adjust subclasses that call this protected method when they need to check whether the cue was set. The protected axisOrientation() const method was removed.

Removed controller hooks

vreParachuteController.h no longer declares processParachuteTolocationTask(DtSimMessage*). vreLasingController.h no longer declares lineOfSight(DtSimObjectReference, DtString&). Remove subclass dependencies on these VRE-specific overrides. The preFirstTickInit() override in vreEmbarkationController.h was also removed; review derived initialization that depended on its behavior.

Joystick controller subclasses

The regular joystick controller families now inherit DtVreJoystickControllerInterface instead of the raw VRF joystick interface. Rebuild custom backend plugins for the changed class layouts. Use matching updated main and ownship backends; mixed-version handoff is not supported.

Additions

Joystick internal state

vreJoystickControllerInterface.h adds DtVreJoystickControllerInterface. Call updateJoystickState() from both joystick connection hooks. Call restoreJoystickState() after the existing component-base preFirstTickInit(). Retain the interface's request override to record count changes that do not invoke connection hooks.

The current helpers create VreJoystickControllers.Controllers in entity internal state on demand. Each map value has Enabled (DtRwBoolean) and RequestCount (DtRwInt) fields. An SMS internal-state-data declaration is not required. Runtime records use literal full component names as keys. The ownership-transfer archive carries the property types, prototype, and values.

The helpers preserve the enabled flag and exact request count during ownership handoff. They do not reconnect during ordinary scenario loading. The stock ground-move-joystick-controller remains unchanged. Controllers with an existing VR-Forces joystick interface use the static state helpers instead of adding a second interface subobject. Preserve their original adjusted interface pointer for callback registration. See Joystick controller interface for the current handoff behavior.

Quadcopter and movement controllers

vreQuadCopterActuator.h adds makVre::DtVreQuadCopterActuator (TS_VREQuadCopterActuator is "vre-quadcopter-actuator"). It extends DtVreRotaryWingActuatorComponent with quadcopter flight behavior. Configure it with DtVreQuadCopterActuatorDescriptor in vreVrfobjparam Library API Changes.

vreRotaryWingMoveToController.h adds makVre::DtVreRotaryWingMoveToController and its "vre-rotary-wing-move-to-controller" type. Use this component when a rotary-wing move-to task must face its target.

Ownership and sensing components

embeddedEntityOwnershipTransferHandler.h adds DtVreEmbeddedEntityOwnershipTransferHandler. Call install(DtLocalObjectManager*, DtSimulationServices*) to connect it to handoff notifications, and shutdown() to disconnect. Keep both supplied objects alive while the handler is installed.

vreJoystickController.h adds preFirstTickInit() for internal-state restoration. See Joystick internal state when extending joystick ownership-transfer handling.

vreHumanWeaponStateActuator.h adds DtVreHumanWeaponStateActuator with type "human-weapon-state-actuator". annotationProximitySensor.h and towHookProximitySensor.h add "annotation-proximity-sensor" and "tow-hook-proximity-sensor". statePropertiesController.h adds DtStatePropertiesController with type "state-properties-controller". Use the corresponding headers and type constants when configuring these backend components.