本文整理汇总了C++中USkeletalMeshComponent::GetBoneIndex方法的典型用法代码示例。如果您正苦于以下问题:C++ USkeletalMeshComponent::GetBoneIndex方法的具体用法?C++ USkeletalMeshComponent::GetBoneIndex怎么用?C++ USkeletalMeshComponent::GetBoneIndex使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类USkeletalMeshComponent
的用法示例。
在下文中一共展示了USkeletalMeshComponent::GetBoneIndex方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetBodyBoxInternal
FBox UPhysicsConstraintComponent::GetBodyBoxInternal(EConstraintFrame::Type Frame, FName InBoneName) const
{
FBox ResultBox(0);
UPrimitiveComponent* PrimComp = GetComponentInternal(Frame);
// Skeletal case
USkeletalMeshComponent* SkelComp = Cast<USkeletalMeshComponent>(PrimComp);
if(SkelComp != NULL)
{
UPhysicsAsset * const PhysicsAsset = SkelComp->GetPhysicsAsset();
if (PhysicsAsset)
{
int32 BoneIndex = SkelComp->GetBoneIndex(InBoneName);
int32 BodyIndex = PhysicsAsset->FindBodyIndex(InBoneName);
if(BoneIndex != INDEX_NONE && BodyIndex != INDEX_NONE)
{
const FTransform BoneTransform = SkelComp->GetBoneTransform(BoneIndex);
ResultBox = PhysicsAsset->BodySetup[BodyIndex]->AggGeom.CalcAABB(BoneTransform);
}
}
}
else if(PrimComp != NULL)
{
ResultBox = PrimComp->Bounds.GetBox();
}
return ResultBox;
}
示例2: GetWidgetMode
FWidget::EWidgetMode FFabrikEditMode::GetWidgetMode() const
{
USkeletalMeshComponent* SkelComp = GetAnimPreviewScene().GetPreviewMeshComponent();
int32 BoneIndex = SkelComp->GetBoneIndex(GraphNode->Node.EffectorTransformBone.BoneName);
if (BoneIndex != INDEX_NONE)
{
return FWidget::WM_Translate;
}
return FWidget::WM_None;
}
示例3: GetWidgetLocation
FVector FObserveBoneEditMode::GetWidgetLocation() const
{
USkeletalMeshComponent* SkelComp = GetAnimPreviewScene().GetPreviewMeshComponent();
USkeleton* Skeleton = SkelComp->SkeletalMesh->Skeleton;
FVector WidgetLoc = FVector::ZeroVector;
int32 MeshBoneIndex = SkelComp->GetBoneIndex(GraphNode->Node.BoneToObserve.BoneName);
if (MeshBoneIndex != INDEX_NONE)
{
const FTransform BoneTM = SkelComp->GetBoneTransform(MeshBoneIndex);
WidgetLoc = BoneTM.GetLocation();
}
return WidgetLoc;
}
示例4: GetBodyTransformInternal
FTransform UPhysicsConstraintComponent::GetBodyTransformInternal(EConstraintFrame::Type Frame, FName InBoneName) const
{
UPrimitiveComponent* PrimComp = GetComponentInternal(Frame);
if(!PrimComp)
{
return FTransform::Identity;
}
//Use ComponentToWorld by default for all components
FTransform ResultTM = PrimComp->ComponentToWorld;
// Skeletal case
USkeletalMeshComponent* SkelComp = Cast<USkeletalMeshComponent>(PrimComp);
if(SkelComp != NULL)
{
int32 BoneIndex = SkelComp->GetBoneIndex(InBoneName);
if(BoneIndex != INDEX_NONE)
{
ResultTM = SkelComp->GetBoneTransform(BoneIndex);
}
}
return ResultTM;
}