本文整理汇总了C++中CBaseAnimating::LookupBone方法的典型用法代码示例。如果您正苦于以下问题:C++ CBaseAnimating::LookupBone方法的具体用法?C++ CBaseAnimating::LookupBone怎么用?C++ CBaseAnimating::LookupBone使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CBaseAnimating
的用法示例。
在下文中一共展示了CBaseAnimating::LookupBone方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PropBreakableCreateAll
//.........这里部分代码省略.........
if ( list[i].mpBreakMode == MULTIPLAYER_BREAK_SERVERSIDE )
continue;
#endif
if ( !defaultLocation && list[i].mpBreakMode == MULTIPLAYER_BREAK_DEFAULT )
continue;
}
if ( ( nPropCount != -1 ) && ( nPropBreakablesPerFrameCount > nPropCount ) )
break;
if ( ( iPrecomputedBreakableCount != -1 ) && ( i >= iPrecomputedBreakableCount ) )
break;
matrix3x4_t matrix;
AngleMatrix( params.angles, params.origin, matrix );
CStudioHdr studioHdr;
const model_t *model = modelinfo->GetModel( modelIndex );
if ( model )
{
studioHdr.Init( modelinfo->GetStudiomodel( model ) );
}
// Increment the number of breakable props this frame.
++nPropBreakablesPerFrameCount;
Vector position = vec3_origin;
QAngle angles = params.angles;
if ( pOwnerAnim && list[i].placementName[0] )
{
if ( list[i].placementIsBone )
{
int boneIndex = pOwnerAnim->LookupBone( list[i].placementName );
if ( boneIndex >= 0 )
{
pOwnerAnim->GetBonePosition( boneIndex, position, angles );
AngleMatrix( angles, position, matrix );
}
}
else
{
int attachmentIndex = Studio_FindAttachment( &studioHdr, list[i].placementName ) + 1;
if ( attachmentIndex > 0 )
{
pOwnerAnim->GetAttachment( attachmentIndex, matrix );
MatrixAngles( matrix, angles );
}
}
}
else
{
int placementIndex = Studio_FindAttachment( &studioHdr, "placementOrigin" ) + 1;
Vector placementOrigin = parentOrigin;
if ( placementIndex > 0 )
{
GetAttachmentLocalSpace( &studioHdr, placementIndex-1, localToWorld );
MatrixGetColumn( localToWorld, 3, placementOrigin );
placementOrigin -= parentOrigin;
}
VectorTransform( list[i].offset - placementOrigin, matrix, position );
}
Vector objectVelocity = params.velocity;
if (pPhysics)