本文整理汇总了C++中Animatable::SuperClassID方法的典型用法代码示例。如果您正苦于以下问题:C++ Animatable::SuperClassID方法的具体用法?C++ Animatable::SuperClassID怎么用?C++ Animatable::SuperClassID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Animatable
的用法示例。
在下文中一共展示了Animatable::SuperClassID方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SvCanConcludeLink
bool OrientConstRotation::SvCanConcludeLink(IGraphObjectManager *gom, IGraphNode *gNode, IGraphNode *gNodeChild)
{
if(GetLocked()==false)
{
Animatable *pChildAnim = gNodeChild->GetAnim();
if( pChildAnim->SuperClassID() == BASENODE_CLASS_ID )
return true;
return Control::SvCanConcludeLink(gom, gNode, gNodeChild);
}
return false;
}
示例2: SvLinkChild
bool OrientConstRotation::SvLinkChild(IGraphObjectManager *gom, IGraphNode *gNodeThis, IGraphNode *gNodeChild)
{
if(GetLocked()==false)
{
Animatable *pChildAnim = gNodeChild->GetAnim();
if( pChildAnim->SuperClassID() == BASENODE_CLASS_ID ) {
if( AppendTarget( (INode*)pChildAnim ) ) {
NotifyDependents(FOREVER,PART_ALL,REFMSG_CHANGE);
GetCOREInterface()->RedrawViews(GetCOREInterface()->GetTime());
return true;
}
}
return Control::SvLinkChild(gom, gNodeThis, gNodeChild);
}
return false;
}
示例3: Apply
void RandKeysUtil::Apply()
{
BOOL timeMode = iu->GetMajorMode()==TVMODE_EDITTIME;
BOOL fcurveMode = iu->GetMajorMode()==TVMODE_EDITFCURVE;
Interval iv = iu->GetTimeSelection();
if (!doTime && !doVal) return;
theHold.Begin();
// Turn animation on
SuspendAnimate();
AnimateOn();
for (int i=0; i<iu->GetNumTracks(); i++) {
if ((timeMode||fcurveMode) && !iu->IsSelected(i)) continue;
// Get Interfaces
Animatable *anim = iu->GetAnim(i);
Animatable *client = iu->GetClient(i);
int subNum = iu->GetSubNum(i);
Control *cont = GetControlInterface(anim);
IKeyControl *ikc = GetKeyControlInterface(anim);
IKey *key = GetKeyPointer(anim->SuperClassID(),anim->ClassID());
if (!ikc || !cont || !key) continue;
if (fcurveMode && !anim->IsCurveSelected()) continue;
// Get the param dim
float min = negVal, max = posVal;
ParamDimension *dim = client->GetParamDimension(subNum);
if (dim) {
min = dim->UnConvert(min);
max = dim->UnConvert(max);
}
for (int j=0; j<ikc->GetNumKeys(); j++) {
// Get the key data
ikc->GetKey(j,key);
// Check if it's selected
if (timeMode && !iv.InInterval(key->time)) continue;
if (!timeMode && !(key->flags&IKEY_SELECTED)) continue;
// Randomize time
if (doTime) {
key->time = (int)CompRand(
float(key->time-negTime),
float(key->time+posTime));
ikc->SetKey(j,key);
}
}
if (doTime) ikc->SortKeys();
for (j=0; j<ikc->GetNumKeys(); j++) {
// Get the key data
ikc->GetKey(j,key);
// Check if it's selected
if (timeMode && !iv.InInterval(key->time)) continue;
if (!timeMode && !(key->flags&IKEY_SELECTED)) continue;
// Randomize value
if (doVal) {
Point3 pt, ang;
Point4 p4;
float f;
Quat q;
ScaleValue s;
BOOL doX, doY, doZ, doW;
doX = doY = doZ = doW = TRUE;
if (!fcurveMode) {
if (!(key->flags&IKEY_XSEL)) doX = FALSE;
if (!(key->flags&IKEY_YSEL)) doY = FALSE;
if (!(key->flags&IKEY_ZSEL)) doZ = FALSE;
if (!(key->flags&IKEY_WSEL)) doW = FALSE;
}
switch (anim->SuperClassID()) {
case CTRL_FLOAT_CLASS_ID:
cont->GetValue(key->time,&f,FOREVER);
f = CompRand(f-min,f+max);
cont->SetValue(key->time,&f);
break;
case CTRL_POSITION_CLASS_ID:
case CTRL_POINT3_CLASS_ID:
cont->GetValue(key->time,&pt,FOREVER);
if (doX) pt.x = CompRand(pt.x-min,pt.x+max);
if (doY) pt.y = CompRand(pt.y-min,pt.y+max);
if (doZ) pt.z = CompRand(pt.z-min,pt.z+max);
cont->SetValue(key->time,&pt);
break;
case CTRL_POINT4_CLASS_ID:
cont->GetValue(key->time,&p4,FOREVER);
if (doX) p4.x = CompRand(p4.x-min,p4.x+max);
if (doY) p4.y = CompRand(p4.y-min,p4.y+max);
if (doZ) p4.z = CompRand(p4.z-min,p4.z+max);
if (doW) p4.w = CompRand(p4.w-min,p4.w+max);
cont->SetValue(key->time,&p4);
//.........这里部分代码省略.........