Xonotic
keyframe.qc File Reference
#include "keyframe.qh"
#include "../menu.qh"
#include "easing.qh"
#include "../item/container.qh"
+ Include dependency graph for keyframe.qc:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

float getNewChildDuration (entity this, float durationTime)
 
float getNewChildStart (entity this)
 
float getNewChildValue (entity this)
 
entity makeHostedKeyframe (entity obj, void(entity, float) objSetter, float animDuration, float animStart, float animEnd)
 
entity makeKeyframe (entity obj, void(entity, float) objSetter, float animDuration, float animStart, float animEnd)
 

Variables

entity parent
 

Function Documentation

◆ getNewChildDuration()

float getNewChildDuration ( entity  this,
float  durationTime 
)

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  this)

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  this)

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  obj,
void(entity, float objSetter,
float  animDuration,
float  animStart,
float  animEnd 
)

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  obj,
void(entity, float objSetter,
float  animDuration,
float  animStart,
float  animEnd 
)

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:

Variable Documentation

◆ parent

entity parent

Definition at line 8 of file keyframe.qc.