Commit 65a3a817 authored by Ken Martin's avatar Ken Martin Committed by Kitware Robot
Browse files

Merge topic 'light-deep-copy'

54feb523 DeepCopy performs deep copy of vtkInformation and vtkMatrix4x4
7247c933

 vtkLight DeepCopy method copies all member data

Acked-by: default avatarKitware Robot <kwrobot@kitware.com>
Acked-by: default avatarKen Martin <ken.martin@kitware.com>
Merge-request: !4845
parents 71960a8c 54feb523
......@@ -249,6 +249,28 @@ void vtkLight::DeepCopy(vtkLight *light)
this->SetExponent(light->GetExponent());
this->SetConeAngle(light->GetConeAngle());
this->SetAttenuationValues(light->GetAttenuationValues());
this->SetLightType(light->GetLightType());
if (light->GetTransformMatrix())
{
vtkNew<vtkMatrix4x4> matrix4x4;
matrix4x4->DeepCopy( light->GetTransformMatrix() );
this->SetTransformMatrix(matrix4x4);
}
else
{
this->SetTransformMatrix(nullptr);
}
this->SetShadowAttenuation(light->GetShadowAttenuation());
if (light->GetInformation())
{
vtkNew<vtkInformation> info;
info->Copy(light->GetInformation(),1);
this->SetInformation(info);
}
else
{
this->SetInformation(nullptr);
}
}
void vtkLight::SetLightType(int type)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment