5 #include "CoreMinimal.h" 8 #include "RuntimeMeshBlueprintMeshBuilder.generated.h" 13 UCLASS(BlueprintType, Abstract)
41 UFUNCTION(BlueprintCallable, Category =
"Components|RuntimeMeshBuilder")
44 OutMeshBuilder =
this;
47 UFUNCTION(BlueprintCallable, Category =
"Components|RuntimeMeshBuilder")
50 OutMeshBuilder =
this;
51 return MeshAccessor->IsUsingHighPrecisionUVs();
53 UFUNCTION(BlueprintCallable, Category =
"Components|RuntimeMeshBuilder")
56 OutMeshBuilder =
this;
57 return MeshAccessor->IsUsing32BitIndices();
60 UFUNCTION(BlueprintCallable, Category =
"Components|RuntimeMeshBuilder")
63 OutMeshBuilder =
this;
64 return MeshAccessor->IsReadonly();
67 UFUNCTION(BlueprintCallable, Category =
"Components|RuntimeMeshBuilder")
70 OutMeshBuilder =
this;
71 return MeshAccessor->NumVertices();
73 UFUNCTION(BlueprintCallable, Category =
"Components|RuntimeMeshBuilder")
76 OutMeshBuilder =
this;
77 return MeshAccessor->NumUVChannels();
79 UFUNCTION(BlueprintCallable, Category =
"Components|RuntimeMeshBuilder")
82 OutMeshBuilder =
this;
83 return MeshAccessor->NumIndices();
86 UFUNCTION(BlueprintCallable, Category =
"Components|RuntimeMeshBuilder")
89 OutMeshBuilder =
this;
90 MeshAccessor->EmptyVertices(Slack);
92 UFUNCTION(BlueprintCallable, Category =
"Components|RuntimeMeshBuilder")
95 OutMeshBuilder =
this;
96 MeshAccessor->SetNumVertices(NewNum);
98 UFUNCTION(BlueprintCallable, Category =
"Components|RuntimeMeshBuilder")
101 OutMeshBuilder =
this;
102 MeshAccessor->EmptyIndices(Slack);
104 UFUNCTION(BlueprintCallable, Category =
"Components|RuntimeMeshBuilder")
107 OutMeshBuilder =
this;
108 MeshAccessor->SetNumIndices(NewNum);
111 UFUNCTION(BlueprintCallable, Category =
"Components|RuntimeMeshBuilder")
114 OutMeshBuilder =
this;
115 int32
Index = MeshAccessor->AddVertex(InPosition);
116 MeshAccessor->SetNormalTangent(
Index, Normal, Tangent);
117 MeshAccessor->SetUV(
Index, UV0);
118 MeshAccessor->SetColor(
Index,
Color.ToFColor(
false));
122 UFUNCTION(BlueprintCallable, Category =
"Components|RuntimeMeshBuilder")
125 OutMeshBuilder =
this;
126 return MeshAccessor->GetPosition(
Index);
128 UFUNCTION(BlueprintCallable, Category =
"Components|RuntimeMeshBuilder")
131 OutMeshBuilder =
this;
132 return MeshAccessor->GetNormal(
Index);
134 UFUNCTION(BlueprintCallable, Category =
"Components|RuntimeMeshBuilder")
137 OutMeshBuilder =
this;
138 return MeshAccessor->GetTangent(
Index);
140 UFUNCTION(BlueprintCallable, Category =
"Components|RuntimeMeshBuilder")
143 OutMeshBuilder =
this;
144 return FLinearColor(MeshAccessor->GetColor(
Index));
146 UFUNCTION(BlueprintCallable, Category =
"Components|RuntimeMeshBuilder")
149 OutMeshBuilder =
this;
150 return MeshAccessor->GetUV(
Index, Channel);
153 UFUNCTION(BlueprintCallable, Category =
"Components|RuntimeMeshBuilder")
156 OutMeshBuilder =
this;
157 MeshAccessor->SetPosition(
Index, InPosition);
158 MeshAccessor->SetNormalTangent(
Index, Normal, Tangent);
159 MeshAccessor->SetUV(
Index, UV0);
160 MeshAccessor->SetColor(
Index,
Color.ToFColor(
false));
165 UFUNCTION(BlueprintCallable, Category =
"Components|RuntimeMeshBuilder")
168 OutMeshBuilder =
this;
172 UFUNCTION(BlueprintCallable, Category =
"Components|RuntimeMeshBuilder")
175 OutMeshBuilder =
this;
180 UFUNCTION(BlueprintCallable, Category =
"Components|RuntimeMeshBuilder")
183 OutMeshBuilder =
this;
187 UFUNCTION(BlueprintCallable, Category =
"Components|RuntimeMeshBuilder")
190 OutMeshBuilder =
this;
191 MeshAccessor->SetColor(
Index,
Value.ToFColor(
false));
194 UFUNCTION(BlueprintCallable, Category =
"Components|RuntimeMeshBuilder")
197 OutMeshBuilder =
this;
202 UFUNCTION(BlueprintCallable, Category =
"Components|RuntimeMeshBuilder")
205 OutMeshBuilder =
this;
206 MeshAccessor->SetNormalTangent(
Index, Normal, Tangent);
209 UFUNCTION(BlueprintCallable, Category =
"Components|RuntimeMeshBuilder")
212 OutMeshBuilder =
this;
213 MeshAccessor->SetTangents(
Index, TangentX, TangentY, TangentZ);
222 UFUNCTION(BlueprintCallable, Category =
"Components|RuntimeMeshBuilder")
225 OutMeshBuilder =
this;
226 return MeshAccessor->AddIndex(NewIndex);
228 UFUNCTION(BlueprintCallable, Category =
"Components|RuntimeMeshBuilder")
231 OutMeshBuilder =
this;
232 return MeshAccessor->AddTriangle(Index0, Index1, Index2);
235 UFUNCTION(BlueprintCallable, Category =
"Components|RuntimeMeshBuilder")
238 OutMeshBuilder =
this;
239 return MeshAccessor->GetIndex(
Index);
241 UFUNCTION(BlueprintCallable, Category =
"Components|RuntimeMeshBuilder")
244 OutMeshBuilder =
this;
259 UFUNCTION(BlueprintCallable, Category =
"Components|RuntimeMeshBuilder")
typedef void(APIENTRY *GLDEBUGPROC)(GLenum source
TSharedPtr< FRuntimeMeshAccessor > MeshAccessor
const bool IsUsingHighPrecisionTangents() const
IMGUI_API void Value(const char *prefix, bool b)
FORCEINLINE TSharedRef< FRuntimeMeshBuilder > MakeRuntimeMeshBuilder()