| 69 | } |
| 70 | |
| 71 | void StaticGeometryNode::construct() |
| 72 | { |
| 73 | EntityNode::construct(); |
| 74 | |
| 75 | m_rotation.setIdentity(); |
| 76 | |
| 77 | // Observe common spawnarg changes |
| 78 | static_assert(std::is_base_of<sigc::trackable, RotationKey>::value); |
| 79 | static_assert(std::is_base_of<sigc::trackable, StaticGeometryNode>::value); |
| 80 | observeKey("origin", sigc::mem_fun(m_originKey, &OriginKey::onKeyValueChanged)); |
| 81 | observeKey("angle", sigc::mem_fun(m_rotationKey, &RotationKey::angleChanged)); |
| 82 | observeKey("rotation", sigc::mem_fun(m_rotationKey, &RotationKey::rotationChanged)); |
| 83 | observeKey("name", sigc::mem_fun(this, &StaticGeometryNode::nameChanged)); |
| 84 | |
| 85 | // Observe curve-related spawnargs |
| 86 | static_assert(std::is_base_of<sigc::trackable, CurveNURBS>::value); |
| 87 | static_assert(std::is_base_of<sigc::trackable, CurveCatmullRom>::value); |
| 88 | observeKey(curve_Nurbs, sigc::mem_fun(m_curveNURBS, &CurveNURBS::onKeyValueChanged)); |
| 89 | observeKey(curve_CatmullRomSpline, |
| 90 | sigc::mem_fun(m_curveCatmullRom, &CurveCatmullRom::onKeyValueChanged)); |
| 91 | |
| 92 | updateIsModel(); |
| 93 | |
| 94 | m_curveNURBS.signal_curveChanged().connect( |
| 95 | sigc::mem_fun(_nurbsEditInstance, &CurveEditInstance::curveChanged) |
| 96 | ); |
| 97 | m_curveCatmullRom.signal_curveChanged().connect( |
| 98 | sigc::mem_fun(_catmullRomEditInstance, &CurveEditInstance::curveChanged) |
| 99 | ); |
| 100 | } |
| 101 | |
| 102 | void StaticGeometryNode::onVisibilityChanged(bool isVisibleNow) |
| 103 | { |
no test coverage detected