The ReckoningStrategy
class interpolates 3D vectors using linear evaluation functions.
More...
|
| Simple3dReckoningStrategy (f32 threshold) |
| Instantiates the object with default parameters (default constructor). More...
|
|
bool | CheckSample (bool *pIsReliable, const Value &value, const SetValueArg *cpSetValueArg, const Accessor &accessor, nn::pia::clone::ClockValue clock, const Work *cpWork) const |
| Determines whether to use the value set with SetValue as a sample. More...
|
|
bool | Estimate (Value *pValue, const Accessor &accessor, nn::pia::clone::ClockValue clock, const Work *cpWork) const |
| Calculates the prediction. More...
|
|
f32 | GetThreshold () |
| Gets the threshold to use when determining whether to use the value set using SetValue as a sample. More...
|
|
void | MakeSample (Sample *pSample, const Value &value, const SetValueArg *cpSetValueArg, const Accessor &accessor, nn::pia::clone::ClockValue clock, const Work *cpWork) const |
| Calculates the value to save as a sample. More...
|
|
void | OnUpdateSample (const Accessor &accessor, int index, Work *pWork) const |
| This is called when a sample is added. More...
|
|
void | SetThreshold (f32 threshold) |
| Sets the threshold to use when determining whether to use the value set using SetValue as a sample. More...
|
|
void | Trace (u64 flag) const |
| Prints information that is useful for debugging. More...
|
|
|
static const size_t | BUFFER_SIZE = 10 |
| Specifies the size of the buffer that holds samples.
|
|
The ReckoningStrategy
class interpolates 3D vectors using linear evaluation functions.
- Revision History:
- 2013-10-29 Initial version.
nn::pia::reckoning::Simple3dReckoningStrategy::Simple3dReckoningStrategy |
( |
f32 |
threshold | ) |
|
Instantiates the object with default parameters (default constructor).
- Parameters
-
[in] | threshold | Specifies the threshold value to use for determination. |
Determines whether to use the value
set with SetValue
as a sample.
- Parameters
-
[out] | pIsReliable | Outputs whether reliable communication needs to be used when sending the sample. |
[in] | value | Specify the value that was set with SetValue . |
[in] | cpSetValueArg | Specify the value that was set in the second parameter of SetValue . This flag specifies whether value is stopped. |
[in] | accessor | Specifies the accessor for the sample buffer. |
[in] | clock | Specifies the current clock. |
[in] | cpWork | Specifies the pre-calculated result for calculating the prediction. |
- Returns
- Returns
true
if the value will be used as a sample.
Calculates the prediction.
- Parameters
-
[out] | pValue | Outputs the prediction. |
[in] | accessor | Specifies the accessor for the sample buffer. |
[in] | clock | Specifies the current clock. |
[in] | cpWork | Specifies the pre-calculated result for calculating the prediction. |
- Returns
- Returns
true
and stores the prediction in pValue
if successful.
f32 nn::pia::reckoning::Simple3dReckoningStrategy::GetThreshold |
( |
| ) |
|
|
inline |
Gets the threshold to use when determining whether to use the value
set using SetValue
as a sample.
- Returns
- Returns the threshold value to use for determination.
Calculates the value to save as a sample.
This is called when CheckSample
determines the value is to be used as a sample and the buffer was successfully allocated.
- Parameters
-
[out] | pSample | Outputs the sample. |
[in] | value | Specify the value that was set with SetValue . |
[in] | cpSetValueArg | Specify the value that was set in the second parameter of SetValue . This flag specifies whether value is stopped. |
[in] | accessor | Specifies the accessor for the sample buffer. |
[in] | clock | Specifies the current clock. |
[in] | cpWork | Specifies the pre-calculated result for calculating the prediction. |
void nn::pia::reckoning::Simple3dReckoningStrategy::OnUpdateSample |
( |
const Accessor & |
accessor, |
|
|
int |
index, |
|
|
Work * |
pWork |
|
) |
| const |
This is called when a sample is added.
This function updates the parameters used to calculate the prediction.
- Parameters
-
[in] | accessor | Specifies the accessor for the sample buffer. |
[in] | index | Specifies the index of the sample. |
[in] | pWork | Specifies the pre-calculated result for calculating the prediction. |
void nn::pia::reckoning::Simple3dReckoningStrategy::SetThreshold |
( |
f32 |
threshold | ) |
|
Sets the threshold to use when determining whether to use the value
set using SetValue
as a sample.
- Parameters
-
[in] | threshold | Specifies the threshold value to use for determination. |
void nn::pia::reckoning::Simple3dReckoningStrategy::Trace |
( |
u64 |
flag | ) |
const |
Prints information that is useful for debugging.
- Parameters
-
[in] | flag | Specifies the bitwise OR of trace flags. For more information, see the TraceFlag type. |