From f3474fb399550b41c377988363ccb048f3458cf9 Mon Sep 17 00:00:00 2001 From: Turo Lamminen Date: Sat, 27 Jan 2018 18:03:57 +0200 Subject: [PATCH] ASE: Add Mesh constructor which takes name --- code/ASEParser.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/code/ASEParser.h b/code/ASEParser.h index cfa01b5ad..71d87b6c3 100644 --- a/code/ASEParser.h +++ b/code/ASEParser.h @@ -321,6 +321,19 @@ struct Mesh : public MeshWithSmoothingGroups, public BaseNode iMaterialIndex = Face::DEFAULT_MATINDEX; } + + //! Construction from an existing name + explicit Mesh(const std::string &name) + : BaseNode (BaseNode::Mesh, name) + , iMaterialIndex(Face::DEFAULT_MATINDEX) + , bSkip (false) + { + // use 2 texture vertex components by default + for (unsigned int c = 0; c < AI_MAX_NUMBER_OF_TEXTURECOORDS;++c) + this->mNumUVComponents[c] = 2; + } + + //! List of all texture coordinate sets std::vector amTexCoords[AI_MAX_NUMBER_OF_TEXTURECOORDS];