------------------------------------------------------------------------------
| 295 | |
| 296 | //------------------------------------------------------------------------------ |
| 297 | void vtkTexturedButtonRepresentation::BuildRepresentation() |
| 298 | { |
| 299 | // The net effect is to resize the handle |
| 300 | if (this->GetMTime() > this->BuildTime || |
| 301 | (this->Renderer && this->Renderer->GetVTKWindow() && |
| 302 | this->Renderer->GetVTKWindow()->GetMTime() > this->BuildTime)) |
| 303 | { |
| 304 | // In case follower is being used |
| 305 | if (this->FollowCamera) |
| 306 | { |
| 307 | this->Follower->VisibilityOn(); |
| 308 | this->Actor->VisibilityOff(); |
| 309 | this->Follower->SetCamera(this->Renderer->GetActiveCamera()); |
| 310 | } |
| 311 | else |
| 312 | { |
| 313 | this->Follower->VisibilityOff(); |
| 314 | this->Actor->VisibilityOn(); |
| 315 | } |
| 316 | |
| 317 | vtkTextureArrayIterator iter = this->TextureArray->find(this->State); |
| 318 | if (iter != this->TextureArray->end()) |
| 319 | { |
| 320 | this->Texture->SetInputData((*iter).second); |
| 321 | } |
| 322 | else |
| 323 | { |
| 324 | this->Texture->SetInputData(nullptr); |
| 325 | } |
| 326 | |
| 327 | this->BuildTime.Modified(); |
| 328 | } |
| 329 | } |
| 330 | |
| 331 | //------------------------------------------------------------------------------ |
| 332 | void vtkTexturedButtonRepresentation::ShallowCopy(vtkProp* prop) |
no test coverage detected