Add ability to specify a material assignment to a mesh asset.
This extends both the spec and the XML definition to allow specification of a material name on a mesh. This material acts as a fallback in the case that the referencing geom element does not specify a material of it's own. PiperOrigin-RevId: 798232378 Change-Id: Iaf300c727732744ea1b613e64334ee505ac6e209
This commit is contained in:
committed by
Copybara-Service
parent
42d8454555
commit
1fb1810b07
@@ -3365,7 +3365,12 @@ void mjCGeom::ComputeAABB(void) {
|
||||
mjuu_copyvec(aabb+3, size, 3);
|
||||
}
|
||||
|
||||
|
||||
const std::string& mjCGeom::get_material() const {
|
||||
if (mesh && spec_material_.empty()) {
|
||||
return mesh->Material();
|
||||
}
|
||||
return spec_material_;
|
||||
}
|
||||
|
||||
// compiler
|
||||
void mjCGeom::Compile(void) {
|
||||
|
||||
Reference in New Issue
Block a user