本文整理汇总了C++中CKBehavior::EnableInputParameter方法的典型用法代码示例。如果您正苦于以下问题:C++ CKBehavior::EnableInputParameter方法的具体用法?C++ CKBehavior::EnableInputParameter怎么用?C++ CKBehavior::EnableInputParameter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CKBehavior
的用法示例。
在下文中一共展示了CKBehavior::EnableInputParameter方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PBPhysicalizeCB
//************************************
// Method: PBPhysicalizeCB
// FullName: PBPhysicalizeCB
// Access: public
// Returns: CKERROR
// Qualifier:
// Parameter: const CKBehaviorContext& behcontext
//************************************
CKERROR PBPhysicalizeCB(const CKBehaviorContext& behcontext)
{
CKBehavior *beh = behcontext.Behavior;
switch(behcontext.CallbackMessage) {
case CKM_BEHAVIORATTACH:
case CKM_BEHAVIORLOAD:
case CKM_BEHAVIORSETTINGSEDITED:
{
DWORD useDWorld;
beh->GetLocalParameterValue(bbS_USE_DEFAULT_WORLD,&useDWorld);
beh->EnableInputParameter(bbI_TargetWorld,!useDWorld);
/*
DWORD useDWorldSS;
beh->GetLocalParameterValue(bbS_USE_WORLD_SLEEP_SETTINGS,&useDWorldSS);
beh->EnableInputParameter(bbI_SleepSettings,!useDWorldSS);
DWORD useDWorldDS;
beh->GetLocalParameterValue(bbS_USE_WORLD_DAMPING_SETTINGS,&useDWorldDS);
beh->EnableInputParameter(bbI_DampingSettings,!useDWorldDS);
*/
DWORD useDWorldM;
beh->GetLocalParameterValue(bbS_USE_WORLD_MATERIAL,&useDWorldM);
beh->EnableInputParameter(bbI_Material,!useDWorldM);
}
break;
}
return CKBR_OK;
}
示例2: PJRevoluteCB
//************************************
// Method: PJRevoluteCB
// FullName: PJRevoluteCB
// Access: public
// Returns: CKERROR
// Qualifier:
// Parameter: const CKBehaviorContext& behcontext
//************************************
CKERROR PJRevoluteCB(const CKBehaviorContext& behcontext)
{
CKBehavior *beh = behcontext.Behavior;
switch(behcontext.CallbackMessage) {
case CKM_BEHAVIORATTACH:
case CKM_BEHAVIORLOAD:
case CKM_BEHAVIORSETTINGSEDITED:
{
DWORD twistLimit;
beh->GetLocalParameterValue(1,&twistLimit);
beh->EnableInputParameter(bbI_HighLimit,twistLimit);
beh->EnableInputParameter(bbI_LowLimit,twistLimit);
DWORD springSwing;
beh->GetLocalParameterValue(0,&springSwing);
beh->EnableInputParameter(bbI_Spring,springSwing);
DWORD motor;
beh->GetLocalParameterValue(2,&motor);
beh->EnableInputParameter(bbI_Motor,motor);
break;
}
}
return CKBR_OK;
}
示例3: PWOverlapSphereCB
//************************************
// Method: PWOverlapSphereCB
// FullName: PWOverlapSphereCB
// Access: public
// Returns: CKERROR
// Qualifier:
// Parameter: const CKBehaviorContext& behcontext
//************************************
CKERROR PWOverlapSphereCB(const CKBehaviorContext& behcontext)
{
CKBehavior *beh = behcontext.Behavior;
switch(behcontext.CallbackMessage) {
case CKM_BEHAVIORATTACH:
case CKM_BEHAVIORLOAD:
case CKM_BEHAVIORSETTINGSEDITED:
{
DWORD groups;
beh->GetLocalParameterValue(bbS_Groups,&groups);
beh->EnableInputParameter(bbI_Groups,groups);
DWORD mask;
beh->GetLocalParameterValue(bbS_Mask,&mask);
beh->EnableInputParameter(bbI_Mask,mask);
}
break;
}
return CKBR_OK;
}
示例4: GeneralCameraOrbitCallback
CKERROR GeneralCameraOrbitCallback(const CKBehaviorContext& context)
{
CKBehavior* beh = context.Behavior;
switch(context.CallbackMessage)
{
case CKM_BEHAVIORCREATE:
case CKM_BEHAVIORLOAD:
{
VxVector InitialAngles(INF,INF,INF);
beh->SetLocalParameterValue(LOCAL_INIT,&InitialAngles);
VxVector RotationAngles(0,0,0);
beh->SetLocalParameterValue(LOCAL_ROT,&RotationAngles);
}
break;
case CKM_BEHAVIORSETTINGSEDITED:
{
// Update the needed input for "returns"
CKBOOL Returns = TRUE;
beh->GetLocalParameterValue(LOCAL_RETURN,&Returns);
beh->EnableInputParameter(IN_SPEED_RETURN, Returns);
// Updates the needed inputs for limiting the move
CKBOOL Limited = TRUE;
beh->GetLocalParameterValue(LOCAL_LIMITS,&Limited);
beh->EnableInputParameter(IN_MIN_H,Limited);
beh->EnableInputParameter(IN_MAX_H,Limited);
beh->EnableInputParameter(IN_MIN_V,Limited);
beh->EnableInputParameter(IN_MAX_V,Limited);
beh->EnableInputParameter(IN_MIN_ZOOM,Limited);
beh->EnableInputParameter(IN_MAX_ZOOM,Limited);
}
break;
default:
break;
}
return CKBR_OK;
}