📄 classpath.html
字号:
<td class="mdname1" valign="top" nowrap> <em>length</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Add a line segment of the specified length. <p>The direction of motion will remain the same as it was at the end of the last added segment. If this is the first segment added to the path, then the direction will be positive motion in the first axis.<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>length</em> </td><td>The length of the line segment to add. </td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>An error object or null on success</dd></dl> </td> </tr></table><a class="anchor" name="a7"></a><!-- doxytag: member="Path::AddLine" ref="a7" args="(PointN &p)" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">virtual const <a class="el" href="classError.html">Error</a>* AddLine </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="classPointN.html">PointN</a> & </td> <td class="mdname1" valign="top" nowrap> <em>p</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Add a line segment from the current position to the specified point. <p>The direction of motion required to move from the current position to the given point will be compared to the direction of motion at the end of the last segment. If these directions change then the addition of this new point will require an abrupt change of direction. In this case, the initial velocity will be set to zero.<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>p</em> </td><td>The point to move to. </td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>An error object or null on success</dd></dl> </td> </tr></table><a class="anchor" name="a12"></a><!-- doxytag: member="Path::GetDim" ref="a12" args="(void)" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">virtual int GetDim </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">void </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Get the dimension (i.e. <p>number of axes) of the path. <dl compact><dt><b>Returns:</b></dt><dd>The path dimension</dd></dl><p>Implements <a class="el" href="classLinkTrajectory.html#a2">LinkTrajectory</a>. </td> </tr></table><a class="anchor" name="a13"></a><!-- doxytag: member="Path::NextSegment" ref="a13" args="(uunit pos[], uunit vel[], uint8 &time)" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">virtual const <a class="el" href="classError.html">Error</a>* NextSegment </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="CML__Utils_8h.html#a11">uunit</a> </td> <td class="mdname" nowrap> <em>pos</em>[], </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap><a class="el" href="CML__Utils_8h.html#a11">uunit</a> </td> <td class="mdname" nowrap> <em>vel</em>[], </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap><a class="el" href="CML__Utils_8h.html#a6">uint8</a> & </td> <td class="mdname" nowrap> <em>time</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"><code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Get the next trajectory segment. <p>This method is called by the <a class="el" href="classLinkage.html">Linkage</a> object when as it passes the trajectory informatoin up to the amplifiers.<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>pos</em> </td><td>An array where the position values will be returned. This array will be at least D elements long, where D is the trajectory dimension as returned by <a class="el" href="classLinkTrajectory.html#a2">LinkTrajectory::GetDim()</a></td></tr> <tr><td valign="top"></td><td valign="top"><em>vel</em> </td><td>An array where the velocity values will be returned.</td></tr> <tr><td valign="top"></td><td valign="top"><em>time</em> </td><td>The segment time is returned here. This is in milliseconds and ranges from 1 to 255. If zero is returned, this is the last frame in the profile.</td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>A pointer to an error object on failure, or NULL on success.</dd></dl><p>Implements <a class="el" href="classLinkTrajectory.html#a4">LinkTrajectory</a>. </td> </tr></table><a class="anchor" name="a11"></a><!-- doxytag: member="Path::Pause" ref="a11" args="(double sec)" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">virtual const <a class="el" href="classError.html">Error</a>* Pause </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">double </td> <td class="mdname1" valign="top" nowrap> <em>sec</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Set the current velocity to 0 and pause for the specified amount of time. <p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>sec</em> </td><td>The time to pause (must be >= 0). Time is specified in seconds.</td></tr> </table></dl> </td> </tr></table><a class="anchor" name="a15"></a><!-- doxytag: member="Path::PlayPath" ref="a15" args="(double timeInc, double pos[], double vel[])" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">bool PlayPath </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">double </td> <td class="mdname" nowrap> <em>timeInc</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>double </td> <td class="mdname" nowrap> <em>pos</em>[], </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>double </td> <td class="mdname" nowrap> <em>vel</em>[]</td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Play back path data. <p>This method may be used to itterate through a path for display purposes.<p>Before starting a path playback, the path should be reset using the method <a class="el" href="classPath.html#a2">Path::Reset</a>.<p>Each call to this function will return position and velocity information for the current playback position in the path. It will then increment the playback position by the time value passed. When the end of the path is reached, the method will return true.<p>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -