CARLA
 
载入中...
搜索中...
未找到
StaticMeshCollection.h
浏览该文件的文档.
1// Copyright (c) 2017 Computer Vision Center (CVC) at the Universitat Autonoma
2// de Barcelona (UAB).
3//
4// This work is licensed under the terms of the MIT license.
5// For a copy, see <https://opensource.org/licenses/MIT>.
6
7#pragma once
8
9#include "GameFramework/Actor.h"
10#include "StaticMeshCollection.generated.h"
11
12class UInstancedStaticMeshComponent;
13
14/// Holds static mesh instatiators.
15UCLASS(Abstract)
16class CARLA_API AStaticMeshCollection : public AActor
17{
18 GENERATED_BODY()
19
20public:
21
22 AStaticMeshCollection(const FObjectInitializer& ObjectInitializer);
23
24protected:
25
27 {
28 return MeshInstantiators.Num();
29 }
30
31 void PushBackInstantiator(UStaticMesh *Mesh);
32
33 void SetStaticMesh(uint32 i, UStaticMesh *Mesh);
34
35 void AddInstance(uint32 i, const FTransform &Transform);
36
37 void ClearInstances();
38
39 /// Clear the instances too.
40 void ClearInstantiators();
41
42private:
43
44 UPROPERTY(Category = "Instanced Static Mesh Collection", VisibleAnywhere)
45 TArray<UInstancedStaticMeshComponent *> MeshInstantiators;
46};
Holds static mesh instatiators.
uint32 GetNumberOfInstantiators() const