Skip to content
Snippets Groups Projects
Commit e7811080 authored by Andrew Wilson's avatar Andrew Wilson :elephant:
Browse files

ENH: Option to not use a shading/lighting model

parent 65d662ba
No related branches found
No related tags found
No related merge requests found
......@@ -56,6 +56,7 @@ public:
/// surface shading model. Defaults to Phong
enum class ShadingModel
{
None, ///< Renders without shading, no lighting
Phong, ///< Phong shading model (default)
Gouraud, ///< Gouraud shading model (default)
Flat, ///< Flat shading model with no interpolation
......
......@@ -114,6 +114,7 @@ VTKPolyDataRenderDelegate::updateRenderProperties()
/*actorProperty->UseImageBasedLightingOn();
actorProperty->SetEnvironmentCubeMap(getVTKTexture(cubemap));*/
actorProperty->LightingOn();
actorProperty->SetInterpolationToPBR();
// configure the basic properties
......@@ -121,16 +122,23 @@ VTKPolyDataRenderDelegate::updateRenderProperties()
}
else if (material->getShadingModel() == RenderMaterial::ShadingModel::Phong)
{
actorProperty->LightingOn();
actorProperty->SetInterpolationToPhong();
}
else if (material->getShadingModel() == RenderMaterial::ShadingModel::Gouraud)
{
actorProperty->LightingOn();
actorProperty->SetInterpolationToGouraud();
}
else
else if (material->getShadingModel() == RenderMaterial::ShadingModel::Flat)
{
actorProperty->LightingOn();
actorProperty->SetInterpolationToFlat();
}
else if (material->getShadingModel() == RenderMaterial::ShadingModel::None)
{
actorProperty->LightingOff();
}
// Display mode
switch (material->getDisplayMode())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment