![]() |
VR-Forces Developer's Guide
|
This document describes the public API changes in the vrfplan library between VR-Forces 5.2 and 5.3.
It covers the following public header:
Changes that are internal to an implementation or limited to comments are not listed.
The boolean ground-clamping property of DtCreateObjectCommand was replaced by a pair of properties that express an altitude relative to the terrain surface. The accessors were renamed and a new value accessor was added:
| 5.2 declaration | 5.3 declaration |
|---|---|
virtual bool clampedToGround() const | virtual bool useAltitudeAboveTerrain() const |
virtual void setClampedToGround(bool value) | virtual void setUseAltitudeAboveTerrain(bool value) |
| *(none)* | virtual double altitudeAboveTerrain() const |
| *(none)* | virtual void setAltitudeAboveTerrain(double d) |
The 5.2 behavior of clamping an entity directly to the ground corresponds to enabling useAltitudeAboveTerrain with an altitudeAboveTerrain of zero. As before, the properties apply only to entities.
Classes that derive from DtCreateObjectCommand and reference its protected reader/writer members are affected. The member backing the old property was replaced:
Because these members participate in command serialization, a derived command that read or wrote myClampedToGround directly must be updated to the new members.
See altitudeAboveTerrain and setAltitudeAboveTerrain in the table above. These have no 5.2 equivalent and allow an object to be created at a specified height above the terrain surface rather than only flush with it.
| Header | Breaking | Additions |
|---|---|---|
createObjectCommand.h | clampedToGround and setClampedToGround replaced by useAltitudeAboveTerrain and setUseAltitudeAboveTerrain; protected myClampedToGround replaced by myClampAboveTerrain and myAltitudeAboveTerrain | altitudeAboveTerrain, setAltitudeAboveTerrain |
Return to VR-Forces 5.3 API Migration Guide.
[Home]