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

Method SetInteractionState

Interaction/Widgets/vtkBoxRepresentation.cxx:1554–1591  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1552
1553//------------------------------------------------------------------------------
1554void vtkBoxRepresentation::SetInteractionState(int state)
1555{
1556 // Clamp to allowable values
1557 state = std::min<int>(
1558 std::max<int>(state, vtkBoxRepresentation::Outside), vtkBoxRepresentation::Scaling);
1559
1560 // Depending on state, highlight appropriate parts of representation
1561 int handle;
1562 this->InteractionState = state;
1563 switch (state)
1564 {
1565 case vtkBoxRepresentation::MoveF0:
1566 case vtkBoxRepresentation::MoveF1:
1567 case vtkBoxRepresentation::MoveF2:
1568 case vtkBoxRepresentation::MoveF3:
1569 case vtkBoxRepresentation::MoveF4:
1570 case vtkBoxRepresentation::MoveF5:
1571 this->HighlightOutline(0);
1572 handle = this->HighlightHandle(this->CurrentHandle);
1573 this->HighlightFace(handle);
1574 break;
1575 case vtkBoxRepresentation::Rotating:
1576 this->HighlightOutline(0);
1577 this->HighlightHandle(nullptr);
1578 this->HighlightFace(this->HexPicker->GetCellId());
1579 break;
1580 case vtkBoxRepresentation::Translating:
1581 case vtkBoxRepresentation::Scaling:
1582 this->HighlightOutline(1);
1583 this->HighlightHandle(this->Handle[6]);
1584 this->HighlightFace(-1);
1585 break;
1586 default:
1587 this->HighlightOutline(0);
1588 this->HighlightHandle(nullptr);
1589 this->HighlightFace(-1);
1590 }
1591}
1592
1593//------------------------------------------------------------------------------
1594double* vtkBoxRepresentation::GetBounds()

Callers 15

SelectActionMethod · 0.45
ScaleActionMethod · 0.45
EndSelectActionMethod · 0.45
SelectActionMethod · 0.45
SelectAction3DMethod · 0.45
TranslateActionMethod · 0.45
ScaleActionMethod · 0.45
MoveActionMethod · 0.45
MovePlaneActionMethod · 0.45
TranslateActionMethod · 0.45
ScaleActionMethod · 0.45
SelectActionMethod · 0.45

Calls 4

HighlightOutlineMethod · 0.95
HighlightHandleMethod · 0.95
HighlightFaceMethod · 0.95
GetCellIdMethod · 0.45

Tested by

no test coverage detected