propagating precision requirments into operations
This commit is contained in:
@@ -83,7 +83,7 @@ KeyIterator::KeyIterator(const std::vector<aiVectorKey>* _objPos,
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
template <class T>
|
||||
inline T Interpolate(const T& one, const T& two, float val)
|
||||
inline T Interpolate(const T& one, const T& two, ai_real val)
|
||||
{
|
||||
return one + (two-one)*val;
|
||||
}
|
||||
@@ -134,7 +134,7 @@ void KeyIterator::operator ++()
|
||||
const aiVectorKey& last = targetObjPos->at(nextTargetObjPos);
|
||||
const aiVectorKey& first = targetObjPos->at(nextTargetObjPos-1);
|
||||
|
||||
curTargetPosition = Interpolate(first.mValue, last.mValue, (float) (
|
||||
curTargetPosition = Interpolate(first.mValue, last.mValue, (ai_real) (
|
||||
(curTime-first.mTime) / (last.mTime-first.mTime) ));
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@ void KeyIterator::operator ++()
|
||||
const aiVectorKey& last = objPos->at(nextObjPos);
|
||||
const aiVectorKey& first = objPos->at(nextObjPos-1);
|
||||
|
||||
curPosition = Interpolate(first.mValue, last.mValue, (float) (
|
||||
curPosition = Interpolate(first.mValue, last.mValue, (ai_real) (
|
||||
(curTime-first.mTime) / (last.mTime-first.mTime)));
|
||||
}
|
||||
|
||||
@@ -220,7 +220,7 @@ void TargetAnimationHelper::Process(std::vector<aiVectorKey>* distanceTrack)
|
||||
|
||||
// diff vector
|
||||
aiVector3D diff = tposition - position;
|
||||
float f = diff.Length();
|
||||
ai_real f = diff.Length();
|
||||
|
||||
// output distance vector
|
||||
if (f)
|
||||
|
||||
Reference in New Issue
Block a user