mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-23 14:20:57 +00:00
Merge remote-tracking branch 'smally/platform_type_consistency' into platform-type-consistency
Conflicts: Engine/source/platform/platformCPUCount.cpp
This commit is contained in:
commit
87d9e245b7
210 changed files with 896 additions and 896 deletions
|
|
@ -38,10 +38,10 @@ void zero_vert_normal_bulk_SSE(const dsize_t count, U8 * __restrict const outPtr
|
|||
vMask = _mm_load_ps((const F32*)&_point3f_zero_mask);
|
||||
|
||||
// pre-populate cache
|
||||
for(int i = 0; i < 8; i++)
|
||||
for(S32 i = 0; i < 8; i++)
|
||||
_mm_prefetch(reinterpret_cast<const char *>(outData + outStride * i), _MM_HINT_T0);
|
||||
|
||||
for(int i = 0; i < count; i++)
|
||||
for(S32 i = 0; i < count; i++)
|
||||
{
|
||||
TSMesh::__TSMeshVertexBase *curElem = reinterpret_cast<TSMesh::__TSMeshVertexBase *>(outData);
|
||||
|
||||
|
|
@ -102,13 +102,13 @@ void m_matF_x_BatchedVertWeightList_SSE(const MatrixF &mat,
|
|||
|
||||
// pre-populate cache
|
||||
const TSSkinMesh::BatchData::BatchedVertWeight &firstElem = batch[0];
|
||||
for(int i = 0; i < 8; i++)
|
||||
for(S32 i = 0; i < 8; i++)
|
||||
{
|
||||
_mm_prefetch(reinterpret_cast<const char *>(iPtr + inStride * i), _MM_HINT_T0);
|
||||
_mm_prefetch(reinterpret_cast<const char *>(outPtr + outStride * (i + firstElem.vidx)), _MM_HINT_T0);
|
||||
}
|
||||
|
||||
for(register int i = 0; i < count; i++)
|
||||
for(register S32 i = 0; i < count; i++)
|
||||
{
|
||||
const TSSkinMesh::BatchData::BatchedVertWeight &inElem = batch[i];
|
||||
TSMesh::__TSMeshVertexBase *outElem = reinterpret_cast<TSMesh::__TSMeshVertexBase *>(outPtr + inElem.vidx * outStride);
|
||||
|
|
|
|||
|
|
@ -46,13 +46,13 @@ void m_matF_x_BatchedVertWeightList_SSE4(const MatrixF &mat,
|
|||
|
||||
// pre-populate cache
|
||||
const TSSkinMesh::BatchData::BatchedVertWeight &firstElem = batch[0];
|
||||
for(int i = 0; i < 8; i++)
|
||||
for(S32 i = 0; i < 8; i++)
|
||||
{
|
||||
_mm_prefetch(reinterpret_cast<const char *>(iPtr + inStride * i), _MM_HINT_T0);
|
||||
_mm_prefetch(reinterpret_cast<const char *>(outPtr + outStride * (i + firstElem.vidx)), _MM_HINT_T0);
|
||||
}
|
||||
|
||||
for(int i = 0; i < count; i++)
|
||||
for(S32 i = 0; i < count; i++)
|
||||
{
|
||||
const TSSkinMesh::BatchData::BatchedVertWeight &inElem = batch[i];
|
||||
TSMesh::__TSMeshVertexBase *outElem = reinterpret_cast<TSMesh::__TSMeshVertexBase *>(outPtr + inElem.vidx * outStride);
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ private:
|
|||
const domVertices* vertices = daeSafeCast<domVertices>(element);
|
||||
// Search for the input with the desired semantic
|
||||
const char* semantic = SourceTypeToSemantic( type );
|
||||
for (int iInput = 0; iInput < vertices->getInput_array().getCount(); iInput++)
|
||||
for (S32 iInput = 0; iInput < vertices->getInput_array().getCount(); iInput++)
|
||||
{
|
||||
domInputLocal* input = vertices->getInput_array().get(iInput);
|
||||
if (dStrEqual(input->getSemantic(), semantic))
|
||||
|
|
@ -230,12 +230,12 @@ public:
|
|||
*maxOffset = 0;
|
||||
|
||||
// Clear output array
|
||||
for (int i = 0; i < NumStreams; i++)
|
||||
for (S32 i = 0; i < NumStreams; i++)
|
||||
sortedInputs[i] = 0;
|
||||
|
||||
// Separate inputs by type, and sort by set (ie. lowest TEXCOORD set becomes UV,
|
||||
// next TEXCOORD set becomes UV2 etc)
|
||||
for (int iInput = 0; iInput < inputs.getCount(); iInput++) {
|
||||
for (S32 iInput = 0; iInput < inputs.getCount(); iInput++) {
|
||||
|
||||
const T& input = inputs[iInput];
|
||||
const daeString semantic = input->getSemantic();
|
||||
|
|
@ -247,7 +247,7 @@ public:
|
|||
// The <vertices> element may contain multiple inputs (eg. POSITION, NORMAL etc)
|
||||
domInputLocalRef verticesInputs[NumStreams];
|
||||
classifyInputs(vertices->getInput_array(), verticesInputs);
|
||||
for (int iStream = 0; iStream < NumStreams; iStream++)
|
||||
for (S32 iStream = 0; iStream < NumStreams; iStream++)
|
||||
{
|
||||
if (verticesInputs[iStream] != 0)
|
||||
sortedInputs[iStream] = input;
|
||||
|
|
@ -367,7 +367,7 @@ bool ColladaAppMesh::animatesMatFrame(const AppSequence* appSeq)
|
|||
// - by animating the morph weights for morph targets with different UVs
|
||||
|
||||
// Check if the MAYA profile texture transform is animated
|
||||
for (int iMat = 0; iMat < appMaterials.size(); iMat++) {
|
||||
for (S32 iMat = 0; iMat < appMaterials.size(); iMat++) {
|
||||
ColladaAppMaterial* appMat = static_cast<ColladaAppMaterial*>(appMaterials[iMat]);
|
||||
if (appMat->effectExt &&
|
||||
appMat->effectExt->animatesTextureTransform(appSeq->getStart(), appSeq->getEnd()))
|
||||
|
|
@ -379,7 +379,7 @@ bool ColladaAppMesh::animatesMatFrame(const AppSequence* appSeq)
|
|||
bool animated = false;
|
||||
bool differentUVs = false;
|
||||
if (const domMorph* morph = getMorph()) {
|
||||
for (int iInput = 0; iInput < morph->getTargets()->getInput_array().getCount(); iInput++) {
|
||||
for (S32 iInput = 0; iInput < morph->getTargets()->getInput_array().getCount(); iInput++) {
|
||||
const domInputLocal* input = morph->getTargets()->getInput_array()[iInput];
|
||||
if (dStrEqual(input->getSemantic(), "MORPH_TARGET")) {
|
||||
// @todo: Check if morph targets have different UVs to base geometry
|
||||
|
|
@ -402,7 +402,7 @@ bool ColladaAppMesh::animatesFrame(const AppSequence* appSeq)
|
|||
// the morph weights are animated within the sequence interval
|
||||
bool animated = false;
|
||||
if (const domMorph* morph = getMorph()) {
|
||||
for (int iInput = 0; iInput < morph->getTargets()->getInput_array().getCount(); iInput++) {
|
||||
for (S32 iInput = 0; iInput < morph->getTargets()->getInput_array().getCount(); iInput++) {
|
||||
const domInputLocal* input = morph->getTargets()->getInput_array()[iInput];
|
||||
if (dStrEqual(input->getSemantic(), "MORPH_WEIGHT")) {
|
||||
const domSource* source = daeSafeCast<domSource>(findInputSource(input));
|
||||
|
|
@ -441,7 +441,7 @@ S32 ColladaAppMesh::addMaterial(const char* symbol)
|
|||
instanceCtrl->getBind_material();
|
||||
if (binds) {
|
||||
const domInstance_material_Array& matArray = binds->getTechnique_common()->getInstance_material_array();
|
||||
for (int iBind = 0; iBind < matArray.getCount(); iBind++) {
|
||||
for (S32 iBind = 0; iBind < matArray.getCount(); iBind++) {
|
||||
if (dStrEqual(matArray[iBind]->getSymbol(), symbol)) {
|
||||
|
||||
// Find the index of the bound material in the shape global list
|
||||
|
|
@ -488,7 +488,7 @@ void ColladaAppMesh::getPrimitives(const domGeometry* geometry)
|
|||
// about unsupported elements
|
||||
Vector<BasePrimitive*> meshPrims;
|
||||
const daeElementRefArray& contents = geometry->getMesh()->getContents();
|
||||
for (int iElem = 0; iElem < contents.getCount(); iElem++) {
|
||||
for (S32 iElem = 0; iElem < contents.getCount(); iElem++) {
|
||||
|
||||
if (BasePrimitive::isPrimitive(contents[iElem])) {
|
||||
if (BasePrimitive::isSupportedPrimitive(contents[iElem]))
|
||||
|
|
@ -505,7 +505,7 @@ void ColladaAppMesh::getPrimitives(const domGeometry* geometry)
|
|||
VertTupleMap tupleMap;
|
||||
|
||||
// Create Torque primitives
|
||||
for (int iPrim = 0; iPrim < meshPrims.size(); iPrim++) {
|
||||
for (S32 iPrim = 0; iPrim < meshPrims.size(); iPrim++) {
|
||||
|
||||
// Primitive element must have at least 1 triangle
|
||||
const domListOfUInts* pTriData = meshPrims[iPrim]->getTriangleData();
|
||||
|
|
@ -619,7 +619,7 @@ void ColladaAppMesh::getPrimitives(const domGeometry* geometry)
|
|||
}
|
||||
}
|
||||
|
||||
for (int iPrim = 0; iPrim < meshPrims.size(); iPrim++)
|
||||
for (S32 iPrim = 0; iPrim < meshPrims.size(); iPrim++)
|
||||
delete meshPrims[iPrim];
|
||||
}
|
||||
|
||||
|
|
@ -641,7 +641,7 @@ void ColladaAppMesh::getVertexData(const domGeometry* geometry, F32 time, const
|
|||
// Get the supported primitive elements for this geometry
|
||||
Vector<BasePrimitive*> meshPrims;
|
||||
const daeElementRefArray& contents = geometry->getMesh()->getContents();
|
||||
for (int iElem = 0; iElem < contents.getCount(); iElem++) {
|
||||
for (S32 iElem = 0; iElem < contents.getCount(); iElem++) {
|
||||
if (BasePrimitive::isSupportedPrimitive(contents[iElem]))
|
||||
meshPrims.push_back(BasePrimitive::get(contents[iElem]));
|
||||
}
|
||||
|
|
@ -659,7 +659,7 @@ void ColladaAppMesh::getVertexData(const domGeometry* geometry, F32 time, const
|
|||
ColorI* colors_array = NULL;
|
||||
Point2F* uv2s_array = NULL;
|
||||
|
||||
for (int iVert = 0; iVert < vertTuples.size(); iVert++) {
|
||||
for (S32 iVert = 0; iVert < vertTuples.size(); iVert++) {
|
||||
|
||||
const VertTuple& tuple = vertTuples[iVert];
|
||||
|
||||
|
|
@ -751,7 +751,7 @@ void ColladaAppMesh::getVertexData(const domGeometry* geometry, F32 time, const
|
|||
}
|
||||
}
|
||||
|
||||
for (int iPrim = 0; iPrim < meshPrims.size(); iPrim++)
|
||||
for (S32 iPrim = 0; iPrim < meshPrims.size(); iPrim++)
|
||||
delete meshPrims[iPrim];
|
||||
}
|
||||
|
||||
|
|
@ -768,7 +768,7 @@ void ColladaAppMesh::getMorphVertexData(const domMorph* morph, F32 time, const M
|
|||
Vector<const domGeometry*> targetGeoms;
|
||||
domListOfFloats targetWeights;
|
||||
|
||||
for (int iInput = 0; iInput < morph->getTargets()->getInput_array().getCount(); iInput++) {
|
||||
for (S32 iInput = 0; iInput < morph->getTargets()->getInput_array().getCount(); iInput++) {
|
||||
const domInputLocal* input = morph->getTargets()->getInput_array()[iInput];
|
||||
const domSource* source = daeSafeCast<domSource>(findInputSource(input));
|
||||
|
||||
|
|
@ -777,7 +777,7 @@ void ColladaAppMesh::getMorphVertexData(const domMorph* morph, F32 time, const M
|
|||
_SourceReader srcTargets;
|
||||
srcTargets.initFromSource(source);
|
||||
|
||||
for (int iTarget = 0; iTarget < srcTargets.size(); iTarget++) {
|
||||
for (S32 iTarget = 0; iTarget < srcTargets.size(); iTarget++) {
|
||||
// Lookup the element and add to the targets list
|
||||
daeIDRef idref(srcTargets.getStringValue(iTarget));
|
||||
idref.setContainer(morph->getDocument()->getDomRoot());
|
||||
|
|
@ -820,27 +820,27 @@ void ColladaAppMesh::getMorphVertexData(const domMorph* morph, F32 time, const M
|
|||
if (morph->getMethod() == MORPHMETHODTYPE_NORMALIZED) {
|
||||
|
||||
F32 weightSum = 0.0f;
|
||||
for (int iWeight = 0; iWeight < targetWeights.getCount(); iWeight++) {
|
||||
for (S32 iWeight = 0; iWeight < targetWeights.getCount(); iWeight++) {
|
||||
weightSum += targetWeights[iWeight];
|
||||
}
|
||||
|
||||
// Result = Base*(1.0-w1-w2 ... -wN) + w1*Target1 + w2*Target2 ... + wN*TargetN
|
||||
weightSum = mClampF(1.0f - weightSum, 0.0f, 1.0f);
|
||||
|
||||
for (int iVert = 0; iVert < vertTuples.size(); iVert++) {
|
||||
for (S32 iVert = 0; iVert < vertTuples.size(); iVert++) {
|
||||
points_array[iVert] *= weightSum;
|
||||
norms_array[iVert] *= weightSum;
|
||||
uvs_array[iVert] *= weightSum;
|
||||
}
|
||||
|
||||
if (uv2s_array) {
|
||||
for (int iVert = 0; iVert < vertTuples.size(); iVert++)
|
||||
for (S32 iVert = 0; iVert < vertTuples.size(); iVert++)
|
||||
uv2s_array[iVert] *= weightSum;
|
||||
}
|
||||
}
|
||||
|
||||
// Interpolate using the target geometry and weights
|
||||
for (int iTarget = 0; iTarget < targetGeoms.size(); iTarget++) {
|
||||
for (S32 iTarget = 0; iTarget < targetGeoms.size(); iTarget++) {
|
||||
|
||||
// Ignore empty weights
|
||||
if (targetWeights[iTarget] == 0.0f)
|
||||
|
|
@ -866,18 +866,18 @@ void ColladaAppMesh::getMorphVertexData(const domMorph* morph, F32 time, const M
|
|||
getVertexData(targetGeoms[iTarget], time, objectOffset, targetPoints, targetNorms, targetColors, targetUvs, targetUv2s, false);
|
||||
|
||||
// Combine with base geometry
|
||||
for (int iVert = 0; iVert < vertTuples.size(); iVert++) {
|
||||
for (S32 iVert = 0; iVert < vertTuples.size(); iVert++) {
|
||||
points_array[iVert] += targetPoints[iVert] * targetWeights[iTarget];
|
||||
norms_array[iVert] += targetNorms[iVert] * targetWeights[iTarget];
|
||||
uvs_array[iVert] += targetUvs[iVert] * targetWeights[iTarget];
|
||||
}
|
||||
|
||||
if (uv2s_array) {
|
||||
for (int iVert = 0; iVert < vertTuples.size(); iVert++)
|
||||
for (S32 iVert = 0; iVert < vertTuples.size(); iVert++)
|
||||
uv2s_array[iVert] += targetUv2s[iVert] * targetWeights[iTarget];
|
||||
}
|
||||
if (colors_array) {
|
||||
for (int iVert = 0; iVert < vertTuples.size(); iVert++)
|
||||
for (S32 iVert = 0; iVert < vertTuples.size(); iVert++)
|
||||
colors_array[iVert] += targetColors[iVert] * (F32)targetWeights[iTarget];
|
||||
}
|
||||
}
|
||||
|
|
@ -963,7 +963,7 @@ void ColladaAppMesh::lookupSkinData()
|
|||
// vertex may have multiple [bone, weight] pairs in the array)
|
||||
Vector<U32> vindicesOffset;
|
||||
const domInt* vindices = (domInt*)weights_v.getRaw(0);
|
||||
for (int iWeight = 0; iWeight < weights_vcount.getCount(); iWeight++) {
|
||||
for (S32 iWeight = 0; iWeight < weights_vcount.getCount(); iWeight++) {
|
||||
// Store the offset into the vindices array for this vertex
|
||||
vindicesOffset.push_back(vindices - (domInt*)weights_v.getRaw(0));
|
||||
vindices += (weights_vcount[iWeight]*2); // 2 indices [bone, weight] per vert
|
||||
|
|
@ -971,14 +971,14 @@ void ColladaAppMesh::lookupSkinData()
|
|||
|
||||
// Set vertex weights
|
||||
bool tooManyWeightsWarning = false;
|
||||
for (int iVert = 0; iVert < vertsPerFrame; iVert++) {
|
||||
for (S32 iVert = 0; iVert < vertsPerFrame; iVert++) {
|
||||
const domUint* vcount = (domUint*)weights_vcount.getRaw(0);
|
||||
const domInt* vindices = (domInt*)weights_v.getRaw(0);
|
||||
vindices += vindicesOffset[vertTuples[iVert].vertex];
|
||||
|
||||
S32 nonZeroWeightCount = 0;
|
||||
|
||||
for (int iWeight = 0; iWeight < vcount[vertTuples[iVert].vertex]; iWeight++) {
|
||||
for (S32 iWeight = 0; iWeight < vcount[vertTuples[iVert].vertex]; iWeight++) {
|
||||
|
||||
S32 bIndex = vindices[iWeight*2];
|
||||
F32 bWeight = streams.weights.getFloatValue( vindices[iWeight*2 + 1] );
|
||||
|
|
@ -1027,12 +1027,12 @@ void ColladaAppMesh::lookupSkinData()
|
|||
}
|
||||
|
||||
// Normalize vertex weights (force weights for each vert to sum to 1)
|
||||
int iWeight = 0;
|
||||
S32 iWeight = 0;
|
||||
while (iWeight < weight.size()) {
|
||||
// Find the last weight with the same vertex number, and sum all weights for
|
||||
// that vertex
|
||||
F32 invTotalWeight = 0;
|
||||
int iLast;
|
||||
S32 iLast;
|
||||
for (iLast = iWeight; iLast < weight.size(); iLast++) {
|
||||
if (vertexIndex[iLast] != vertexIndex[iWeight])
|
||||
break;
|
||||
|
|
@ -1048,7 +1048,7 @@ void ColladaAppMesh::lookupSkinData()
|
|||
// Add dummy AppNodes to allow Collada joints to be mapped to 3space nodes
|
||||
bones.setSize(streams.joints.size());
|
||||
initialTransforms.setSize(streams.joints.size());
|
||||
for (int iJoint = 0; iJoint < streams.joints.size(); iJoint++)
|
||||
for (S32 iJoint = 0; iJoint < streams.joints.size(); iJoint++)
|
||||
{
|
||||
const char* jointName = streams.joints.getStringValue(iJoint);
|
||||
|
||||
|
|
@ -1056,7 +1056,7 @@ void ColladaAppMesh::lookupSkinData()
|
|||
const domNode* joint = 0;
|
||||
if (instanceCtrl->getSkeleton_array().getCount()) {
|
||||
// Search for the node using the <skeleton> as the base element
|
||||
for (int iSkel = 0; iSkel < instanceCtrl->getSkeleton_array().getCount(); iSkel++) {
|
||||
for (S32 iSkel = 0; iSkel < instanceCtrl->getSkeleton_array().getCount(); iSkel++) {
|
||||
xsAnyURI skeleton = instanceCtrl->getSkeleton_array()[iSkel]->getValue();
|
||||
daeSIDResolver resolver(skeleton.getElement(), jointName);
|
||||
joint = daeSafeCast<domNode>(resolver.getElement());
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ ColladaAppNode::ColladaAppNode(const domNode* node, ColladaAppNode* parent)
|
|||
dFree( properties );
|
||||
|
||||
// Create vector of transform elements
|
||||
for (int iChild = 0; iChild < node->getContents().getCount(); iChild++) {
|
||||
for (S32 iChild = 0; iChild < node->getContents().getCount(); iChild++) {
|
||||
switch (node->getContents()[iChild]->getElementType()) {
|
||||
case COLLADA_TYPE::TRANSLATE:
|
||||
case COLLADA_TYPE::ROTATE:
|
||||
|
|
@ -109,7 +109,7 @@ ColladaAppNode::ColladaAppNode(const domNode* node, ColladaAppNode* parent)
|
|||
void ColladaAppNode::buildChildList()
|
||||
{
|
||||
// Process children: collect <node> and <instance_node> elements
|
||||
for (int iChild = 0; iChild < p_domNode->getContents().getCount(); iChild++) {
|
||||
for (S32 iChild = 0; iChild < p_domNode->getContents().getCount(); iChild++) {
|
||||
|
||||
daeElement* child = p_domNode->getContents()[iChild];
|
||||
switch (child->getElementType()) {
|
||||
|
|
@ -139,7 +139,7 @@ void ColladaAppNode::buildChildList()
|
|||
void ColladaAppNode::buildMeshList()
|
||||
{
|
||||
// Process children: collect <instance_geometry> and <instance_controller> elements
|
||||
for (int iChild = 0; iChild < p_domNode->getContents().getCount(); iChild++) {
|
||||
for (S32 iChild = 0; iChild < p_domNode->getContents().getCount(); iChild++) {
|
||||
|
||||
daeElement* child = p_domNode->getContents()[iChild];
|
||||
switch (child->getElementType()) {
|
||||
|
|
@ -167,7 +167,7 @@ bool ColladaAppNode::animatesTransform(const AppSequence* appSeq)
|
|||
{
|
||||
// Check if any of this node's transform elements are animated during the
|
||||
// sequence interval
|
||||
for (int iTxfm = 0; iTxfm < nodeTransforms.size(); iTxfm++) {
|
||||
for (S32 iTxfm = 0; iTxfm < nodeTransforms.size(); iTxfm++) {
|
||||
if (nodeTransforms[iTxfm].isAnimated(appSeq->getStart(), appSeq->getEnd()))
|
||||
return true;
|
||||
}
|
||||
|
|
@ -227,7 +227,7 @@ MatrixF ColladaAppNode::getTransform(F32 time)
|
|||
}
|
||||
|
||||
// Multiply by local node transform elements
|
||||
for (int iTxfm = 0; iTxfm < nodeTransforms.size(); iTxfm++) {
|
||||
for (S32 iTxfm = 0; iTxfm < nodeTransforms.size(); iTxfm++) {
|
||||
|
||||
MatrixF mat(true);
|
||||
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ F32 ColladaAppSequence::getBlendRefTime()
|
|||
|
||||
void ColladaAppSequence::setActive(bool active)
|
||||
{
|
||||
for (int iAnim = 0; iAnim < getClip()->getInstance_animation_array().getCount(); iAnim++) {
|
||||
for (S32 iAnim = 0; iAnim < getClip()->getInstance_animation_array().getCount(); iAnim++) {
|
||||
domAnimation* anim = daeSafeCast<domAnimation>(getClip()->getInstance_animation_array()[iAnim]->getUrl().getElement());
|
||||
if (anim)
|
||||
setAnimationActive(anim, active);
|
||||
|
|
@ -84,7 +84,7 @@ void ColladaAppSequence::setActive(bool active)
|
|||
void ColladaAppSequence::setAnimationActive(const domAnimation* anim, bool active)
|
||||
{
|
||||
// Enabled/disable data channels for this animation
|
||||
for (int iChannel = 0; iChannel < anim->getChannel_array().getCount(); iChannel++) {
|
||||
for (S32 iChannel = 0; iChannel < anim->getChannel_array().getCount(); iChannel++) {
|
||||
domChannel* channel = anim->getChannel_array()[iChannel];
|
||||
AnimData* animData = reinterpret_cast<AnimData*>(channel->getUserData());
|
||||
if (animData)
|
||||
|
|
@ -92,6 +92,6 @@ void ColladaAppSequence::setAnimationActive(const domAnimation* anim, bool activ
|
|||
}
|
||||
|
||||
// Recurse into child animations
|
||||
for (int iAnim = 0; iAnim < anim->getAnimation_array().getCount(); iAnim++)
|
||||
for (S32 iAnim = 0; iAnim < anim->getAnimation_array().getCount(); iAnim++)
|
||||
setAnimationActive(anim->getAnimation_array()[iAnim], active);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,8 +59,8 @@ protected:
|
|||
template<class T> const domTechnique* findExtraTechnique(const T* element, const char* name) const
|
||||
{
|
||||
if (element) {
|
||||
for (int iExt = 0; iExt < element->getExtra_array().getCount(); iExt++) {
|
||||
for (int iTech = 0; iTech < element->getExtra_array()[iExt]->getTechnique_array().getCount(); iTech++) {
|
||||
for (S32 iExt = 0; iExt < element->getExtra_array().getCount(); iExt++) {
|
||||
for (S32 iTech = 0; iTech < element->getExtra_array()[iExt]->getTechnique_array().getCount(); iTech++) {
|
||||
if (dStrEqual(element->getExtra_array()[iExt]->getTechnique_array()[iTech]->getProfile(), name))
|
||||
return element->getExtra_array()[iExt]->getTechnique_array()[iTech];
|
||||
}
|
||||
|
|
@ -75,7 +75,7 @@ protected:
|
|||
const domCommon_color_or_texture_type_complexType::domTexture* element, const char* name) const
|
||||
{
|
||||
if (element && element->getExtra()) {
|
||||
for (int iTech = 0; iTech < element->getExtra()->getTechnique_array().getCount(); iTech++) {
|
||||
for (S32 iTech = 0; iTech < element->getExtra()->getTechnique_array().getCount(); iTech++) {
|
||||
if (dStrEqual(element->getExtra()->getTechnique_array()[iTech]->getProfile(), name))
|
||||
return element->getExtra()->getTechnique_array()[iTech];
|
||||
}
|
||||
|
|
@ -88,7 +88,7 @@ protected:
|
|||
{
|
||||
if (pTechnique) {
|
||||
// search the technique contents for the desired parameter
|
||||
for (int iParam = 0; iParam < pTechnique->getContents().getCount(); iParam++) {
|
||||
for (S32 iParam = 0; iParam < pTechnique->getContents().getCount(); iParam++) {
|
||||
const domAny* param = daeSafeCast<domAny>(pTechnique->getContents()[iParam]);
|
||||
if (param && !dStrcmp(param->getElementName(), name))
|
||||
return param;
|
||||
|
|
@ -290,7 +290,7 @@ public:
|
|||
// Torque profile
|
||||
pTechnique = findExtraTechnique(clip, "Torque");
|
||||
GET_EXTRA_PARAM(num_triggers, 0);
|
||||
for (int iTrigger = 0; iTrigger < num_triggers; iTrigger++) {
|
||||
for (S32 iTrigger = 0; iTrigger < num_triggers; iTrigger++) {
|
||||
triggers.increment();
|
||||
get(avar("trigger_time%d", iTrigger), triggers.last().time, 0.0f);
|
||||
get(avar("trigger_state%d", iTrigger), triggers.last().state, 0);
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ static void processNode(GuiTreeViewCtrl* tree, domNode* node, S32 parentID, Scen
|
|||
S32 nodeID = tree->insertItem(parentID, _GetNameOrId(node), "node", "", 0, 0);
|
||||
|
||||
// Update mesh and poly counts
|
||||
for (int i = 0; i < node->getContents().getCount(); i++)
|
||||
for (S32 i = 0; i < node->getContents().getCount(); i++)
|
||||
{
|
||||
domGeometry* geom = 0;
|
||||
const char* elemName = "";
|
||||
|
|
@ -178,13 +178,13 @@ ConsoleFunction( enumColladaForImport, bool, 3, 3,
|
|||
SceneStats stats;
|
||||
|
||||
// Query DOM for shape summary details
|
||||
for (int i = 0; i < root->getLibrary_visual_scenes_array().getCount(); i++)
|
||||
for (S32 i = 0; i < root->getLibrary_visual_scenes_array().getCount(); i++)
|
||||
{
|
||||
const domLibrary_visual_scenes* libScenes = root->getLibrary_visual_scenes_array()[i];
|
||||
for (int j = 0; j < libScenes->getVisual_scene_array().getCount(); j++)
|
||||
for (S32 j = 0; j < libScenes->getVisual_scene_array().getCount(); j++)
|
||||
{
|
||||
const domVisual_scene* visualScene = libScenes->getVisual_scene_array()[j];
|
||||
for (int k = 0; k < visualScene->getNode_array().getCount(); k++)
|
||||
for (S32 k = 0; k < visualScene->getNode_array().getCount(); k++)
|
||||
processNode(tree, visualScene->getNode_array()[k], nodesID, stats);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -215,11 +215,11 @@ ConsoleFunction( loadColladaLights, bool, 2, 4,
|
|||
|
||||
// First grab all of the top-level nodes
|
||||
Vector<ColladaAppNode*> sceneNodes;
|
||||
for (int iSceneLib = 0; iSceneLib < root->getLibrary_visual_scenes_array().getCount(); iSceneLib++) {
|
||||
for (S32 iSceneLib = 0; iSceneLib < root->getLibrary_visual_scenes_array().getCount(); iSceneLib++) {
|
||||
const domLibrary_visual_scenes* libScenes = root->getLibrary_visual_scenes_array()[iSceneLib];
|
||||
for (int iScene = 0; iScene < libScenes->getVisual_scene_array().getCount(); iScene++) {
|
||||
for (S32 iScene = 0; iScene < libScenes->getVisual_scene_array().getCount(); iScene++) {
|
||||
const domVisual_scene* visualScene = libScenes->getVisual_scene_array()[iScene];
|
||||
for (int iNode = 0; iNode < visualScene->getNode_array().getCount(); iNode++)
|
||||
for (S32 iNode = 0; iNode < visualScene->getNode_array().getCount(); iNode++)
|
||||
sceneNodes.push_back(new ColladaAppNode(visualScene->getNode_array()[iNode]));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -96,8 +96,8 @@ ColladaShapeLoader::ColladaShapeLoader(domCOLLADA* _root)
|
|||
ColladaShapeLoader::~ColladaShapeLoader()
|
||||
{
|
||||
// Delete all of the animation channels
|
||||
for (int iAnim = 0; iAnim < animations.size(); iAnim++) {
|
||||
for (int iChannel = 0; iChannel < animations[iAnim]->size(); iChannel++)
|
||||
for (S32 iAnim = 0; iAnim < animations.size(); iAnim++) {
|
||||
for (S32 iChannel = 0; iChannel < animations[iAnim]->size(); iChannel++)
|
||||
delete (*animations[iAnim])[iChannel];
|
||||
delete animations[iAnim];
|
||||
}
|
||||
|
|
@ -113,7 +113,7 @@ void ColladaShapeLoader::processAnimation(const domAnimation* anim, F32& maxEndT
|
|||
const char* sSKEWNames[] = { ".ROTATEX", ".ROTATEY", ".ROTATEZ", ".AROUNDX", ".AROUNDY", ".AROUNDZ", ".ANGLE", "" };
|
||||
const char* sNullNames[] = { "" };
|
||||
|
||||
for (int iChannel = 0; iChannel < anim->getChannel_array().getCount(); iChannel++) {
|
||||
for (S32 iChannel = 0; iChannel < anim->getChannel_array().getCount(); iChannel++) {
|
||||
|
||||
// Get the animation elements: <channel>, <sampler>
|
||||
domChannel* channel = anim->getChannel_array()[iChannel];
|
||||
|
|
@ -150,7 +150,7 @@ void ColladaShapeLoader::processAnimation(const domAnimation* anim, F32& maxEndT
|
|||
channel->setUserData(targetChannels->last());
|
||||
AnimData& data = *targetChannels->last();
|
||||
|
||||
for (int iInput = 0; iInput < sampler->getInput_array().getCount(); iInput++) {
|
||||
for (S32 iInput = 0; iInput < sampler->getInput_array().getCount(); iInput++) {
|
||||
|
||||
const domInputLocal* input = sampler->getInput_array()[iInput];
|
||||
const domSource* source = daeSafeCast<domSource>(input->getSource().getElement());
|
||||
|
|
@ -219,7 +219,7 @@ void ColladaShapeLoader::processAnimation(const domAnimation* anim, F32& maxEndT
|
|||
}
|
||||
|
||||
// Process child animations
|
||||
for (int iAnim = 0; iAnim < anim->getAnimation_array().getCount(); iAnim++)
|
||||
for (S32 iAnim = 0; iAnim < anim->getAnimation_array().getCount(); iAnim++)
|
||||
processAnimation(anim->getAnimation_array()[iAnim], maxEndTime, minFrameTime);
|
||||
}
|
||||
|
||||
|
|
@ -227,20 +227,20 @@ void ColladaShapeLoader::enumerateScene()
|
|||
{
|
||||
// Get animation clips
|
||||
Vector<const domAnimation_clip*> animationClips;
|
||||
for (int iClipLib = 0; iClipLib < root->getLibrary_animation_clips_array().getCount(); iClipLib++) {
|
||||
for (S32 iClipLib = 0; iClipLib < root->getLibrary_animation_clips_array().getCount(); iClipLib++) {
|
||||
const domLibrary_animation_clips* libraryClips = root->getLibrary_animation_clips_array()[iClipLib];
|
||||
for (int iClip = 0; iClip < libraryClips->getAnimation_clip_array().getCount(); iClip++)
|
||||
for (S32 iClip = 0; iClip < libraryClips->getAnimation_clip_array().getCount(); iClip++)
|
||||
appSequences.push_back(new ColladaAppSequence(libraryClips->getAnimation_clip_array()[iClip]));
|
||||
}
|
||||
|
||||
// Process all animations => this attaches animation channels to the targeted
|
||||
// Collada elements, and determines the length of the sequence if it is not
|
||||
// already specified in the Collada <animation_clip> element
|
||||
for (int iSeq = 0; iSeq < appSequences.size(); iSeq++) {
|
||||
for (S32 iSeq = 0; iSeq < appSequences.size(); iSeq++) {
|
||||
ColladaAppSequence* appSeq = dynamic_cast<ColladaAppSequence*>(appSequences[iSeq]);
|
||||
F32 maxEndTime = 0;
|
||||
F32 minFrameTime = 1000.0f;
|
||||
for (int iAnim = 0; iAnim < appSeq->getClip()->getInstance_animation_array().getCount(); iAnim++) {
|
||||
for (S32 iAnim = 0; iAnim < appSeq->getClip()->getInstance_animation_array().getCount(); iAnim++) {
|
||||
domAnimation* anim = daeSafeCast<domAnimation>(appSeq->getClip()->getInstance_animation_array()[iAnim]->getUrl().getElement());
|
||||
if (anim)
|
||||
processAnimation(anim, maxEndTime, minFrameTime);
|
||||
|
|
@ -256,11 +256,11 @@ void ColladaShapeLoader::enumerateScene()
|
|||
|
||||
// First grab all of the top-level nodes
|
||||
Vector<domNode*> sceneNodes;
|
||||
for (int iSceneLib = 0; iSceneLib < root->getLibrary_visual_scenes_array().getCount(); iSceneLib++) {
|
||||
for (S32 iSceneLib = 0; iSceneLib < root->getLibrary_visual_scenes_array().getCount(); iSceneLib++) {
|
||||
const domLibrary_visual_scenes* libScenes = root->getLibrary_visual_scenes_array()[iSceneLib];
|
||||
for (int iScene = 0; iScene < libScenes->getVisual_scene_array().getCount(); iScene++) {
|
||||
for (S32 iScene = 0; iScene < libScenes->getVisual_scene_array().getCount(); iScene++) {
|
||||
const domVisual_scene* visualScene = libScenes->getVisual_scene_array()[iScene];
|
||||
for (int iNode = 0; iNode < visualScene->getNode_array().getCount(); iNode++)
|
||||
for (S32 iNode = 0; iNode < visualScene->getNode_array().getCount(); iNode++)
|
||||
sceneNodes.push_back(visualScene->getNode_array()[iNode]);
|
||||
}
|
||||
}
|
||||
|
|
@ -272,10 +272,10 @@ void ColladaShapeLoader::enumerateScene()
|
|||
case ColladaUtils::ImportOptions::DetectDTS:
|
||||
// Check for a baseXX->startXX hierarchy at the top-level, if we find
|
||||
// one, use trailing numbers for LOD, otherwise use a single size
|
||||
for (int iNode = 0; singleDetail && (iNode < sceneNodes.size()); iNode++) {
|
||||
for (S32 iNode = 0; singleDetail && (iNode < sceneNodes.size()); iNode++) {
|
||||
domNode* node = sceneNodes[iNode];
|
||||
if (dStrStartsWith(_GetNameOrId(node), "base")) {
|
||||
for (int iChild = 0; iChild < node->getNode_array().getCount(); iChild++) {
|
||||
for (S32 iChild = 0; iChild < node->getNode_array().getCount(); iChild++) {
|
||||
domNode* child = node->getNode_array()[iChild];
|
||||
if (dStrStartsWith(_GetNameOrId(child), "start")) {
|
||||
singleDetail = false;
|
||||
|
|
@ -484,7 +484,7 @@ void updateMaterialsScript(const Torque::Path &path, bool copyTextures = false)
|
|||
// If importing a sketchup file, the paths will point inside the KMZ so we need to cache them.
|
||||
if (copyTextures)
|
||||
{
|
||||
for (int iMat = 0; iMat < persistMgr.getDirtyList().size(); iMat++)
|
||||
for (S32 iMat = 0; iMat < persistMgr.getDirtyList().size(); iMat++)
|
||||
{
|
||||
Material *mat = dynamic_cast<Material*>( persistMgr.getDirtyList()[iMat].getObject() );
|
||||
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ const domProfile_COMMON* ColladaUtils::findEffectCommonProfile(const domEffect*
|
|||
if (effect) {
|
||||
// Find the COMMON profile
|
||||
const domFx_profile_abstract_Array& profiles = effect->getFx_profile_abstract_array();
|
||||
for (int iProfile = 0; iProfile < profiles.getCount(); iProfile++) {
|
||||
for (S32 iProfile = 0; iProfile < profiles.getCount(); iProfile++) {
|
||||
if (profiles[iProfile]->getElementType() == COLLADA_TYPE::PROFILE_COMMON)
|
||||
return daeSafeCast<domProfile_COMMON>(profiles[iProfile]);
|
||||
}
|
||||
|
|
@ -245,7 +245,7 @@ BasePrimitive* BasePrimitive::get(const daeElement* element)
|
|||
// Collada animation curves
|
||||
|
||||
/// Determine which elements are being targeted
|
||||
void AnimData::parseTargetString(const char* target, int fullCount, const char* elements[])
|
||||
void AnimData::parseTargetString(const char* target, S32 fullCount, const char* elements[])
|
||||
{
|
||||
// Assume targeting all elements at offset 0
|
||||
targetValueCount = fullCount;
|
||||
|
|
@ -253,7 +253,7 @@ void AnimData::parseTargetString(const char* target, int fullCount, const char*
|
|||
|
||||
// Check for array syntax: (n) or (n)(m)
|
||||
if (const char* p = dStrchr(target, '(')) {
|
||||
int indN, indM;
|
||||
S32 indN, indM;
|
||||
if (dSscanf(p, "(%d)(%d)", &indN, &indM) == 2) {
|
||||
targetValueOffset = (indN * 4) + indM; // @todo: 4x4 matrix only
|
||||
targetValueCount = 1;
|
||||
|
|
@ -265,7 +265,7 @@ void AnimData::parseTargetString(const char* target, int fullCount, const char*
|
|||
}
|
||||
else if (const char* p = dStrrchr(target, '.')) {
|
||||
// Check for named elements
|
||||
for (int iElem = 0; elements[iElem][0] != 0; iElem++) {
|
||||
for (S32 iElem = 0; elements[iElem][0] != 0; iElem++) {
|
||||
if (!dStrcmp(p, elements[iElem])) {
|
||||
targetValueOffset = iElem;
|
||||
targetValueCount = 1;
|
||||
|
|
@ -278,9 +278,9 @@ void AnimData::parseTargetString(const char* target, int fullCount, const char*
|
|||
/// Solve the cubic spline B(s) = param for s
|
||||
F32 AnimData::invertParamCubic(F32 param, F32 x0, F32 x1, F32 x2, F32 x3) const
|
||||
{
|
||||
const double INVERTPARAMCUBIC_TOL = 1.0e-09;
|
||||
const double INVERTPARAMCUBIC_SMALLERTOL = 1.0e-20;
|
||||
const double INVERTPARAMCUBIC_MAXIT = 100;
|
||||
const F64 INVERTPARAMCUBIC_TOL = 1.0e-09;
|
||||
const F64 INVERTPARAMCUBIC_SMALLERTOL = 1.0e-20;
|
||||
const F64 INVERTPARAMCUBIC_MAXIT = 100;
|
||||
|
||||
// check input value for outside range
|
||||
if ((param - x0) < INVERTPARAMCUBIC_SMALLERTOL)
|
||||
|
|
@ -295,12 +295,12 @@ F32 AnimData::invertParamCubic(F32 param, F32 x0, F32 x1, F32 x2, F32 x3) const
|
|||
F32 v = 1.0f;
|
||||
|
||||
while (iterations < INVERTPARAMCUBIC_MAXIT) {
|
||||
double a = (x0 + x1)*0.5f;
|
||||
double b = (x1 + x2)*0.5f;
|
||||
double c = (x2 + x3)*0.5f;
|
||||
double d = (a + b)*0.5f;
|
||||
double e = (b + c)*0.5f;
|
||||
double f = (d + e)*0.5f;
|
||||
F64 a = (x0 + x1)*0.5f;
|
||||
F64 b = (x1 + x2)*0.5f;
|
||||
F64 c = (x2 + x3)*0.5f;
|
||||
F64 d = (a + b)*0.5f;
|
||||
F64 e = (b + c)*0.5f;
|
||||
F64 f = (d + e)*0.5f;
|
||||
|
||||
if (mFabs(f - param) < INVERTPARAMCUBIC_TOL)
|
||||
break;
|
||||
|
|
@ -344,7 +344,7 @@ void AnimData::interpValue(F32 t, U32 offset, double* value) const
|
|||
t = mClampF(t, curveStart, curveEnd);
|
||||
|
||||
// find the index of the input keyframe BEFORE 't'
|
||||
int index;
|
||||
S32 index;
|
||||
for (index = 0; index < input.size()-2; index++) {
|
||||
if (input.getFloatValue(index + 1) > t)
|
||||
break;
|
||||
|
|
@ -470,7 +470,7 @@ void AnimData::interpValue(F32 t, U32 offset, const char** value) const
|
|||
t = mClampF(t, curveStart, curveEnd);
|
||||
|
||||
// find the index of the input keyframe BEFORE 't'
|
||||
int index;
|
||||
S32 index;
|
||||
for (index = 0; index < input.size()-2; index++) {
|
||||
if (input.getFloatValue(index + 1) > t)
|
||||
break;
|
||||
|
|
@ -487,9 +487,9 @@ void AnimData::interpValue(F32 t, U32 offset, const char** value) const
|
|||
|
||||
static void conditioner_fixupTextureSIDs(domCOLLADA* root)
|
||||
{
|
||||
for (int iLib = 0; iLib < root->getLibrary_effects_array().getCount(); iLib++) {
|
||||
for (S32 iLib = 0; iLib < root->getLibrary_effects_array().getCount(); iLib++) {
|
||||
domLibrary_effects* lib = root->getLibrary_effects_array()[iLib];
|
||||
for (int iEffect = 0; iEffect < lib->getEffect_array().getCount(); iEffect++) {
|
||||
for (S32 iEffect = 0; iEffect < lib->getEffect_array().getCount(); iEffect++) {
|
||||
domEffect* effect = lib->getEffect_array()[iEffect];
|
||||
const domCommon_color_or_texture_type_complexType* diffuse = findEffectDiffuse(effect);
|
||||
if (!diffuse || !diffuse->getTexture())
|
||||
|
|
@ -542,9 +542,9 @@ static void conditioner_fixupTextureSIDs(domCOLLADA* root)
|
|||
|
||||
static void conditioner_fixupImageURIs(domCOLLADA* root)
|
||||
{
|
||||
for (int iLib = 0; iLib < root->getLibrary_images_array().getCount(); iLib++) {
|
||||
for (S32 iLib = 0; iLib < root->getLibrary_images_array().getCount(); iLib++) {
|
||||
domLibrary_images* lib = root->getLibrary_images_array()[iLib];
|
||||
for (int iImage = 0; iImage < lib->getImage_array().getCount(); iImage++) {
|
||||
for (S32 iImage = 0; iImage < lib->getImage_array().getCount(); iImage++) {
|
||||
domImage* image = lib->getImage_array()[iImage];
|
||||
if (image->getInit_from()) {
|
||||
xsAnyURI& uri = image->getInit_from()->getValue();
|
||||
|
|
@ -595,7 +595,7 @@ static void conditioner_fixupTransparency(domCOLLADA* root)
|
|||
// Get the <authoring_tool> string
|
||||
const char *authoringTool = "";
|
||||
if (const domAsset* asset = root->getAsset()) {
|
||||
for (int iContrib = 0; iContrib < asset->getContributor_array().getCount(); iContrib++) {
|
||||
for (S32 iContrib = 0; iContrib < asset->getContributor_array().getCount(); iContrib++) {
|
||||
const domAsset::domContributor* contrib = asset->getContributor_array()[iContrib];
|
||||
if (contrib->getAuthoring_tool()) {
|
||||
authoringTool = contrib->getAuthoring_tool()->getValue();
|
||||
|
|
@ -608,7 +608,7 @@ static void conditioner_fixupTransparency(domCOLLADA* root)
|
|||
bool invertTransparency = false;
|
||||
const char *toolNames[] = { "FBX COLLADA exporter", "Google SketchUp",
|
||||
"Illusoft Collada Exporter", "FCollada" };
|
||||
for (int iName = 0; iName < (sizeof(toolNames)/sizeof(toolNames[0])); iName++) {
|
||||
for (S32 iName = 0; iName < (sizeof(toolNames)/sizeof(toolNames[0])); iName++) {
|
||||
if (dStrstr(authoringTool, toolNames[iName])) {
|
||||
invertTransparency = true;
|
||||
break;
|
||||
|
|
@ -619,9 +619,9 @@ static void conditioner_fixupTransparency(domCOLLADA* root)
|
|||
return;
|
||||
|
||||
// Invert transparency as required for each effect
|
||||
for (int iLib = 0; iLib < root->getLibrary_effects_array().getCount(); iLib++) {
|
||||
for (S32 iLib = 0; iLib < root->getLibrary_effects_array().getCount(); iLib++) {
|
||||
domLibrary_effects* lib = root->getLibrary_effects_array()[iLib];
|
||||
for (int iEffect = 0; iEffect < lib->getEffect_array().getCount(); iEffect++) {
|
||||
for (S32 iEffect = 0; iEffect < lib->getEffect_array().getCount(); iEffect++) {
|
||||
domEffect* effect = lib->getEffect_array()[iEffect];
|
||||
|
||||
// Find the common profile
|
||||
|
|
@ -658,9 +658,9 @@ static void conditioner_fixupTransparency(domCOLLADA* root)
|
|||
|
||||
static void conditioner_checkBindShapeMatrix(domCOLLADA* root)
|
||||
{
|
||||
for (int iLib = 0; iLib < root->getLibrary_controllers_array().getCount(); iLib++) {
|
||||
for (S32 iLib = 0; iLib < root->getLibrary_controllers_array().getCount(); iLib++) {
|
||||
domLibrary_controllers* lib = root->getLibrary_controllers_array().get(iLib);
|
||||
for (int iCon = 0; iCon < lib->getController_array().getCount(); iCon++) {
|
||||
for (S32 iCon = 0; iCon < lib->getController_array().getCount(); iCon++) {
|
||||
domController* con = lib->getController_array().get(iCon);
|
||||
if (con->getSkin() && con->getSkin()->getBind_shape_matrix()) {
|
||||
|
||||
|
|
@ -677,14 +677,14 @@ static void conditioner_checkBindShapeMatrix(domCOLLADA* root)
|
|||
|
||||
static void conditioner_fixupVertexWeightJoints(domCOLLADA* root)
|
||||
{
|
||||
for (int iLib = 0; iLib < root->getLibrary_controllers_array().getCount(); iLib++) {
|
||||
for (S32 iLib = 0; iLib < root->getLibrary_controllers_array().getCount(); iLib++) {
|
||||
domLibrary_controllers* lib = root->getLibrary_controllers_array().get(iLib);
|
||||
for (int iCon = 0; iCon < lib->getController_array().getCount(); iCon++) {
|
||||
for (S32 iCon = 0; iCon < lib->getController_array().getCount(); iCon++) {
|
||||
domController* con = lib->getController_array().get(iCon);
|
||||
if (con->getSkin() && con->getSkin()->getVertex_weights())
|
||||
{
|
||||
domInputLocalOffset_Array& vw_inputs = con->getSkin()->getVertex_weights()->getInput_array();
|
||||
for (int vInput = 0; vInput < vw_inputs.getCount(); vInput++) {
|
||||
for (S32 vInput = 0; vInput < vw_inputs.getCount(); vInput++) {
|
||||
|
||||
domInputLocalOffset *vw_input = vw_inputs.get(vInput);
|
||||
if (dStrEqual(vw_input->getSemantic(), "JOINT")) {
|
||||
|
|
@ -695,7 +695,7 @@ static void conditioner_fixupVertexWeightJoints(domCOLLADA* root)
|
|||
|
||||
// Copy the value from the <joints> JOINTS input instead
|
||||
domInputLocal_Array& joint_inputs = con->getSkin()->getJoints()->getInput_array();
|
||||
for (int jInput = 0; jInput < joint_inputs.getCount(); jInput++) {
|
||||
for (S32 jInput = 0; jInput < joint_inputs.getCount(); jInput++) {
|
||||
|
||||
domInputLocal *joint_input = joint_inputs.get(jInput);
|
||||
if (dStrEqual(joint_input->getSemantic(), "JOINT")) {
|
||||
|
|
@ -714,16 +714,16 @@ static void conditioner_fixupVertexWeightJoints(domCOLLADA* root)
|
|||
static void conditioner_createDefaultClip(domCOLLADA* root)
|
||||
{
|
||||
// Check if the document has any <animation_clip>s
|
||||
for (int iLib = 0; iLib < root->getLibrary_animation_clips_array().getCount(); iLib++) {
|
||||
for (S32 iLib = 0; iLib < root->getLibrary_animation_clips_array().getCount(); iLib++) {
|
||||
if (root->getLibrary_animation_clips_array()[iLib]->getAnimation_clip_array().getCount())
|
||||
return;
|
||||
}
|
||||
|
||||
// Get all top-level <animation>s into an array
|
||||
domAnimation_Array animations;
|
||||
for (int iAnimLib = 0; iAnimLib < root->getLibrary_animations_array().getCount(); iAnimLib++) {
|
||||
for (S32 iAnimLib = 0; iAnimLib < root->getLibrary_animations_array().getCount(); iAnimLib++) {
|
||||
const domLibrary_animations* libraryAnims = root->getLibrary_animations_array()[iAnimLib];
|
||||
for (int iAnim = 0; iAnim < libraryAnims->getAnimation_array().getCount(); iAnim++)
|
||||
for (S32 iAnim = 0; iAnim < libraryAnims->getAnimation_array().getCount(); iAnim++)
|
||||
animations.append(libraryAnims->getAnimation_array()[iAnim]);
|
||||
}
|
||||
|
||||
|
|
@ -748,7 +748,7 @@ static void conditioner_createDefaultClip(domCOLLADA* root)
|
|||
|
||||
// Add all top_level animations to the clip (sub-animations will be included
|
||||
// when the clip is procesed)
|
||||
for (int iAnim = 0; iAnim < animations.getCount(); iAnim++) {
|
||||
for (S32 iAnim = 0; iAnim < animations.getCount(); iAnim++) {
|
||||
if (!animations[iAnim]->getId())
|
||||
animations[iAnim]->setId(avar("dummy-animation-id%d", iAnim));
|
||||
CREATE_ELEMENT(animation_clip, instance_animation, domInstanceWithExtra)
|
||||
|
|
@ -767,7 +767,7 @@ static void conditioner_createDefaultClip(domCOLLADA* root)
|
|||
|
||||
static void conditioner_fixupAnimation(domAnimation* anim)
|
||||
{
|
||||
for (int iChannel = 0; iChannel < anim->getChannel_array().getCount(); iChannel++) {
|
||||
for (S32 iChannel = 0; iChannel < anim->getChannel_array().getCount(); iChannel++) {
|
||||
|
||||
// Get the animation elements: <channel>, <sampler>
|
||||
domChannel* channel = anim->getChannel_array()[iChannel];
|
||||
|
|
@ -848,7 +848,7 @@ static void conditioner_fixupAnimation(domAnimation* anim)
|
|||
}
|
||||
|
||||
// Process child animations
|
||||
for (int iAnim = 0; iAnim < anim->getAnimation_array().getCount(); iAnim++)
|
||||
for (S32 iAnim = 0; iAnim < anim->getAnimation_array().getCount(); iAnim++)
|
||||
conditioner_fixupAnimation(anim->getAnimation_array()[iAnim]);
|
||||
}
|
||||
|
||||
|
|
@ -893,9 +893,9 @@ void ColladaUtils::applyConditioners(domCOLLADA* root)
|
|||
// 2) Some exporters generate visibility animations but don't add the FCOLLADA
|
||||
// extension, so the target doesn't actually exist! Detect this situation
|
||||
// and add the extension manually so the animation still works.
|
||||
for (int iLib = 0; iLib < root->getLibrary_animations_array().getCount(); iLib++) {
|
||||
for (S32 iLib = 0; iLib < root->getLibrary_animations_array().getCount(); iLib++) {
|
||||
const domLibrary_animations* lib = root->getLibrary_animations_array()[iLib];
|
||||
for (int iAnim = 0; iAnim < lib->getAnimation_array().getCount(); iAnim++)
|
||||
for (S32 iAnim = 0; iAnim < lib->getAnimation_array().getCount(); iAnim++)
|
||||
conditioner_fixupAnimation(lib->getAnimation_array()[iAnim]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ template<> inline MatrixF vecToMatrixF<domRotate>(const domListOfFloats& vec)
|
|||
template<> inline MatrixF vecToMatrixF<domMatrix>(const domListOfFloats& vec)
|
||||
{
|
||||
MatrixF mat;
|
||||
for (int i = 0; i < 16; i++)
|
||||
for (S32 i = 0; i < 16; i++)
|
||||
mat[i] = vec[i];
|
||||
return mat;
|
||||
}
|
||||
|
|
@ -332,7 +332,7 @@ public:
|
|||
|
||||
// If no input params were specified, just map the source params directly
|
||||
if (!offsets.size()) {
|
||||
for (int iParam = 0; iParam < accessor->getParam_array().getCount(); iParam++)
|
||||
for (S32 iParam = 0; iParam < accessor->getParam_array().getCount(); iParam++)
|
||||
offsets.push_back(iParam);
|
||||
}
|
||||
|
||||
|
|
@ -348,9 +348,9 @@ public:
|
|||
|
||||
//------------------------------------------------------
|
||||
// Get a pointer to the start of a group of values (index advances by stride)
|
||||
//template<class T> T getArrayData(int index) const { return 0; }
|
||||
//template<class T> T getArrayData(S32 index) const { return 0; }
|
||||
|
||||
const double* getStringArrayData(int index) const
|
||||
const double* getStringArrayData(S32 index) const
|
||||
{
|
||||
if ((index >= 0) && (index < size())) {
|
||||
if (source->getFloat_array())
|
||||
|
|
@ -361,9 +361,9 @@ public:
|
|||
|
||||
//------------------------------------------------------
|
||||
// Read a single value from the source array
|
||||
//template<class T> T getValue(int index) const { return T; }
|
||||
//template<class T> T getValue(S32 index) const { return T; }
|
||||
|
||||
const char* getStringValue(int index) const
|
||||
const char* getStringValue(S32 index) const
|
||||
{
|
||||
if ((index >= 0) && (index < size())) {
|
||||
// could be plain strings or IDREFs
|
||||
|
|
@ -375,7 +375,7 @@ public:
|
|||
return "";
|
||||
}
|
||||
|
||||
F32 getFloatValue(int index) const
|
||||
F32 getFloatValue(S32 index) const
|
||||
{
|
||||
F32 value(0);
|
||||
if (const double* data = getStringArrayData(index))
|
||||
|
|
@ -383,7 +383,7 @@ public:
|
|||
return value;
|
||||
}
|
||||
|
||||
Point2F getPoint2FValue(int index) const
|
||||
Point2F getPoint2FValue(S32 index) const
|
||||
{
|
||||
Point2F value(0, 0);
|
||||
if (const double* data = getStringArrayData(index))
|
||||
|
|
@ -391,7 +391,7 @@ public:
|
|||
return value;
|
||||
}
|
||||
|
||||
Point3F getPoint3FValue(int index) const
|
||||
Point3F getPoint3FValue(S32 index) const
|
||||
{
|
||||
Point3F value(1, 0, 0);
|
||||
if (const double* data = getStringArrayData(index))
|
||||
|
|
@ -399,7 +399,7 @@ public:
|
|||
return value;
|
||||
}
|
||||
|
||||
ColorI getColorIValue(int index) const
|
||||
ColorI getColorIValue(S32 index) const
|
||||
{
|
||||
ColorI value(255, 255, 255, 255);
|
||||
if (const double* data = getStringArrayData(index))
|
||||
|
|
@ -413,11 +413,11 @@ public:
|
|||
return value;
|
||||
}
|
||||
|
||||
MatrixF getMatrixFValue(int index) const
|
||||
MatrixF getMatrixFValue(S32 index) const
|
||||
{
|
||||
MatrixF value(true);
|
||||
if (const double* data = getStringArrayData(index)) {
|
||||
for (int i = 0; i < 16; i++)
|
||||
for (S32 i = 0; i < 16; i++)
|
||||
value[i] = data[i];
|
||||
}
|
||||
return value;
|
||||
|
|
@ -486,7 +486,7 @@ public:
|
|||
|
||||
// Determine stride
|
||||
stride = 0;
|
||||
for (int iInput = 0; iInput < getInputs().getCount(); iInput++) {
|
||||
for (S32 iInput = 0; iInput < getInputs().getCount(); iInput++) {
|
||||
if (getInputs()[iInput]->getOffset() >= stride)
|
||||
stride = getInputs()[iInput]->getOffset() + 1;
|
||||
}
|
||||
|
|
@ -524,7 +524,7 @@ template<> inline const domListOfUInts *ColladaPrimitive<domTristrips>::getTrian
|
|||
// Convert strips to triangles
|
||||
pTriangleData = new domListOfUInts();
|
||||
|
||||
for (int iStrip = 0; iStrip < primitive->getCount(); iStrip++) {
|
||||
for (S32 iStrip = 0; iStrip < primitive->getCount(); iStrip++) {
|
||||
|
||||
domP* P = primitive->getP_array()[iStrip];
|
||||
|
||||
|
|
@ -537,7 +537,7 @@ template<> inline const domListOfUInts *ColladaPrimitive<domTristrips>::getTrian
|
|||
|
||||
// Convert the strip back to a triangle list
|
||||
domUint* v0 = pSrcData;
|
||||
for (int iTri = 0; iTri < numTriangles; iTri++, v0 += stride) {
|
||||
for (S32 iTri = 0; iTri < numTriangles; iTri++, v0 += stride) {
|
||||
if (iTri & 0x1)
|
||||
{
|
||||
// CW triangle
|
||||
|
|
@ -565,7 +565,7 @@ template<> inline const domListOfUInts *ColladaPrimitive<domTrifans>::getTriangl
|
|||
// Convert strips to triangles
|
||||
pTriangleData = new domListOfUInts();
|
||||
|
||||
for (int iStrip = 0; iStrip < primitive->getCount(); iStrip++) {
|
||||
for (S32 iStrip = 0; iStrip < primitive->getCount(); iStrip++) {
|
||||
|
||||
domP* P = primitive->getP_array()[iStrip];
|
||||
|
||||
|
|
@ -578,7 +578,7 @@ template<> inline const domListOfUInts *ColladaPrimitive<domTrifans>::getTriangl
|
|||
|
||||
// Convert the fan back to a triangle list
|
||||
domUint* v0 = pSrcData + stride;
|
||||
for (int iTri = 0; iTri < numTriangles; iTri++, v0 += stride) {
|
||||
for (S32 iTri = 0; iTri < numTriangles; iTri++, v0 += stride) {
|
||||
pTriangleData->appendArray(stride, pSrcData); // shared vertex
|
||||
pTriangleData->appendArray(stride, v0); // previous vertex
|
||||
pTriangleData->appendArray(stride, v0+stride); // current vertex
|
||||
|
|
@ -597,7 +597,7 @@ template<> inline const domListOfUInts *ColladaPrimitive<domPolygons>::getTriang
|
|||
// Convert polygons to triangles
|
||||
pTriangleData = new domListOfUInts();
|
||||
|
||||
for (int iPoly = 0; iPoly < primitive->getCount(); iPoly++) {
|
||||
for (S32 iPoly = 0; iPoly < primitive->getCount(); iPoly++) {
|
||||
|
||||
domP* P = primitive->getP_array()[iPoly];
|
||||
|
||||
|
|
@ -612,7 +612,7 @@ template<> inline const domListOfUInts *ColladaPrimitive<domPolygons>::getTriang
|
|||
// converting the polygon to triangles.
|
||||
domUint* v0 = pSrcData;
|
||||
pSrcData += stride;
|
||||
for (int iTri = 0; iTri < numPoints-2; iTri++) {
|
||||
for (S32 iTri = 0; iTri < numPoints-2; iTri++) {
|
||||
pTriangleData->appendArray(stride, v0);
|
||||
pTriangleData->appendArray(stride*2, pSrcData);
|
||||
pSrcData += stride;
|
||||
|
|
@ -636,7 +636,7 @@ template<> inline const domListOfUInts *ColladaPrimitive<domPolylist>::getTriang
|
|||
const domListOfUInts& vcount = primitive->getVcount()->getValue();
|
||||
|
||||
U32 expectedCount = 0;
|
||||
for (int iPoly = 0; iPoly < vcount.getCount(); iPoly++)
|
||||
for (S32 iPoly = 0; iPoly < vcount.getCount(); iPoly++)
|
||||
expectedCount += vcount[iPoly];
|
||||
expectedCount *= stride;
|
||||
|
||||
|
|
@ -648,13 +648,13 @@ template<> inline const domListOfUInts *ColladaPrimitive<domPolylist>::getTriang
|
|||
}
|
||||
|
||||
domUint* pSrcData = &(primitive->getP()->getValue()[0]);
|
||||
for (int iPoly = 0; iPoly < vcount.getCount(); iPoly++) {
|
||||
for (S32 iPoly = 0; iPoly < vcount.getCount(); iPoly++) {
|
||||
|
||||
// Use a simple tri-fan (centered at the first point) method of
|
||||
// converting the polygon to triangles.
|
||||
domUint* v0 = pSrcData;
|
||||
pSrcData += stride;
|
||||
for (int iTri = 0; iTri < vcount[iPoly]-2; iTri++) {
|
||||
for (S32 iTri = 0; iTri < vcount[iPoly]-2; iTri++) {
|
||||
pTriangleData->appendArray(stride, v0);
|
||||
pTriangleData->appendArray(stride*2, pSrcData);
|
||||
pSrcData += stride;
|
||||
|
|
@ -671,7 +671,7 @@ template<> inline const domListOfUInts *ColladaPrimitive<domPolylist>::getTriang
|
|||
template<typename T> inline T convert(const char* value) { return value; }
|
||||
template<> inline bool convert(const char* value) { return dAtob(value); }
|
||||
template<> inline S32 convert(const char* value) { return dAtoi(value); }
|
||||
template<> inline double convert(const char* value) { return dAtof(value); }
|
||||
template<> inline F64 convert(const char* value) { return dAtof(value); }
|
||||
template<> inline F32 convert(const char* value) { return convert<double>(value); }
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -713,7 +713,7 @@ struct AnimData
|
|||
|
||||
AnimData() : enabled(false) { }
|
||||
|
||||
void parseTargetString(const char* target, int fullCount, const char* elements[]);
|
||||
void parseTargetString(const char* target, S32 fullCount, const char* elements[]);
|
||||
|
||||
F32 invertParamCubic(F32 param, F32 x0, F32 x1, F32 x2, F32 x3) const;
|
||||
void interpValue(F32 t, U32 offset, double* value) const;
|
||||
|
|
@ -757,7 +757,7 @@ struct AnimatedElement
|
|||
// Animate the value
|
||||
const AnimChannels* channels = AnimData::getAnimChannels(element);
|
||||
if (channels && (time >= 0)) {
|
||||
for (int iChannel = 0; iChannel < channels->size(); iChannel++) {
|
||||
for (S32 iChannel = 0; iChannel < channels->size(); iChannel++) {
|
||||
const AnimData* animData = (*channels)[iChannel];
|
||||
if (animData->enabled)
|
||||
animData->interpValue(time, 0, &value);
|
||||
|
|
@ -787,10 +787,10 @@ template<class T> struct AnimatedElementList : public AnimatedElement<T>
|
|||
// Animate the vector
|
||||
const AnimChannels* channels = AnimData::getAnimChannels(this->element);
|
||||
if (channels && (time >= 0)) {
|
||||
for (int iChannel = 0; iChannel < channels->size(); iChannel++) {
|
||||
for (S32 iChannel = 0; iChannel < channels->size(); iChannel++) {
|
||||
const AnimData* animData = (*channels)[iChannel];
|
||||
if (animData->enabled) {
|
||||
for (int iValue = 0; iValue < animData->targetValueCount; iValue++)
|
||||
for (S32 iValue = 0; iValue < animData->targetValueCount; iValue++)
|
||||
animData->interpValue(time, iValue, &vec[animData->targetValueOffset + iValue]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,9 +32,9 @@
|
|||
|
||||
|
||||
const F32 TSShapeLoader::DefaultTime = -1.0f;
|
||||
const double TSShapeLoader::MinFrameRate = 15.0f;
|
||||
const double TSShapeLoader::MaxFrameRate = 60.0f;
|
||||
const double TSShapeLoader::AppGroundFrameRate = 10.0f;
|
||||
const F64 TSShapeLoader::MinFrameRate = 15.0f;
|
||||
const F64 TSShapeLoader::MaxFrameRate = 60.0f;
|
||||
const F64 TSShapeLoader::AppGroundFrameRate = 10.0f;
|
||||
Torque::Path TSShapeLoader::shapePath;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
|
@ -102,7 +102,7 @@ void TSShapeLoader::generateNodeTransform(AppNode* node, F32 t, bool blend, F32
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
void TSShapeLoader::updateProgress(int major, const char* msg, int numMinor, int minor)
|
||||
void TSShapeLoader::updateProgress(S32 major, const char* msg, S32 numMinor, S32 minor)
|
||||
{
|
||||
// Calculate progress value
|
||||
F32 progress = (F32)major / NumLoadPhases;
|
||||
|
|
@ -229,7 +229,7 @@ bool cmpShapeName(const String& key, const Vector<String>& names, void* arg1, vo
|
|||
|
||||
String getUniqueName(const char* name, NameCmpFunc isNameUnique, const Vector<String>& names, void* arg1=0, void* arg2=0)
|
||||
{
|
||||
const int MAX_ITERATIONS = 0x10000; // maximum of 4 characters (A-P) will be appended
|
||||
const S32 MAX_ITERATIONS = 0x10000; // maximum of 4 characters (A-P) will be appended
|
||||
|
||||
String suffix;
|
||||
for (S32 i = 0; i < MAX_ITERATIONS; i++)
|
||||
|
|
@ -336,7 +336,7 @@ void TSShapeLoader::recurseSubshape(AppNode* appNode, S32 parentIndex, bool recu
|
|||
// Create children
|
||||
if (recurseChildren)
|
||||
{
|
||||
for (int iChild = 0; iChild < appNode->getNumChildNodes(); iChild++)
|
||||
for (S32 iChild = 0; iChild < appNode->getNumChildNodes(); iChild++)
|
||||
recurseSubshape(appNode->getChildNode(iChild), myIndex, true);
|
||||
}
|
||||
}
|
||||
|
|
@ -500,9 +500,9 @@ void TSShapeLoader::generateObjects()
|
|||
void TSShapeLoader::generateSkins()
|
||||
{
|
||||
Vector<AppMesh*> skins;
|
||||
for (int iObject = 0; iObject < shape->objects.size(); iObject++)
|
||||
for (S32 iObject = 0; iObject < shape->objects.size(); iObject++)
|
||||
{
|
||||
for (int iMesh = 0; iMesh < shape->objects[iObject].numMeshes; iMesh++)
|
||||
for (S32 iMesh = 0; iMesh < shape->objects[iObject].numMeshes; iMesh++)
|
||||
{
|
||||
AppMesh* mesh = appMeshes[shape->objects[iObject].startMeshIndex + iMesh];
|
||||
if (mesh->isSkin())
|
||||
|
|
@ -510,7 +510,7 @@ void TSShapeLoader::generateSkins()
|
|||
}
|
||||
}
|
||||
|
||||
for (int iSkin = 0; iSkin < skins.size(); iSkin++)
|
||||
for (S32 iSkin = 0; iSkin < skins.size(); iSkin++)
|
||||
{
|
||||
updateProgress(Load_GenerateSkins, "Generating skins...", skins.size(), iSkin);
|
||||
|
||||
|
|
@ -524,11 +524,11 @@ void TSShapeLoader::generateSkins()
|
|||
|
||||
// Map bones to nodes
|
||||
skin->nodeIndex.setSize(skin->bones.size());
|
||||
for (int iBone = 0; iBone < skin->bones.size(); iBone++)
|
||||
for (S32 iBone = 0; iBone < skin->bones.size(); iBone++)
|
||||
{
|
||||
// Find the node that matches this bone
|
||||
skin->nodeIndex[iBone] = -1;
|
||||
for (int iNode = 0; iNode < appNodes.size(); iNode++)
|
||||
for (S32 iNode = 0; iNode < appNodes.size(); iNode++)
|
||||
{
|
||||
if (appNodes[iNode]->isEqual(skin->bones[iBone]))
|
||||
{
|
||||
|
|
@ -551,7 +551,7 @@ void TSShapeLoader::generateSkins()
|
|||
void TSShapeLoader::generateDefaultStates()
|
||||
{
|
||||
// Generate default object states (includes initial geometry)
|
||||
for (int iObject = 0; iObject < shape->objects.size(); iObject++)
|
||||
for (S32 iObject = 0; iObject < shape->objects.size(); iObject++)
|
||||
{
|
||||
updateProgress(Load_GenerateDefaultStates, "Generating initial mesh and node states...",
|
||||
shape->objects.size(), iObject);
|
||||
|
|
@ -559,7 +559,7 @@ void TSShapeLoader::generateDefaultStates()
|
|||
TSShape::Object& obj = shape->objects[iObject];
|
||||
|
||||
// Calculate the objectOffset for each mesh at T=0
|
||||
for (int iMesh = 0; iMesh < obj.numMeshes; iMesh++)
|
||||
for (S32 iMesh = 0; iMesh < obj.numMeshes; iMesh++)
|
||||
{
|
||||
AppMesh* appMesh = appMeshes[obj.startMeshIndex + iMesh];
|
||||
AppNode* appNode = obj.nodeIndex >= 0 ? appNodes[obj.nodeIndex] : boundsNode;
|
||||
|
|
@ -576,7 +576,7 @@ void TSShapeLoader::generateDefaultStates()
|
|||
}
|
||||
|
||||
// Generate default node transforms
|
||||
for (int iNode = 0; iNode < appNodes.size(); iNode++)
|
||||
for (S32 iNode = 0; iNode < appNodes.size(); iNode++)
|
||||
{
|
||||
// Determine the default translation and rotation for the node
|
||||
QuatF rot, srot;
|
||||
|
|
@ -610,7 +610,7 @@ void TSShapeLoader::generateObjectState(TSShape::Object& obj, F32 t, bool addFra
|
|||
|
||||
void TSShapeLoader::generateFrame(TSShape::Object& obj, F32 t, bool addFrame, bool addMatFrame)
|
||||
{
|
||||
for (int iMesh = 0; iMesh < obj.numMeshes; iMesh++)
|
||||
for (S32 iMesh = 0; iMesh < obj.numMeshes; iMesh++)
|
||||
{
|
||||
AppMesh* appMesh = appMeshes[obj.startMeshIndex + iMesh];
|
||||
|
||||
|
|
@ -690,7 +690,7 @@ void TSShapeLoader::generateMaterialList()
|
|||
{
|
||||
// Install the materials into the material list
|
||||
shape->materialList = new TSMaterialList;
|
||||
for (int iMat = 0; iMat < AppMesh::appMaterials.size(); iMat++)
|
||||
for (S32 iMat = 0; iMat < AppMesh::appMaterials.size(); iMat++)
|
||||
{
|
||||
updateProgress(Load_GenerateMaterials, "Generating materials...", AppMesh::appMaterials.size(), iMat);
|
||||
|
||||
|
|
@ -705,7 +705,7 @@ void TSShapeLoader::generateMaterialList()
|
|||
|
||||
void TSShapeLoader::generateSequences()
|
||||
{
|
||||
for (int iSeq = 0; iSeq < appSequences.size(); iSeq++)
|
||||
for (S32 iSeq = 0; iSeq < appSequences.size(); iSeq++)
|
||||
{
|
||||
updateProgress(Load_GenerateSequences, "Generating sequences...", appSequences.size(), iSeq);
|
||||
|
||||
|
|
@ -783,14 +783,14 @@ void TSShapeLoader::setNodeMembership(TSShape::Sequence& seq, const AppSequence*
|
|||
|
||||
void TSShapeLoader::setRotationMembership(TSShape::Sequence& seq)
|
||||
{
|
||||
for (int iNode = 0; iNode < appNodes.size(); iNode++)
|
||||
for (S32 iNode = 0; iNode < appNodes.size(); iNode++)
|
||||
{
|
||||
// Check if any of the node rotations are different to
|
||||
// the default rotation
|
||||
QuatF defaultRot;
|
||||
shape->defaultRotations[iNode].getQuatF(&defaultRot);
|
||||
|
||||
for (int iFrame = 0; iFrame < seq.numKeyframes; iFrame++)
|
||||
for (S32 iFrame = 0; iFrame < seq.numKeyframes; iFrame++)
|
||||
{
|
||||
if (nodeRotCache[iNode][iFrame] != defaultRot)
|
||||
{
|
||||
|
|
@ -803,13 +803,13 @@ void TSShapeLoader::setRotationMembership(TSShape::Sequence& seq)
|
|||
|
||||
void TSShapeLoader::setTranslationMembership(TSShape::Sequence& seq)
|
||||
{
|
||||
for (int iNode = 0; iNode < appNodes.size(); iNode++)
|
||||
for (S32 iNode = 0; iNode < appNodes.size(); iNode++)
|
||||
{
|
||||
// Check if any of the node translations are different to
|
||||
// the default translation
|
||||
Point3F& defaultTrans = shape->defaultTranslations[iNode];
|
||||
|
||||
for (int iFrame = 0; iFrame < seq.numKeyframes; iFrame++)
|
||||
for (S32 iFrame = 0; iFrame < seq.numKeyframes; iFrame++)
|
||||
{
|
||||
if (!nodeTransCache[iNode][iFrame].equal(defaultTrans))
|
||||
{
|
||||
|
|
@ -828,10 +828,10 @@ void TSShapeLoader::setScaleMembership(TSShape::Sequence& seq)
|
|||
U32 alignedScaleCount = 0;
|
||||
U32 uniformScaleCount = 0;
|
||||
|
||||
for (int iNode = 0; iNode < appNodes.size(); iNode++)
|
||||
for (S32 iNode = 0; iNode < appNodes.size(); iNode++)
|
||||
{
|
||||
// Check if any of the node scales are not the unit scale
|
||||
for (int iFrame = 0; iFrame < seq.numKeyframes; iFrame++)
|
||||
for (S32 iFrame = 0; iFrame < seq.numKeyframes; iFrame++)
|
||||
{
|
||||
Point3F& scale = nodeScaleCache[iNode][iFrame];
|
||||
if (!unitScale.equal(scale))
|
||||
|
|
@ -865,7 +865,7 @@ void TSShapeLoader::setObjectMembership(TSShape::Sequence& seq, const AppSequenc
|
|||
seq.frameMatters.clearAll(); // vert animation (morph) (size = objects.size())
|
||||
seq.matFrameMatters.clearAll(); // UV animation (size = objects.size())
|
||||
|
||||
for (int iObject = 0; iObject < shape->objects.size(); iObject++)
|
||||
for (S32 iObject = 0; iObject < shape->objects.size(); iObject++)
|
||||
{
|
||||
if (!appMeshes[shape->objects[iObject].startMeshIndex])
|
||||
continue;
|
||||
|
|
@ -883,16 +883,16 @@ void TSShapeLoader::setObjectMembership(TSShape::Sequence& seq, const AppSequenc
|
|||
void TSShapeLoader::clearNodeTransformCache()
|
||||
{
|
||||
// clear out the transform caches
|
||||
for (int i = 0; i < nodeRotCache.size(); i++)
|
||||
for (S32 i = 0; i < nodeRotCache.size(); i++)
|
||||
delete [] nodeRotCache[i];
|
||||
nodeRotCache.clear();
|
||||
for (int i = 0; i < nodeTransCache.size(); i++)
|
||||
for (S32 i = 0; i < nodeTransCache.size(); i++)
|
||||
delete [] nodeTransCache[i];
|
||||
nodeTransCache.clear();
|
||||
for (int i = 0; i < nodeScaleRotCache.size(); i++)
|
||||
for (S32 i = 0; i < nodeScaleRotCache.size(); i++)
|
||||
delete [] nodeScaleRotCache[i];
|
||||
nodeScaleRotCache.clear();
|
||||
for (int i = 0; i < nodeScaleCache.size(); i++)
|
||||
for (S32 i = 0; i < nodeScaleCache.size(); i++)
|
||||
delete [] nodeScaleCache[i];
|
||||
nodeScaleCache.clear();
|
||||
}
|
||||
|
|
@ -903,23 +903,23 @@ void TSShapeLoader::fillNodeTransformCache(TSShape::Sequence& seq, const AppSequ
|
|||
clearNodeTransformCache();
|
||||
|
||||
nodeRotCache.setSize(appNodes.size());
|
||||
for (int i = 0; i < nodeRotCache.size(); i++)
|
||||
for (S32 i = 0; i < nodeRotCache.size(); i++)
|
||||
nodeRotCache[i] = new QuatF[seq.numKeyframes];
|
||||
nodeTransCache.setSize(appNodes.size());
|
||||
for (int i = 0; i < nodeTransCache.size(); i++)
|
||||
for (S32 i = 0; i < nodeTransCache.size(); i++)
|
||||
nodeTransCache[i] = new Point3F[seq.numKeyframes];
|
||||
nodeScaleRotCache.setSize(appNodes.size());
|
||||
for (int i = 0; i < nodeScaleRotCache.size(); i++)
|
||||
for (S32 i = 0; i < nodeScaleRotCache.size(); i++)
|
||||
nodeScaleRotCache[i] = new QuatF[seq.numKeyframes];
|
||||
nodeScaleCache.setSize(appNodes.size());
|
||||
for (int i = 0; i < nodeScaleCache.size(); i++)
|
||||
for (S32 i = 0; i < nodeScaleCache.size(); i++)
|
||||
nodeScaleCache[i] = new Point3F[seq.numKeyframes];
|
||||
|
||||
// get the node transforms for every frame
|
||||
for (int iFrame = 0; iFrame < seq.numKeyframes; iFrame++)
|
||||
for (S32 iFrame = 0; iFrame < seq.numKeyframes; iFrame++)
|
||||
{
|
||||
F32 time = appSeq->getStart() + seq.duration * iFrame / getMax(1, seq.numKeyframes - 1);
|
||||
for (int iNode = 0; iNode < appNodes.size(); iNode++)
|
||||
for (S32 iNode = 0; iNode < appNodes.size(); iNode++)
|
||||
{
|
||||
generateNodeTransform(appNodes[iNode], time, seq.isBlend(), appSeq->getBlendRefTime(),
|
||||
nodeRotCache[iNode][iFrame], nodeTransCache[iNode][iFrame],
|
||||
|
|
@ -973,9 +973,9 @@ void TSShapeLoader::generateNodeAnimation(TSShape::Sequence& seq)
|
|||
(seq.flags & TSShape::AlignedScale) ? shape->nodeAlignedScales.size() :
|
||||
shape->nodeUniformScales.size();
|
||||
|
||||
for (int iNode = 0; iNode < appNodes.size(); iNode++)
|
||||
for (S32 iNode = 0; iNode < appNodes.size(); iNode++)
|
||||
{
|
||||
for (int iFrame = 0; iFrame < seq.numKeyframes; iFrame++)
|
||||
for (S32 iFrame = 0; iFrame < seq.numKeyframes; iFrame++)
|
||||
{
|
||||
if (seq.rotationMatters.test(iNode))
|
||||
addNodeRotation(nodeRotCache[iNode][iFrame], false);
|
||||
|
|
@ -1001,7 +1001,7 @@ void TSShapeLoader::generateObjectAnimation(TSShape::Sequence& seq, const AppSeq
|
|||
{
|
||||
seq.baseObjectState = shape->objectStates.size();
|
||||
|
||||
for (int iObject = 0; iObject < shape->objects.size(); iObject++)
|
||||
for (S32 iObject = 0; iObject < shape->objects.size(); iObject++)
|
||||
{
|
||||
bool visMatters = seq.visMatters.test(iObject);
|
||||
bool frameMatters = seq.frameMatters.test(iObject);
|
||||
|
|
@ -1009,7 +1009,7 @@ void TSShapeLoader::generateObjectAnimation(TSShape::Sequence& seq, const AppSeq
|
|||
|
||||
if (visMatters || frameMatters || matFrameMatters)
|
||||
{
|
||||
for (int iFrame = 0; iFrame < seq.numKeyframes; iFrame++)
|
||||
for (S32 iFrame = 0; iFrame < seq.numKeyframes; iFrame++)
|
||||
{
|
||||
F32 time = appSeq->getStart() + seq.duration * iFrame / getMax(1, seq.numKeyframes - 1);
|
||||
generateObjectState(shape->objects[iObject], time, frameMatters, matFrameMatters);
|
||||
|
|
@ -1036,7 +1036,7 @@ void TSShapeLoader::generateGroundAnimation(TSShape::Sequence& seq, const AppSeq
|
|||
zapScale(invStartMat);
|
||||
invStartMat.inverse();
|
||||
|
||||
for (int iFrame = 0; iFrame < seq.numGroundFrames; iFrame++)
|
||||
for (S32 iFrame = 0; iFrame < seq.numGroundFrames; iFrame++)
|
||||
{
|
||||
F32 time = appSeq->getStart() + seq.duration * iFrame / getMax(1, seq.numGroundFrames - 1);
|
||||
|
||||
|
|
@ -1064,7 +1064,7 @@ void TSShapeLoader::generateFrameTriggers(TSShape::Sequence& seq, const AppSeque
|
|||
seq.flags |= TSShape::MakePath;
|
||||
|
||||
// Add triggers
|
||||
for (int iTrigger = 0; iTrigger < seq.numTriggers; iTrigger++)
|
||||
for (S32 iTrigger = 0; iTrigger < seq.numTriggers; iTrigger++)
|
||||
{
|
||||
shape->triggers.increment();
|
||||
appSeq->getTrigger(iTrigger, shape->triggers.last());
|
||||
|
|
@ -1075,7 +1075,7 @@ void TSShapeLoader::generateFrameTriggers(TSShape::Sequence& seq, const AppSeque
|
|||
// need to mark ourselves as such so that on/off can become off/on when sequence
|
||||
// is played in reverse...
|
||||
U32 offTriggers = 0;
|
||||
for (int iTrigger = 0; iTrigger < seq.numTriggers; iTrigger++)
|
||||
for (S32 iTrigger = 0; iTrigger < seq.numTriggers; iTrigger++)
|
||||
{
|
||||
U32 state = shape->triggers[seq.firstTrigger+iTrigger].state;
|
||||
if ((state & TSShape::Trigger::StateOn) == 0)
|
||||
|
|
@ -1098,18 +1098,18 @@ void TSShapeLoader::sortDetails()
|
|||
|
||||
|
||||
// Insert NULL meshes where required
|
||||
for (int iSub = 0; iSub < subshapes.size(); iSub++)
|
||||
for (S32 iSub = 0; iSub < subshapes.size(); iSub++)
|
||||
{
|
||||
Vector<S32> validDetails;
|
||||
shape->getSubShapeDetails(iSub, validDetails);
|
||||
|
||||
for (int iDet = 0; iDet < validDetails.size(); iDet++)
|
||||
for (S32 iDet = 0; iDet < validDetails.size(); iDet++)
|
||||
{
|
||||
TSShape::Detail &detail = shape->details[validDetails[iDet]];
|
||||
if (detail.subShapeNum >= 0)
|
||||
detail.objectDetailNum = iDet;
|
||||
|
||||
for (int iObj = shape->subShapeFirstObject[iSub];
|
||||
for (S32 iObj = shape->subShapeFirstObject[iSub];
|
||||
iObj < (shape->subShapeFirstObject[iSub] + shape->subShapeNumObjects[iSub]);
|
||||
iObj++)
|
||||
{
|
||||
|
|
@ -1126,7 +1126,7 @@ void TSShapeLoader::sortDetails()
|
|||
object.numMeshes++;
|
||||
|
||||
// Fixup the start index for the other objects
|
||||
for (int k = iObj+1; k < shape->objects.size(); k++)
|
||||
for (S32 k = iObj+1; k < shape->objects.size(); k++)
|
||||
shape->objects[k].startMeshIndex++;
|
||||
}
|
||||
}
|
||||
|
|
@ -1256,17 +1256,17 @@ TSShapeLoader::~TSShapeLoader()
|
|||
clearNodeTransformCache();
|
||||
|
||||
// Clear shared AppMaterial list
|
||||
for (int iMat = 0; iMat < AppMesh::appMaterials.size(); iMat++)
|
||||
for (S32 iMat = 0; iMat < AppMesh::appMaterials.size(); iMat++)
|
||||
delete AppMesh::appMaterials[iMat];
|
||||
AppMesh::appMaterials.clear();
|
||||
|
||||
// Delete Subshapes
|
||||
delete boundsNode;
|
||||
for (int iSub = 0; iSub < subshapes.size(); iSub++)
|
||||
for (S32 iSub = 0; iSub < subshapes.size(); iSub++)
|
||||
delete subshapes[iSub];
|
||||
|
||||
// Delete AppSequences
|
||||
for (int iSeq = 0; iSeq < appSequences.size(); iSeq++)
|
||||
for (S32 iSeq = 0; iSeq < appSequences.size(); iSeq++)
|
||||
delete appSequences[iSeq];
|
||||
appSequences.clear();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ public:
|
|||
Load_Complete = NumLoadPhases
|
||||
};
|
||||
|
||||
static void updateProgress(int major, const char* msg, int numMinor=0, int minor=0);
|
||||
static void updateProgress(S32 major, const char* msg, S32 numMinor=0, S32 minor=0);
|
||||
|
||||
protected:
|
||||
struct Subshape
|
||||
|
|
@ -82,9 +82,9 @@ protected:
|
|||
|
||||
public:
|
||||
static const F32 DefaultTime;
|
||||
static const double MinFrameRate;
|
||||
static const double MaxFrameRate;
|
||||
static const double AppGroundFrameRate;
|
||||
static const F64 MinFrameRate;
|
||||
static const F64 MaxFrameRate;
|
||||
static const F64 AppGroundFrameRate;
|
||||
|
||||
protected:
|
||||
// Variables used during loading that must be held until the shape is deleted
|
||||
|
|
|
|||
|
|
@ -62,12 +62,12 @@ GFXDeclareVertexFormat( ImposterState )
|
|||
/// .xyz = imposter center
|
||||
/// .w = billboard corner... damn SM 2.0
|
||||
Point3F center;
|
||||
float corner;
|
||||
F32 corner;
|
||||
|
||||
/// .x = scaled half size
|
||||
/// .y = alpha fade out
|
||||
float halfSize;
|
||||
float alpha;
|
||||
F32 halfSize;
|
||||
F32 alpha;
|
||||
|
||||
/// The rotation encoded as the up
|
||||
/// and right vectors... cross FTW.
|
||||
|
|
|
|||
|
|
@ -1203,7 +1203,7 @@ void TSSkinMesh::updateSkin( const Vector<MatrixF> &transforms, TSVertexBufferHa
|
|||
|
||||
// set up bone transforms
|
||||
PROFILE_START(TSSkinMesh_UpdateTransforms);
|
||||
for( int i=0; i<batchData.nodeIndex.size(); i++ )
|
||||
for( S32 i=0; i<batchData.nodeIndex.size(); i++ )
|
||||
{
|
||||
S32 node = batchData.nodeIndex[i];
|
||||
sBoneTransforms[i].mul( transforms[node], batchData.initialTransforms[i] );
|
||||
|
|
@ -1233,7 +1233,7 @@ void TSSkinMesh::updateSkin( const Vector<MatrixF> &transforms, TSVertexBufferHa
|
|||
skinnedVert.zero();
|
||||
skinnedNorm.zero();
|
||||
|
||||
for( int tOp = 0; tOp < curVert.transformCount; tOp++ )
|
||||
for( S32 tOp = 0; tOp < curVert.transformCount; tOp++ )
|
||||
{
|
||||
const BatchData::TransformOp &transformOp = curVert.transform[tOp];
|
||||
|
||||
|
|
@ -1418,7 +1418,7 @@ void TSSkinMesh::createBatchData()
|
|||
itr != batchOperations.end(); itr++ )
|
||||
{
|
||||
const BatchData::BatchedVertex &curTransform = *itr;
|
||||
for( int i = 0; i < curTransform.transformCount; i++ )
|
||||
for( S32 i = 0; i < curTransform.transformCount; i++ )
|
||||
{
|
||||
const BatchData::TransformOp &transformOp = curTransform.transform[i];
|
||||
|
||||
|
|
@ -1443,8 +1443,8 @@ void TSSkinMesh::createBatchData()
|
|||
|
||||
// Now iterate the resulting operations and convert the vectors to aligned
|
||||
// memory locations
|
||||
const int numBatchOps = batchData.transformKeys.size();
|
||||
for(int i = 0; i < numBatchOps; i++)
|
||||
const S32 numBatchOps = batchData.transformKeys.size();
|
||||
for(S32 i = 0; i < numBatchOps; i++)
|
||||
{
|
||||
BatchData::BatchedTransform &curTransform = *batchData.transformBatchOperations.retreive(batchData.transformKeys[i]);
|
||||
const S32 numVerts = curTransform._tmpVec->size();
|
||||
|
|
@ -1462,7 +1462,7 @@ void TSSkinMesh::createBatchData()
|
|||
}
|
||||
|
||||
// Now sort the batch data so that the skin function writes close to linear output
|
||||
for(int i = 0; i < numBatchOps; i++)
|
||||
for(S32 i = 0; i < numBatchOps; i++)
|
||||
{
|
||||
BatchData::BatchedTransform &curTransform = *batchData.transformBatchOperations.retreive(batchData.transformKeys[i]);
|
||||
dQsort(curTransform.alignedMem, curTransform.numElements, sizeof(BatchData::BatchedVertWeight), _sort_BatchedVertWeight);
|
||||
|
|
@ -2558,7 +2558,7 @@ void TSMesh::assemble( bool skip )
|
|||
// need to copy to temporary arrays
|
||||
deleteInputArrays = true;
|
||||
primIn = new TSDrawPrimitive[szPrimIn];
|
||||
for (int i = 0; i < szPrimIn; i++)
|
||||
for (S32 i = 0; i < szPrimIn; i++)
|
||||
{
|
||||
primIn[i].start = prim16[i*2];
|
||||
primIn[i].numElements = prim16[i*2+1];
|
||||
|
|
|
|||
|
|
@ -214,7 +214,7 @@ class TSMesh
|
|||
}
|
||||
|
||||
// Vector-like interface
|
||||
__TSMeshVertexBase &operator[](int idx) const { AssertFatal(idx < numElements, "Out of bounds access!"); return *reinterpret_cast<__TSMeshVertexBase *>(base + idx * vertSz); }
|
||||
__TSMeshVertexBase &operator[](S32 idx) const { AssertFatal(idx < numElements, "Out of bounds access!"); return *reinterpret_cast<__TSMeshVertexBase *>(base + idx * vertSz); }
|
||||
__TSMeshVertexBase *address() const { return reinterpret_cast<__TSMeshVertexBase *>(base); }
|
||||
U32 size() const { return numElements; }
|
||||
dsize_t mem_size() const { return numElements * vertSz; }
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ void zero_vert_normal_bulk_C(const dsize_t count, U8 * __restrict const outPtr,
|
|||
|
||||
// TODO: Try prefetch w/ ptr de-reference
|
||||
|
||||
for(register int i = 0; i < count; i++)
|
||||
for(register S32 i = 0; i < count; i++)
|
||||
{
|
||||
TSMesh::__TSMeshVertexBase *outElem = reinterpret_cast<TSMesh::__TSMeshVertexBase *>(outData);
|
||||
outElem->_vert.zero();
|
||||
|
|
@ -60,7 +60,7 @@ void m_matF_x_BatchedVertWeightList_C(const MatrixF &mat,
|
|||
register Point3F tempPt;
|
||||
register Point3F tempNrm;
|
||||
|
||||
for(register int i = 0; i < count; i++)
|
||||
for(register S32 i = 0; i < count; i++)
|
||||
{
|
||||
const TSSkinMesh::BatchData::BatchedVertWeight &inElem = batch[i];
|
||||
|
||||
|
|
|
|||
|
|
@ -213,7 +213,7 @@ public:
|
|||
void write(TSShape* shape, Stream& stream, const String& savePath);
|
||||
};
|
||||
|
||||
static const int MaxLegacySequences = 127;
|
||||
static const S32 MaxLegacySequences = 127;
|
||||
|
||||
protected:
|
||||
FileName mShapePath;
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ S32 TSShape::addDetail(const String& dname, S32 size, S32 subShapeNum)
|
|||
alphaOut.increment();
|
||||
|
||||
// Fixup objectDetailNum in other detail levels
|
||||
for (int i = index+1; i < details.size(); i++)
|
||||
for (S32 i = index+1; i < details.size(); i++)
|
||||
{
|
||||
if ((details[i].subShapeNum >= 0) &&
|
||||
((subShapeNum == -1) || (details[i].subShapeNum == subShapeNum)))
|
||||
|
|
@ -1521,7 +1521,7 @@ bool TSShape::addSequence(const Torque::Path& path, const String& fromSeq,
|
|||
// Check if visibility is animated within the frames to be copied
|
||||
const F32 defaultVis = srcShape->objectStates[i].vis;
|
||||
S32 objNum = srcSeq->visMatters.count(i);
|
||||
for (int iFrame = startFrame; iFrame <= endFrame; iFrame++)
|
||||
for (S32 iFrame = startFrame; iFrame <= endFrame; iFrame++)
|
||||
{
|
||||
if (srcShape->getObjectState(*srcSeq, iFrame, objNum).vis != defaultVis)
|
||||
{
|
||||
|
|
@ -1600,7 +1600,7 @@ bool TSShape::addSequence(const Torque::Path& path, const String& fromSeq,
|
|||
// Check if node position is animated within the frames to be copied
|
||||
const Point3F& defaultTrans = srcShape->defaultTranslations[i];
|
||||
S32 tranNum = srcSeq->translationMatters.count(i);
|
||||
for (int iFrame = startFrame; iFrame <= endFrame; iFrame++)
|
||||
for (S32 iFrame = startFrame; iFrame <= endFrame; iFrame++)
|
||||
{
|
||||
if (srcShape->getTranslation(*srcSeq, iFrame, tranNum) != defaultTrans)
|
||||
{
|
||||
|
|
@ -1615,7 +1615,7 @@ bool TSShape::addSequence(const Torque::Path& path, const String& fromSeq,
|
|||
// Check if node rotation is animated within the frames to be copied
|
||||
const QuatF defaultRot = srcShape->defaultRotations[i].getQuatF();
|
||||
S32 rotNum = srcSeq->rotationMatters.count(i);
|
||||
for (int iFrame = startFrame; iFrame <= endFrame; iFrame++)
|
||||
for (S32 iFrame = startFrame; iFrame <= endFrame; iFrame++)
|
||||
{
|
||||
QuatF temp;
|
||||
if (srcShape->getRotation(*srcSeq, iFrame, rotNum, &temp) != defaultRot)
|
||||
|
|
@ -1634,7 +1634,7 @@ bool TSShape::addSequence(const Torque::Path& path, const String& fromSeq,
|
|||
{
|
||||
TSScale defaultScale;
|
||||
defaultScale.identity();
|
||||
for (int iFrame = startFrame; iFrame <= endFrame; iFrame++)
|
||||
for (S32 iFrame = startFrame; iFrame <= endFrame; iFrame++)
|
||||
{
|
||||
TSScale temp;
|
||||
if (!(srcShape->getArbitraryScale(*srcSeq, iFrame, scaleNum, &temp) == defaultScale))
|
||||
|
|
@ -1647,7 +1647,7 @@ bool TSShape::addSequence(const Torque::Path& path, const String& fromSeq,
|
|||
else if (srcSeq->animatesAlignedScale())
|
||||
{
|
||||
const Point3F defaultScale(Point3F::One);
|
||||
for (int iFrame = startFrame; iFrame <= endFrame; iFrame++)
|
||||
for (S32 iFrame = startFrame; iFrame <= endFrame; iFrame++)
|
||||
{
|
||||
if (srcShape->getAlignedScale(*srcSeq, iFrame, scaleNum) != defaultScale)
|
||||
{
|
||||
|
|
@ -1659,7 +1659,7 @@ bool TSShape::addSequence(const Torque::Path& path, const String& fromSeq,
|
|||
else if (srcSeq->animatesUniformScale())
|
||||
{
|
||||
const F32 defaultScale = 1.0f;
|
||||
for (int iFrame = startFrame; iFrame <= endFrame; iFrame++)
|
||||
for (S32 iFrame = startFrame; iFrame <= endFrame; iFrame++)
|
||||
{
|
||||
if (srcShape->getUniformScale(*srcSeq, iFrame, scaleNum) != defaultScale)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue