MCPcopy Create free account
hub / github.com/OctoMap/octomap / SelectionBox

Method SelectionBox

octovis/src/SelectionBox.cpp:32–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30namespace octomap{
31
32SelectionBox::SelectionBox()
33: m_visible(false),
34 m_minPt(0,0,0), m_maxPt(1,1,1),
35 m_arrowLength(0.2)
36{
37
38
39
40 for (unsigned i=0; i< 3; ++i){
41 m_frames.push_back(new qglviewer::ManipulatedFrame());
42 }
43
44 for (unsigned i=0; i< 3; ++i){
45 m_frames.push_back(new qglviewer::ManipulatedFrame());
46 }
47
48 qglviewer::WorldConstraint* XAxis = new qglviewer::WorldConstraint();
49 XAxis->setTranslationConstraint(qglviewer::AxisPlaneConstraint::AXIS, qglviewer::Vec(1.0,0.0,0.0));
50 XAxis->setRotationConstraint (qglviewer::AxisPlaneConstraint::FORBIDDEN, qglviewer::Vec(0.0,0.0,0.0));
51
52 qglviewer::WorldConstraint* YAxis = new qglviewer::WorldConstraint();
53 YAxis->setTranslationConstraint(qglviewer::AxisPlaneConstraint::AXIS, qglviewer::Vec(0.0,1.0,0.0));
54 YAxis->setRotationConstraint (qglviewer::AxisPlaneConstraint::FORBIDDEN, qglviewer::Vec(0.0,0.0,0.0));
55
56 qglviewer::WorldConstraint* ZAxis = new qglviewer::WorldConstraint();
57 ZAxis->setTranslationConstraint(qglviewer::AxisPlaneConstraint::AXIS, qglviewer::Vec(0.0,0.0,1.0));
58 ZAxis->setRotationConstraint (qglviewer::AxisPlaneConstraint::FORBIDDEN, qglviewer::Vec(0.0,0.0,0.0));
59
60
61 frame(0)->setConstraint(XAxis);
62 frame(1)->setConstraint(YAxis);
63 frame(2)->setConstraint(ZAxis);
64 frame(3)->setConstraint(XAxis);
65 frame(4)->setConstraint(YAxis);
66 frame(5)->setConstraint(ZAxis);
67
68
69
70}
71
72SelectionBox::~SelectionBox(){
73 delete m_frames[0];

Callers

nothing calls this directly

Calls 4

VecFunction · 0.85
setRotationConstraintMethod · 0.80
push_backMethod · 0.45

Tested by

no test coverage detected