123
This commit is contained in:
15
CryAnimation/BSplineVec3dPacked.cpp
Normal file
15
CryAnimation/BSplineVec3dPacked.cpp
Normal file
@@ -0,0 +1,15 @@
|
||||
#include "StdAfx.h"
|
||||
#include "bsplinevec3dpacked.h"
|
||||
|
||||
// returns the normalized knot and the base - how many cycles the knot rolled back or forth
|
||||
int PackedSplineClosedGetKnotTime(int &nKnot, int numKnots)
|
||||
{
|
||||
int nBase = nKnot / (numKnots-1);
|
||||
nKnot = nKnot % (numKnots-1);
|
||||
if (nKnot < 0)
|
||||
{
|
||||
--nBase;
|
||||
nKnot += numKnots-1;
|
||||
}
|
||||
return nBase;
|
||||
}
|
||||
Reference in New Issue
Block a user