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

Method update_derived_values

Engine/source/afx/util/afxPath.cpp:265–307  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

263}
264
265void afxPathData::update_derived_values()
266{
267 U32 num_rolls = (rolls != 0) ? num_points : 0;
268 U32 num_times = (times != 0) ? num_points : 0;
269
270 if (update_points)
271 {
272 derive_points_array();
273 update_points = false;
274 }
275
276 if (update_rolls || num_rolls != num_points)
277 {
278 derive_rolls_array();
279 update_rolls = false;
280 }
281
282 if (update_times || num_times != num_points)
283 {
284 derive_times_array();
285 update_times = false;
286 }
287
288 // CAUTION: The following block of code is fragile and tricky since it depends
289 // on the underlying structures defined by ImplementEnumType/EndImplementEnumType.
290 // This done because the enum text is parsed from a longer string.
291 if (loop_string != ST_NULLSTRING)
292 {
293 for (unsigned int i = 0; i < _afxPath3DLoopType::_sEnumTable.getNumValues(); i++)
294 {
295 if (dStricmp(_afxPath3DLoopType::_sEnumTable[i].mName, loop_string) == 0)
296 {
297 loop_type = _afxPath3DLoopType::_sEnumTable[i].mInt;
298 break;
299 }
300 }
301 }
302 else
303 {
304 loop_string = _afxPath3DLoopType::_sEnumTable[0].mName;
305 loop_type = _afxPath3DLoopType::_sEnumTable[0].mInt;
306 }
307}
308
309bool afxPathData::preload(bool server, String &errorStr)
310{

Callers

nothing calls this directly

Calls 2

dStricmpFunction · 0.85
getNumValuesMethod · 0.80

Tested by

no test coverage detected