#include <bn_template_actions.h>
template<typename Property, class PropertyManager>
to_template_action class
Modifies the property until it has a given state.
Template parameters | |
---|---|
Property | Property to modify. |
PropertyManager | Reads and writes the property to modify. |
Constructors, destructors, conversion operators
- to_template_action(int duration_updates, const Property& final_property) protected
- Constructor.
Public functions
- void reset()
- Resets the property to its initial state.
- void update()
- Adds ((final_property - initial_property) / duration_updates) to the property until it is equal to final_property.
- auto done() const -> bool
- Indicates if the action must not be updated anymore.
- auto duration_updates() const -> int
- Returns the number of times that the action must be updated until the property is equal to final_property.
Protected functions
- auto final_property() const -> const Property&
- Returns the state of property when the action is updated the given number of times.
Function documentation
template<typename Property, class PropertyManager>
bn:: to_template_action<Property, PropertyManager>:: to_template_action(int duration_updates,
const Property& final_property) protected
Constructor.
Parameters | |
---|---|
duration_updates | Number of times that the action must be updated until the property is equal to final_property. |
final_property | Property when the action is updated duration_updates times. |