本文整理汇总了C++中IProperty::IsNull方法的典型用法代码示例。如果您正苦于以下问题:C++ IProperty::IsNull方法的具体用法?C++ IProperty::IsNull怎么用?C++ IProperty::IsNull使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IProperty
的用法示例。
在下文中一共展示了IProperty::IsNull方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Stop
RESULT
Animation::BindTo( IProperty& property )
{
RESULT rval = S_OK;
if (property.IsNull())
{
SAFE_DELETE(m_pTargetProperty);
m_isBoundToProperty = false;
Stop();
goto Exit;
}
if (property.GetType() != m_propertyType)
{
RETAILMSG(ZONE_ERROR, "ERROR: Animation::BindTo( \"%s\", 0x%x ): target Property type 0x%x incorrect for this Animation",
m_name.c_str(), (UINT32)&property, property.GetType());
rval = E_INVALID_OPERATION;
goto Exit;
}
SAFE_DELETE(m_pTargetProperty);
m_pTargetProperty = property.Clone();
m_isBoundToProperty = true;
if (m_relativeToCurrentState)
{
// Save the target Property into our m_startingValue.
// Keyframes will be interpolated, then added to m_startingValue to produce the final result.
switch (m_keyFrameType)
{
case KEYFRAME_TYPE_UINT32:
m_startingValue.SetIntValue( m_pTargetProperty->GetInteger() );
break;
case KEYFRAME_TYPE_FLOAT:
m_startingValue.SetFloatValue( m_pTargetProperty->GetFloat() );
break;
case KEYFRAME_TYPE_VEC2:
m_startingValue.SetVec2Value( m_pTargetProperty->GetVec2() );
break;
case KEYFRAME_TYPE_VEC3:
m_startingValue.SetVec3Value( m_pTargetProperty->GetVec3() );
break;
case KEYFRAME_TYPE_VEC4:
m_startingValue.SetVec4Value( m_pTargetProperty->GetVec4() );
break;
case KEYFRAME_TYPE_COLOR:
m_startingValue.SetColorValue( m_pTargetProperty->GetColor() );
break;
default:
DEBUGCHK(0);
break;
}
}
Exit:
return rval;
}