RuntimeMeshGenericVertex.cpp 986 B

123456789101112131415161718192021222324252627282930
  1. // Copyright 2016 Chris Conway (Koderz). All Rights Reserved.
  2. #include "RuntimeMeshComponentPluginPrivatePCH.h"
  3. #include "RuntimeMeshGenericVertex.h"
  4. #include "RuntimeMeshBuilder.h"
  5. // Finish all the built in vertex types.
  6. DEFINE_RUNTIME_MESH_VERTEX(FRuntimeMeshVertexSimple);
  7. DEFINE_RUNTIME_MESH_VERTEX(FRuntimeMeshVertexDualUV);
  8. DEFINE_RUNTIME_MESH_VERTEX(FRuntimeMeshVertexNoPosition);
  9. DEFINE_RUNTIME_MESH_VERTEX(FRuntimeMeshVertexNoPositionDualUV);
  10. DEFINE_RUNTIME_MESH_VERTEX(FRuntimeMeshVertexHiPrecisionNormals);
  11. DEFINE_RUNTIME_MESH_VERTEX(FRuntimeMeshVertexDualUVHiPrecisionNormals);
  12. DEFINE_RUNTIME_MESH_VERTEX(FRuntimeMeshVertexNoPositionHiPrecisionNormals);
  13. DEFINE_RUNTIME_MESH_VERTEX(FRuntimeMeshVertexNoPositionDualUVHiPrecisionNormals);
  14. const FRuntimeMeshVertexTypeInfo* FRuntimeMeshComponentVerticesBuilder::GetVertexType() const
  15. {
  16. if (HasUVComponent(1))
  17. {
  18. return &FRuntimeMeshVertexDualUV::TypeInfo;
  19. }
  20. else
  21. {
  22. return &FRuntimeMeshVertexSimple::TypeInfo;
  23. }
  24. }