<commit_before>//****************************************************************************//
// corebone.cpp                                                               //
// Copyright (C) 2001, 2002 <NAME>' Heidelberger                       //
//****************************************************************************//
// This library is free software; you can redistribute it and/or modify it    //
// under the terms of the GNU Lesser General Public License as published by   //
// the Free Software Foundation; either version 2.1 of the License, or (at    //
// your option) any later version.                                            //
//****************************************************************************//

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "cal3d/error.h"
#include "cal3d/corebone.h"
#include "cal3d/coreskeleton.h"
#include "cal3d/coremesh.h"
#include "cal3d/coresubmesh.h"


CalCoreBone::CalCoreBone(const std::string& n, int p)
    : parentId(p)
    , name(n) {
}

void CalCoreBone::scale(float factor, CalCoreSkeleton* skeleton) {
    relativeTransform.translation *= factor;
    boneSpaceTransform.translation *= factor;

    // calculate all child bones
    std::vector<int>::const_iterator iteratorChildId;
    for (iteratorChildId = childIds.begin(); iteratorChildId != childIds.end(); ++iteratorChildId) {
        skeleton->coreBones[*iteratorChildId]->scale(factor, skeleton);
    }
}

<commit_msg>Minor refactorings<commit_after>//****************************************************************************//
// corebone.cpp                                                               //
// Copyright (C) 2001, 2002 Bruno 'Beosil' Heidelberger                       //
//****************************************************************************//
// This library is free software; you can redistribute it and/or modify it    //
// under the terms of the GNU Lesser General Public License as published by   //
// the Free Software Foundation; either version 2.1 of the License, or (at    //
// your option) any later version.                                            //
//****************************************************************************//

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "cal3d/error.h"
#include "cal3d/corebone.h"
#include "cal3d/coreskeleton.h"
#include "cal3d/coremesh.h"
#include "cal3d/coresubmesh.h"


CalCoreBone::CalCoreBone(const std::string& n, int p)
    : parentId(p)
    , name(n)
    , lightType(LIGHT_TYPE_NONE)
{
}

void CalCoreBone::scale(float factor, CalCoreSkeleton* skeleton) {
    relativeTransform.translation *= factor;
    boneSpaceTransform.translation *= factor;

    // calculate all child bones
    std::vector<int>::const_iterator iteratorChildId;
    for (iteratorChildId = childIds.begin(); iteratorChildId != childIds.end(); ++iteratorChildId) {
        skeleton->coreBones[*iteratorChildId]->scale(factor, skeleton);
    }
}


{'fraction_non_alphanumeric': 0.25765220316178944, 'fraction_numerical': 0.010090817356205853, 'mean_word_length': 3.0462585034013605, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '884228', 'n_tokens_mistral': 788, 'n_tokens_neox': 726, 'n_words': 193}