Drag[en]gine Script Module DragonScript  1.21
Dragengine.Scenery.SmoothDouble Class Reference

Smooth double precision floating point value. More...

Inheritance diagram for Dragengine.Scenery.SmoothDouble:

Public Member Functions

Constructors
SmoothDouble new ()
 Create smooth double. More...
 
SmoothDouble new (SmoothDouble copy)
 Create copy of smooth double. More...
 
Management
float getValue ()
 Current value. More...
 
void setValue (float value)
 Set current value. More...
 
float getGoal ()
 Goal value. More...
 
void setGoal (float goal)
 Set goal value. More...
 
float getAdjustTime ()
 Adjustment time in seconds. More...
 
void setAdjustTime (float adjustTime)
 Adjustment time in seconds clamped to 0 or larger. More...
 
float getAdjustRange ()
 Adjustment range in units. More...
 
void setAdjustRange (float limit)
 Set adjustment range in units clamped to 0 or larger. More...
 
float getChangeSpeed ()
 Change speed of the value in units per second. More...
 
void setChangeSpeed (float changeSpeed)
 Set change speed of the value in units per second. More...
 
void reset ()
 Reset value, goal and change speed to 0. More...
 
void update (float elapsed)
 Update value with goal using current smoothing parameters. More...
 

File Handling

void writeToFile (FileWriter writer)
 Write to file writer. More...
 
static SmoothDouble readFromFile (FileReader reader)
 Read from file reader. More...
 

Detailed Description

Smooth double precision floating point value.

Smooth dynamic changing double precision floating point value across time.

Member Function Documentation

◆ getAdjustRange()

float Dragengine.Scenery.SmoothDouble.getAdjustRange ( )

Adjustment range in units.

◆ getAdjustTime()

float Dragengine.Scenery.SmoothDouble.getAdjustTime ( )

Adjustment time in seconds.

◆ getChangeSpeed()

float Dragengine.Scenery.SmoothDouble.getChangeSpeed ( )

Change speed of the value in units per second.

◆ getGoal()

float Dragengine.Scenery.SmoothDouble.getGoal ( )

Goal value.

◆ getValue()

float Dragengine.Scenery.SmoothDouble.getValue ( )

Current value.

◆ new() [1/2]

SmoothDouble Dragengine.Scenery.SmoothDouble.new ( )

Create smooth double.

Value, goal and change speed are set to 0. Adjust time is set to 1s. Change speed limit is set to 1 unit per second.

◆ new() [2/2]

SmoothDouble Dragengine.Scenery.SmoothDouble.new ( SmoothDouble  copy)

Create copy of smooth double.

◆ readFromFile()

static SmoothDouble Dragengine.Scenery.SmoothDouble.readFromFile ( FileReader  reader)
static

Read from file reader.

◆ reset()

void Dragengine.Scenery.SmoothDouble.reset ( )

Reset value, goal and change speed to 0.

◆ setAdjustRange()

void Dragengine.Scenery.SmoothDouble.setAdjustRange ( float  limit)

Set adjustment range in units clamped to 0 or larger.

◆ setAdjustTime()

void Dragengine.Scenery.SmoothDouble.setAdjustTime ( float  adjustTime)

Adjustment time in seconds clamped to 0 or larger.

◆ setChangeSpeed()

void Dragengine.Scenery.SmoothDouble.setChangeSpeed ( float  changeSpeed)

Set change speed of the value in units per second.

◆ setGoal()

void Dragengine.Scenery.SmoothDouble.setGoal ( float  goal)

Set goal value.

◆ setValue()

void Dragengine.Scenery.SmoothDouble.setValue ( float  value)

Set current value.

◆ update()

void Dragengine.Scenery.SmoothDouble.update ( float  elapsed)

Update value with goal using current smoothing parameters.

Goal is not modified.

Parameters
[in]elapsedElapsed time in seconds. If less than 0.001s update is skipped.

◆ writeToFile()

void Dragengine.Scenery.SmoothDouble.writeToFile ( FileWriter  writer)

Write to file writer.


The documentation for this class was generated from the following file: