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

Method BuildRepresentation

Interaction/Widgets/vtkCoordinateFrameRepresentation.cxx:1487–1532  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1485
1486//------------------------------------------------------------------------------
1487void vtkCoordinateFrameRepresentation::BuildRepresentation()
1488{
1489 if (!this->Renderer || !this->Renderer->GetRenderWindow())
1490 {
1491 return;
1492 }
1493
1494 vtkInformation* info = this->GetPropertyKeys();
1495 this->OriginSphereActor->SetPropertyKeys(info);
1496 this->XVectorLineActor->SetPropertyKeys(info);
1497 this->XVectorConeActor->SetPropertyKeys(info);
1498 this->LockerXVectorConeActor->SetPropertyKeys(info);
1499 this->YVectorLineActor->SetPropertyKeys(info);
1500 this->YVectorConeActor->SetPropertyKeys(info);
1501 this->LockerYVectorConeActor->SetPropertyKeys(info);
1502 this->ZVectorLineActor->SetPropertyKeys(info);
1503 this->ZVectorConeActor->SetPropertyKeys(info);
1504 this->LockerZVectorConeActor->SetPropertyKeys(info);
1505
1506 if (this->GetMTime() > this->BuildTime)
1507 {
1508 double* origin = this->GetOrigin();
1509
1510 // Set up the position handle
1511 this->OriginSphereSource->SetCenter(origin);
1512 this->XVectorLineSource->SetPoint1(origin);
1513 this->XVectorConeSource->SetDirection(this->GetXVectorNormal());
1514 this->LockerXVectorConeSource->SetDirection(this->GetXVectorNormal());
1515 this->YVectorLineSource->SetPoint1(origin);
1516 this->YVectorConeSource->SetDirection(this->GetYVectorNormal());
1517 this->LockerYVectorConeSource->SetDirection(this->GetYVectorNormal());
1518 this->ZVectorLineSource->SetPoint1(origin);
1519 this->ZVectorConeSource->SetDirection(this->GetZVectorNormal());
1520 this->LockerZVectorConeSource->SetDirection(this->GetZVectorNormal());
1521 }
1522
1523 if (this->GetMTime() > this->BuildTime ||
1524 this->Renderer->GetRenderWindow()->GetMTime() > this->BuildTime ||
1525 (this->Renderer->GetActiveCamera() &&
1526 this->Renderer->GetActiveCamera()->GetMTime() > this->BuildTime))
1527
1528 {
1529 this->SizeHandles();
1530 this->BuildTime.Modified();
1531 }
1532}
1533
1534//------------------------------------------------------------------------------
1535void vtkCoordinateFrameRepresentation::SizeHandles()

Callers 13

GetBoundsMethod · 0.95
RenderOpaqueGeometryMethod · 0.95
ModifyingLockerMethod · 0.95
TranslateOriginMethod · 0.95
PlaceWidgetMethod · 0.95
SetOriginMethod · 0.95
SetNormalMethod · 0.95
SetDirectionMethod · 0.95
UpdatePlacementMethod · 0.95
ResetAxesMethod · 0.95
PickOriginMethod · 0.95

Calls 9

SizeHandlesMethod · 0.95
GetActiveCameraMethod · 0.80
GetRenderWindowMethod · 0.45
GetMTimeMethod · 0.45
GetOriginMethod · 0.45
SetCenterMethod · 0.45
SetPoint1Method · 0.45
SetDirectionMethod · 0.45
ModifiedMethod · 0.45

Tested by

no test coverage detected