int RawModel::AddNode()

in src/raw/RawModel.cpp [314:336]


int RawModel::AddNode(const long id, const char* name, const long parentId) {
  assert(name[0] != '\0');

  for (size_t i = 0; i < nodes.size(); i++) {
    if (nodes[i].id == id) {
      return (int)i;
    }
  }

  RawNode joint;
  joint.isJoint = false;
  joint.id = id;
  joint.name = name;
  joint.parentId = parentId;
  joint.surfaceId = 0;
  joint.lightIx = -1;
  joint.translation = Vec3f(0, 0, 0);
  joint.rotation = Quatf(0, 0, 0, 1);
  joint.scale = Vec3f(1, 1, 1);

  nodes.emplace_back(joint);
  return (int)nodes.size() - 1;
}