Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
Easing Class Reference
Inheritance diagram for Easing:
Collaboration diagram for Easing:

Public Member Functions

 ATTRIB (Animation, m_framenames, string)
 ATTRIB (Animation, object, entity)
virtual void calcValue ()
virtual void configureAnimation ()
virtual void finishAnim ()
 float (float, float, float, float) math
 LOG_DEBUGF ("Missing animation for %s: %s", modelnameforindex(mdlidx), this.registered_id)
virtual void resumeAnim ()
virtual void setMath ()
virtual void setObjectSetter ()
void setterDummy (Animation this, float)
virtual void setTimeStartDuration ()
virtual void setTimeStartEnd ()
virtual void setValueStartEnd ()
virtual void stopAnim ()
virtual void tick ()
virtual void update ()
 void (Animation this, float) setter

Public Attributes

float delta = 0
float duration = 0
float finished = false
 return
float startTime = 0
float startValue = 0
float stopped = false
float value = 0

Detailed Description

Definition at line 10 of file easing.qh.

Member Function Documentation

◆ ATTRIB() [1/2]

Animation::ATTRIB ( Animation ,
m_framenames ,
string  )
inherited

References ATTRIB(), FOREACH_WORD, STATIC_METHOD, and this.

Referenced by ATTRIB().

◆ ATTRIB() [2/2]

Animation::ATTRIB ( Animation ,
object ,
entity  )
inherited

References entity().

◆ calcValue()

void Easing::calcValue ( )
virtual

Reimplemented from Animation.

Definition at line 21 of file easing.qc.

22 {
23 return this.math(tickTime, animDuration, animStart, animDelta);
24 }

References calcValue(), and entity().

Referenced by calcValue().

◆ configureAnimation()

void Animation::configureAnimation ( )
virtualinherited

Definition at line 5 of file animation.qc.

6 {
7 this.setObjectSetter(this, obj, objSetter);
8 this.setTimeStartDuration(this, animStartTime, animDuration);
9 this.setValueStartEnd(this, animStartValue, animEndValue);
10 }
virtual void setValueStartEnd()
Definition animation.qc:30
virtual void setTimeStartDuration()
Definition animation.qc:24
virtual void setObjectSetter()
Definition animation.qc:36

References configureAnimation(), entity(), setObjectSetter(), setTimeStartDuration(), and setValueStartEnd().

Referenced by configureAnimation().

◆ finishAnim()

void Animation::finishAnim ( )
virtualinherited

Definition at line 67 of file animation.qc.

68 {
69 this.value = this.delta + this.startValue;
70 this.finished = true;
71 this.setter(this.object, this.value);
72 }
float value
Definition animation.qh:20
float delta
Definition animation.qh:24
float finished
Definition animation.qh:26
float startValue
Definition animation.qh:23

References delta, entity(), finishAnim(), finished, startValue, and value.

Referenced by finishAnim(), and tick().

◆ float()

Easing::float ( float ,
float ,
float ,
float  )

References easingLinear().

◆ LOG_DEBUGF()

Animation::LOG_DEBUGF ( "Missing animation for %s: %s" ,
modelnameforindex(mdlidx) ,
this. registered_id )
inherited

References registered_id.

◆ resumeAnim()

void Animation::resumeAnim ( )
virtualinherited

Definition at line 62 of file animation.qc.

63 {
64 this.stopped = false;
65 }
float stopped
Definition animation.qh:25

References entity(), resumeAnim(), and stopped.

Referenced by resumeAnim().

◆ setMath()

void Easing::setMath ( )
virtual

Definition at line 26 of file easing.qc.

27 {
28 this.math = func;
29 }

References entity(), and setMath().

Referenced by setMath().

◆ setObjectSetter()

void Animation::setObjectSetter ( )
virtualinherited

Definition at line 36 of file animation.qc.

37 {
38 this.object = o;
39 this.setter = s;
40 }

References entity(), and setObjectSetter().

Referenced by configureAnimation(), and setObjectSetter().

◆ setterDummy()

void Animation::setterDummy ( Animation this,
float  )
inlineinherited

Definition at line 18 of file animation.qh.

18{}

Referenced by void().

◆ setTimeStartDuration()

void Animation::setTimeStartDuration ( )
virtualinherited

Definition at line 24 of file animation.qc.

25 {
26 this.startTime = s;
27 this.duration = d;
28 }
float startTime
Definition animation.qh:21
float duration
Definition animation.qh:22

References duration, entity(), setTimeStartDuration(), and startTime.

Referenced by configureAnimation(), setTimeStartDuration(), and update().

◆ setTimeStartEnd()

void Animation::setTimeStartEnd ( )
virtualinherited

Definition at line 18 of file animation.qc.

19 {
20 this.startTime = s;
21 this.duration = e - s;
22 }

References duration, entity(), setTimeStartEnd(), and startTime.

Referenced by setTimeStartEnd().

◆ setValueStartEnd()

void Animation::setValueStartEnd ( )
virtualinherited

Definition at line 30 of file animation.qc.

31 {
32 this.startValue = s;
33 this.delta = e - s;
34 }

References delta, entity(), setValueStartEnd(), and startValue.

Referenced by configureAnimation(), setValueStartEnd(), and update().

◆ stopAnim()

void Animation::stopAnim ( )
virtualinherited

Definition at line 57 of file animation.qc.

58 {
59 this.stopped = true;
60 }

References entity(), stopAnim(), and stopped.

Referenced by stopAnim().

◆ tick()

void Animation::tick ( )
virtualinherited

Definition at line 42 of file animation.qc.

43 {
44 if (this.stopped || this.finished || (tickTime < this.startTime)) return;
45
46 if (tickTime >= (this.startTime + this.duration)) this.finishAnim(this);
47 else this.value = this.calcValue(this, (tickTime - this.startTime), this.duration, this.startValue, this.delta);
48
49 this.setter(this.object, this.value);
50 }
virtual void calcValue()
Definition animation.qc:52
virtual void finishAnim()
Definition animation.qc:67

References calcValue(), delta, duration, entity(), finishAnim(), finished, startTime, startValue, stopped, tick(), and value.

Referenced by tick().

◆ update()

void Animation::update ( )
virtualinherited

Definition at line 12 of file animation.qc.

13 {
14 this.setTimeStartDuration(this, time, animDuration);
15 this.setValueStartEnd(this, animStartValue, animEndValue);
16 }
float time

References entity(), setTimeStartDuration(), setValueStartEnd(), time, and update().

Referenced by update().

◆ void()

Animation::void ( Animation this,
float  )
inherited

References setterDummy().

Member Data Documentation

◆ delta

float Animation::delta = 0
inherited

Definition at line 24 of file animation.qh.

Referenced by finishAnim(), setValueStartEnd(), and tick().

◆ duration

float Animation::duration = 0
inherited

Definition at line 22 of file animation.qh.

Referenced by setTimeStartDuration(), setTimeStartEnd(), and tick().

◆ finished

float Animation::finished = false
inherited

Definition at line 26 of file animation.qh.

Referenced by finishAnim(), and tick().

◆ return

Animation::return
inherited

Definition at line 21 of file animdecide.qh.

◆ startTime

float Animation::startTime = 0
inherited

Definition at line 21 of file animation.qh.

Referenced by setTimeStartDuration(), setTimeStartEnd(), and tick().

◆ startValue

float Animation::startValue = 0
inherited

Definition at line 23 of file animation.qh.

Referenced by finishAnim(), setValueStartEnd(), and tick().

◆ stopped

float Animation::stopped = false
inherited

Definition at line 25 of file animation.qh.

Referenced by resumeAnim(), stopAnim(), and tick().

◆ value

float Animation::value = 0
inherited

Definition at line 20 of file animation.qh.

Referenced by finishAnim(), and tick().


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