void SetModel( PHBDRVar_qInt32 & v, qReal dValue, qReal dRateOfChange, qReal dAcceleration, Time tTimestamp = GetTimestamp() );
Name | Description | |
---|---|---|
in | v |
Specifies the variable in the dataset for which there are changes in the supplementation model. Specify using the MODEL macro. |
in | dValue | Specifies the value of the variable at the current session time. |
in | dRateOfChange | Specifies the rate of change in the variable at the current session time in units of milliseconds. |
in | dAcceleration | Specifies the acceleration of the variable at the current session time in units of milliseconds squared. |
in | tTimestamp | Specifies the current session time, specified as a default argument. |
Sets a new supplementation model on the duplication master.
Note: This function is not provided by the DataSet
class. The data definition language (DDL) compiler generates the code for this function only when the dataset in question is indicated as holding an extrapolation_filter
property in the DDL declaration.
Called by the duplication master when there has been a sudden change in dataset values, this function notifies the system of that sudden change. This function is used together with the CONTINUITY_BREAK_UPDATED_MODEL
flag, which is used to indicate that continuity has been broken. This function is used to temporarily correct inaccurate supplemental information.
If dead reckoning (the supplementation of values to account for packet latency and other issues) is enabled for the position of a ball in a game, there may be cases where the ball is shown to go inside the wall on the duplica when it strikes the wall and bounces off. The SetModel
function temporarily adjusts the duplica model and calculates the effect on collision detection. For example, if the IndicateContinuityBreak
function is used to signal CONTINUITY_BREAK_TELEPORT
, the duplica loses its own position and immediately moves to the new position (without supplementation). However, the ball will continue to remain in the same position for the next three updates (two frames for most games). The SetModel function can be used to recover these two frames by immediately providing the correct speed and acceleration after instantaneous motion of the duplica.
The following errors may be signaled when using this function.
・SYSTEMERROR_GEN_INVALID_OPERATION
is signaled when this function is called for a dataset for which supplementation is not enabled.
・SYSTEMERROR_OBJDUP_INVALID_ON_DUPLICA
is signaled when this function is called on a duplica (DuplicatedObject::IsADuplica
).
For details on this function, see the NEX Programming Manual.
CONFIDENTIAL