本文整理汇总了C++中OutputPort::PutValue方法的典型用法代码示例。如果您正苦于以下问题:C++ OutputPort::PutValue方法的具体用法?C++ OutputPort::PutValue怎么用?C++ OutputPort::PutValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OutputPort
的用法示例。
在下文中一共展示了OutputPort::PutValue方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: gInvRotorderOp_Update
// Update =====================================================
CStatus gInvRotorderOp_Update( CRef& in_ctxt )
{
OperatorContext ctxt( in_ctxt );
// Inputs --------------------------------------------------------------
long iRotorder = ctxt.GetParameterValue(L"Rotorder");
long iOut = 0;
if(iRotorder == 0)
iOut = 5;
else if (iRotorder == 1)
iOut = 3;
else if (iRotorder == 2)
iOut = 4;
else if (iRotorder == 3)
iOut = 1;
else if (iRotorder == 4)
iOut = 2;
else if (iRotorder == 5)
iOut = 0;
OutputPort Out = ctxt.GetOutputPort();
Out.PutValue(iOut);
return CStatus::OK;
}
示例2: sn_inverseRotorder_op_Update
// Update =====================================================
CStatus sn_inverseRotorder_op_Update( CRef& in_ctxt )
{
OperatorContext ctxt( in_ctxt );
LONG rotorder = ctxt.GetParameterValue(L"rotorder");
LONG out_ro = 0;
if(rotorder == 0)
out_ro = 5;
else if (rotorder == 1)
out_ro = 3;
else if (rotorder == 2)
out_ro = 4;
else if (rotorder == 3)
out_ro = 1;
else if (rotorder == 4)
out_ro = 2;
else if (rotorder == 5)
out_ro = 0;
OutputPort Out = ctxt.GetOutputPort();
Out.PutValue(out_ro);
return CStatus::OK;
}
示例3: sn_curvelength_op_Update
///////////////////////////////////////////////////////////////
// CURVE LENGTH
///////////////////////////////////////////////////////////////
// Define =====================================================
XSIPLUGINCALLBACK CStatus sn_curvelength_op_Update( CRef& in_ctxt )
{
OperatorContext ctxt( in_ctxt );
// Inputs -----------------------------------------
Primitive crvprim(ctxt.GetInputValue(0));
NurbsCurveList crvlist(crvprim.GetGeometry());
NurbsCurve crv(crvlist.GetCurves().GetItem(0));
// KinematicState kCurve(ctxt.GetInputValue(2));
// CTransformation tCurve(kCurve.GetTransform());
// ------------------------------------------------
//CVector3 vScale(tCurve.GetScaling());
double length;
crv.GetLength(length);
OutputPort outPort = ctxt.GetOutputPort();
outPort.PutValue(length);
return CStatus::OK;
}