|
Drag[en]gine Script Module DragonScript 1.35
|
Smooth 3-component vector value. More...
Public Member Functions | |
Constructors | |
| SmoothVector | new () |
| Create smooth vector. | |
| SmoothVector | new (SmoothVector copy) |
| Create copy of smooth vector. | |
Management | |
| Vector | getValue () |
| Current value. | |
| void | setValue (Vector value) |
| Set current value. | |
| Vector | getGoal () |
| Goal value. | |
| void | setGoal (Vector goal) |
| Set goal value. | |
| float | getAdjustTime () |
| Adjustment time in seconds. | |
| void | setAdjustTime (float adjustTime) |
| Adjustment time in seconds clamped to 0 or larger. | |
| float | getAdjustRange () |
| Adjustment range in units. | |
| void | setAdjustRange (float limit) |
| Set adjustment range in units clamped to 0 or larger. | |
| float | getChangeSpeed () |
| Change speed of the value in units per second. | |
| void | setChangeSpeed (float changeSpeed) |
| Set change speed of the value in units per second. | |
| void | reset () |
| Reset value, goal and change speed to 0. | |
| void | update (float elapsed) |
| Update value with goal using current smoothing parameters. | |
File Handling | |
| void | writeToFile (FileWriter writer) |
| Write to file writer. | |
| static SmoothVector | readFromFile (FileReader reader) |
| Read from file reader. | |
Smooth 3-component vector value.
Smooth dynamic changing vector value across time.
| float Dragengine.Scenery.SmoothVector.getAdjustRange | ( | ) |
| float Dragengine.Scenery.SmoothVector.getAdjustTime | ( | ) |
Adjustment time in seconds.
Referenced by getAdjustRange().
| float Dragengine.Scenery.SmoothVector.getChangeSpeed | ( | ) |
| Vector Dragengine.Scenery.SmoothVector.getGoal | ( | ) |
| Vector Dragengine.Scenery.SmoothVector.getValue | ( | ) |
| SmoothVector Dragengine.Scenery.SmoothVector.new | ( | ) |
| SmoothVector Dragengine.Scenery.SmoothVector.new | ( | SmoothVector | copy | ) |
Create copy of smooth vector.
References new().
|
static |
| void Dragengine.Scenery.SmoothVector.reset | ( | ) |
Reset value, goal and change speed to 0.
References getChangeSpeed(), and setAdjustRange().
Referenced by readFromFile().
| void Dragengine.Scenery.SmoothVector.setAdjustRange | ( | float | limit | ) |
Set adjustment range in units clamped to 0 or larger.
Referenced by reset().
| void Dragengine.Scenery.SmoothVector.setAdjustTime | ( | float | adjustTime | ) |
Adjustment time in seconds clamped to 0 or larger.
References setGoal().
Referenced by getChangeSpeed().
| void Dragengine.Scenery.SmoothVector.setChangeSpeed | ( | float | changeSpeed | ) |
Set change speed of the value in units per second.
References getAdjustRange().
Referenced by update().
| void Dragengine.Scenery.SmoothVector.setGoal | ( | Vector | goal | ) |
| void Dragengine.Scenery.SmoothVector.setValue | ( | Vector | value | ) |
Set current value.
Referenced by getGoal().
| void Dragengine.Scenery.SmoothVector.update | ( | float | elapsed | ) |
Update value with goal using current smoothing parameters.
Goal is not modified.
| [in] | elapsed | Elapsed time in seconds. If less than 0.001s update is skipped. |
References setChangeSpeed().
Referenced by writeToFile().
| void Dragengine.Scenery.SmoothVector.writeToFile | ( | FileWriter | writer | ) |
Write to file writer.
References readFromFile(), update(), and writeToFile().
Referenced by writeToFile().