Graphics.UsingTrails - lordmundi/wikidoctest GitHub Wiki
Using Trails
« EDGE Coneatron Plugin Reference | EDGE User’s Guide | Adding overlays (more advanced) »
Simple directions
- Use the "Trail-atron" GUI located at "Options→Trail-atron"
- Check the checkbox at the top of up to 3 trails to enable visibility of those trails.
- Configure up to 3 trails by settings which node to track, what reference to track it with respect to, color, etc. and hitting apply. You can hit "Reset" at any time to clear the stored points, and uncheck the checkbox at the top to retain the points, but not show the trail.
The Trail-atron GUI makes breadcrumbs easy.
More advanced usage
Sometimes configuring the trails via the GUI on each startup is not desired. You may need to script the trail parameters so that they are enabled by default each time you start, or so you can configure the trails on a remote machine.
To do that, use the dsp_trail plugin tcl commands.
Tcl Commands:
doug.plugin dsp_trail trail_number set/reset/get **-**command
reset acts the same as set except it empties the trail of points before processing the commands
trail_number : Determines the which trail will be modified. There are currently three trails available numbered 0, 1, and 2. frankie June 05, 2013, at 10:08 AM: Update: After EDGE version 2.3, this has been upgraded to 20 trails. See issue Issues.00441 for more info.
set/reset/get
-node_name name : Takes/Returns the name in the form of a string of the node to be tracked. If the node cannot be found the trail will be unchanged. If the node is found the points that tracked the last node will be deleted.
-ref_name name : Takes/Returns the name in the form of a string of the node to be used as a reference. If the node cannot be found the trail will be unchanged. If the node is found the points that tracked the last node will be deleted.
-distance #distance : Takes/Returns a float that determines how far the tracking node must be from the position of the last point to draw another point.
-enabled #enabled : Takes/Returns a 1 or 0. A 1 set the trail to be enabled and visible. A zero makes the trail invisible.
size #size : Takes/Returns a GL float that sets the size of the trail being drawn. The size can be form 1.0 to 10.0.
-max_samples #max : Takes/Returns in one argument as an integer. It sets the maximum number of points the trail will record before deleting points. If the trail has more than the new maximum then the extra points will be deleted when the next point is recorded.
-color #red #green #blue : Takes/Returns three arguments as integers. The integer's value must be from 0 to 254.
-add_point #x #y #z : Takes/Returns three arguments as floats. It adds a new point to the trail. The numbers determine the coordinates of the point in the trails frame of the reference node.
get
-num_points : Returns the number of points in the trail.
Examples:
doug.plugin dsp_trail 1 set -ref_name EARTH_CENTER -node_name SSREF -distance 10 -color 254 254 0 -enabled 1 -max_samples 5000
« EDGE Coneatron Plugin Reference | EDGE User’s Guide | Adding overlays (more advanced) »