propagating precision requirments into operations
This commit is contained in:
@@ -77,8 +77,8 @@ void ConvertListToStrings(const std::string& in, std::list<std::string>& out)
|
||||
void FindAABBTransformed (const aiMesh* mesh, aiVector3D& min, aiVector3D& max,
|
||||
const aiMatrix4x4& m)
|
||||
{
|
||||
min = aiVector3D (10e10f, 10e10f, 10e10f);
|
||||
max = aiVector3D (-10e10f,-10e10f,-10e10f);
|
||||
min = aiVector3D (10e10, 10e10, 10e10);
|
||||
max = aiVector3D (-10e10,-10e10,-10e10);
|
||||
for (unsigned int i = 0;i < mesh->mNumVertices;++i)
|
||||
{
|
||||
const aiVector3D v = m * mesh->mVertices[i];
|
||||
@@ -91,7 +91,7 @@ void FindAABBTransformed (const aiMesh* mesh, aiVector3D& min, aiVector3D& max,
|
||||
void FindMeshCenter (aiMesh* mesh, aiVector3D& out, aiVector3D& min, aiVector3D& max)
|
||||
{
|
||||
ArrayBounds(mesh->mVertices,mesh->mNumVertices, min,max);
|
||||
out = min + (max-min)*0.5f;
|
||||
out = min + (max-min)*(ai_real)0.5;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------------
|
||||
@@ -114,7 +114,7 @@ void FindSceneCenter (aiScene* scene, aiVector3D& out, aiVector3D& min, aiVector
|
||||
if (max[1] < tmax[1]) max[1] = tmax[1];
|
||||
if (max[2] < tmax[2]) max[2] = tmax[2];
|
||||
}
|
||||
out = min + (max-min)*0.5f;
|
||||
out = min + (max-min)*(ai_real)0.5;
|
||||
}
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ void FindMeshCenterTransformed (aiMesh* mesh, aiVector3D& out, aiVector3D& min,
|
||||
aiVector3D& max, const aiMatrix4x4& m)
|
||||
{
|
||||
FindAABBTransformed(mesh,min,max,m);
|
||||
out = min + (max-min)*0.5f;
|
||||
out = min + (max-min)*(ai_real)0.5;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user