MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / insertPlotPoint

Method insertPlotPoint

Engine/source/gui/editor/guiParticleGraphCtrl.cpp:358–384  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

356}
357
358void GuiParticleGraphCtrl::insertPlotPoint(S32 plotID, S32 i, Point2F v)
359{
360 //AssertFatal(plotID > -1 && plotID < MaxPlots, "Invalid plot specified!");
361
362 // Add the data and trim the vector...
363 mPlots[plotID].mGraphData.insert( i );
364 mPlots[plotID].mGraphData[ i ] = v;
365
366 if(mAutoMax == true)
367 {
368 // Keep record of maximum data value for scaling purposes.
369 if(v.y > mPlots[plotID].mGraphMax.y)
370 mPlots[plotID].mGraphMax.y = v.y;
371
372 if(v.x > mPlots[plotID].mGraphMax.x)
373 mPlots[plotID].mGraphMax.x = v.x;
374 }
375
376 // Argument Buffer.
377 char argBuffer[2][32];
378
379 dSprintf(argBuffer[0], 32, "%d", plotID);
380 dSprintf(argBuffer[1], 32, "%f %f", v.x, v.y);
381
382 // Call Scripts.
383 Con::executef(this, "onPlotPointInserted", argBuffer[0], argBuffer[1]);
384}
385
386S32 GuiParticleGraphCtrl::changePlotPoint(S32 plotID, S32 i, Point2F v)
387{

Callers 1

Calls 3

dSprintfFunction · 0.85
executefFunction · 0.85
insertMethod · 0.45

Tested by

no test coverage detected