mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 11:43:49 +00:00
Rename all member variables to follow the style guidelines (prefixed with the 'm') - class TSShapeLoader
This commit is contained in:
parent
9aeb4389f3
commit
1778a8d7f2
7 changed files with 284 additions and 284 deletions
|
|
@ -230,14 +230,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++)
|
||||
appSequences.push_back(new ColladaAppSequence(libraryClips->getAnimation_clip_array()[iClip]));
|
||||
mAppSequences.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 < appSequences.size(); iSeq++) {
|
||||
ColladaAppSequence* appSeq = dynamic_cast<ColladaAppSequence*>(appSequences[iSeq]);
|
||||
for (S32 iSeq = 0; iSeq < mAppSequences.size(); iSeq++) {
|
||||
ColladaAppSequence* appSeq = dynamic_cast<ColladaAppSequence*>(mAppSequences[iSeq]);
|
||||
F32 maxEndTime = 0;
|
||||
F32 minFrameTime = 1000.0f;
|
||||
for (S32 iAnim = 0; iAnim < appSeq->getClip()->getInstance_animation_array().getCount(); iAnim++) {
|
||||
|
|
@ -251,7 +251,7 @@ void ColladaShapeLoader::enumerateScene()
|
|||
// Collada animations can be stored as sampled frames or true keyframes. For
|
||||
// sampled frames, use the same frame rate as the DAE file. For true keyframes,
|
||||
// resample at a fixed frame rate.
|
||||
appSeq->fps = mClamp(1.0f / minFrameTime + 0.5f, TSShapeLoader::MinFrameRate, TSShapeLoader::MaxFrameRate);
|
||||
appSeq->fps = mClamp(1.0f / minFrameTime + 0.5f, TSShapeLoader::smMinFrameRate, TSShapeLoader::smMaxFrameRate);
|
||||
}
|
||||
|
||||
// First grab all of the top-level nodes
|
||||
|
|
@ -308,7 +308,7 @@ void ColladaShapeLoader::enumerateScene()
|
|||
}
|
||||
|
||||
// Make sure that the scene has a bounds node (for getting the root scene transform)
|
||||
if (!boundsNode)
|
||||
if (!mBoundsNode)
|
||||
{
|
||||
domVisual_scene* visualScene = root->getLibrary_visual_scenes_array()[0]->getVisual_scene_array()[0];
|
||||
domNode* dombounds = daeSafeCast<domNode>( visualScene->createAndPlace( "node" ) );
|
||||
|
|
@ -359,24 +359,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 < shape->nodes.size(); iNode++)
|
||||
for (S32 iNode = 0; iNode < mShape->nodes.size(); iNode++)
|
||||
{
|
||||
if ( !appNodes[iNode]->isParentRoot() )
|
||||
if ( !mAppNodes[iNode]->isParentRoot() )
|
||||
continue;
|
||||
|
||||
// Adjust default translation
|
||||
shape->defaultTranslations[iNode] += shapeOffset;
|
||||
mShape->defaultTranslations[iNode] += shapeOffset;
|
||||
|
||||
// Adjust animated translations
|
||||
for (S32 iSeq = 0; iSeq < shape->sequences.size(); iSeq++)
|
||||
for (S32 iSeq = 0; iSeq < mShape->sequences.size(); iSeq++)
|
||||
{
|
||||
const TSShape::Sequence& seq = shape->sequences[iSeq];
|
||||
const TSShape::Sequence& seq = mShape->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;
|
||||
shape->nodeTranslations[index] += shapeOffset;
|
||||
mShape->nodeTranslations[index] += shapeOffset;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue