// Add transparency
Handle(StepVisual_SurfaceStyleTransparent) aTransparent = new StepVisual_SurfaceStyleTransparent;
aTransparent->Init(myTransparency);
-
- StepVisual_RenderingPropertiesSelect aRPS;
- aRPS.SetValue(aTransparent);
- aProps->SetValue(aPropIndex++, aRPS);
+ aProps->ChangeValue(aPropIndex++).SetValue(aTransparent);
// Add the appropriate reflectance model based on what we have
if (hasAmbientOnly)
new StepVisual_SurfaceStyleReflectanceAmbient;
aAmbient->Init(myAmbientReflectance.first);
- StepVisual_RenderingPropertiesSelect aRPS;
- aRPS.SetValue(aAmbient);
- aProps->SetValue(aPropIndex++, aRPS);
+ aProps->ChangeValue(aPropIndex++).SetValue(aAmbient);
}
else if (hasDiffuseAndAmbient)
{
new StepVisual_SurfaceStyleReflectanceAmbientDiffuse;
aAmbientDiffuse->Init(myAmbientReflectance.first, myDiffuseReflectance.first);
- StepVisual_RenderingPropertiesSelect aRPS;
- aRPS.SetValue(aAmbientDiffuse);
- aProps->SetValue(aPropIndex++, aRPS);
+ aProps->ChangeValue(aPropIndex++).SetValue(aAmbientDiffuse);
}
else if (hasFullReflectance)
{
mySpecularExponent.first,
STEPConstruct_Styles::EncodeColor(mySpecularColour.first));
- StepVisual_RenderingPropertiesSelect aRPS;
- aRPS.SetValue(aFullRefl);
- aProps->SetValue(aPropIndex++, aRPS);
+ aProps->ChangeValue(aPropIndex++).SetValue(aFullRefl);
}
// Create STEP surface style rendering with properties
// Use surface color as the base diffuse color
aMaterial.DiffuseColor = mySurfaceColor;
- aMaterial.Transparency = myTransparency;
+ aMaterial.Transparency = static_cast<float>(myTransparency);
aMaterial.IsDefined = Standard_True;
// Set default values for other properties
{
for (Standard_Integer i = 1; i <= aProperties->Length(); i++)
{
- StepVisual_RenderingPropertiesSelect aPropSelect = aProperties->Value(i);
+ const StepVisual_RenderingPropertiesSelect& aPropSelect = aProperties->Value(i);
// Check for transparency
Handle(StepVisual_SurfaceStyleTransparent) aTransparent =