Revert "collada/ts chain shadowvar and member var clenaups"

This reverts commit 3ce15b33eb.
This commit is contained in:
Azaezel 2018-04-01 23:16:13 -05:00
parent 43c3f75b14
commit c84bd23e17
6 changed files with 264 additions and 264 deletions

View file

@ -147,12 +147,12 @@ private:
end = start;
// Get the set for this input
domInputLocalOffset* localOffset = daeSafeCast<domInputLocalOffset>(input);
const domInputLocalOffset* localOffset = daeSafeCast<domInputLocalOffset>(input);
domUint newSet = localOffset ? localOffset->getSet() : 0;
// Add the input to the right place in the list (somewhere between start and end)
for (S32 i = start; i <= end; i++) {
localOffset = daeSafeCast<domInputLocalOffset>(sortedInputs[i]);
const domInputLocalOffset* localOffset = daeSafeCast<domInputLocalOffset>(sortedInputs[i]);
domUint set = localOffset ? localOffset->getSet() : 0xFFFFFFFF;
if (newSet < set) {
for (S32 j = i + 1; j <= end; j++)
@ -181,10 +181,10 @@ private:
const char* semantic = SourceTypeToSemantic( type );
for (S32 iInput = 0; iInput < vertices->getInput_array().getCount(); iInput++)
{
domInputLocal* vInput = vertices->getInput_array().get(iInput);
if (dStrEqual(vInput->getSemantic(), semantic))
domInputLocal* input = vertices->getInput_array().get(iInput);
if (dStrEqual(input->getSemantic(), semantic))
{
source = daeSafeCast<domSource>(findInputSource(vInput));
source = daeSafeCast<domSource>(findInputSource(input));
break;
}
}
@ -966,7 +966,7 @@ void ColladaAppMesh::lookupSkinData()
// Determine the offset into the vindices array for each vertex (since each
// vertex may have multiple [bone, weight] pairs in the array)
Vector<U32> vindicesOffset;
domInt* vindices = (domInt*)weights_v.getRaw(0);
const domInt* vindices = (domInt*)weights_v.getRaw(0);
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));
@ -977,7 +977,7 @@ void ColladaAppMesh::lookupSkinData()
bool tooManyWeightsWarning = false;
for (S32 iVert = 0; iVert < vertsPerFrame; iVert++) {
const domUint* vcount = (domUint*)weights_vcount.getRaw(0);
vindices = (domInt*)weights_v.getRaw(0);
const domInt* vindices = (domInt*)weights_v.getRaw(0);
vindices += vindicesOffset[vertTuples[iVert].vertex];
S32 nonZeroWeightCount = 0;

View file

@ -120,9 +120,9 @@ static void processNode(GuiTreeViewCtrl* tree, domNode* node, S32 parentID, Scen
for (S32 i = 0; i < node->getInstance_node_array().getCount(); i++)
{
domInstance_node* instnode = node->getInstance_node_array()[i];
domNode* dNode = daeSafeCast<domNode>(instnode->getUrl().getElement());
if (dNode)
processNode(tree, dNode, nodeID, stats);
domNode* node = daeSafeCast<domNode>(instnode->getUrl().getElement());
if (node)
processNode(tree, node, nodeID, stats);
}
}

View file

@ -239,14 +239,14 @@ void ColladaShapeLoader::enumerateScene()
for (S32 iClipLib = 0; iClipLib < root->getLibrary_animation_clips_array().getCount(); iClipLib++) {
const domLibrary_animation_clips* libraryClips = root->getLibrary_animation_clips_array()[iClipLib];
for (S32 iClip = 0; iClip < libraryClips->getAnimation_clip_array().getCount(); iClip++)
mAppSequences.push_back(new ColladaAppSequence(libraryClips->getAnimation_clip_array()[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 (S32 iSeq = 0; iSeq < mAppSequences.size(); iSeq++) {
ColladaAppSequence* appSeq = dynamic_cast<ColladaAppSequence*>(mAppSequences[iSeq]);
for (S32 iSeq = 0; iSeq < appSequences.size(); iSeq++) {
ColladaAppSequence* appSeq = dynamic_cast<ColladaAppSequence*>(appSequences[iSeq]);
F32 maxEndTime = 0;
F32 minFrameTime = 1000.0f;
for (S32 iAnim = 0; iAnim < appSeq->getClip()->getInstance_animation_array().getCount(); iAnim++) {
@ -317,7 +317,7 @@ void ColladaShapeLoader::enumerateScene()
}
// Make sure that the scene has a bounds node (for getting the root scene transform)
if (!mBoundsNode)
if (!boundsNode)
{
domVisual_scene* visualScene = root->getLibrary_visual_scenes_array()[0]->getVisual_scene_array()[0];
domNode* dombounds = daeSafeCast<domNode>( visualScene->createAndPlace( "node" ) );
@ -354,7 +354,7 @@ void ColladaShapeLoader::computeBounds(Box3F& bounds)
ColladaUtils::getOptions().adjustFloor) )
{
// Compute shape offset
Point3F shapeOffset = Point3F::Zero;
Point3F shapeOffset = Point3F::Zero;
if ( ColladaUtils::getOptions().adjustCenter )
{
bounds.getCenter( &shapeOffset );
@ -368,24 +368,24 @@ void ColladaShapeLoader::computeBounds(Box3F& bounds)
bounds.maxExtents += shapeOffset;
// Now adjust all positions for root level nodes (nodes with no parent)
for (S32 iNode = 0; iNode < mShape->nodes.size(); iNode++)
for (S32 iNode = 0; iNode < shape->nodes.size(); iNode++)
{
if ( !mAppNodes[iNode]->isParentRoot() )
if ( !appNodes[iNode]->isParentRoot() )
continue;
// Adjust default translation
mShape->defaultTranslations[iNode] += shapeOffset;
shape->defaultTranslations[iNode] += shapeOffset;
// Adjust animated translations
for (S32 iSeq = 0; iSeq < mShape->sequences.size(); iSeq++)
for (S32 iSeq = 0; iSeq < shape->sequences.size(); iSeq++)
{
const TSShape::Sequence& seq = mShape->sequences[iSeq];
const TSShape::Sequence& seq = shape->sequences[iSeq];
if ( seq.translationMatters.test(iNode) )
{
for (S32 iFrame = 0; iFrame < seq.numKeyframes; iFrame++)
{
S32 index = seq.baseTranslation + seq.translationMatters.count(iNode)*seq.numKeyframes + iFrame;
mShape->nodeTranslations[index] += shapeOffset;
shape->nodeTranslations[index] += shapeOffset;
}
}
}

View file

@ -266,10 +266,10 @@ void AnimData::parseTargetString(const char* target, S32 fullCount, const char*
targetValueCount = 1;
}
}
else if (const char* p2 = dStrrchr(target, '.')) {
else if (const char* p = dStrrchr(target, '.')) {
// Check for named elements
for (S32 iElem = 0; elements[iElem][0] != 0; iElem++) {
if (!dStrcmp(p2, elements[iElem])) {
if (!dStrcmp(p, elements[iElem])) {
targetValueOffset = iElem;
targetValueCount = 1;
break;