INNER CODE UNIT · C++

col

mosra/magnum-integration · src/Magnum/DartIntegration/ConvertShapeNode.cpp:95

        Eigen::Vector4d col = shapeNode.getVisualAspect()->getRGBA();

        /* Get diffuse color from Dart ShapeNode */
        arrayAppend(nodeMaterialAttributes, InPlaceInit,
            Trade::MaterialAttribute::DiffuseColor,
            Color4(col(0), col(1), col(2), col(3)));

        /* Remove specular color from soft bodies (otherwise the default would
           be white) */
        if(shape->getType() == dart::dynamics::SoftMeshShape::getStaticType())
            arrayAppend(nodeMaterialAttributes, InPlaceInit,
                Trade::MaterialAttribute::SpecularColor, 0x00000000_rgbaf);
    }

    /* Larger shininess than the default to make things look less plastic */
    arrayAppend(nodeMaterialAttributes, InPlaceInit,
        Trade::MaterialAttribute::Shininess, 2000.0f);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…