How to create a control in C++ (Tutorial)
by Abdiel Jaramillo · 02/16/2009 (2:40 am) · 2 comments
I recently needed to create a control to display graphs and decided to investigate the C++ engine source code. And as it turned out it is not that hard. So I wonder if some of you guys are interested in a tutorial about this.
Here is a snapshot of a simulation where I use the control (an early version).

Example of script code to add data to the graph:
Please let me know what you think.
Here is a snapshot of a simulation where I use the control (an early version).

Example of script code to add data to the graph:
function clientCmdOnDataLineReceived(%dataPos, %dataVel)
{
tlBallPos.addRow(0, %dataPos);
tlBallVel.addRow(0, %dataVel);
[b]DataGraph.addPoint(getWord(%dataPos,0)/1000, getWord(%dataPos,3))[/b];
}Please let me know what you think.
Torque 3D Owner Jeff Johnston