MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / CalcRootBoneVelocity

Method CalcRootBoneVelocity

Source/Objects/riggedobject.cpp:242–252  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

240extern Timer game_timer;
241
242void RiggedObject::CalcRootBoneVelocity() {
243 vec3 pos(0.0f);
244 vec3 old_pos(0.0f);
245 pos = display_bone_matrices[0] * pos;
246 old_pos = old_root_bone * old_pos;
247
248 old_root_bone = display_bone_matrices[0];
249
250 velocity = (length(pos - old_pos)) / (game_timer.GetWallTime() - old_time);
251 old_time = game_timer.GetWallTime();
252}
253
254void RiggedObject::GetCubicSplineWeights(float interp, float* weights) {
255 float interp_squared = interp * interp;

Callers

nothing calls this directly

Calls 2

GetWallTimeMethod · 0.80
lengthFunction · 0.50

Tested by

no test coverage detected