Jump to content

Josh

Staff
  • Posts

    22,895
  • Joined

  • Last visited

Posts posted by Josh

  1. There are some questions that need to be decided.

    • How much info should a brush instance share with the original?
    • Should texture mapping be updated on a brush that came from a prefab?

    The behavior we are seeing right now is a result of not having decided these questions.

  2. I am starting to investigate the assimp library. Posting some code to come back to when I am ready to continue:

        Assimp::Importer importer;
        auto d = CurrentDir();
        auto path = d.ToUtf8String() + "/Models/xxxxxxxxx.gltf";
    
        const aiScene* scene = importer.ReadFile(path, 0);
    
        if (!scene || scene->mFlags & AI_SCENE_FLAGS_INCOMPLETE || !scene->mRootNode) {
            // Error handling if the file fails to load
            return -1;
        }
    
        auto node = scene->mRootNode;
        
        auto name = node->mName;
    
        // Process meshes attached to the current node (if any)
        for (unsigned int i = 0; i < node->mNumMeshes; i++)
        {
            aiMesh* mesh = scene->mMeshes[node->mMeshes[i]];
            // Process the mesh as needed
        }
    
        // Recursively process child nodes
        for (unsigned int i = 0; i < node->mNumChildren; i++)
        {
            
        }

     

    • Like 2
×
×
  • Create New...