Xonotic
keyframe.qh File Reference
#include "animation.qh"
+ Include dependency graph for keyframe.qh:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Keyframe
 

Functions

float getNewChildDuration (entity, float)
 
float getNewChildStart (entity)
 
float getNewChildValue (entity)
 
entity makeHostedKeyframe (entity, void(entity, float), float, float, float)
 
entity makeKeyframe (entity, void(entity, float), float, float, float)
 

Function Documentation

◆ getNewChildDuration()

float getNewChildDuration ( entity  ,
float   
)

Definition at line 37 of file keyframe.qc.

Referenced by makeKeyframe().

38  {
39  float maxDura = this.duration;
40  if (this.lastChild) maxDura = maxDura - (this.lastChild.startTime + this.lastChild.duration);
41  float dura = durationTime;
42  if (0 >= dura || dura > maxDura) dura = maxDura;
43  return dura;
44  }
+ Here is the caller graph for this function:

◆ getNewChildStart()

float getNewChildStart ( entity  )

Definition at line 31 of file keyframe.qc.

Referenced by makeKeyframe().

32  {
33  if (this.lastChild) return this.lastChild.startTime + this.lastChild.duration;
34  else return 0;
35  }
+ Here is the caller graph for this function:

◆ getNewChildValue()

float getNewChildValue ( entity  )

Definition at line 46 of file keyframe.qc.

References entity(), error(), firstChild, if(), METHOD, NULL, and other.

Referenced by makeKeyframe().

47  {
48  if (this.lastChild) return this.lastChild.startValue + this.lastChild.delta;
49  else return this.startValue;
50  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ makeHostedKeyframe()

entity makeHostedKeyframe ( entity  ,
void(entity, float ,
float  ,
float  ,
float   
)

Definition at line 10 of file keyframe.qc.

References anim, entity(), and makeKeyframe().

11  {
12  entity this = makeKeyframe(obj, objSetter, animDuration, animStart, animEnd);
13  anim.addAnim(anim, this);
14  return this;
15  }
entity() spawn
entity makeKeyframe(entity obj, void(entity, float) objSetter, float animDuration, float animStart, float animEnd)
Definition: keyframe.qc:17
+ Here is the call graph for this function:

◆ makeKeyframe()

entity makeKeyframe ( entity  ,
void(entity, float ,
float  ,
float  ,
float   
)

Definition at line 17 of file keyframe.qc.

References entity(), getNewChildDuration(), getNewChildStart(), getNewChildValue(), makeEasing(), METHOD, NEW, other, and time.

Referenced by makeHostedKeyframe().

18  {
19  entity this = NEW(Keyframe);
20  this.configureAnimation(this, obj, objSetter, time, animDuration, animStart, animEnd);
21  return this;
22  }
#define NEW(cname,...)
Definition: oo.qh:105
entity() spawn
float time
Definition: csprogsdefs.qc:16
+ Here is the call graph for this function:
+ Here is the caller graph for this function: