mirror of
https://github.com/bulletphysics/bullet3
synced 2024-12-14 05:40:05 +00:00
Check diffuse field in sdf.
This commit is contained in:
parent
7d5dea1bac
commit
d51320be2c
@ -496,14 +496,16 @@ bool UrdfParser::parseVisual(UrdfModel& model, UrdfVisual& visual, TiXmlElement*
|
|||||||
{
|
{
|
||||||
UrdfMaterial* matPtr = new UrdfMaterial;
|
UrdfMaterial* matPtr = new UrdfMaterial;
|
||||||
matPtr->m_name = "mat";
|
matPtr->m_name = "mat";
|
||||||
std::string diffuseText = mat->FirstChildElement("diffuse")->GetText();
|
TiXmlElement *diffuse = mat->FirstChildElement("diffuse");
|
||||||
btVector4 rgba(1,0,0,1);
|
if (diffuse) {
|
||||||
parseVector4(rgba,diffuseText);
|
std::string diffuseText = diffuse->GetText();
|
||||||
matPtr->m_rgbaColor = rgba;
|
btVector4 rgba(1,0,0,1);
|
||||||
matPtr->m_textureFilename = "textureTest.png";
|
parseVector4(rgba,diffuseText);
|
||||||
model.m_materials.insert(matPtr->m_name.c_str(),matPtr);
|
matPtr->m_rgbaColor = rgba;
|
||||||
visual.m_materialName = "mat";
|
model.m_materials.insert(matPtr->m_name.c_str(),matPtr);
|
||||||
visual.m_hasLocalMaterial = true;
|
visual.m_materialName = "mat";
|
||||||
|
visual.m_hasLocalMaterial = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user