MCPcopy Create free account
hub / github.com/Kitware/VTK / BuildRepresentation

Method BuildRepresentation

Interaction/Widgets/vtkTexturedButtonRepresentation.cxx:297–329  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

295
296//------------------------------------------------------------------------------
297void 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//------------------------------------------------------------------------------
332void vtkTexturedButtonRepresentation::ShallowCopy(vtkProp* prop)

Calls 8

GetVTKWindowMethod · 0.80
GetActiveCameraMethod · 0.80
GetMTimeMethod · 0.45
SetCameraMethod · 0.45
findMethod · 0.45
endMethod · 0.45
SetInputDataMethod · 0.45
ModifiedMethod · 0.45

Tested by

no test coverage detected