| 219 | } |
| 220 | |
| 221 | void Path::updatePath() |
| 222 | { |
| 223 | // If we need to, allocate a path index from the manager |
| 224 | if (mPathIndex == NoPathIndex) |
| 225 | mPathIndex = gServerPathManager->allocatePathId(); |
| 226 | |
| 227 | sortMarkers(); |
| 228 | |
| 229 | Vector<Point3F> positions; |
| 230 | Vector<QuatF> rotations; |
| 231 | Vector<U32> times; |
| 232 | Vector<U32> smoothingTypes; |
| 233 | |
| 234 | for (iterator itr = begin(); itr != end(); itr++) |
| 235 | { |
| 236 | Marker* pMarker = dynamic_cast<Marker*>(*itr); |
| 237 | if (pMarker != NULL) |
| 238 | { |
| 239 | Point3F pos; |
| 240 | pMarker->getTransform().getColumn(3, &pos); |
| 241 | positions.push_back(pos); |
| 242 | |
| 243 | QuatF rot; |
| 244 | rot.set(pMarker->getTransform()); |
| 245 | rotations.push_back(rot); |
| 246 | |
| 247 | times.push_back(pMarker->mMSToNext); |
| 248 | smoothingTypes.push_back(pMarker->mSmoothingType); |
| 249 | } |
| 250 | } |
| 251 | |
| 252 | gServerPathManager->updatePath(mPathIndex, positions, rotations, times, smoothingTypes, mIsLooping); |
| 253 | } |
| 254 | |
| 255 | void Path::addObject(SimObject* obj) |
| 256 | { |
no test coverage detected