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

Method UpdatePaths

Rendering/Core/vtkAssembly.cxx:276–312  ·  view source on GitHub ↗

Build the assembly paths if necessary. UpdatePaths() is only called when the assembly is at the root of the hierarchy; otherwise UpdatePaths() is called.

Source from the content-addressed store, hash-verified

274// is only called when the assembly is at the root
275// of the hierarchy; otherwise UpdatePaths() is called.
276void vtkAssembly::UpdatePaths()
277{
278 if (this->GetMTime() > this->PathTime ||
279 (this->Paths != nullptr && this->Paths->GetMTime() > this->PathTime))
280 {
281 if (this->Paths)
282 {
283 this->Paths->Delete();
284 this->Paths = nullptr;
285 }
286
287 // Create the list to hold all the paths
288 this->Paths = vtkAssemblyPaths::New();
289 vtkAssemblyPath* path = vtkAssemblyPath::New();
290
291 // add ourselves to the path to start things off
292 path->AddNode(this, this->GetMatrix());
293
294 // Add nodes as we proceed down the hierarchy
295 vtkProp3D* prop3D;
296 vtkCollectionSimpleIterator pit;
297 for (this->Parts->InitTraversal(pit); (prop3D = this->Parts->GetNextProp3D(pit));)
298 {
299 path->AddNode(prop3D, prop3D->GetMatrix());
300
301 // dive into the hierarchy
302 prop3D->BuildPaths(this->Paths, path);
303
304 // when returned, pop the last node off of the
305 // current path
306 path->DeleteLastNode();
307 }
308
309 path->Delete();
310 this->PathTime.Modified();
311 }
312}
313
314// Build assembly paths from this current assembly. A path consists of
315// an ordered sequence of props, with transformations properly concatenated.

Callers 9

RenderOpaqueGeometryMethod · 0.95
GetActorsMethod · 0.95
GetVolumesMethod · 0.95
InitPathTraversalMethod · 0.95
GetNumberOfPathsMethod · 0.95
GetBoundsMethod · 0.95

Calls 10

GetMTimeMethod · 0.95
GetNextProp3DMethod · 0.80
NewFunction · 0.70
DeleteMethod · 0.65
AddNodeMethod · 0.45
GetMatrixMethod · 0.45
InitTraversalMethod · 0.45
BuildPathsMethod · 0.45
DeleteLastNodeMethod · 0.45
ModifiedMethod · 0.45

Tested by

no test coverage detected