engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 所有成员列表
FPrimitiveComponentTarget类 参考abstract

Wrapper around a UObject Component that can provide a MeshDescription, and (optionally) bake a modified MeshDescription back to this Component. 更多...

#include <ComponentSourceInterfaces.h>

Public 成员函数

virtual void CommitMaterialSetUpdate (const FComponentMaterialSet &MaterialSet, bool bApplyToAsset)
 Commit an update to the material set. 更多...
 
 FPrimitiveComponentTarget (UPrimitiveComponent *Component)
 Constructor UPrimitivecomponent* 更多...
 
UMaterialInterface * GetMaterial (int32 MaterialIndex) const
 Get pointer to a Material provided by this Source 更多...
 
virtual void GetMaterialSet (FComponentMaterialSet &MaterialSetOut, bool bAssetMaterials=false) const
 Get material set provided by this source 更多...
 
int32 GetNumMaterials () const
 
AActor * GetOwnerActor () const
 
UPrimitiveComponent * GetOwnerComponent () const
 
FTransform GetWorldTransform () const
 
virtual bool HasSameSourceData (const FPrimitiveComponentTarget &OtherTarget) const =0
 Checks if the underlying asset that would be edited by CommitMesh() is the same for two ComponentTargets 更多...
 
bool HitTest (const FRay &WorldRay, FHitResult &OutHit) const
 Compute ray intersection with the MeshDescription this Source is providing 更多...
 
virtual bool IsValid () const
 
void SetOwnerVisibility (bool bVisible) const
 Set the visibility of the Component associated with this Source (ie to hide during Tool usage) 更多...
 

详细描述

Wrapper around a UObject Component that can provide a MeshDescription, and (optionally) bake a modified MeshDescription back to this Component.

An example of a Source might be a StaticMeshComponent. How a modified MeshDescription is committed back is context-dependent (in Editor vs PIE vs Runtime, etc).

(Conceivably this doesn't have to be backed by a Component, but most usage will assume there is an Actor)

构造及析构函数说明

◆ FPrimitiveComponentTarget()

FPrimitiveComponentTarget::FPrimitiveComponentTarget ( UPrimitiveComponent *  Component)
inline

Constructor UPrimitivecomponent*

参数
Componentthe UPrimitiveComponent* to target

成员函数说明

◆ CommitMaterialSetUpdate()

virtual void FPrimitiveComponentTarget::CommitMaterialSetUpdate ( const FComponentMaterialSet &  MaterialSet,
bool  bApplyToAsset 
)
virtual

Commit an update to the material set.

This may generate a transaction.

参数
MaterialSetnew list of materials
bApplyToAssetif true, materials of Asset are updated (if Asset exists), rather than Component

◆ GetMaterial()

UMaterialInterface * FPrimitiveComponentTarget::GetMaterial ( int32  MaterialIndex) const

Get pointer to a Material provided by this Source

参数
MaterialIndexindex of the material
返回
MaterialInterface pointer, or null if MaterialIndex is invalid

◆ GetMaterialSet()

virtual void FPrimitiveComponentTarget::GetMaterialSet ( FComponentMaterialSet &  MaterialSetOut,
bool  bAssetMaterials = false 
) const
virtual

Get material set provided by this source

参数
MaterialSetOutreturned material set
bAssetMaterialsif an underlying asset exists, return the Asset-level material assignment instead of the component materials

◆ GetNumMaterials()

int32 FPrimitiveComponentTarget::GetNumMaterials ( ) const
返回
number of material indices in use by this Component

◆ GetOwnerActor()

AActor * FPrimitiveComponentTarget::GetOwnerActor ( ) const
返回
the Actor that owns this Component

◆ GetOwnerComponent()

UPrimitiveComponent * FPrimitiveComponentTarget::GetOwnerComponent ( ) const
返回
the Component this is a Source for

◆ GetWorldTransform()

FTransform FPrimitiveComponentTarget::GetWorldTransform ( ) const
返回
the transform on this component
待办事项:
Do we need to return a list of transforms here?

◆ HasSameSourceData()

virtual bool FPrimitiveComponentTarget::HasSameSourceData ( const FPrimitiveComponentTarget &  OtherTarget) const
pure virtual

Checks if the underlying asset that would be edited by CommitMesh() is the same for two ComponentTargets

参数
OtherTargetAnother component target to compare against
返回
true if both component targets are known to share the same source asset

◆ HitTest()

bool FPrimitiveComponentTarget::HitTest ( const FRay &  WorldRay,
FHitResult &  OutHit 
) const

Compute ray intersection with the MeshDescription this Source is providing

参数
WorldRayray in world space
OutHithit test data
返回
true if ray intersected Component

◆ IsValid()

virtual bool FPrimitiveComponentTarget::IsValid ( ) const
virtual
返回
true if component target is still valid. May become invalid for various reasons (eg Component was deleted out from under us)

◆ SetOwnerVisibility()

void FPrimitiveComponentTarget::SetOwnerVisibility ( bool  bVisible) const

Set the visibility of the Component associated with this Source (ie to hide during Tool usage)

参数
bVisibledesired visibility

该类的文档由以下文件生成: