-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Closed
Labels
bugNot a build issue, this is likely a bug.Not a build issue, this is likely a bug.
Description
Checklist
- I have searched for similar issues.
- For Python issues, I have tested with the latest development wheel.
- I have checked the release documentation and the latest documentation (for
master
branch).
Describe the issue
The triangle_material_ids_ vector contain indices for which texture should be applied. However because materials are stored in an unordered_map, the indices cannot be used to access the corresponding material. It would be better to store a vector<pair<string, Material>> that way it is indexable, but materials could still be accessed by name using find with a lambda comparing names.
Steps to reproduce the bug
`class TriangleMesh {
...
std::unordered_map<std::string, Material> materials_;
/// List of material ids.
std::vector<int> triangle_material_ids_;
/// Textures of the image.
std::vector<Image> textures_;
}`
By examining the values with a debugger, the triangle_material_ids_ match up with the textures_ but there is no mechanism for accessing the material associated with it.
Error message
No response
Expected behavior
No response
Open3D, Python and System information
- Operating system: Ubuntu 22.04
- Python version: Python 3.11
- Open3D version: bbae9e31fefac1c2fe04759d30b81c30d927dbeb
- System architecture: x86
- Is this a remote workstation?: no
- How did you install Open3D?: build from source
- Compiler version (if built from source): gcc 11.3
Additional information
No response
Metadata
Metadata
Assignees
Labels
bugNot a build issue, this is likely a bug.Not a build issue, this is likely a bug.