mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-12 07:04:36 +00:00
Merge pull request #1016 from Azaezel/alpha41/mangledMath
clean up math varsize complaints
This commit is contained in:
commit
a6f03897ed
30 changed files with 73 additions and 68 deletions
|
|
@ -427,6 +427,7 @@ bool AssimpShapeLoader::fillGuiTreeView(const char* sourceShapePath, GuiTreeView
|
|||
void AssimpShapeLoader::updateMaterialsScript(const Torque::Path &path)
|
||||
{
|
||||
return;
|
||||
/*
|
||||
Torque::Path scriptPath(path);
|
||||
scriptPath.setFileName("materials");
|
||||
scriptPath.setExtension(TORQUE_SCRIPT_EXTENSION);
|
||||
|
|
@ -460,6 +461,7 @@ void AssimpShapeLoader::updateMaterialsScript(const Torque::Path &path)
|
|||
return;
|
||||
|
||||
persistMgr.saveDirty();
|
||||
*/
|
||||
}
|
||||
|
||||
/// Check if an up-to-date cached DTS is available for this DAE file
|
||||
|
|
|
|||
|
|
@ -512,7 +512,7 @@ void ColladaAppMesh::getPrimitives(const domGeometry* geometry)
|
|||
if (!pTriData)
|
||||
continue;
|
||||
|
||||
U32 numTriangles = pTriData->getCount() / meshPrims[iPrim]->getStride() / 3;
|
||||
U32 numTriangles = (U32)(pTriData->getCount() / meshPrims[iPrim]->getStride() / 3);
|
||||
if (!numTriangles)
|
||||
continue;
|
||||
|
||||
|
|
|
|||
|
|
@ -195,8 +195,8 @@ DefineEngineFunction( enumColladaForImport, bool, (const char * shapePath, const
|
|||
for (S32 i = 0; i < root->getLibrary_materials_array().getCount(); i++)
|
||||
{
|
||||
const domLibrary_materials* libraryMats = root->getLibrary_materials_array()[i];
|
||||
stats.numMaterials += libraryMats->getMaterial_array().getCount();
|
||||
for (S32 j = 0; j < libraryMats->getMaterial_array().getCount(); j++)
|
||||
stats.numMaterials += (S32)libraryMats->getMaterial_array().getCount();
|
||||
for (S32 j = 0; j < (S32)libraryMats->getMaterial_array().getCount(); j++)
|
||||
{
|
||||
domMaterial* mat = libraryMats->getMaterial_array()[j];
|
||||
tree->insertItem(matsID, _GetNameOrId(mat), "", "", 0, 0);
|
||||
|
|
@ -225,7 +225,7 @@ DefineEngineFunction( enumColladaForImport, bool, (const char * shapePath, const
|
|||
for (S32 i = 0; i < root->getLibrary_animation_clips_array().getCount(); i++)
|
||||
{
|
||||
const domLibrary_animation_clips* libraryClips = root->getLibrary_animation_clips_array()[i];
|
||||
stats.numClips += libraryClips->getAnimation_clip_array().getCount();
|
||||
stats.numClips += (S32)libraryClips->getAnimation_clip_array().getCount();
|
||||
for (S32 j = 0; j < libraryClips->getAnimation_clip_array().getCount(); j++)
|
||||
{
|
||||
domAnimation_clip* clip = libraryClips->getAnimation_clip_array()[j];
|
||||
|
|
|
|||
|
|
@ -462,7 +462,7 @@ void updateMaterialsScript(const Torque::Path &path, bool copyTextures = false)
|
|||
#endif
|
||||
|
||||
return;
|
||||
|
||||
/*
|
||||
Torque::Path scriptPath(path);
|
||||
scriptPath.setFileName("materials");
|
||||
scriptPath.setExtension(TORQUE_SCRIPT_EXTENSION);
|
||||
|
|
@ -510,6 +510,7 @@ void updateMaterialsScript(const Torque::Path &path, bool copyTextures = false)
|
|||
}
|
||||
|
||||
persistMgr.saveDirty();
|
||||
*/
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -527,7 +527,7 @@ public:
|
|||
{
|
||||
if ((index >= 0) && (index < size())) {
|
||||
if (source->getFloat_array())
|
||||
return &source->getFloat_array()->getValue()[index*stride()];
|
||||
return &source->getFloat_array()->getValue()[(U64)(index*stride())];
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -541,9 +541,9 @@ public:
|
|||
if ((index >= 0) && (index < size())) {
|
||||
// could be plain strings or IDREFs
|
||||
if (source->getName_array())
|
||||
return source->getName_array()->getValue()[index*stride()];
|
||||
return source->getName_array()->getValue()[(U64)(index*stride())];
|
||||
else if (source->getIDREF_array())
|
||||
return source->getIDREF_array()->getValue()[index*stride()].getID();
|
||||
return source->getIDREF_array()->getValue()[(U64)(index*stride())].getID();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
|
@ -708,7 +708,7 @@ template<> inline const domListOfUInts *ColladaPrimitive<domTristrips>::getTrian
|
|||
continue;
|
||||
|
||||
domUint* pSrcData = &(P->getValue()[0]);
|
||||
size_t numTriangles = (P->getValue().getCount() / stride) - 2;
|
||||
U64 numTriangles = (P->getValue().getCount() / stride) - 2;
|
||||
|
||||
// Convert the strip back to a triangle list
|
||||
domUint* v0 = pSrcData;
|
||||
|
|
@ -723,7 +723,7 @@ template<> inline const domListOfUInts *ColladaPrimitive<domTristrips>::getTrian
|
|||
else
|
||||
{
|
||||
// CCW triangle
|
||||
pTriangleData->appendArray(stride*3, v0);
|
||||
pTriangleData->appendArray((U64)(stride*3), v0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -749,7 +749,7 @@ template<> inline const domListOfUInts *ColladaPrimitive<domTrifans>::getTriangl
|
|||
continue;
|
||||
|
||||
domUint* pSrcData = &(P->getValue()[0]);
|
||||
size_t numTriangles = (P->getValue().getCount() / stride) - 2;
|
||||
U64 numTriangles = (P->getValue().getCount() / stride) - 2;
|
||||
|
||||
// Convert the fan back to a triangle list
|
||||
domUint* v0 = pSrcData + stride;
|
||||
|
|
@ -781,7 +781,7 @@ template<> inline const domListOfUInts *ColladaPrimitive<domPolygons>::getTriang
|
|||
continue;
|
||||
|
||||
domUint* pSrcData = &(P->getValue()[0]);
|
||||
size_t numPoints = P->getValue().getCount() / stride;
|
||||
U64 numPoints = P->getValue().getCount() / stride;
|
||||
|
||||
// Use a simple tri-fan (centered at the first point) method of
|
||||
// converting the polygon to triangles.
|
||||
|
|
@ -789,7 +789,7 @@ template<> inline const domListOfUInts *ColladaPrimitive<domPolygons>::getTriang
|
|||
pSrcData += stride;
|
||||
for (S32 iTri = 0; iTri < numPoints-2; iTri++) {
|
||||
pTriangleData->appendArray(stride, v0);
|
||||
pTriangleData->appendArray(stride*2, pSrcData);
|
||||
pTriangleData->appendArray((U64)(stride*2), pSrcData);
|
||||
pSrcData += stride;
|
||||
}
|
||||
}
|
||||
|
|
@ -831,7 +831,7 @@ template<> inline const domListOfUInts *ColladaPrimitive<domPolylist>::getTriang
|
|||
pSrcData += stride;
|
||||
for (S32 iTri = 0; iTri < vcount[iPoly]-2; iTri++) {
|
||||
pTriangleData->appendArray(stride, v0);
|
||||
pTriangleData->appendArray(stride*2, pSrcData);
|
||||
pTriangleData->appendArray((U64)(stride*2), pSrcData);
|
||||
pSrcData += stride;
|
||||
}
|
||||
pSrcData += stride;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue