MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / updatePath

Method updatePath

Engine/source/scene/simPath.cpp:221–253  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219}
220
221void 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
255void Path::addObject(SimObject* obj)
256{

Callers 2

simPath.cppFile · 0.45
inspectPostApplyMethod · 0.45

Calls 7

beginFunction · 0.85
endFunction · 0.85
allocatePathIdMethod · 0.80
getColumnMethod · 0.80
getTransformMethod · 0.45
push_backMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected