本文整理汇总了C++中SimObject::isLocked方法的典型用法代码示例。如果您正苦于以下问题:C++ SimObject::isLocked方法的具体用法?C++ SimObject::isLocked怎么用?C++ SimObject::isLocked使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SimObject
的用法示例。
在下文中一共展示了SimObject::isLocked方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: return
//.........这里部分代码省略.........
{
me->setDefPlaceMask( atoi( argv[1] ) );
return(ME_Success);
}
else
console->printf( "%s: placement mask", argv[0] );
break;
}
case GetConsoleOptions:
{
me->getConsoleOptions();
return(ME_Success);
}
case ObjectToCamera:
case CameraToObject:
case ObjectToSC:
{
int objId = atoi( console->getVariable( "ME::InspectObject" ) );
SimObject * obj = me->getObject( static_cast< UINT >( objId ) );
if( !obj )
{
console->printf( "%s: failed to get inspect object", argv[0] );
break;
}
switch( id )
{
case ObjectToCamera:
{
if( obj->isLocked() )
{
console->printf("%s: object is locked", argv[0]);
break;
}
TMat3F objMat;
me->saveInfo( obj );
me->getTransform( obj, objMat );
objMat.p.set( 0.f, 0.f, 0.f );
me->setTransform( obj, objMat );
me->onDrop( obj, FearMissionEditor::DropAtCamera );
break;
}
case CameraToObject:
{
SimObject * cam = me->getCamera();
if( !cam )
{
console->printf( "%s: failed to get camera", argv[0] );
break;
}
TMat3F camMat;
TMat3F objMat;
me->getTransform( obj, objMat );
me->getTransform( cam, camMat );
me->saveInfo( cam );
// move her
camMat.p = objMat.p;
camMat.flags |= TMat3F::Matrix_HasTranslation;