RapyutaSimulationPlugins
Public Member Functions | Public Attributes | Protected Attributes | List of all members
ARRMeshActor Class Reference

Mesh actor.ARRBaseActor with list of #UMeshComponent. More...

#include <RRMeshActor.h>

Inheritance diagram for ARRMeshActor:
Inheritance graph
[legend]
Collaboration diagram for ARRMeshActor:
Collaboration graph
[legend]

Public Member Functions

 ARRMeshActor ()
 Construct a new ARRMeshActor object. Create and setup a scene component as root. More...
 
virtual bool Initialize () override
 Initialize MeshActor by 1)Create child mesh components, 2)SetCustomDepthEnabled, 3)Set mobility. More...
 
virtual bool HasInitialized (bool bIsLogged=false) const override
 Checm MeshCompList and BaseMeshComp. More...
 
virtual void Reset () override
 Reset MeshCompList. More...
 
void DrawTransform ()
 
UMaterialInterface * GetBaseMeshMaterial (int32 InMaterialIndex=0) const
 Get BaseMeshComp's material. More...
 
virtual void DeclareFullCreation (bool bInCreationResult)
 Declare mesh actor full creation with all meshes created. More...
 
UMeshComponent * GetMeshComponent (int32 Index=0) const
 Get body mesh component. More...
 
template<typename TMeshComp >
TArray< TMeshComp * > CreateMeshComponentList (USceneComponent *InParentComp, const TArray< FString > &InMeshUniqueNameList, const TArray< FTransform > &InMeshRelTransf=TArray< FTransform >(), const TArray< FString > &InMaterialNameList=TArray< FString >())
 Create mesh component list. More...
 
virtual void OnBodyComponentMeshCreationDone (bool bInCreationResult, UObject *InMeshBodyComponent)
 Callback as a body mesh is created. More...
 
void SetCustomDepthEnabled (bool bIsCustomDepthEnabled)
 Enable/Disable Custom Depth rendering pass. More...
 
void SetCustomDepthStencilValue (int32 InCustomDepthStencilValue)
 Set Custom Depth Stencil value uniformly for all child mesh comps. More...
 
bool IsCustomDepthEnabled () const
 Whether Custom depth rendering is enabled. More...
 
TArray< int32 > GetCustomDepthStencilValueList () const
 Get mesh comps' custom depth stencil values. More...
 
virtual FORCEINLINE void SetActivated (bool bInIsActivated)
 Activate/Deactivate mesh actor. More...
 
bool IsActivated () const
 Whether mesh actor is activated. More...
 
- Public Member Functions inherited from ARRBaseActor
 ARRBaseActor ()
 Construct a new ARRBaseActor object. More...
 
 ARRBaseActor (const FObjectInitializer &ObjectInitializer)
 Construct a new ARRBaseActor object. More...
 
void SetupDefaultBase ()
 Initialize default components being configurable in child BP classes. More...
 
void SetEntityModelName (const FString &InEntityModelName)
 
bool IsDataSynthEntity () const
 
template<typename TActorSpawnInfo >
bool InitializeWithSpawnInfo (const TActorSpawnInfo &InActorInfo)
 ACTOR INTIALIZING GENERAL INFO (Unique name, mesh list, material list, etc.) More...
 
void SetTickEnabled (bool bInIsTickEnabled)
 Use URRUObjectUtils::SetupActorTick. More...
 
virtual void GetLifetimeReplicatedProps (TArray< FLifetimeProperty > &OutLifetimeProps) const override
 Returns the properties used for network replication, this needs to be overridden by all actor classes with native. More...
 

Public Attributes

TArray< UMeshComponent * > MeshCompList
 Body mesh component list. More...
 
int32 CreatedMeshesNum = 0
 Created mesh components num up to the moment. More...
 
int32 ToBeCreatedMeshesNum = 0
 Planned num of mesh components to be created. More...
 
TObjectPtr< UMeshComponent > BaseMeshComp = nullptr
 Base mesh comp, normally also as the root comp. More...
 
FIntVector CellIdx = FIntVector::ZeroValue
 Cell index if arranged in a grid. More...
 
FOnMeshActorDeactivated OnDeactivated
 Delegate on mesh actor being deactivated. More...
 
- Public Attributes inherited from ARRBaseActor
TSharedPtr< FRRActorSpawnInfoActorInfo = nullptr
 
ARRGameStateRRGameState = nullptr
 Pointer for convinience. Since this pointer can be nullptr, you need null check before using. More...
 
URRGameSingletonRRGameSingleton = nullptr
 Pointer for convinience. Since this pointer can be nullptr, you need null check before using. More...
 
ARRGameModeRRGameMode = nullptr
 Pointer for convinience. Since this pointer can be nullptr, you need null check before using. More...
 
ARRPlayerControllerRRPlayerController = nullptr
 Pointer for convinience. Since this pointer can be nullptr, you need null check before using. More...
 
int8 SceneInstanceId = URRActorCommon::DEFAULT_SCENE_INSTANCE_ID
 
URRActorCommonActorCommon = nullptr
 
FString EntityUniqueName
 Actually Object's Name is also unique as noted by UE, but we just do not want to rely on it. More...
 
FString EntityModelName
 
FTimerHandle GenericTimerHandle
 

Protected Attributes

uint8 bLastMeshCreationResult: 1
 Last body mesh creation result. More...
 
uint8 bFullyCreated: 1
 Whether all body meshes are fully created. More...
 

Additional Inherited Members

- Static Public Attributes inherited from ARRBaseActor
static TMap< UClass *, TUniquePtr< std::once_flag > > OnceFlagList
 [std::once_flag] also applies even in case of consecutive PIE runs, More...
 
static std::once_flag OnceFlag
 Used for class having single-branch child classes (linear inheritance tree) More...
 
static int8 SSceneInstanceId
 
- Protected Member Functions inherited from ARRBaseActor
virtual void PreInitializeComponents () override
 Set #GameMode #GameState #GameSingleton #PlayerController. More...
 
virtual void PrintSimConfig () const
 Print class members' values configured in RapyutaSimSettings.ini. More...
 
virtual void DoGlobalConfig ()
 Globally config custom setups (eg. Exec() cmds) applied for all instances of this class. More...
 

Detailed Description

Mesh actor.ARRBaseActor with list of #UMeshComponent.

See also
#RRProceduralMeshComponent
#RRStaticMeshComponent

UCLASS()

Constructor & Destructor Documentation

◆ ARRMeshActor()

ARRMeshActor::ARRMeshActor ( )

Construct a new ARRMeshActor object. Create and setup a scene component as root.

Member Function Documentation

◆ CreateMeshComponentList()

template<typename TMeshComp >
TArray<TMeshComp*> ARRMeshActor::CreateMeshComponentList ( USceneComponent *  InParentComp,
const TArray< FString > &  InMeshUniqueNameList,
const TArray< FTransform > &  InMeshRelTransf = TArray<FTransform>(),
const TArray< FString > &  InMaterialNameList = TArray<FString>() 
)
inline

Create mesh component list.

Template Parameters
TMeshComp
Parameters
InParentComp
InMeshUniqueNameList
InMeshRelTransf
InMaterialNameList

◆ DeclareFullCreation()

virtual void ARRMeshActor::DeclareFullCreation ( bool  bInCreationResult)
virtual

Declare mesh actor full creation with all meshes created.

Parameters
bInCreationResult

◆ DrawTransform()

void ARRMeshActor::DrawTransform ( )

◆ GetBaseMeshMaterial()

UMaterialInterface* ARRMeshActor::GetBaseMeshMaterial ( int32  InMaterialIndex = 0) const
inline

Get BaseMeshComp's material.

Parameters
InMaterialIndex

◆ GetCustomDepthStencilValueList()

TArray<int32> ARRMeshActor::GetCustomDepthStencilValueList ( ) const

Get mesh comps' custom depth stencil values.

Returns
TArray<int32>

◆ GetMeshComponent()

UMeshComponent* ARRMeshActor::GetMeshComponent ( int32  Index = 0) const

Get body mesh component.

Parameters
Index

◆ HasInitialized()

virtual bool ARRMeshActor::HasInitialized ( bool  bIsLogged = false) const
overridevirtual

Checm MeshCompList and BaseMeshComp.

Parameters
bIsLogged
Returns
true
false

Reimplemented from ARRBaseActor.

◆ Initialize()

virtual bool ARRMeshActor::Initialize ( )
overridevirtual

Initialize MeshActor by 1)Create child mesh components, 2)SetCustomDepthEnabled, 3)Set mobility.

Returns
true
false

Reimplemented from ARRBaseActor.

◆ IsActivated()

bool ARRMeshActor::IsActivated ( ) const
inline

Whether mesh actor is activated.

◆ IsCustomDepthEnabled()

bool ARRMeshActor::IsCustomDepthEnabled ( ) const

Whether Custom depth rendering is enabled.

Returns
true
false

◆ OnBodyComponentMeshCreationDone()

virtual void ARRMeshActor::OnBodyComponentMeshCreationDone ( bool  bInCreationResult,
UObject *  InMeshBodyComponent 
)
virtual

Callback as a body mesh is created.

Parameters
bInCreationResult
InMeshBodyComponent

◆ Reset()

virtual void ARRMeshActor::Reset ( )
overridevirtual

Reset MeshCompList.

Reimplemented from ARRBaseActor.

◆ SetActivated()

virtual FORCEINLINE void ARRMeshActor::SetActivated ( bool  bInIsActivated)
inlinevirtual

Activate/Deactivate mesh actor.

Parameters
bInIsActivated

◆ SetCustomDepthEnabled()

void ARRMeshActor::SetCustomDepthEnabled ( bool  bIsCustomDepthEnabled)

Enable/Disable Custom Depth rendering pass.

Parameters
bIsCustomDepthEnabled

◆ SetCustomDepthStencilValue()

void ARRMeshActor::SetCustomDepthStencilValue ( int32  InCustomDepthStencilValue)

Set Custom Depth Stencil value uniformly for all child mesh comps.

Parameters
InCustomDepthStencilValue

Member Data Documentation

◆ BaseMeshComp

TObjectPtr<UMeshComponent> ARRMeshActor::BaseMeshComp = nullptr

Base mesh comp, normally also as the root comp.

UPROPERTY(VisibleAnywhere)

◆ bFullyCreated

uint8 ARRMeshActor::bFullyCreated
protected

Whether all body meshes are fully created.

UPROPERTY(VisibleAnywhere)

◆ bLastMeshCreationResult

uint8 ARRMeshActor::bLastMeshCreationResult
protected

Last body mesh creation result.

UPROPERTY(VisibleAnywhere)

◆ CellIdx

FIntVector ARRMeshActor::CellIdx = FIntVector::ZeroValue

Cell index if arranged in a grid.

UPROPERTY()

◆ CreatedMeshesNum

int32 ARRMeshActor::CreatedMeshesNum = 0

Created mesh components num up to the moment.

UPROPERTY()

◆ MeshCompList

TArray<UMeshComponent*> ARRMeshActor::MeshCompList

Body mesh component list.

UPROPERTY(VisibleAnywhere)

◆ OnDeactivated

FOnMeshActorDeactivated ARRMeshActor::OnDeactivated

Delegate on mesh actor being deactivated.

◆ ToBeCreatedMeshesNum

int32 ARRMeshActor::ToBeCreatedMeshesNum = 0

Planned num of mesh components to be created.

UPROPERTY()


The documentation for this class was generated from the following file: