当前位置: 首页>>代码示例>>C++>>正文


C++ USkeletalMeshComponent::GetBoneIndex方法代码示例

本文整理汇总了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;
}
开发者ID:WasPedro,项目名称:UnrealEngine4.11-HairWorks,代码行数:29,代码来源:PhysicsConstraintComponent.cpp

示例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;
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:12,代码来源:FabrikEditMode.cpp

示例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;
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:16,代码来源:ObserveBoneEditMode.cpp

示例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;
}
开发者ID:WasPedro,项目名称:UnrealEngine4.11-HairWorks,代码行数:24,代码来源:PhysicsConstraintComponent.cpp


注:本文中的USkeletalMeshComponent::GetBoneIndex方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。