The MarkupModel enables the user to draw custom markup figures and texts into the model.
Markup can, for instance, be used to:
- Draw measure lines (distance/angle/...)
- Add annotations as labels
- Position 2D symbols in the model
This example loads the demo file and draws the models bounding box as a markup model in the view. The bounding box is draw as yellow lines.
cee::Str vtfxFile = TutorialUtils::testDataDir() +
"scoobs.vtfx";
if (!source->
open(vtfxFile))
{
return;
}
if (stateInfos.size() > 0)
{
int lastStateId = stateInfos[stateInfos.size() - 1].id();
}
part->add(p1, p2);
part->add(p2, p3);
part->add(p3, p4);
part->add(p4, p1);
part->add(p1, p5);
part->add(p2, p6);
part->add(p3, p7);
part->add(p4, p8);
part->add(p5, p6);
part->add(p6, p7);
part->add(p7, p8);
part->add(p8, p5);