RuntimeMeshBuilder.h
Go to the documentation of this file.
1 // Copyright 2016-2018 Chris Conway (Koderz). All Rights Reserved.
2 
3 #pragma once
4 
5 #include "CoreMinimal.h"
6 #include "RuntimeMeshCore.h"
8 
9 class FRuntimeMeshData;
10 using FRuntimeMeshDataPtr = TSharedPtr<FRuntimeMeshData, ESPMode::ThreadSafe>;
12 using FRuntimeMeshSectionPtr = TSharedPtr<FRuntimeMeshSection, ESPMode::ThreadSafe>;
13 
14 
15 struct RUNTIMEMESHCOMPONENT_API FRuntimeMeshAccessorVertex
16 {
17  FVector Position;
18  FVector4 Normal;
19  FVector Tangent;
20  FColor Color;
21 
22  TArray<FVector2D, TInlineAllocator<RUNTIMEMESH_MAXTEXCOORDS>> UVs;
23 };
24 
25 class RUNTIMEMESHCOMPONENT_API FRuntimeMeshVerticesAccessor
26 {
29  TArray<uint8>* PositionStream;
30  static const int32 PositionStride = 12;
31  TArray<uint8>* TangentStream;
33  const int32 TangentSize;
34  const int32 TangentStride;
35  TArray<uint8>* UVStream;
36  const bool bUVHighPrecision;
37  const int32 UVChannelCount;
38  const int32 UVSize;
39  const int32 UVStride;
40  TArray<uint8>* ColorStream;
41  static const int32 ColorStride = 4;
42 
43 public:
44 
45  FRuntimeMeshVerticesAccessor(bool bInTangentsHighPrecision, bool bInUVsHighPrecision, int32 bInUVCount,
46  TArray<uint8>* PositionStreamData, TArray<uint8>* TangentStreamData, TArray<uint8>* UVStreamData, TArray<uint8>* ColorStreamData, bool bInIsReadonly = false);
48 
49 protected:
50  FRuntimeMeshVerticesAccessor(TArray<uint8>* PositionStreamData, TArray<uint8>* TangentStreamData, TArray<uint8>* UVStreamData, TArray<uint8>* ColorStreamData, bool bInIsReadonly);
51 
52  void Initialize(bool bInTangentsHighPrecision, bool bInUVsHighPrecision, int32 bInUVCount);
53 
54 public:
55  const bool IsUsingHighPrecisionTangents() const { return bTangentHighPrecision; }
56  const bool IsUsingHighPrecisionUVs() const { return bUVHighPrecision; }
57 
58  const bool IsReadonly() const { return bIsReadonly; }
59 
60  int32 NumVertices() const;
61  int32 NumUVChannels() const;
62 
63  void EmptyVertices(int32 Slack = 0);
64  void SetNumVertices(int32 NewNum);
65 
66  int32 AddVertex(FVector InPosition);
67 
68  FVector GetPosition(int32 Index) const;
69  FVector4 GetNormal(int32 Index) const;
70  FVector GetTangent(int32 Index) const;
71  FColor GetColor(int32 Index) const;
72  FVector2D GetUV(int32 Index, int32 Channel = 0) const;
73 
74 
75  void SetPosition(int32 Index, const FVector& Value);
76  bool SetPositions(const int32 InsertAtIndex, const TArray<FVector>& Positions, const int32 Count, const bool bSizeToFit);
77  bool SetPositions(const int32 InsertAtIndex, const FVector *const Positions, const int32 Count, const bool bSizeToFit);
78  void SetNormal(int32 Index, const FVector4& Value);
79  void SetTangent(int32 Index, const FVector& Value);
80  void SetTangent(int32 Index, const FRuntimeMeshTangent& Value);
81  void SetColor(int32 Index, const FColor& Value);
82  bool SetColors(const int32 InsertAtIndex, const TArray<FColor>& Colors, const int32 Count, const bool bSizeToFit);
83  bool SetColors(const int32 InsertAtIndex, const FColor *const Colors, const int32 Count, const bool bSizeToFit);
84  void SetUV(int32 Index, const FVector2D& Value);
85  void SetUV(int32 Index, int32 Channel, const FVector2D& Value);
86 
100  bool SetUVs(const int32 InsertAtVertexIndex, const TArray<FVector2D>& UVs, const int32 CountVertices, const bool bSizeToFit);
101  bool SetUVs(const int32 InsertAtVertexIndex, const TArray<FVector2DHalf>& UVs, const int32 CountVertices, const bool bSizeToFit);
102 
117  bool SetUVs(const int32 InsertAtVertexIndex, const FVector2D *const UVs, const int32 CountVertices, const bool bSizeToFit);
118  bool SetUVs(const int32 InsertAtVertexIndex, const FVector2DHalf *const UVs, const int32 CountVertices, const bool bSizeToFit);
119 
120  void SetNormalTangent(int32 Index, FVector Normal, FRuntimeMeshTangent Tangent);
121  void SetTangents(int32 Index, FVector TangentX, FVector TangentY, FVector TangentZ);
122 
123  FRuntimeMeshAccessorVertex GetVertex(int32 Index) const;
124  void SetVertex(int32 Index, const FRuntimeMeshAccessorVertex& Vertex);
125  int32 AddVertex(const FRuntimeMeshAccessorVertex& Vertex);
126 
127 
128 private:
129 
130  template<typename Type>
132  {
133 #if ENGINE_MAJOR_VERSION >= 4 && ENGINE_MINOR_VERSION >= 20
134  return Input.ToFVector4();
135 #else
136  return Input;
137 #endif
138  }
139 
140  template<typename Type>
142  {
143 #if ENGINE_MAJOR_VERSION >= 4 && ENGINE_MINOR_VERSION >= 20
144  return Input.ToFVector();
145 #else
146  return Input;
147 #endif
148  }
149 
150  template<typename Type>
151  typename TEnableIf<FRuntimeMeshVertexTraits<Type>::HasPosition>::Type
152  SetPositionValue(int32 Index, const Type& Vertex)
153  {
154  SetPosition(Index, Vertex.Position);
155  }
156 
157  template<typename Type>
158  typename TEnableIf<!FRuntimeMeshVertexTraits<Type>::HasPosition>::Type
159  SetPositionValue(int32 Index, const Type& Vertex)
160  {
161  }
162 
163  template<typename Type>
164  typename TEnableIf<FRuntimeMeshVertexTraits<Type>::HasNormal>::Type
165  SetNormalValue(int32 Index, const Type& Vertex)
166  {
167  SetNormal(Index, ConvertPackedToNormal(Vertex.Normal));
168  }
169 
170  template<typename Type>
171  typename TEnableIf<!FRuntimeMeshVertexTraits<Type>::HasNormal>::Type
172  SetNormalValue(int32 Index, const Type& Vertex)
173  {
174  }
175 
176  template<typename Type>
177  typename TEnableIf<FRuntimeMeshVertexTraits<Type>::HasTangent>::Type
178  SetTangentValue(int32 Index, const Type& Vertex)
179  {
180  SetTangent(Index, ConvertPackedToTangent(Vertex.Tangent));
181  }
182 
183  template<typename Type>
184  typename TEnableIf<!FRuntimeMeshVertexTraits<Type>::HasTangent>::Type
185  SetTangentValue(int32 Index, const Type& Vertex)
186  {
187  }
188 
189  template<typename Type>
190  typename TEnableIf<FRuntimeMeshVertexTraits<Type>::HasColor>::Type
191  SetColorValue(int32 Index, const Type& Vertex)
192  {
193  SetColor(Index, Vertex.Color);
194  }
195 
196  template<typename Type>
197  typename TEnableIf<!FRuntimeMeshVertexTraits<Type>::HasColor>::Type
198  SetColorValue(int32 Index, const Type& Vertex)
199  {
200  }
201 
202 
203 
204 
205  template<typename Type>
206  typename TEnableIf<FRuntimeMeshVertexTraits<Type>::HasUV0>::Type
207  SetUV0Value(int32 Index, const Type& Vertex)
208  {
209  SetUV(Index, 0, Vertex.UV0);
210  }
211 
212  template<typename Type>
213  typename TEnableIf<!FRuntimeMeshVertexTraits<Type>::HasUV0>::Type
214  SetUV0Value(int32 Index, const Type& Vertex)
215  {
216  }
217 
218  template<typename Type>
219  typename TEnableIf<FRuntimeMeshVertexTraits<Type>::HasUV1>::Type
220  SetUV1Value(int32 Index, const Type& Vertex)
221  {
222  SetUV(Index, 1, Vertex.UV1);
223  }
224 
225  template<typename Type>
226  typename TEnableIf<!FRuntimeMeshVertexTraits<Type>::HasUV1>::Type
227  SetUV1Value(int32 Index, const Type& Vertex)
228  {
229  }
230 
231  template<typename Type>
232  typename TEnableIf<FRuntimeMeshVertexTraits<Type>::HasUV2>::Type
233  SetUV2Value(int32 Index, const Type& Vertex)
234  {
235  SetUV(Index, 2, Vertex.UV2);
236  }
237 
238  template<typename Type>
239  typename TEnableIf<!FRuntimeMeshVertexTraits<Type>::HasUV2>::Type
240  SetUV2Value(int32 Index, const Type& Vertex)
241  {
242  }
243 
244  template<typename Type>
245  typename TEnableIf<FRuntimeMeshVertexTraits<Type>::HasUV3>::Type
246  SetUV3Value(int32 Index, const Type& Vertex)
247  {
248  SetUV(Index, 3, Vertex.UV3);
249  }
250 
251  template<typename Type>
252  typename TEnableIf<!FRuntimeMeshVertexTraits<Type>::HasUV3>::Type
253  SetUV3Value(int32 Index, const Type& Vertex)
254  {
255  }
256 
257  template<typename Type>
258  typename TEnableIf<FRuntimeMeshVertexTraits<Type>::HasUV4>::Type
259  SetUV4Value(int32 Index, const Type& Vertex)
260  {
261  SetUV(Index, 4, Vertex.UV4);
262  }
263 
264  template<typename Type>
265  typename TEnableIf<!FRuntimeMeshVertexTraits<Type>::HasUV4>::Type
266  SetUV4Value(int32 Index, const Type& Vertex)
267  {
268  }
269 
270  template<typename Type>
271  typename TEnableIf<FRuntimeMeshVertexTraits<Type>::HasUV5>::Type
272  SetUV5Value(int32 Index, const Type& Vertex)
273  {
274  SetUV(Index, 5, Vertex.UV5);
275  }
276 
277  template<typename Type>
278  typename TEnableIf<!FRuntimeMeshVertexTraits<Type>::HasUV5>::Type
279  SetUV5Value(int32 Index, const Type& Vertex)
280  {
281  }
282 
283  template<typename Type>
284  typename TEnableIf<FRuntimeMeshVertexTraits<Type>::HasUV6>::Type
285  SetUV6Value(int32 Index, const Type& Vertex)
286  {
287  SetUV(Index, 6, Vertex.UV6);
288  }
289 
290  template<typename Type>
291  typename TEnableIf<!FRuntimeMeshVertexTraits<Type>::HasUV6>::Type
292  SetUV6Value(int32 Index, const Type& Vertex)
293  {
294  }
295 
296  template<typename Type>
297  typename TEnableIf<FRuntimeMeshVertexTraits<Type>::HasUV7>::Type
298  SetUV7Value(int32 Index, const Type& Vertex)
299  {
300  SetUV(Index, 7, Vertex.UV7);
301  }
302 
303  template<typename Type>
304  typename TEnableIf<!FRuntimeMeshVertexTraits<Type>::HasUV7>::Type
305  SetUV7Value(int32 Index, const Type& Vertex)
306  {
307  }
308 
309 
310 
311 
312 public:
313  // Helper for setting vertex properties from the old style packed vertices like the generic vertex
314  template<typename VertexType>
315  void SetVertexProperties(int32 Index, const VertexType& Vertex)
316  {
317  SetPositionValue(Index, Vertex);
318  SetNormalValue(Index, Vertex);
319  SetTangentValue(Index, Vertex);
320  SetColorValue(Index, Vertex);
321 
322  SetUV0Value(Index, Vertex);
323  SetUV1Value(Index, Vertex);
324  SetUV2Value(Index, Vertex);
325  SetUV3Value(Index, Vertex);
326  SetUV4Value(Index, Vertex);
327  SetUV5Value(Index, Vertex);
328  SetUV6Value(Index, Vertex);
329  SetUV7Value(Index, Vertex);
330  }
331 
332  template<typename VertexType0>
333  void AddVertexByProperties(const VertexType0& Vertex0)
334  {
335  int32 NewIndex = AddSingleVertex();
336  SetVertexProperties(NewIndex, Vertex0);
337  }
338 
339  template<typename VertexType0, typename VertexType1>
340  void AddVertexByProperties(const VertexType0& Vertex0, const VertexType1& Vertex1)
341  {
342  int32 NewIndex = AddSingleVertex();
343  SetVertexProperties(NewIndex, Vertex0);
344  SetVertexProperties(NewIndex, Vertex1);
345  }
346 
347  template<typename VertexType0, typename VertexType1, typename VertexType2>
348  void AddVertexByProperties(const VertexType0& Vertex0, const VertexType1& Vertex1, const VertexType2& Vertex2)
349  {
350  int32 NewIndex = AddSingleVertex();
351  SetVertexProperties(NewIndex, Vertex0);
352  SetVertexProperties(NewIndex, Vertex1);
353  SetVertexProperties(NewIndex, Vertex2);
354  }
355 
356 
357 protected:
358 
359  void Unlink()
360  {
361  bIsInitialized = false;
362  PositionStream = nullptr;
363  TangentStream = nullptr;
364  UVStream = nullptr;
365  ColorStream = nullptr;
366  }
367 
368  int32 AddSingleVertex();
369 
370 };
371 
372 // ISO C++ (IS 14.7.2/6) and Clang want template specializations to occur outside of the class scope
373 template<>
374 inline FVector4 FRuntimeMeshVerticesAccessor::ConvertPackedToNormal<FVector4>(const FVector4& Input)
375 {
376  return Input;
377 }
378 template<>
379 inline FVector FRuntimeMeshVerticesAccessor::ConvertPackedToTangent<FVector>(const FVector& Input)
380 {
381  return Input;
382 }
383 
384 class RUNTIMEMESHCOMPONENT_API FRuntimeMeshIndicesAccessor
385 {
388  TArray<uint8>* IndexStream;
390 
391 public:
392 
393  FRuntimeMeshIndicesAccessor(bool bIn32BitIndices, TArray<uint8>* IndexStreamData, bool bInIsReadonly = false);
394  virtual ~FRuntimeMeshIndicesAccessor();
395 
396 protected:
397  FRuntimeMeshIndicesAccessor(TArray<uint8>* IndexStreamData, bool bInIsReadonly);
398 
399  void Initialize(bool bIn32BitIndices);
400 
401 public:
402  bool IsUsing32BitIndices() const { return b32BitIndices; }
403 
404  const bool IsReadonly() const { return bIsReadonly; }
405 
406 
407  int32 NumIndices() const;
408  void EmptyIndices(int32 Slack = 0);
409  void SetNumIndices(int32 NewNum);
410  int32 AddIndex(int32 NewIndex);
411  int32 AddTriangle(int32 Index0, int32 Index1, int32 Index2);
412 
413  int32 GetIndex(int32 Index) const;
414  void SetIndex(int32 Index, int32 Value);
415  bool SetIndices(const int32 InsertAtIndex, const TArray<uint16>& Indices, const int32 Count, const bool bSizeToFit);
416  bool SetIndices(const int32 InsertAtIndex, const uint16 *const Indices, const int32 Count, const bool bSizeToFit);
417  bool SetIndices(const int32 InsertAtIndex, const TArray<int32>& Indices, const int32 Count, const bool bSizeToFit);
418  bool SetIndices(const int32 InsertAtIndex, const int32 *const Indices, const int32 Count, const bool bSizeToFit);
419 
420 protected:
421 
422  FORCEINLINE int32 GetIndexStride() const { return b32BitIndices ? sizeof(int32) : sizeof(uint16); }
423 
424  void Unlink()
425  {
426  bIsInitialized = false;
427  IndexStream = nullptr;
428  }
429 };
430 
431 
436 {
437 
438 
439 public:
440 
441  FRuntimeMeshAccessor(bool bInTangentsHighPrecision, bool bInUVsHighPrecision, int32 bInUVCount, bool bIn32BitIndices, TArray<uint8>* PositionStreamData,
442  TArray<uint8>* TangentStreamData, TArray<uint8>* UVStreamData, TArray<uint8>* ColorStreamData, TArray<uint8>* IndexStreamData, bool bInIsReadonly = false);
443  virtual ~FRuntimeMeshAccessor() override;
444 
445 protected:
446  FRuntimeMeshAccessor(TArray<uint8>* PositionStreamData, TArray<uint8>* TangentStreamData, TArray<uint8>* UVStreamData, TArray<uint8>* ColorStreamData, TArray<uint8>* IndexStreamData, bool bInIsReadonly);
447 
448  void Initialize(bool bInTangentsHighPrecision, bool bInUVsHighPrecision, int32 bInUVCount, bool bIn32BitIndices);
449 
450 public:
452 
453  void CopyTo(const TSharedPtr<FRuntimeMeshAccessor>& Other, bool bClearDestination = false) const;
454 
455  void Unlink()
456  {
459  }
460 
461 };
462 
463 
468 class RUNTIMEMESHCOMPONENT_API FRuntimeMeshBuilder : public FRuntimeMeshAccessor
469 {
470  TArray<uint8> PositionStream;
471  TArray<uint8> TangentStream;
472  TArray<uint8> UVStream;
473  TArray<uint8> ColorStream;
474 
475  TArray<uint8> IndexStream;
476 
477 public:
478  FRuntimeMeshBuilder(bool bInTangentsHighPrecision, bool bInUVsHighPrecision, int32 bInUVCount, bool bIn32BitIndices);
479 
480  virtual ~FRuntimeMeshBuilder() override;
481 
482  TArray<uint8>& GetPositionStream() { return PositionStream; }
483  TArray<uint8>& GetTangentStream() { return TangentStream; }
484  TArray<uint8>& GetUVStream() { return UVStream; }
485  TArray<uint8>& GetColorStream() { return ColorStream; }
486  TArray<uint8>& GetIndexStream() { return IndexStream; }
487 };
488 
489 
490 class RUNTIMEMESHCOMPONENT_API FRuntimeMeshScopedUpdater : public FRuntimeMeshAccessor, private FRuntimeMeshScopeLock
491 {
495 
496 private:
497  FRuntimeMeshScopedUpdater(const FRuntimeMeshDataPtr& InLinkedMeshData, int32 InSectionIndex, ESectionUpdateFlags InUpdateFlags, bool bInTangentsHighPrecision, bool bInUVsHighPrecision, int32 bInUVCount, bool bIn32BitIndices, TArray<uint8>* PositionStreamData,
498  TArray<uint8>* TangentStreamData, TArray<uint8>* UVStreamData, TArray<uint8>* ColorStreamData, TArray<uint8>* IndexStreamData, FRuntimeMeshLockProvider* InSyncObject, bool bIsReadonly);
499 
500 public:
502 
503  void Commit(bool bNeedsPositionUpdate = true, bool bNeedsNormalTangentUpdate = true, bool bNeedsColorUpdate = true, bool bNeedsUVUpdate = true, bool bNeedsIndexUpdate = true);
504  void Commit(const FBox& BoundingBox, bool bNeedsPositionUpdate = true, bool bNeedsNormalTangentUpdate = true, bool bNeedsColorUpdate = true, bool bNeedsUVUpdate = true, bool bNeedsIndexUpdate = true);
505  void Cancel();
506 
507  friend class FRuntimeMeshData;
508  friend class FRuntimeMeshSection;
509 };
510 
511 
512 
513 template<typename TangentType, typename UVType, typename IndexType>
514 FORCEINLINE TSharedRef<FRuntimeMeshBuilder> MakeRuntimeMeshBuilder()
515 {
516  bool bIsUsingHighPrecisionUVs;
517  int32 NumUVChannels;
518  GetUVVertexProperties<UVType>(bIsUsingHighPrecisionUVs, NumUVChannels);
519 
520  return MakeShared<FRuntimeMeshBuilder>(GetTangentIsHighPrecision<TangentType>(), bIsUsingHighPrecisionUVs, NumUVChannels, (bool)FRuntimeMeshIndexTraits<IndexType>::Is32Bit);
521 }
522 
523 FORCEINLINE TSharedRef<FRuntimeMeshBuilder> MakeRuntimeMeshBuilder(bool bUsingHighPrecisionTangents, bool bUsingHighPrecisionUVs, int32 NumUVs, bool bUsing32BitIndices)
524 {
525  return MakeShared<FRuntimeMeshBuilder>(bUsingHighPrecisionTangents, bUsingHighPrecisionUVs, NumUVs, bUsing32BitIndices);
526 }
527 
528 FORCEINLINE TSharedRef<FRuntimeMeshBuilder> MakeRuntimeMeshBuilder(const TSharedRef<const FRuntimeMeshAccessor>& StructureToCopy)
529 {
530  return MakeShared<FRuntimeMeshBuilder>(StructureToCopy->IsUsingHighPrecisionTangents(), StructureToCopy->IsUsingHighPrecisionUVs(), StructureToCopy->NumUVChannels(), StructureToCopy->IsUsing32BitIndices());
531 }
532 
533 FORCEINLINE TSharedRef<FRuntimeMeshBuilder> MakeRuntimeMeshBuilder(const TUniquePtr<const FRuntimeMeshAccessor>& StructureToCopy)
534 {
535  return MakeShared<FRuntimeMeshBuilder>(StructureToCopy->IsUsingHighPrecisionTangents(), StructureToCopy->IsUsingHighPrecisionUVs(), StructureToCopy->NumUVChannels(), StructureToCopy->IsUsing32BitIndices());
536 }
537 
538 FORCEINLINE TSharedRef<FRuntimeMeshBuilder> MakeRuntimeMeshBuilder(const FRuntimeMeshAccessor& StructureToCopy)
539 {
540  return MakeShared<FRuntimeMeshBuilder>(StructureToCopy.IsUsingHighPrecisionTangents(), StructureToCopy.IsUsingHighPrecisionUVs(), StructureToCopy.NumUVChannels(), StructureToCopy.IsUsing32BitIndices());
541 }
void AddVertexByProperties(const VertexType0 &Vertex0, const VertexType1 &Vertex1)
TEnableIf<!FRuntimeMeshVertexTraits< Type >::HasUV6 >::Type SetUV6Value(int32 Index, const Type &Vertex)
TEnableIf< FRuntimeMeshVertexTraits< Type >::HasColor >::Type SetColorValue(int32 Index, const Type &Vertex)
TEnableIf<!FRuntimeMeshVertexTraits< Type >::HasColor >::Type SetColorValue(int32 Index, const Type &Vertex)
TEnableIf<!FRuntimeMeshVertexTraits< Type >::HasUV3 >::Type SetUV3Value(int32 Index, const Type &Vertex)
TEnableIf< FRuntimeMeshVertexTraits< Type >::HasUV3 >::Type SetUV3Value(int32 Index, const Type &Vertex)
TArray< uint8 > & GetIndexStream()
ESectionUpdateFlags UpdateFlags
TArray< uint8 > & GetUVStream()
TEnableIf<!FRuntimeMeshVertexTraits< Type >::HasUV7 >::Type SetUV7Value(int32 Index, const Type &Vertex)
TEnableIf< FRuntimeMeshVertexTraits< Type >::HasUV5 >::Type SetUV5Value(int32 Index, const Type &Vertex)
TEnableIf<!FRuntimeMeshVertexTraits< Type >::HasUV1 >::Type SetUV1Value(int32 Index, const Type &Vertex)
const bool IsReadonly() const
void Initialize(bool bIn32BitIndices)
TEnableIf<!FRuntimeMeshVertexTraits< Type >::HasUV2 >::Type SetUV2Value(int32 Index, const Type &Vertex)
TEnableIf< FRuntimeMeshVertexTraits< Type >::HasUV2 >::Type SetUV2Value(int32 Index, const Type &Vertex)
TEnableIf< FRuntimeMeshVertexTraits< Type >::HasUV0 >::Type SetUV0Value(int32 Index, const Type &Vertex)
TEnableIf<!FRuntimeMeshVertexTraits< Type >::HasUV5 >::Type SetUV5Value(int32 Index, const Type &Vertex)
FORCEINLINE int32 GetIndexStride() const
TEnableIf<!FRuntimeMeshVertexTraits< Type >::HasNormal >::Type SetNormalValue(int32 Index, const Type &Vertex)
TSharedPtr< FRuntimeMeshData, ESPMode::ThreadSafe > FRuntimeMeshDataPtr
TArray< uint8 > PositionStream
FVector4 ConvertPackedToNormal(const Type &Input)
TArray< uint8 > TangentStream
void SetVertexProperties(int32 Index, const VertexType &Vertex)
TArray< uint8 > & GetColorStream()
TEnableIf< FRuntimeMeshVertexTraits< Type >::HasTangent >::Type SetTangentValue(int32 Index, const Type &Vertex)
const bool IsUsingHighPrecisionUVs() const
TEnableIf<!FRuntimeMeshVertexTraits< Type >::HasUV4 >::Type SetUV4Value(int32 Index, const Type &Vertex)
const bool IsUsingHighPrecisionTangents() const
FVector ConvertPackedToTangent(const Type &Input)
IMGUI_API void Value(const char *prefix, bool b)
Definition: imgui.cpp:9538
ESectionUpdateFlags
TEnableIf< FRuntimeMeshVertexTraits< Type >::HasUV7 >::Type SetUV7Value(int32 Index, const Type &Vertex)
TEnableIf< FRuntimeMeshVertexTraits< Type >::HasUV6 >::Type SetUV6Value(int32 Index, const Type &Vertex)
TArray< FVector2D, TInlineAllocator< RUNTIMEMESH_MAXTEXCOORDS > > UVs
TEnableIf< FRuntimeMeshVertexTraits< Type >::HasPosition >::Type SetPositionValue(int32 Index, const Type &Vertex)
TEnableIf< FRuntimeMeshVertexTraits< Type >::HasUV4 >::Type SetUV4Value(int32 Index, const Type &Vertex)
void AddVertexByProperties(const VertexType0 &Vertex0, const VertexType1 &Vertex1, const VertexType2 &Vertex2)
void AddVertexByProperties(const VertexType0 &Vertex0)
TArray< uint8 > UVStream
const bool IsReadonly() const
TEnableIf< FRuntimeMeshVertexTraits< Type >::HasUV1 >::Type SetUV1Value(int32 Index, const Type &Vertex)
TArray< uint8 > IndexStream
TEnableIf<!FRuntimeMeshVertexTraits< Type >::HasPosition >::Type SetPositionValue(int32 Index, const Type &Vertex)
TArray< uint8 > ColorStream
TArray< uint8 > & GetPositionStream()
FRuntimeMeshDataPtr LinkedMeshData
FORCEINLINE TSharedRef< FRuntimeMeshBuilder > MakeRuntimeMeshBuilder()
TEnableIf< FRuntimeMeshVertexTraits< Type >::HasNormal >::Type SetNormalValue(int32 Index, const Type &Vertex)
TEnableIf<!FRuntimeMeshVertexTraits< Type >::HasUV0 >::Type SetUV0Value(int32 Index, const Type &Vertex)
TEnableIf<!FRuntimeMeshVertexTraits< Type >::HasTangent >::Type SetTangentValue(int32 Index, const Type &Vertex)
TSharedPtr< FRuntimeMeshSection, ESPMode::ThreadSafe > FRuntimeMeshSectionPtr
TArray< uint8 > & GetTangentStream()


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:47:41