本文整理汇总了C++中Stage::ClearSegList方法的典型用法代码示例。如果您正苦于以下问题:C++ Stage::ClearSegList方法的具体用法?C++ Stage::ClearSegList怎么用?C++ Stage::ClearSegList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Stage
的用法示例。
在下文中一共展示了Stage::ClearSegList方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CreatePath1_2
int CreatePath1_2()
{
int res;
//
//Clear the segment list and initialize the starting point for the path
//
g_stage.ClearSegList(3.0, 0.0, 0.0); //Clear the segment list and set the
// starting point for the path
// at X = 5, Y = 0, Z = 0
//
//Add line and arc segments to the path module's segment list for first move
//
res = g_stage.AddLineSeg(0.0, 0.0, 0.0); //Add a segment to move to x=0, y=2, z=0
if (res<0) return -1;
}
示例2: CreatePath1A_XOffset
int CreatePath1A_XOffset(double dX, double dY, double dZ)
{
int res;
//
//Clear the segment list and initialize the starting point for the path
//
g_stage.ClearSegList(dX, dY, dZ); //Clear the segment list and set the
// starting point for the path
// at X = 0, Y = 1, Z = 0
//
//Add line and arc segments to the path module's segment list for first move
//
res = g_stage.AddLineSeg(dX, dY+1.0, dZ+0.0); //Add a segment to move to x=0, y=2, z=0
if (res<0) return -1;
res = g_stage.AddArcSeg( dX+1.0, dY+2.0, dZ+0.0, //end point of arc: x=1, y=3, z=0
dX+1.0, dY+1.0, dZ+0.0, //center point of arc: x=1, y=2, z = 0
0.0, 0.0, -1.0 ); //normal vector to arc plane: x = 0, y = 0, z = -1
if (res<0) return -1;
res = g_stage.AddLineSeg(dX+2.0, dY+2.0, dZ+0.0); //line segment endpoint: x=4, y=3, z=0
if (res<0) return -1;
// ServoInf::m_pNMCServo->ClearSegList(4.0, 3.0, 0.0); //Clear the segment list and set the
// ExecutePath3Axis();
res = g_stage.AddArcSeg( dX+3.0, dY+1.0, dZ+0.0, //end point of arc: x=5, y=2, z=0
dX+2.0, dY+1.0, dZ+0.0, //center point of arc: x=4, y=2, z = 0
0.0, 0.0, -1.0 ); //normal vector to arc plane: x = 0, y = 0, z = -1
if (res<0) return -1;
res = g_stage.AddLineSeg(dX+3.0, dY+0.0, dZ+0.0); //line segment endpoint: x=5, y=0, z=0
if (res<0) return -1;
res = g_stage.AddStart(dX+3.0, dY+0.0, dZ+0.0); //line segment endpoint: x=5, y=0, z=0
if (res<0) return -1;
res = g_stage.AddLineSeg(dX+0.0, dY+0.0, dZ+0.0); //line segment endpoint: x=5, y=0, z=0
if (res<0) return -1;
}
示例3:
int CreateSplinePath ()
{
int res;
//
//Clear the segment list and initialize the starting point for the path
//
g_stage.ClearSegList(0.0, 0.0, 0.0); //Clear the segment list and set the
// starting point for the path
// at X = 0, Y = 1, Z = 0
//
//Add line and arc segments to the path module's segment list for first move
//
vector<double> CtrlPts;
SetControlPts(CtrlPts);
res = g_stage.AddSplineSeg(CtrlPts, 60, enCatmullRom); //Add a segment to move to x=0, y=2, z=0
if (res<0) return -1;
};
示例4: CreatePath1
int CreatePath1()
{
int res;
//
//Clear the segment list and initialize the starting point for the path
//
g_stage.ClearSegList(0.0, 0.0, 0.0); //Clear the segment list and set the
// starting point for the path
// at X = 0, Y = 1, Z = 0
//
//Add line and arc segments to the path module's segment list for first move
//
res = g_stage.AddLineSeg(0.0, 1.0, 0.0); //Add a segment to move to x=0, y=2, z=0
if (res<0) return -1;
res = g_stage.AddArcSeg( 1.0, 2.0, 0.0, //end point of arc: x=1, y=3, z=0
1.0, 1.0, 0.0, //center point of arc: x=1, y=2, z = 0
0.0, 0.0, -1.0 ); //normal vector to arc plane: x = 0, y = 0, z = -1
if (res<0) return -1;
res = g_stage.AddLineSeg(2.0, 2.0, 0.0); //line segment endpoint: x=4, y=3, z=0
if (res<0) return -1;
res = g_stage.AddArcSeg( 3.0, 1.0, 0.0, //end point of arc: x=5, y=2, z=0
2.0, 1.0, 0.0, //center point of arc: x=4, y=2, z = 0
0.0, 0.0, -1.0 ); //normal vector to arc plane: x = 0, y = 0, z = -1
if (res<0) return -1;
res = g_stage.AddLineSeg(3.0, 0.0, 0.0); //line segment endpoint: x=5, y=0, z=0
if (res<0) return -1;
}