<commit_before>#ifndef BABYLON_BONES_BONE_H
#define BABYLON_BONES_BONE_H

#include <babylon/animations/ianimatable.h>
#include <babylon/babylon_api.h>
#include <babylon/engines/node.h>

namespace BABYLON {

class Bone;
class Skeleton;
using BonePtr = std::shared_ptr<Bone>;

/**
 * @brief Class used to store bone information.
 * @see https://doc.babylonjs.com/how_to/how_to_use_bones_and_skeletons
 */
class BABYLON_SHARED_EXPORT Bone : public Node {

public:
  template <typename... Ts>
  static BonePtr New(const std::string& iName, Skeleton* skeleton, Bone* parentBone = nullptr,
                     const std::optional<Matrix>& localMatrix = std::nullopt,
                     const std::optional<Matrix>& restPose    = std::nullopt,
                     const std::optional<Matrix>& baseMatrix  = std::nullopt,
                     std::optional<int> index                 = std::nullopt)
  {
    auto bone = std::shared_ptr<Bone>(
      new Bone(iName, skeleton, parentBone, localMatrix, restPose, baseMatrix, index));
    bone->addToSkeleton(bone);
    bone->setParent(parentBone, false);

    if (baseMatrix || localMatrix) {
      bone->_updateDifferenceMatrix();
    }

    return bone;
  }
  ~Bone() override; // = default

  Type type() const override;
  void addToSkeleton(const BonePtr& newBone);
<commit_msg>Using forward declaration macro<commit_after>#ifndef BABYLON_BONES_BONE_H
#define BABYLON_BONES_BONE_H

#include <babylon/animations/ianimatable.h>
#include <babylon/babylon_api.h>
#include <babylon/babylon_fwd.h>
#include <babylon/engines/node.h>

namespace BABYLON {

class Skeleton;
FWD_CLASS_SPTR(Bone)

/**
 * @brief Class used to store bone information.
 * @see https://doc.babylonjs.com/how_to/how_to_use_bones_and_skeletons
 */
class BABYLON_SHARED_EXPORT Bone : public Node {

public:
  template <typename... Ts>
  static BonePtr New(const std::string& iName, Skeleton* skeleton, Bone* parentBone = nullptr,
                     const std::optional<Matrix>& localMatrix = std::nullopt,
                     const std::optional<Matrix>& restPose    = std::nullopt,
                     const std::optional<Matrix>& baseMatrix  = std::nullopt,
                     std::optional<int> index                 = std::nullopt)
  {
    auto bone = std::shared_ptr<Bone>(
      new Bone(iName, skeleton, parentBone, localMatrix, restPose, baseMatrix, index));
    bone->addToSkeleton(bone);
    bone->setParent(parentBone, false);

    if (baseMatrix || localMatrix) {
      bone->_updateDifferenceMatrix();
    }

    return bone;
  }
  ~Bone() override; // = default

  Type type() const override;
  void addToSkeleton(const BonePtr& newBone);

{'fraction_non_alphanumeric': 0.11681018345189068, 'fraction_numerical': 0.0, 'mean_word_length': 3.3731587561374794, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 29, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5272994', 'n_tokens_mistral': 923, 'n_tokens_neox': 858, 'n_words': 187}