#include <ProceduralBuilding.h>
Inheritance diagram for AProceduralBuilding:
Collaboration 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. More... | |
| TArray< TSubclassOf< AActor > > | BodyBPs |
| TArray< UStaticMesh * > | BodyMeshes |
| Meshes | Body. More... | |
| TArray< 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. More... | |
| TMap< FString, UHierarchicalInstancedStaticMeshComponent * > | HISMComps |
| int | LengthX = 0 |
| int | LengthY = 0 |
| int | NumFloors = 0 |
| TArray< TSubclassOf< AActor > > | RoofBPs |
| TArray< UStaticMesh * > | RoofMeshes |
| bool | RoofVisibility = true |
| UStaticMeshComponent * | RootSMComp = nullptr |
| TArray< bool > | SideVisibility |
| Base Parameters | Visibility. More... | |
| TArray< TSubclassOf< AActor > > | TopBPs |
| TArray< UStaticMesh * > | TopMeshes |
| Meshes | Top. More... | |
| 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 26 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().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 584 of file ProceduralBuilding.cpp.
References CurrentTransform, and GetHISMComp().
Referenced by AddChunck().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 452 of file ProceduralBuilding.cpp.
References DoorsIndexPosition.
Referenced by CreateFloor().
Here is the caller graph for this function:
|
private |
Definition at line 432 of file ProceduralBuilding.cpp.
References LengthX, LengthY, SidesLength, and UseFullBlocks.
Referenced by Init().
Here is the caller graph for this function:
|
private |
Definition at line 478 of file ProceduralBuilding.cpp.
References CornerVisibility, SideVisibility, and UseFullBlocks.
Referenced by CreateFloor().
Here is the caller graph for this function:
|
private |
Definition at line 484 of file ProceduralBuilding.cpp.
Referenced by CreateRoof(), and CreateSide().
Here is the caller graph for this function:| void AProceduralBuilding::ConvertOldBP_ToNativeCodeObject | ( | AActor * | BP_Building | ) |
Definition at line 57 of file ProceduralBuilding.cpp.
References ChildActorComps, and GetHISMComp().
Here is the call graph for this function:
|
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.
Here is the call graph for this function:
|
private |
Definition at line 280 of file ProceduralBuilding.cpp.
References CalculateDoorsIndexInSide(), CalculateSideVisibilities(), CreateSide(), CurrentTransform, GenerateWallsIndexPositions(), SidesLength, UseFullBlocks, and UseWallMesh.
Referenced by CreateBuilding().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 329 of file ProceduralBuilding.cpp.
References AddChunck(), ChooseGeometryToSpawn(), CurrentTransform, LastSelectedMeshBounds, LengthX, LengthY, RoofBPs, RoofMeshes, RoofVisibility, and UpdateTransformPositionToNextSide().
Referenced by CreateBuilding().
Here is the call graph for this function:
Here is the caller graph for this function:
|
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().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Definition at line 49 of file ProceduralBuilding.cpp.
References ChildActorComps.
|
private |
Definition at line 468 of file ProceduralBuilding.cpp.
Referenced by CreateFloor().
Here is the caller graph for this function:| UHierarchicalInstancedStaticMeshComponent * AProceduralBuilding::GetHISMComp | ( | const UStaticMesh * | SM | ) |
Definition at line 22 of file ProceduralBuilding.cpp.
References HISMComps.
Referenced by AddMeshToBuilding(), and ConvertOldBP_ToNativeCodeObject().
Here is the caller graph for this function:
|
private |
Definition at line 591 of file ProceduralBuilding.cpp.
Referenced by AddChunck().
Here is the caller graph for this function:| 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().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Definition at line 241 of file ProceduralBuilding.cpp.
References ChildActorComps, CurrentTransform, HISMComps, and SidesLength.
Referenced by Init().
Here is the caller graph for this function:| 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, and UseFullBlocks.
Referenced by AddChunck().
Here is the caller graph for this function:
|
private |
Definition at line 611 of file ProceduralBuilding.cpp.
References CurrentTransform, and UseFullBlocks.
Referenced by CreateRoof(), and CreateSide().
Here is the caller graph for this function:
|
protected |
Definition at line 175 of file ProceduralBuilding.h.
Referenced by CreateBuilding(), and SetBaseMeshes().
|
protected |
Meshes.
Meshes | Base
Definition at line 171 of file ProceduralBuilding.h.
Referenced by CreateBuilding(), and SetBaseMeshes().
|
protected |
Definition at line 203 of file ProceduralBuilding.h.
Referenced by CreateBuilding(), and SetBodyMeshes().
|
protected |
Meshes | Body.
Definition at line 199 of file ProceduralBuilding.h.
Referenced by CreateBuilding(), and SetBodyMeshes().
|
protected |
Definition at line 107 of file ProceduralBuilding.h.
Referenced by AddChunck(), ConvertOldBP_ToNativeCodeObject(), FixMobility(), HideAllChildren(), and Reset().
|
protected |
Definition at line 191 of file ProceduralBuilding.h.
Referenced by CreateBuilding(), and SetBaseMeshes().
|
protected |
Definition at line 187 of file ProceduralBuilding.h.
Referenced by CreateBuilding(), and SetBaseMeshes().
|
protected |
Definition at line 219 of file ProceduralBuilding.h.
Referenced by CreateBuilding(), and SetBodyMeshes().
|
protected |
Definition at line 215 of file ProceduralBuilding.h.
Referenced by CreateBuilding(), and SetBodyMeshes().
|
protected |
Definition at line 138 of file ProceduralBuilding.h.
Referenced by CreateSide(), and SetBaseParameters().
|
protected |
Definition at line 239 of file ProceduralBuilding.h.
Referenced by CreateBuilding(), and SetTopMeshes().
|
protected |
Definition at line 235 of file ProceduralBuilding.h.
Referenced by CreateBuilding(), and SetTopMeshes().
|
protected |
Definition at line 154 of file ProceduralBuilding.h.
Referenced by AProceduralBuilding(), CalculateSideVisibilities(), and SetVisibilityParameters().
|
private |
Definition at line 306 of file ProceduralBuilding.h.
Referenced by AddChunck(), AddMeshToBuilding(), CreateFloor(), CreateRoof(), Reset(), UpdateTransformPositionToNextChunk(), and UpdateTransformPositionToNextSide().
|
protected |
Definition at line 183 of file ProceduralBuilding.h.
Referenced by CreateBuilding(), and SetBaseMeshes().
|
protected |
Definition at line 179 of file ProceduralBuilding.h.
Referenced by CreateBuilding(), and SetBaseMeshes().
|
protected |
Base Parameters.
Definition at line 118 of file ProceduralBuilding.h.
Referenced by CalculateDoorsIndexInSide(), and SetBaseParameters().
|
protected |
Definition at line 103 of file ProceduralBuilding.h.
Referenced by GetHISMComp(), and Reset().
|
private |
Definition at line 308 of file ProceduralBuilding.h.
Referenced by CreateRoof(), and CreateSide().
|
protected |
Definition at line 130 of file ProceduralBuilding.h.
Referenced by CalculateSidesLength(), CreateRoof(), and SetBaseParameters().
|
protected |
Definition at line 134 of file ProceduralBuilding.h.
Referenced by CalculateSidesLength(), CreateRoof(), and SetBaseParameters().
|
protected |
Definition at line 126 of file ProceduralBuilding.h.
Referenced by CreateBuilding(), and SetBaseParameters().
|
protected |
Definition at line 247 of file ProceduralBuilding.h.
Referenced by CreateRoof(), and SetTopMeshes().
|
protected |
Definition at line 243 of file ProceduralBuilding.h.
Referenced by CreateRoof(), and SetTopMeshes().
|
protected |
Definition at line 158 of file ProceduralBuilding.h.
Referenced by CreateRoof(), and SetVisibilityParameters().
|
protected |
Definition at line 110 of file ProceduralBuilding.h.
Referenced by AProceduralBuilding().
|
private |
Definition at line 303 of file ProceduralBuilding.h.
Referenced by CalculateSidesLength(), CreateFloor(), and Reset().
|
protected |
Base Parameters | Visibility.
Definition at line 150 of file ProceduralBuilding.h.
Referenced by AProceduralBuilding(), CalculateSideVisibilities(), and SetVisibilityParameters().
|
protected |
Definition at line 231 of file ProceduralBuilding.h.
Referenced by CreateBuilding(), and SetTopMeshes().
|
protected |
Meshes | Top.
Definition at line 227 of file ProceduralBuilding.h.
Referenced by CreateBuilding(), and SetTopMeshes().
|
protected |
Definition at line 142 of file ProceduralBuilding.h.
Referenced by CalculateSidesLength(), CalculateSideVisibilities(), CreateFloor(), SetBaseParameters(), UpdateTransformPositionToNextChunk(), and UpdateTransformPositionToNextSide().
|
protected |
Definition at line 122 of file ProceduralBuilding.h.
Referenced by AProceduralBuilding(), CreateFloor(), and SetBaseParameters().
|
protected |
Definition at line 211 of file ProceduralBuilding.h.
Referenced by CreateBuilding(), and SetBodyMeshes().
|
protected |
Definition at line 207 of file ProceduralBuilding.h.
Referenced by CreateBuilding(), and SetBodyMeshes().
1.8.13