|
CARLA
|
#include <ProceduralBuilding.h>
Inheritance diagram for AProceduralBuilding:Public Member Functions | |
| AProceduralBuilding () | |
| void | ConvertOldBP_ToNativeCodeObject (AActor *BP_Building) |
| UHierarchicalInstancedStaticMeshComponent * | GetHISMComp (const UStaticMesh *SM) |
| void | HideAllChildren () |
| void | SetBaseMeshes (const TArray< UStaticMesh * > &InBaseMeshes, const TArray< TSubclassOf< AActor > > &InBaseBPs, const TArray< UStaticMesh * > &InCornerBaseMeshes, const TArray< TSubclassOf< AActor > > &InCornerBaseBPs, const TArray< UStaticMesh * > &InDoorMeshes, const TArray< TSubclassOf< AActor > > &InDoorBPs) |
| void | SetBaseParameters (const TSet< int > &InDoorsIndexPosition, const TArray< bool > &InUseWallMesh, int InNumFloors, int InLengthX, int InLengthY, bool InCorners, bool InUseFullBlocks) |
| void | SetBodyMeshes (const TArray< UStaticMesh * > &InBodyMeshes, const TArray< TSubclassOf< AActor > > &InBodyBPs, const TArray< UStaticMesh * > &InCornerBodyMeshes, const TArray< TSubclassOf< AActor > > &InCornerBodyBPs, const TArray< UStaticMesh * > &InWallMeshes, const TArray< TSubclassOf< AActor > > &InWallBPs) |
| void | SetTopMeshes (const TArray< UStaticMesh * > &InTopMeshes, const TArray< TSubclassOf< AActor > > &InTopBPs, const TArray< UStaticMesh * > &InCornerTopMeshes, const TArray< TSubclassOf< AActor > > &InCornerTopBPs, const TArray< UStaticMesh * > &InRoofMeshes, const TArray< TSubclassOf< AActor > > &InRoofBPs) |
| void | SetVisibilityParameters (const TArray< bool > &InSideVisibility, const TArray< bool > &InCornerVisibility, bool InRoofVisibility) |
Protected Member Functions | |
| void | CreateBuilding () |
| void | FixMobility () |
| void | Reset () |
Protected Attributes | |
| TArray< TSubclassOf< AActor > > | BaseBPs |
| TArray< UStaticMesh * > | BaseMeshes |
| Meshes. | |
| TArray< TSubclassOf< AActor > > | BodyBPs |
| TArray< UStaticMesh * > | BodyMeshes |
| Meshes | Body. | |
| TArray< TObjectPtr< UChildActorComponent > > | ChildActorComps |
| TArray< TSubclassOf< AActor > > | CornerBaseBPs |
| TArray< UStaticMesh * > | CornerBaseMeshes |
| TArray< TSubclassOf< AActor > > | CornerBodyBPs |
| TArray< UStaticMesh * > | CornerBodyMeshes |
| bool | Corners = false |
| TArray< TSubclassOf< AActor > > | CornerTopBPs |
| TArray< UStaticMesh * > | CornerTopMeshes |
| TArray< bool > | CornerVisibility |
| TArray< TSubclassOf< AActor > > | DoorBPs |
| TArray< UStaticMesh * > | DoorMeshes |
| TSet< int > | DoorsIndexPosition |
| Base Parameters. | |
| TMap< FString, TObjectPtr< UHierarchicalInstancedStaticMeshComponent > > | HISMComps |
| int | LengthX = 0 |
| int | LengthY = 0 |
| int | NumFloors = 0 |
| TArray< TSubclassOf< AActor > > | RoofBPs |
| TArray< UStaticMesh * > | RoofMeshes |
| bool | RoofVisibility = true |
| TObjectPtr< UStaticMeshComponent > | RootSMComp = nullptr |
| TArray< bool > | SideVisibility |
| Base Parameters | Visibility. | |
| TArray< TSubclassOf< AActor > > | TopBPs |
| TArray< UStaticMesh * > | TopMeshes |
| Meshes | Top. | |
| bool | UseFullBlocks = false |
| TArray< bool > | UseWallMesh |
| TArray< TSubclassOf< AActor > > | WallBPs |
| TArray< UStaticMesh * > | WallMeshes |
Private Member Functions | |
| float | AddChunck (const UStaticMesh *SelectedMesh, const TSubclassOf< AActor > SelectedBP, bool Visible, FBox &OutSelectedMeshBounds) |
| void | AddMeshToBuilding (const UStaticMesh *SM) |
| TSet< int > | CalculateDoorsIndexInSide (int StartIndex, int Length) |
| void | CalculateSidesLength () |
| void | CalculateSideVisibilities (int SideIndex, bool &MainVisibility, bool &CornerVisbility) |
| void | ChooseGeometryToSpawn (const TArray< UStaticMesh * > &InMeshes, const TArray< TSubclassOf< AActor > > &InMainBPs, UStaticMesh **OutMesh, TSubclassOf< AActor > *OutBP) |
| void | CreateFloor (const FloorMeshCollection &MeshCollection, bool IncludeDoors, bool IncludeWalls) |
| void | CreateRoof () |
| float | CreateSide (const FloorMeshCollection &MeshCollection, const TSet< int > &AuxiliarPositions, int SideLength, bool MainVisibility, bool CornerVisbility) |
| TSet< int > | GenerateWallsIndexPositions (int Length) |
| FVector | GetMeshSize (const UStaticMesh *SM) |
| void | Init () |
| void | UpdateTransformPositionToNextChunk (const FVector &Box) |
| void | UpdateTransformPositionToNextSide (const FBox &Box) |
Private Attributes | |
| FTransform | CurrentTransform = FTransform::Identity |
| FBox | LastSelectedMeshBounds |
| TArray< int > | SidesLength |
Definition at line 27 of file ProceduralBuilding.h.
| AProceduralBuilding::AProceduralBuilding | ( | ) |
Definition at line 8 of file ProceduralBuilding.cpp.
References CornerVisibility, RootSMComp, SideVisibility, and UseWallMesh.
|
private |
Definition at line 506 of file ProceduralBuilding.cpp.
References AddMeshToBuilding(), ChildActorComps, CurrentTransform, GetMeshSize(), and UpdateTransformPositionToNextChunk().
Referenced by CreateRoof(), and CreateSide().
|
private |
Definition at line 584 of file ProceduralBuilding.cpp.
References CurrentTransform, and GetHISMComp().
Referenced by AddChunck().
|
private |
Definition at line 452 of file ProceduralBuilding.cpp.
References DoorsIndexPosition.
Referenced by CreateFloor().
|
private |
Definition at line 432 of file ProceduralBuilding.cpp.
References LengthX, LengthY, SidesLength, and UseFullBlocks.
Referenced by Init().
|
private |
Definition at line 478 of file ProceduralBuilding.cpp.
References CornerVisibility, SideVisibility, and UseFullBlocks.
Referenced by CreateFloor().
|
private |
Definition at line 484 of file ProceduralBuilding.cpp.
Referenced by CreateRoof(), and CreateSide().
| void AProceduralBuilding::ConvertOldBP_ToNativeCodeObject | ( | AActor * | BP_Building | ) |
Definition at line 57 of file ProceduralBuilding.cpp.
References ChildActorComps, and GetHISMComp().
|
protected |
Definition at line 212 of file ProceduralBuilding.cpp.
References BaseBPs, BaseMeshes, BodyBPs, BodyMeshes, CornerBaseBPs, CornerBaseMeshes, CornerBodyBPs, CornerBodyMeshes, CornerTopBPs, CornerTopMeshes, CreateFloor(), CreateRoof(), DoorBPs, DoorMeshes, Init(), NumFloors, TopBPs, TopMeshes, WallBPs, and WallMeshes.
|
private |
Definition at line 280 of file ProceduralBuilding.cpp.
References CalculateDoorsIndexInSide(), CalculateSideVisibilities(), CreateSide(), CurrentTransform, GenerateWallsIndexPositions(), SidesLength, UseFullBlocks, and UseWallMesh.
Referenced by CreateBuilding().
|
private |
Definition at line 329 of file ProceduralBuilding.cpp.
References AddChunck(), ChooseGeometryToSpawn(), CurrentTransform, LastSelectedMeshBounds, LengthX, LengthY, RoofBPs, RoofMeshes, RoofVisibility, and UpdateTransformPositionToNextSide().
Referenced by CreateBuilding().
|
private |
Main part
Corner part
Definition at line 366 of file ProceduralBuilding.cpp.
References AddChunck(), FloorMeshCollection::AuxiliarBPs, FloorMeshCollection::AuxiliarMeshes, ChooseGeometryToSpawn(), FloorMeshCollection::CornerBPs, FloorMeshCollection::CornerMeshes, Corners, LastSelectedMeshBounds, FloorMeshCollection::MainBPs, FloorMeshCollection::MainMeshes, and UpdateTransformPositionToNextSide().
Referenced by CreateFloor().
|
protected |
Definition at line 49 of file ProceduralBuilding.cpp.
References ChildActorComps.
|
private |
Definition at line 468 of file ProceduralBuilding.cpp.
Referenced by CreateFloor().
| UHierarchicalInstancedStaticMeshComponent * AProceduralBuilding::GetHISMComp | ( | const UStaticMesh * | SM | ) |
Definition at line 22 of file ProceduralBuilding.cpp.
References HISMComps.
Referenced by AddMeshToBuilding(), and ConvertOldBP_ToNativeCodeObject().
|
private |
Definition at line 591 of file ProceduralBuilding.cpp.
Referenced by AddChunck().
| void AProceduralBuilding::HideAllChildren | ( | ) |
Definition at line 122 of file ProceduralBuilding.cpp.
References ChildActorComps.
|
private |
Definition at line 273 of file ProceduralBuilding.cpp.
References CalculateSidesLength(), and Reset().
Referenced by CreateBuilding().
|
protected |
Definition at line 241 of file ProceduralBuilding.cpp.
References ChildActorComps, CurrentTransform, HISMComps, and SidesLength.
Referenced by Init().
| void AProceduralBuilding::SetBaseMeshes | ( | const TArray< UStaticMesh * > & | InBaseMeshes, |
| const TArray< TSubclassOf< AActor > > & | InBaseBPs, | ||
| const TArray< UStaticMesh * > & | InCornerBaseMeshes, | ||
| const TArray< TSubclassOf< AActor > > & | InCornerBaseBPs, | ||
| const TArray< UStaticMesh * > & | InDoorMeshes, | ||
| const TArray< TSubclassOf< AActor > > & | InDoorBPs | ||
| ) |
Definition at line 164 of file ProceduralBuilding.cpp.
References BaseBPs, BaseMeshes, CornerBaseBPs, CornerBaseMeshes, DoorBPs, and DoorMeshes.
| void AProceduralBuilding::SetBaseParameters | ( | const TSet< int > & | InDoorsIndexPosition, |
| const TArray< bool > & | InUseWallMesh, | ||
| int | InNumFloors, | ||
| int | InLengthX, | ||
| int | InLengthY, | ||
| bool | InCorners, | ||
| bool | InUseFullBlocks | ||
| ) |
Definition at line 136 of file ProceduralBuilding.cpp.
References Corners, DoorsIndexPosition, LengthX, LengthY, NumFloors, UseFullBlocks, and UseWallMesh.
| void AProceduralBuilding::SetBodyMeshes | ( | const TArray< UStaticMesh * > & | InBodyMeshes, |
| const TArray< TSubclassOf< AActor > > & | InBodyBPs, | ||
| const TArray< UStaticMesh * > & | InCornerBodyMeshes, | ||
| const TArray< TSubclassOf< AActor > > & | InCornerBodyBPs, | ||
| const TArray< UStaticMesh * > & | InWallMeshes, | ||
| const TArray< TSubclassOf< AActor > > & | InWallBPs | ||
| ) |
Definition at line 180 of file ProceduralBuilding.cpp.
References BodyBPs, BodyMeshes, CornerBodyBPs, CornerBodyMeshes, WallBPs, and WallMeshes.
| void AProceduralBuilding::SetTopMeshes | ( | const TArray< UStaticMesh * > & | InTopMeshes, |
| const TArray< TSubclassOf< AActor > > & | InTopBPs, | ||
| const TArray< UStaticMesh * > & | InCornerTopMeshes, | ||
| const TArray< TSubclassOf< AActor > > & | InCornerTopBPs, | ||
| const TArray< UStaticMesh * > & | InRoofMeshes, | ||
| const TArray< TSubclassOf< AActor > > & | InRoofBPs | ||
| ) |
Definition at line 196 of file ProceduralBuilding.cpp.
References CornerTopBPs, CornerTopMeshes, RoofBPs, RoofMeshes, TopBPs, and TopMeshes.
| void AProceduralBuilding::SetVisibilityParameters | ( | const TArray< bool > & | InSideVisibility, |
| const TArray< bool > & | InCornerVisibility, | ||
| bool | InRoofVisibility | ||
| ) |
Definition at line 154 of file ProceduralBuilding.cpp.
References CornerVisibility, RoofVisibility, and SideVisibility.
|
private |
Definition at line 597 of file ProceduralBuilding.cpp.
References CurrentTransform, carla::geom::Rotation::GetForwardVector(), and UseFullBlocks.
Referenced by AddChunck().
|
private |
Definition at line 611 of file ProceduralBuilding.cpp.
References CurrentTransform, carla::geom::Rotation::GetRightVector(), and UseFullBlocks.
Referenced by CreateRoof(), and CreateSide().
|
protected |
Definition at line 176 of file ProceduralBuilding.h.
Referenced by CreateBuilding(), and SetBaseMeshes().
|
protected |
Meshes.
Meshes | Base
Definition at line 172 of file ProceduralBuilding.h.
Referenced by CreateBuilding(), and SetBaseMeshes().
|
protected |
Definition at line 204 of file ProceduralBuilding.h.
Referenced by CreateBuilding(), and SetBodyMeshes().
|
protected |
Meshes | Body.
Definition at line 200 of file ProceduralBuilding.h.
Referenced by CreateBuilding(), and SetBodyMeshes().
|
protected |
Definition at line 108 of file ProceduralBuilding.h.
Referenced by AddChunck(), ConvertOldBP_ToNativeCodeObject(), FixMobility(), HideAllChildren(), and Reset().
|
protected |
Definition at line 192 of file ProceduralBuilding.h.
Referenced by CreateBuilding(), and SetBaseMeshes().
|
protected |
Definition at line 188 of file ProceduralBuilding.h.
Referenced by CreateBuilding(), and SetBaseMeshes().
|
protected |
Definition at line 220 of file ProceduralBuilding.h.
Referenced by CreateBuilding(), and SetBodyMeshes().
|
protected |
Definition at line 216 of file ProceduralBuilding.h.
Referenced by CreateBuilding(), and SetBodyMeshes().
|
protected |
Definition at line 139 of file ProceduralBuilding.h.
Referenced by CreateSide(), and SetBaseParameters().
|
protected |
Definition at line 240 of file ProceduralBuilding.h.
Referenced by CreateBuilding(), and SetTopMeshes().
|
protected |
Definition at line 236 of file ProceduralBuilding.h.
Referenced by CreateBuilding(), and SetTopMeshes().
|
protected |
Definition at line 155 of file ProceduralBuilding.h.
Referenced by AProceduralBuilding(), CalculateSideVisibilities(), and SetVisibilityParameters().
|
private |
Definition at line 307 of file ProceduralBuilding.h.
Referenced by AddChunck(), AddMeshToBuilding(), CreateFloor(), CreateRoof(), Reset(), UpdateTransformPositionToNextChunk(), and UpdateTransformPositionToNextSide().
|
protected |
Definition at line 184 of file ProceduralBuilding.h.
Referenced by CreateBuilding(), and SetBaseMeshes().
|
protected |
Definition at line 180 of file ProceduralBuilding.h.
Referenced by CreateBuilding(), and SetBaseMeshes().
|
protected |
Base Parameters.
Definition at line 119 of file ProceduralBuilding.h.
Referenced by CalculateDoorsIndexInSide(), and SetBaseParameters().
|
protected |
Definition at line 104 of file ProceduralBuilding.h.
Referenced by GetHISMComp(), and Reset().
|
private |
Definition at line 309 of file ProceduralBuilding.h.
Referenced by CreateRoof(), and CreateSide().
|
protected |
Definition at line 131 of file ProceduralBuilding.h.
Referenced by CalculateSidesLength(), CreateRoof(), and SetBaseParameters().
|
protected |
Definition at line 135 of file ProceduralBuilding.h.
Referenced by CalculateSidesLength(), CreateRoof(), and SetBaseParameters().
|
protected |
Definition at line 127 of file ProceduralBuilding.h.
Referenced by CreateBuilding(), and SetBaseParameters().
|
protected |
Definition at line 248 of file ProceduralBuilding.h.
Referenced by CreateRoof(), and SetTopMeshes().
|
protected |
Definition at line 244 of file ProceduralBuilding.h.
Referenced by CreateRoof(), and SetTopMeshes().
|
protected |
Definition at line 159 of file ProceduralBuilding.h.
Referenced by CreateRoof(), and SetVisibilityParameters().
|
protected |
Definition at line 111 of file ProceduralBuilding.h.
Referenced by AProceduralBuilding().
|
private |
Definition at line 304 of file ProceduralBuilding.h.
Referenced by CalculateSidesLength(), CreateFloor(), and Reset().
|
protected |
Base Parameters | Visibility.
Definition at line 151 of file ProceduralBuilding.h.
Referenced by AProceduralBuilding(), CalculateSideVisibilities(), and SetVisibilityParameters().
|
protected |
Definition at line 232 of file ProceduralBuilding.h.
Referenced by CreateBuilding(), and SetTopMeshes().
|
protected |
Meshes | Top.
Definition at line 228 of file ProceduralBuilding.h.
Referenced by CreateBuilding(), and SetTopMeshes().
|
protected |
Definition at line 143 of file ProceduralBuilding.h.
Referenced by CalculateSidesLength(), CalculateSideVisibilities(), CreateFloor(), SetBaseParameters(), UpdateTransformPositionToNextChunk(), and UpdateTransformPositionToNextSide().
|
protected |
Definition at line 123 of file ProceduralBuilding.h.
Referenced by AProceduralBuilding(), CreateFloor(), and SetBaseParameters().
|
protected |
Definition at line 212 of file ProceduralBuilding.h.
Referenced by CreateBuilding(), and SetBodyMeshes().
|
protected |
Definition at line 208 of file ProceduralBuilding.h.
Referenced by CreateBuilding(), and SetBodyMeshes().