本文整理汇总了C++中BL_ArmatureObject::NodeGetWorldPosition方法的典型用法代码示例。如果您正苦于以下问题:C++ BL_ArmatureObject::NodeGetWorldPosition方法的具体用法?C++ BL_ArmatureObject::NodeGetWorldPosition怎么用?C++ BL_ArmatureObject::NodeGetWorldPosition使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BL_ArmatureObject
的用法示例。
在下文中一共展示了BL_ArmatureObject::NodeGetWorldPosition方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Update
//.........这里部分代码省略.........
if (bPositiveEvent){
if (!(m_flag & ACT_FLAG_LOCKINPUT)){
m_flag &= ~ACT_FLAG_REVERSE;
m_flag |= ACT_FLAG_LOCKINPUT;
SetStartTime(curtime);
}
}
else if (bNegativeEvent){
m_flag |= ACT_FLAG_REVERSE;
m_flag &= ~ACT_FLAG_LOCKINPUT;
SetStartTime(curtime);
}
break;
case ACT_ACTION_PLAY:
if (bPositiveEvent){
if (!(m_flag & ACT_FLAG_LOCKINPUT)){
m_flag &= ~ACT_FLAG_REVERSE;
m_localtime = m_starttime;
m_starttime = curtime;
m_flag |= ACT_FLAG_LOCKINPUT;
}
}
break;
default:
break;
}
/* Perform increment */
if (keepgoing){
if (m_playtype == ACT_ACTION_MOTION){
MT_Point3 newpos;
MT_Point3 deltapos;
newpos = obj->NodeGetWorldPosition();
/* Find displacement */
deltapos = newpos-m_lastpos;
m_localtime += (length/m_stridelength) * deltapos.length();
m_lastpos = newpos;
}
else{
SetLocalTime(curtime);
}
}
/* Check if a wrapping response is needed */
if (length){
if (m_localtime < m_startframe || m_localtime > m_endframe)
{
m_localtime = m_startframe + fmod(m_localtime, length);
wrap = true;
}
}
else
m_localtime = m_startframe;
/* Perform post-increment tasks */
switch (m_playtype){
case ACT_ACTION_FROM_PROP:
{
CValue* propval = GetParent()->GetProperty(m_propname);
if (propval)
m_localtime = propval->GetNumber();
if (bNegativeEvent){
keepgoing=false;