Interface for mesh rendering data 更多...
#include <SkeletalRenderPublic.h>
类 FSkeletalMeshObject 继承关系图:类 | |
| struct | FSkelMeshObjectLODInfo |
| Setup for rendering a specific LOD entry of the component 更多... | |
Public 成员函数 | |
| virtual void | CacheVertices (int32 LODIndex, bool bForce) const =0 |
| Re-skin cached vertices for an LOD and update the vertex buffer. 更多... | |
| virtual void | DrawVertexElements (FPrimitiveDrawInterface *PDI, const FMatrix &ToWorldSpace, bool bDrawNormals, bool bDrawTangents, bool bDrawBinormals) const |
| Draw Normals/Tangents based on skinned vertex data 更多... | |
| virtual void | EnableOverlayRendering (bool bEnabled, const TArray< int32 > *InBonesOfInterest, const TArray< UMorphTarget * > *MorphTargetOfInterest) |
| Enable blend weight rendering in the editor 更多... | |
| FORCEINLINE uint32 | GetComponentId () const |
| Return the ID of the component to which the skeletal mesh object belongs to. | |
| virtual TArray< FTransform > * | GetComponentSpaceTransforms () const =0 |
| Get the array of component-space bone transforms. 更多... | |
| ERHIFeatureLevel::Type | GetFeatureLevel () const |
| returns the feature level this FSkeletalMeshObject was created with | |
| virtual int32 | GetLOD () const =0 |
| Get the LOD to render this mesh at. | |
| virtual const TArray< FMatrix > & | GetReferenceToLocalMatrices () const =0 |
| Get the array of refpose->local matrices Not safe to hold this reference between frames, because it exists in dynamic data passed from main thread. | |
| const TArray< FSkelMeshRenderSection > & | GetRenderSections (int32 InLODIndex) const |
| List of sections to be rendered based on instance weight usage. 更多... | |
| virtual void | GetResourceSizeEx (FResourceSizeEx &CumulativeResourceSize)=0 |
| Returns the size of memory allocated by render data | |
| float | GetScreenSize (int32 LODIndex) const |
| Returns the display factor for the given LOD level 更多... | |
| FORCEINLINE FSkeletalMeshRenderData & | GetSkeletalMeshRenderData () const |
| Get the skeletal mesh resource for which this mesh object was created. | |
| virtual const FVertexFactory * | GetSkinVertexFactory (const FSceneView *View, int32 LODIndex, int32 ChunkIdx) const =0 |
| virtual bool | HaveValidDynamicData ()=0 |
| Return true if this does have valid dynamic data to render | |
| void | InitLODInfos (const USkinnedMeshComponent *InMeshComponent) |
| Initialize the array of LODInfo based on the settings of the current skel mesh component | |
| virtual void | InitResources (USkinnedMeshComponent *InMeshComponent)=0 |
| Initialize rendering resources for each LOD | |
| virtual bool | IsCPUSkinned () const =0 |
| Returns true if this mesh performs skinning on the CPU. | |
| bool | IsMaterialHidden (int32 InLODIndex, int32 MaterialIdx) const |
| Determine if the material section entry for an LOD is hidden or not 更多... | |
| virtual void | PreGDMECallback (class FGPUSkinCache *GPUSkinCache, uint32 FrameNumber) |
| Called by FSkeletalMeshObject prior to GDME. 更多... | |
| virtual void | RefreshClothingTransforms (const FMatrix &InNewLocalToWorld, uint32 FrameNumber) |
| Called to notify clothing data that component transform has changed | |
| virtual void | ReleaseResources ()=0 |
| Release rendering resources for each LOD | |
| void | SetHiddenMaterials (int32 InLODIndex, const TArray< bool > &HiddenMaterials) |
| Update the hidden material section flags for an LOD entry 更多... | |
| bool | ShouldUsePerBoneMotionBlur () const |
| virtual void | Update (int32 LODIndex, USkinnedMeshComponent *InMeshComponent, const TArray< FActiveMorphTarget > &ActiveMorphTargets, const TArray< float > &MorphTargetWeights, EPreviousBoneTransformUpdateMode PreviousBoneTransformUpdateMode)=0 |
| Called by the game thread for any dynamic data updates for this skel mesh object 更多... | |
| void | UpdateMinDesiredLODLevel (const FSceneView *View, const FBoxSphereBounds &Bounds, int32 FrameNumber, uint8 CurFirstLODIdx) |
| Given a set of views, update the MinDesiredLODLevel member to indicate the minimum (ie best) LOD we would like to use to render this mesh. 更多... | |
| virtual void | UpdateSkinWeightBuffer (USkinnedMeshComponent *InMeshComponent)=0 |
| Will force re-evaluating which Skin Weight buffer should be used for skinning, determined by checking for any override weights or a skin weight profile being set. 更多... | |
Public 属性 | |
| bool | bHasBeenUpdatedAtLeastOnce |
| This is set to true when we have sent our Mesh data to the rendering thread at least once as it needs to have have a datastructure created there for each MeshObject | |
| float | MaxDistanceFactor |
| High (best) DistanceFactor that was desired for rendering this SkeletalMesh last frame. 更多... | |
| int32 | MinDesiredLODLevel |
| Lowest (best) LOD that was desired for rendering this SkeletalMesh last frame. 更多... | |
| float | WorkingMaxDistanceFactor |
| This frames max distance factor. 更多... | |
| int32 | WorkingMinDesiredLODLevel |
| This frames min desired LOD level. 更多... | |
Protected 属性 | |
| bool | bUsePerBoneMotionBlur |
| If true, per-bone motion blur is enabled for this object. 更多... | |
| uint32 | ComponentId |
| Component ID to which belong this mesh object | |
| ERHIFeatureLevel::Type | FeatureLevel |
| Feature level to render for. | |
| uint32 | LastFrameNumber |
| Used to keep track of the first call to UpdateMinDesiredLODLevel each frame. 更多... | |
| TArray< FSkeletalMeshLODInfo > | SkeletalMeshLODInfo |
| Per-LOD info. | |
| FSkeletalMeshRenderData * | SkeletalMeshRenderData |
| The skeletal mesh resource with which to render. | |
| TStatId | StatId |
| Used for dynamic stats | |
友元 | |
| class | FSkeletalMeshSceneProxy |
Interface for mesh rendering data
|
pure virtual |
Re-skin cached vertices for an LOD and update the vertex buffer.
Note that this function is called from the render thread!
| LODIndex | - index to LODs |
| bForce | - force update even if LOD index hasn't changed |
|
inlinevirtual |
Draw Normals/Tangents based on skinned vertex data
| PDI | - Draw Interface |
| ToWorldSpace | - Transform from component space to world space |
| bDrawNormals | - Should draw vertex normals |
| bDrawTangents | - Should draw vertex tangents |
| bDrawBinormals | - Should draw vertex binormals |
|
inlinevirtual |
Enable blend weight rendering in the editor
| bEnabled | - turn on or off the rendering mode optional parameters will decide which one to draw |
| (optional) | BonesOfInterest - array of bone indices to capture weights for |
| (optional) | MorphTargetsOfInterest - array of morphtargets to render for |
|
pure virtual |
Get the array of component-space bone transforms.
Not safe to hold this point between frames, because it exists in dynamic data passed from main thread.
| const TArray< FSkelMeshRenderSection > & FSkeletalMeshObject::GetRenderSections | ( | int32 | InLODIndex | ) | const |
List of sections to be rendered based on instance weight usage.
Full swap of weights will render with its own sections.
| float FSkeletalMeshObject::GetScreenSize | ( | int32 | LODIndex | ) | const |
Returns the display factor for the given LOD level
@Param LODIndex - The LOD to get the display factor for
|
pure virtual |
| View | - View, must not be 0, allows to cull depending on showflags (normally not needed/used in SHIPPING) |
| LODIndex | - each LOD has its own vertex data |
| ChunkIdx | - not used |
| bool FSkeletalMeshObject::IsMaterialHidden | ( | int32 | InLODIndex, |
| int32 | MaterialIdx | ||
| ) | const |
Determine if the material section entry for an LOD is hidden or not
| InLODIndex | - LOD entry to get hidden material flags for |
| MaterialIdx | - index of the material section to check |
|
inlinevirtual |
Called by FSkeletalMeshObject prior to GDME.
This allows the GPU skin version to update bones etc now that we know we are going to render
| FrameNumber | from GFrameNumber |
| void FSkeletalMeshObject::SetHiddenMaterials | ( | int32 | InLODIndex, |
| const TArray< bool > & | HiddenMaterials | ||
| ) |
Update the hidden material section flags for an LOD entry
| InLODIndex | - LOD entry to update hidden material flags for |
| HiddenMaterials | - array of hidden material sections |
|
inline |
|
pure virtual |
Called by the game thread for any dynamic data updates for this skel mesh object
| LODIndex | - lod level to update |
| InSkeletalMeshComponen | - parent prim component doing the updating |
| ActiveMorphs | - morph targets to blend with during skinning |
| void FSkeletalMeshObject::UpdateMinDesiredLODLevel | ( | const FSceneView * | View, |
| const FBoxSphereBounds & | Bounds, | ||
| int32 | FrameNumber, | ||
| uint8 | CurFirstLODIdx | ||
| ) |
Given a set of views, update the MinDesiredLODLevel member to indicate the minimum (ie best) LOD we would like to use to render this mesh.
This is called from the rendering thread (PreRender) so be very careful what you read/write to.
| FrameNumber | from ViewFamily.FrameNumber |
|
pure virtual |
Will force re-evaluating which Skin Weight buffer should be used for skinning, determined by checking for any override weights or a skin weight profile being set.
This prevents re-creating the vertex factories, but rather updates the bindings in place.
|
protected |
If true, per-bone motion blur is enabled for this object.
This includes is the system overwrites the skeletal mesh setting.
|
protected |
Used to keep track of the first call to UpdateMinDesiredLODLevel each frame.
from ViewFamily.FrameNumber
| float FSkeletalMeshObject::MaxDistanceFactor |
High (best) DistanceFactor that was desired for rendering this SkeletalMesh last frame.
Represents how big this mesh was in screen space
This should only ever be WRITTEN by the RENDER thread (in FSkeletalMeshProxy::PreRenderView) and READ by the GAME thread (in USkeletalMeshComponent::UpdateSkelPose).
| int32 FSkeletalMeshObject::MinDesiredLODLevel |
Lowest (best) LOD that was desired for rendering this SkeletalMesh last frame.
This should only ever be WRITTEN by the RENDER thread (in FSkeletalMeshProxy::PreRenderView) and READ by the GAME thread (in USkeletalMeshComponent::UpdateSkelPose).
| float FSkeletalMeshObject::WorkingMaxDistanceFactor |
This frames max distance factor.
This is copied (flipped) to MaxDistanceFactor at the beginning of the next frame.
| int32 FSkeletalMeshObject::WorkingMinDesiredLODLevel |
This frames min desired LOD level.
This is copied (flipped) to MinDesiredLODLevel at the beginning of the next frame.