本文整理汇总了C#中HTuple.TupleSelect方法的典型用法代码示例。如果您正苦于以下问题:C# HTuple.TupleSelect方法的具体用法?C# HTuple.TupleSelect怎么用?C# HTuple.TupleSelect使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HTuple
的用法示例。
在下文中一共展示了HTuple.TupleSelect方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: tuple_equal_greater
private void tuple_equal_greater(HTuple hv_Tuple,
HTuple hv_Threshold,
out HTuple hv_Selected,
out HTuple hv_Indices)
{
// Local control variables
HTuple hv_Sgn;
// Initialize local and output iconic variables
hv_Selected = new HTuple();
HOperatorSet.TupleSgn(hv_Tuple - hv_Threshold, out hv_Sgn);
HOperatorSet.TupleFind(hv_Sgn, 1, out hv_Indices);
if ((int)((new HTuple((new HTuple(hv_Indices.TupleLength())).TupleGreater(1))).TupleOr(
new HTuple(((hv_Indices.TupleSelect(0))).TupleNotEqual(-1)))) != 0)
{
HOperatorSet.TupleSelect(hv_Tuple, hv_Indices, out hv_Selected);
}
return;
}
示例2: disp_3d_coord_system
/// <summary>
/// Display the axes of a 3d coordinate system.
/// </summary>
private void disp_3d_coord_system(HTuple hv_WindowHandle,
HTuple hv_CamParam,
HTuple hv_Pose,
HTuple hv_CoordAxesLength)
{
// Local iconic variables
HObject ho_ContX, ho_ContY, ho_ContZ;
// Local control variables
HTuple hv_TransWorld2Cam, hv_OrigCamX, hv_OrigCamY;
HTuple hv_OrigCamZ, hv_Row0, hv_Column0, hv_X, hv_Y, hv_Z;
HTuple hv_RowAxX, hv_ColumnAxX, hv_RowAxY, hv_ColumnAxY;
HTuple hv_RowAxZ, hv_ColumnAxZ;
// Initialize local and output iconic variables
HOperatorSet.GenEmptyObj(out ho_ContX);
HOperatorSet.GenEmptyObj(out ho_ContY);
HOperatorSet.GenEmptyObj(out ho_ContZ);
if ((int)(new HTuple((new HTuple(hv_Pose.TupleLength())).TupleNotEqual(7))) != 0)
{
ho_ContX.Dispose();
ho_ContY.Dispose();
ho_ContZ.Dispose();
return;
}
if ((int)(new HTuple(((hv_Pose.TupleSelect(5))).TupleEqual(0.0))) != 0)
{
ho_ContX.Dispose();
ho_ContY.Dispose();
ho_ContZ.Dispose();
return;
}
HOperatorSet.PoseToHomMat3d(hv_Pose, out hv_TransWorld2Cam);
//Project the world origin into the image
HOperatorSet.AffineTransPoint3d(hv_TransWorld2Cam, 0, 0, 0, out hv_OrigCamX,
out hv_OrigCamY, out hv_OrigCamZ);
HOperatorSet.Project3dPoint(hv_OrigCamX, hv_OrigCamY, hv_OrigCamZ, hv_CamParam,
out hv_Row0, out hv_Column0);
//Project the coordinate axes into the image
HOperatorSet.AffineTransPoint3d(hv_TransWorld2Cam, hv_CoordAxesLength, 0, 0,
out hv_X, out hv_Y, out hv_Z);
HOperatorSet.Project3dPoint(hv_X, hv_Y, hv_Z, hv_CamParam, out hv_RowAxX, out hv_ColumnAxX);
HOperatorSet.AffineTransPoint3d(hv_TransWorld2Cam, 0, hv_CoordAxesLength, 0,
out hv_X, out hv_Y, out hv_Z);
HOperatorSet.Project3dPoint(hv_X, hv_Y, hv_Z, hv_CamParam, out hv_RowAxY, out hv_ColumnAxY);
HOperatorSet.AffineTransPoint3d(hv_TransWorld2Cam, 0, 0, hv_CoordAxesLength,
out hv_X, out hv_Y, out hv_Z);
HOperatorSet.Project3dPoint(hv_X, hv_Y, hv_Z, hv_CamParam, out hv_RowAxZ, out hv_ColumnAxZ);
ho_ContX.Dispose();
gen_arrow_cont(out ho_ContX, hv_Row0, hv_Column0, hv_RowAxX, hv_ColumnAxX);
ho_ContY.Dispose();
gen_arrow_cont(out ho_ContY, hv_Row0, hv_Column0, hv_RowAxY, hv_ColumnAxY);
ho_ContZ.Dispose();
gen_arrow_cont(out ho_ContZ, hv_Row0, hv_Column0, hv_RowAxZ, hv_ColumnAxZ);
if (HDevWindowStack.IsOpen())
{
//dev_display (ContX)
}
if (HDevWindowStack.IsOpen())
{
//dev_display (ContY)
}
if (HDevWindowStack.IsOpen())
{
//dev_display (ContZ)
}
HOperatorSet.DispObj(ho_ContX, hv_WindowHandle);
HOperatorSet.DispObj(ho_ContY, hv_WindowHandle);
HOperatorSet.DispObj(ho_ContZ, hv_WindowHandle);
HOperatorSet.SetTposition(hv_WindowHandle, hv_RowAxX + 3, hv_ColumnAxX + 3);
HOperatorSet.WriteString(hv_WindowHandle, "X");
HOperatorSet.SetTposition(hv_WindowHandle, hv_RowAxY + 3, hv_ColumnAxY + 3);
HOperatorSet.WriteString(hv_WindowHandle, "Y");
HOperatorSet.SetTposition(hv_WindowHandle, hv_RowAxZ + 3, hv_ColumnAxZ + 3);
HOperatorSet.WriteString(hv_WindowHandle, "Z");
ho_ContX.Dispose();
ho_ContY.Dispose();
ho_ContZ.Dispose();
return;
}