| 95 | //---------------------------------------------------------------------------- |
| 96 | |
| 97 | bool PathShape::onAdd() |
| 98 | { |
| 99 | if(!Parent::onAdd() && !mDataBlock) |
| 100 | return false; |
| 101 | |
| 102 | mTypeMask |= PathShapeObjectType | StaticShapeObjectType; |
| 103 | // Initialize from the current transform. |
| 104 | if (!mNodeCount) { |
| 105 | QuatF rot(getTransform()); |
| 106 | Point3F pos = getPosition(); |
| 107 | mSpline.removeAll(); |
| 108 | mSpline.push_back(new CameraSpline::Knot(pos,rot,1, |
| 109 | CameraSpline::Knot::NORMAL, CameraSpline::Knot::SPLINE)); |
| 110 | mNodeCount = 1; |
| 111 | } |
| 112 | |
| 113 | if (isServerObject()) scriptOnAdd(); |
| 114 | return true; |
| 115 | |
| 116 | } |
| 117 | |
| 118 | void PathShape::onRemove() |
| 119 | { |
nothing calls this directly
no test coverage detected