engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 静态 Public 成员函数 | Public 属性 | Protected 属性 | 所有成员列表
USkeletalMesh类 参考

SkeletalMesh is geometry bound to a hierarchical skeleton of bones which can be animated for the purpose of deforming the mesh. 更多...

#include <SkeletalMesh.h>

继承自 UStreamableRenderAsset, IInterface_CollisionDataProvider, IInterface_AssetUserData , 以及 INodeMappingProviderInterface .

Public 成员函数

void AddClothingAsset (UClothingAssetBase *InNewAsset)
 Adds an asset to this mesh with validation and event broadcast
 
void AllocateResourceForRendering ()
 Allocate a new FSkeletalMeshRenderData and assign to SkeletalMeshRenderData member. 更多...
 
virtual void BeginDestroy () override
 Called before destroying the object. 更多...
 
void CalculateExtendedBounds ()
 Calculate the extended bounds based on the imported bounds and the extension values
 
void CalculateInvRefMatrices ()
 Setup-only routines - not concerned with the instance.
 
void CopyMirrorTableFrom (USkeletalMesh *SrcMesh)
 Utility for copying and converting a mirroring table from another USkeletalMesh.
 
void DebugVerifySkeletalMeshLOD ()
 Verify SkeletalMeshLOD is set up correctly

 
UMorphTarget * FindMorphTarget (FName MorphTargetName) const
 Find a named MorphTarget from the MorphSets array in the SkinnedMeshComponent. 更多...
 
USkeletalMeshSocket * FindSocket (FName InSocketName) const
 Find a socket object in this SkeletalMesh by name. 更多...
 
USkeletalMeshSocket * FindSocketAndIndex (FName InSocketName, int32 &OutIndex) const
 Find a socket object in this SkeletalMesh by name. 更多...
 
USkeletalMeshSocket * FindSocketInfo (FName InSocketName, FTransform &OutTransform, int32 &OutBoneIndex, int32 &OutIndex) const
 Find a socket object and asscociated info in this SkeletalMesh by name. 更多...
 
void FlushRenderState ()
 Flush current render state
 
TArray< USkeletalMeshSocket * > GetActiveSocketList () const
 Returns the "active" socket list - all sockets from this mesh plus all non-duplicates from the skeleton Const ref return value as this cannot be modified externally
 
virtual void GetAssetRegistryTags (TArray< FAssetRegistryTag > &OutTags) const override
 Gathers a list of asset registry searchable tags which are name/value pairs with some type information This only needs to be implemented for asset objects 更多...
 
const UAnimSequence * GetBakePose (int32 LODIndex) const
 Get BakePose for the given LOD
 
FBoxSphereBounds GetBounds () const
 Get the extended bounds of this mesh (imported bounds plus bounds extension)
 
UClothingAssetBase * GetClothingAsset (const FGuid &InAssetGuid) const
 Get a clothing asset from its associated GUID (returns nullptr if no match is found)
 
void GetClothingAssetsInUse (TArray< UClothingAssetBase * > &OutClothingAssets) const
 Populates OutClothingAssets with all clothing assets that are mapped to sections in the mesh.
 
FMatrix GetComposedRefPoseMatrix (FName InBoneName) const
 Get the component orientation of a bone or socket. 更多...
 
virtual FString GetDesc () override
 Return a one line description of an object for viewing in the thumbnail view of the generic browser
 
virtual FString GetDetailedInfoInternal () const override
 This function actually does the work for the GetDetailedInfo() and is virtual. 更多...
 
FBoxSphereBounds GetImportedBounds () const
 Get the original imported bounds of the skel mesh
 
TArray< USkeletalMeshSocket * > & GetMeshOnlySocketList ()
 Returns the mesh only socket list - this ignores any sockets in the skeleton Return value is a non-const reference so the socket list can be changed
 
const TArray< USkeletalMeshSocket * > & GetMeshOnlySocketList () const
 Const version Returns the mesh only socket list - this ignores any sockets in the skeleton Return value is a non-const reference so the socket list can be changed
 
virtual void GetPreloadDependencies (TArray< UObject * > &OutDeps) override
 Called during cooking. 更多...
 
FORCEINLINE FSkeletalMeshRenderData * GetResourceForRendering () const
 Get the data to use for rendering.
 
virtual void GetResourceSizeEx (FResourceSizeEx &CumulativeResourceSize) override
 Get the size of the object/resource for use in memory tools or to display to artists/LDs in the Editor This is the extended version which separates up the used memory into different memory regions (the actual definition of which may be platform specific). 更多...
 
UClothingAssetBase * GetSectionClothingAsset (int32 InLodIndex, int32 InSectionIndex)
 Given an LOD and section index, retrieve a clothing asset bound to that section. 更多...
 
USkeletalMeshSocket * GetSocketByIndex (int32 Index) const
 Returns a socket by index. 更多...
 
const FMeshUVChannelInfo * GetUVChannelData (int32 MaterialIndex) const
 Returns the UV channel data for a given material index. 更多...
 
uint32 GetVertexBufferFlags () const
 Computes flags for building vertex buffers.
 
TMap< FVector, FColor > GetVertexColorData (const uint32 PaintingMeshLODIndex=0) const
 Returns vertex color data by position. 更多...
 
void InitBoneMirrorInfo ()
 Allocate and initialise bone mirroring table for this skeletal mesh. 更多...
 
void InitMorphTargets ()
 Initialize MorphSets look up table : MorphTargetIndexMap
 
void InitResources ()
 Initialize the mesh's render resources.
 
virtual bool IsReadyForFinishDestroy () override
 Called to check if the object is ready for FinishDestroy. 更多...
 
bool IsSectionUsingCloth (int32 InSectionIndex, bool bCheckCorrespondingSections=true) const
 Checks whether the provided section is using APEX cloth. 更多...
 
TArray< FString > K2_GetAllMorphTargetNames () const
 Returns the list of all morph targets of this skeletal mesh 更多...
 
bool MirrorTableIsGood (FString &ProblemBones) const
 Utility for checking that the bone mirroring table of this mesh is good. 更多...
 
bool NeedCPUData (int32 LODIndex) const
 True if this mesh LOD needs to keep it's data on CPU.
 
int32 NumSockets () const
 Returns the number of sockets available. 更多...
 
virtual void PostDuplicate (bool bDuplicateForPIE) override
 Called after duplication & serialization and before PostLoad. 更多...
 
virtual void PostInitProperties () override
 Called after the C++ constructor and after the properties have been initialized, including those loaded from config. 更多...
 
virtual void PostLoad () override
 Do any object-specific cleanup required immediately after loading an object. 更多...
 
virtual void PostRename (UObject *OldOuter, const FName OldName) override
 Called at the end of Rename(), but only if the rename was actually carried out
 
virtual void PreSave (const class ITargetPlatform *TargetPlatform) override
 Presave function. 更多...
 
void RebuildSocketMap ()
 Called to rebuild an out-of-date or invalid socket map
 
bool RegisterMorphTarget (UMorphTarget *MorphTarget, bool bInvalidateRenderData=true)
 if name conflicts, it will overwrite the reference
 
void ReleaseCPUResources ()
 Release CPU access version of buffer
 
void ReleaseResources ()
 Releases the mesh's render resources.
 
void ReleaseSkinWeightProfileResources ()
 Releases all allocated Skin Weight Profile resources, assumes none are currently in use
 
virtual void Serialize (FArchive &Ar) override
 Handles reading, writing, and reference collecting using FArchive. 更多...
 
void SetImportedBounds (const FBoxSphereBounds &InBounds)
 Set the original imported bounds of the skel mesh, will recalculate extended bounds
 
void SetNegativeBoundsExtension (const FVector &InExtension)
 Set bound extension values in the negative direction of XYZ, positive value increases bound size
 
void SetPositiveBoundsExtension (const FVector &InExtension)
 Set bound extension values in the positive direction of XYZ, positive value increases bound size
 
void UpdateUVChannelData (bool bResetOverrides)
 Update the material UV channel data used by the texture streamer. 更多...
 
void ValidateBoundsExtension ()
 Alters the bounds extension values to fit correctly into the current bounds (so negative values never extend the bounds etc.)
 

静态 Public 成员函数

static void CancelAllPendingStreamingActions ()
 Cancels any pending static mesh streaming actions if possible. 更多...
 

Public 属性

uint8 bEnablePerPolyCollision: 1
 Uses skinned data for collision data. 更多...
 
uint8 bHasBeenSimplified:1
 true if this mesh has ever been simplified with Simplygon.
 
uint8 bHasVertexColors:1
 Whether or not the mesh has vertex colors
 
uint8 bUseFullPrecisionUVs_DEPRECATED:1
 If true, use 32 bit UVs. 更多...
 
uint8 bUseHighPrecisionTangentBasis_DEPRECATED: 1
 If true, tangents will be stored at 16 bit vs 8 bit precision
 
FPerPlatformBool DisableBelowMinLodStripping
 when true all lods below minlod will still be cooked
 
TArray< FSkeletalMaterial > Materials
 List of materials applied to this mesh.
 
TArray< UClothingAssetBase * > MeshClothingAssets
 Clothing assets imported to this mesh. 更多...
 
FPerPlatformInt MinLod
 Minimum LOD to render. 更多...
 
TMap< FName, int32 > MorphTargetIndexMap
 Map of morph target name to index into USkeletalMesh::MorphTargets
 
TArray< class UNodeMappingContainer * > NodeMappingData
 Mapping data that is saved
 
class UPhysicsAsset * PhysicsAsset
 Physics and collision information used for this USkeletalMesh, set up in Physics Asset Editor. 更多...
 
TSubclassOf< UAnimInstance > PostProcessAnimBlueprint
 Animation Blueprint class to run as a post process for this mesh. 更多...
 
TArray< FMatrix > RefBasesInvMatrix
 Reference skeleton precomputed bases.
 
FReferenceSkeleton RefSkeleton
 New Reference skeleton type
 
FRenderCommandFence ReleaseResourcesFence
 A fence which is used to keep track of the rendering thread releasing the static mesh resources.
 
class UPhysicsAsset * ShadowPhysicsAsset
 Physics asset whose shapes will be used for shadowing when components have bCastCharacterCapsuleDirectShadow or bCastCharacterCapsuleIndirectShadow enabled. 更多...
 
USkeleton * Skeleton
 Skeleton of this skeletal mesh
 
TArray< struct FBoneMirrorInfo > SkelMirrorTable
 List of bones that should be mirrored.
 

Protected 属性

TArray< UAssetUserData * > AssetUserData
 Array of user data stored with the asset
 
FVector NegativeBoundsExtension
 Bound extension values in addition to imported bound in the negative direction of XYZ, positive value increases bound size and negative value decreases bound size. 更多...
 
FVector PositiveBoundsExtension
 Bound extension values in addition to imported bound in the positive direction of XYZ, positive value increases bound size and negative value decreases bound size. 更多...
 
FSkeletalMeshSamplingInfo SamplingInfo
 Defines if and how to generate a set of precomputed data allowing targeted and fast sampling of this mesh on the CPU.
 
TArray< FSkinWeightProfileInfo > SkinWeightProfiles
 Set of skin weight profiles associated with this mesh
 

详细描述

SkeletalMesh is geometry bound to a hierarchical skeleton of bones which can be animated for the purpose of deforming the mesh.

Skeletal Meshes are built up of two parts; a set of polygons composed to make up the surface of the mesh, and a hierarchical skeleton which can be used to animate the polygons. The 3D models, rigging, and animations are created in an external modeling and animation application (3DSMax, Maya, Softimage, etc).

参见
https://docs.unrealengine.com/latest/INT/Engine/Content/Types/SkeletalMeshes/

成员函数说明

◆ AllocateResourceForRendering()

void USkeletalMesh::AllocateResourceForRendering ( )

Allocate a new FSkeletalMeshRenderData and assign to SkeletalMeshRenderData member.


◆ BeginDestroy()

virtual void USkeletalMesh::BeginDestroy ( )
overridevirtual

Called before destroying the object.

This is called immediately upon deciding to destroy the object, to allow the object to begin an asynchronous cleanup process.

重载 UObject .

◆ CancelAllPendingStreamingActions()

static void USkeletalMesh::CancelAllPendingStreamingActions ( )
static

Cancels any pending static mesh streaming actions if possible.

Returns when no more async loading requests are in flight.

◆ FindMorphTarget()

UMorphTarget * USkeletalMesh::FindMorphTarget ( FName  MorphTargetName) const

Find a named MorphTarget from the MorphSets array in the SkinnedMeshComponent.

This searches the array in the same way as FindAnimSequence

参数
MorphTargetNameName of MorphTarget to look for.
返回
Pointer to found MorphTarget. Returns NULL if could not find target with that name.

◆ FindSocket()

USkeletalMeshSocket * USkeletalMesh::FindSocket ( FName  InSocketName) const

Find a socket object in this SkeletalMesh by name.

Entering NAME_None will return NULL. If there are multiple sockets with the same name, will return the first one.

◆ FindSocketAndIndex()

USkeletalMeshSocket * USkeletalMesh::FindSocketAndIndex ( FName  InSocketName,
int32 &  OutIndex 
) const

Find a socket object in this SkeletalMesh by name.

Entering NAME_None will return NULL. If there are multiple sockets with the same name, will return the first one. Also returns the index for the socket allowing for future fast access via GetSocketByIndex()

◆ FindSocketInfo()

USkeletalMeshSocket * USkeletalMesh::FindSocketInfo ( FName  InSocketName,
FTransform &  OutTransform,
int32 &  OutBoneIndex,
int32 &  OutIndex 
) const

Find a socket object and asscociated info in this SkeletalMesh by name.

Entering NAME_None will return NULL. If there are multiple sockets with the same name, will return the first one. Also returns the index for the socket allowing for future fast access via GetSocketByIndex() Also rteturns the socket loca transform and the bone index (if any)

◆ GetAssetRegistryTags()

virtual void USkeletalMesh::GetAssetRegistryTags ( TArray< FAssetRegistryTag > &  OutTags) const
overridevirtual

Gathers a list of asset registry searchable tags which are name/value pairs with some type information This only needs to be implemented for asset objects

参数
OutTagsA list of key-value pairs associated with this object and their types

重载 UObject .

◆ GetComposedRefPoseMatrix()

FMatrix USkeletalMesh::GetComposedRefPoseMatrix ( FName  InBoneName) const

Get the component orientation of a bone or socket.

Transforms by parent bones.

◆ GetDetailedInfoInternal()

virtual FString USkeletalMesh::GetDetailedInfoInternal ( ) const
overridevirtual

This function actually does the work for the GetDetailedInfo() and is virtual.


It should only be called from GetDetailedInfo as GetDetailedInfo is safe to call on NULL object pointers

重载 UObject .

◆ GetPreloadDependencies()

virtual void USkeletalMesh::GetPreloadDependencies ( TArray< UObject * > &  OutDeps)
overridevirtual

Called during cooking.

Must return all objects that will be Preload()ed when this is serialized at load time. Only used by the EDL.

参数
OutDepsall objects that will be preloaded when this is serialized at load time

重载 UObject .

◆ GetResourceSizeEx()

virtual void USkeletalMesh::GetResourceSizeEx ( FResourceSizeEx &  CumulativeResourceSize)
overridevirtual

Get the size of the object/resource for use in memory tools or to display to artists/LDs in the Editor This is the extended version which separates up the used memory into different memory regions (the actual definition of which may be platform specific).

参数
CumulativeResourceSizeStruct used to count up the cumulative size of the resource as to be displayed to artists/LDs in the Editor.

重载 UObject .

◆ GetSectionClothingAsset()

UClothingAssetBase * USkeletalMesh::GetSectionClothingAsset ( int32  InLodIndex,
int32  InSectionIndex 
)

Given an LOD and section index, retrieve a clothing asset bound to that section.

If no clothing asset is in use, returns nullptr

◆ GetSocketByIndex()

USkeletalMeshSocket * USkeletalMesh::GetSocketByIndex ( int32  Index) const

Returns a socket by index.

Max index is NumSockets(). The meshes sockets are accessed first, then the skeletons.

◆ GetUVChannelData()

const FMeshUVChannelInfo * USkeletalMesh::GetUVChannelData ( int32  MaterialIndex) const

Returns the UV channel data for a given material index.

Used by the texture streamer. This data applies to all lod-section using the same material.

参数
MaterialIndexthe material index for which to get the data for.
返回
the data, or null if none exists.

◆ GetVertexColorData()

TMap< FVector, FColor > USkeletalMesh::GetVertexColorData ( const uint32  PaintingMeshLODIndex = 0) const

Returns vertex color data by position.

For matching to reimported meshes that may have changed or copying vertex paint data from mesh to mesh.

返回
VertexColorData Returns a map of vertex position and their associated color.

◆ InitBoneMirrorInfo()

void USkeletalMesh::InitBoneMirrorInfo ( )

Allocate and initialise bone mirroring table for this skeletal mesh.

Default is source = destination for each bone.

◆ IsReadyForFinishDestroy()

virtual bool USkeletalMesh::IsReadyForFinishDestroy ( )
overridevirtual

Called to check if the object is ready for FinishDestroy.

This is called after BeginDestroy to check the completion of the potentially asynchronous object cleanup.

返回
True if the object's asynchronous cleanup has completed and it is ready for FinishDestroy to be called.

重载 UObject .

◆ IsSectionUsingCloth()

bool USkeletalMesh::IsSectionUsingCloth ( int32  InSectionIndex,
bool  bCheckCorrespondingSections = true 
) const

Checks whether the provided section is using APEX cloth.

if bCheckCorrespondingSections is true disabled sections will defer to correspond sections to see if they use cloth (non-cloth sections are disabled and another section added when cloth is enabled, using this flag allows for a check on the original section to succeed)

参数
InSectionIndexIndex to check
bCheckCorrespondingSectionsWhether to check corresponding sections for disabled sections

◆ K2_GetAllMorphTargetNames()

TArray< FString > USkeletalMesh::K2_GetAllMorphTargetNames ( ) const

Returns the list of all morph targets of this skeletal mesh

返回
The list of morph targets

◆ MirrorTableIsGood()

bool USkeletalMesh::MirrorTableIsGood ( FString &  ProblemBones) const

Utility for checking that the bone mirroring table of this mesh is good.

Return true if mirror table is OK, false if there are problems.

参数
ProblemBonesOutput string containing information on bones that are currently bad.

◆ NumSockets()

int32 USkeletalMesh::NumSockets ( ) const

Returns the number of sockets available.

Both on this mesh and it's skeleton.

◆ PostDuplicate()

virtual void USkeletalMesh::PostDuplicate ( bool  bDuplicateForPIE)
overridevirtual

Called after duplication & serialization and before PostLoad.

Used to e.g. make sure UStaticMesh's UModel gets copied as well. Note: NOT called on components on actor duplication (alt-drag or copy-paste). Use PostEditImport as well to cover that case.

重载 UObject .

◆ PostInitProperties()

virtual void USkeletalMesh::PostInitProperties ( )
overridevirtual

Called after the C++ constructor and after the properties have been initialized, including those loaded from config.

This is called before any serialization or other setup has happened.

重载 UObject .

◆ PostLoad()

virtual void USkeletalMesh::PostLoad ( )
overridevirtual

Do any object-specific cleanup required immediately after loading an object.

This is not called for newly-created objects, and by default will always execute on the game thread.

重载 UObject .

◆ PreSave()

virtual void USkeletalMesh::PreSave ( const class ITargetPlatform *  TargetPlatform)
overridevirtual

Presave function.

Gets called once before an object gets serialized for saving. This function is necessary for save time computation as Serialize gets called three times per object from within SavePackage.

警告
: Objects created from within PreSave will NOT have PreSave called on them!!!

重载 UObject .

◆ Serialize()

virtual void USkeletalMesh::Serialize ( FArchive &  Ar)
overridevirtual

Handles reading, writing, and reference collecting using FArchive.

This implementation handles all FProperty serialization, but can be overridden for native variables.

重载 UObject .

◆ UpdateUVChannelData()

void USkeletalMesh::UpdateUVChannelData ( bool  bResetOverrides)

Update the material UV channel data used by the texture streamer.

参数
bResetOverridesTrue if overridden values should be reset.

类成员变量说明

◆ bEnablePerPolyCollision

uint8 USkeletalMesh::bEnablePerPolyCollision

Uses skinned data for collision data.

Per poly collision cannot be used for simulation, in most cases you are better off using the physics asset

◆ bUseFullPrecisionUVs_DEPRECATED

uint8 USkeletalMesh::bUseFullPrecisionUVs_DEPRECATED

If true, use 32 bit UVs.

If false, use 16 bit UVs to save memory

◆ MeshClothingAssets

TArray<UClothingAssetBase*> USkeletalMesh::MeshClothingAssets

Clothing assets imported to this mesh.

May or may not be in use currently on the mesh. Ordering not guaranteed, use the provided getters to access elements in this array whenever possible

◆ MinLod

FPerPlatformInt USkeletalMesh::MinLod

Minimum LOD to render.

Can be overridden per component as well as set here for all mesh instances here

◆ NegativeBoundsExtension

FVector USkeletalMesh::NegativeBoundsExtension
protected

Bound extension values in addition to imported bound in the negative direction of XYZ, positive value increases bound size and negative value decreases bound size.

The final bound would be from [Imported Bound - Negative Bound] to [Imported Bound + Positive Bound].

◆ PhysicsAsset

class UPhysicsAsset* USkeletalMesh::PhysicsAsset

Physics and collision information used for this USkeletalMesh, set up in Physics Asset Editor.

This is used for per-bone hit detection, accurate bounding box calculation and ragdoll physics for example.

◆ PositiveBoundsExtension

FVector USkeletalMesh::PositiveBoundsExtension
protected

Bound extension values in addition to imported bound in the positive direction of XYZ, positive value increases bound size and negative value decreases bound size.

The final bound would be from [Imported Bound - Negative Bound] to [Imported Bound + Positive Bound].

◆ PostProcessAnimBlueprint

TSubclassOf<UAnimInstance> USkeletalMesh::PostProcessAnimBlueprint

Animation Blueprint class to run as a post process for this mesh.

This blueprint will be ran before physics, but after the main anim instance for any skeletal mesh component using this mesh.

◆ ShadowPhysicsAsset

class UPhysicsAsset* USkeletalMesh::ShadowPhysicsAsset

Physics asset whose shapes will be used for shadowing when components have bCastCharacterCapsuleDirectShadow or bCastCharacterCapsuleIndirectShadow enabled.

Only spheres and sphyl shapes in the physics asset can be supported. The more shapes used, the higher the cost of the capsule shadows will be.


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