Navigation
Unreal Engine C++ API Reference > Runtime > Engine > Components
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UActorComponent
- USceneComponent
- UPrimitiveComponent
- UModelComponent
References
Module | Engine |
Header | /Engine/Source/Runtime/Engine/Classes/Components/ModelComponent.h |
Include | #include "Components/ModelComponent.h" |
Syntax
class UModelComponent :
public UPrimitiveComponent,
public IInterface_CollisionDataProvider
Remarks
ModelComponents are PrimitiveComponents that represent elements of BSP geometry in a ULevel object. They are used exclusively by ULevel and are not intended as general-purpose components.
Variables
Type | Name | Description | |
---|---|---|---|
![]() |
TObjectPtr< class UBodySetup > | ModelBodySetup | Description of collision |
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
UModelComponent
(
const FObjectInitializer& ObjectInitializer |
Functions
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
void | AddReferencedObjects
(
UObject* InThis, |
|
![]() ![]() |
void | ApplyTempElements
(
bool bLightingWasSuccessful |
Apply all the elements that we were putting into the TempBSPElements map to the Elements arrays in all components |
![]() |
void | Rebuild the model's rendering info. | |
![]() |
void | Commit the editor's changes to BSP surfaces. | |
![]() |
void | CopyElementsFrom
(
UModelComponent* OtherModelComponent |
Copy model elements from the other component. |
![]() |
void | Ensure ModelBodySetup is present and correctly configured. | |
![]() ![]() |
FModelElement * | CreateNewTempElement
(
UModelComponent* Component |
Create a new temp FModelElement element for the component, which will be applied when lighting is all done. |
![]() ![]() |
bool | GenerateElements
(
bool bBuildRenderData |
Generate the Elements array. |
![]() ![]() |
const TIndirectArray< FModelElement > & | GetElements () |
|
![]() |
TIndirectArray< FModelElement > & | GetElements () |
|
![]() ![]() |
UModel * | GetModel () |
Accessors. |
![]() ![]() |
void | GetStaticLightingInfo
(
FStaticLightingPrimitiveInfo& OutPrimitiveInfo, |
|
![]() ![]() |
void | GetSurfaceLightMapResolution
(
int32 SurfaceIndex, |
Calculate the lightmap resolution to be used by the given surface. |
![]() |
void | InitializeModelComponent
(
UModel* InModel, |
Minimal initialization. |
![]() |
void | Invalidate current collision data | |
![]() |
void | Selects all surfaces that are part of this model component. | |
![]() |
void | Free empty elements. |
Overridden from UPrimitiveComponent
Type | Name | Description | |
---|---|---|---|
![]() ![]() ![]() |
void | AddMapBuildDataGUIDs
(
TSet< FGuid >& InGUIDs |
Add the used GUIDs from UMapBuildDataRegistry::MeshBuildData. |
![]() ![]() |
FPrimitiveSceneProxy * | Creates a proxy to represent the primitive to the scene manager in the rendering thread. | |
![]() ![]() |
UBodySetup * | GetBodySetup () |
Return the BodySetup to use for this PrimitiveComponent (single body case) |
![]() ![]() ![]() |
void | GetLightAndShadowMapMemoryUsage
(
int32& LightMapMemoryUsage, |
Returns the light and shadow map memory for this primitive in its out variables. |
![]() ![]() ![]() |
bool | GetLightMapResolution
(
int32& Width, |
Returns the lightmap resolution used for this primitive instance in the case of it supporting texture light/ shadow maps. |
![]() ![]() ![]() |
UMaterialInterface * | GetMaterial
(
int32 ElementIndex |
Returns the material used by the element at the specified index |
![]() ![]() ![]() |
UMaterialInterface * | GetMaterialFromCollisionFaceIndex
(
int32 FaceIndex, |
Try and retrieve the material applied to a particular collision face of mesh. |
![]() ![]() ![]() |
int32 | Return number of material elements in this primitive | |
![]() ![]() ![]() |
ELightMapInteractionType | Requests whether the component will use texture, vertex or no lightmaps. | |
![]() ![]() ![]() |
int32 | Returns the static lightmap resolution used for this primitive. | |
![]() ![]() ![]() |
void | GetStreamingRenderAssetInfo
(
FStreamingTextureLevelContext& LevelContext, |
Enumerates the streaming textures/meshes used by the primitive. |
![]() ![]() ![]() |
void | GetUsedMaterials
(
TArray< UMaterialInterface* >& OutMaterials, |
Retrieves the materials used in this component |
![]() ![]() ![]() |
bool | Determines whether the proxy for this primitive type needs to be recreated whenever the primitive moves. | |
![]() ![]() ![]() |
bool | Whether the component type supports static lighting. |
Overridden from USceneComponent
Type | Name | Description | |
---|---|---|---|
![]() ![]() ![]() |
FBoxSphereBounds | CalcBounds
(
const FTransform& LocalToWorld |
Calculate the bounds of the component. Default behavior is a bounding box/sphere of zero size. |
![]() ![]() ![]() |
bool | True if our precomputed lighting is up to date | |
![]() ![]() |
void | Updates any visuals after the lighting has changed |
Overridden from UActorComponent
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
void | CreateRenderState_Concurrent
(
FRegisterComponentContext* Context |
Used to create any rendering thread information for this component |
![]() ![]() |
void | Used to shut down any rendering thread structure for this component | |
![]() ![]() |
void | InvalidateLightingCacheDetailed
(
bool bInvalidateBuildEnqueuedLighting, |
Called when this actor component has moved, allowing it to discard statically cached lighting information. |
Overridden from UObject
Type | Name | Description | |
---|---|---|---|
![]() ![]() ![]() |
bool | IsNameStableForNetworking means an object can be referred to its path name (relative to outer) over the network | |
![]() ![]() |
void | PostEditUndo () |
Called after applying a transaction to the object. |
![]() ![]() |
void | PostLoad () |
Do any object-specific cleanup required immediately after loading an object. |
![]() ![]() |
void | Handles reading, writing, and reference collecting using FArchive. |
Overridden from IInterface_CollisionDataProvider
Type | Name | Description | |
---|---|---|---|
![]() ![]() ![]() |
bool | ContainsPhysicsTriMeshData
(
bool InUseAllTriData |
Interface for checking if the implementing objects contains triangle mesh collision data |
![]() ![]() |
bool | GetPhysicsTriMeshData
(
FTriMeshCollisionData* CollisionData, |
Interface for retrieving triangle mesh collision data from the implementing object |
![]() ![]() ![]() |
bool | GetTriMeshSizeEstimates
(
FTriMeshCollisionDataEstimates& OutTriMeshEstimates, |
Returns an estimate of how much data would be retrieved by GetPhysicsTriMeshData. |
![]() ![]() |
bool | Do we want to create a negative version of this mesh |
Constants
Name | Description |
---|---|
TempBSPElements | The new BSP elements that are made during lighting, and will be applied to the components when all lighting is done |