5 #include "PhysicsEngine/PhysicsSettings.h" 8 template<
typename Type>
16 : Data(InData), Offset(InOffset), Stride(InStride)
25 int32 StartPosition = (Index * Stride +
Offset);
26 return *((
Type*)(&(*Data)[StartPosition]));
45 virtual FVector2D GetUV(int32
Index) = 0;
46 virtual int32
Num() = 0;
64 virtual int32
Num()
override 83 virtual int32
Num()
override 104 : UpdateFrequency(InUpdateFrequency)
105 , TangentsBuffer(bInUseHighPrecisionTangents)
106 , UVsBuffer(bInUseHighPrecisionUVs, InNumUVs)
109 , LocalBoundingBox(EForceInit::ForceInitToZero)
110 , bCollisionEnabled(false)
150 return CreationParams;
157 UpdateParams->BuffersToUpdate = BuffersToUpdate;
211 int32 StartVertexPosition = OutPositions.Num();
269 FTriIndices& Triangle = *
new (OutIndices) FTriIndices;
270 Triangle.v0 = (*((int32*)&IndexData[(
Index + 0) * 4])) + StartVertexPosition;
271 Triangle.v1 = (*((int32*)&IndexData[(
Index + 1) * 4])) + StartVertexPosition;
272 Triangle.v2 = (*((int32*)&IndexData[(
Index + 2) * 4])) + StartVertexPosition;
281 FTriIndices& Triangle = *
new (OutIndices) FTriIndices;
282 Triangle.v0 = (*((uint16*)&IndexData[(
Index + 0) * 2])) + StartVertexPosition;
283 Triangle.v1 = (*((uint16*)&IndexData[(
Index + 1) * 2])) + StartVertexPosition;
284 Triangle.v2 = (*((uint16*)&IndexData[(
Index + 2) * 2])) + StartVertexPosition;
virtual int32 Num() override
virtual FVector2D GetUV(int32 Index) override
FRuntimeMeshStreamAccessor(const TArray< uint8 > *InData, int32 InOffset, int32 InStride)
FRuntimeMeshSection(FArchive &Ar)
int32 GetNumVertices() const
FRuntimeMeshVertexStreamUVFullPrecisionAccessor(TArray< uint8 > *InData, const FRuntimeMeshVertexStreamStructureElement &Element)
FSectionPositionVertexBuffer PositionBuffer
virtual int32 Num() override
FRuntimeMeshVertexStreamStructureElement Position
TSharedPtr< struct FRuntimeMeshSectionCreationParams, ESPMode::NotThreadSafe > GetSectionCreationParams()
virtual ~FRuntimeMeshStreamAccessor()
FSectionColorVertexBuffer ColorBuffer
FSectionTangentsVertexBuffer TangentsBuffer
TSharedPtr< FRuntimeMeshSectionPropertyUpdateParams, ESPMode::NotThreadSafe > FRuntimeMeshSectionPropertyUpdateParamsPtr
TSharedPtr< FRuntimeMeshSectionUpdateParams, ESPMode::NotThreadSafe > FRuntimeMeshSectionUpdateParamsPtr
int32 GetNumIndices() const
const TArray< uint8 > * Data
FSectionIndexBuffer AdjacencyIndexBuffer
FSectionUVsVertexBuffer UVsBuffer
FRuntimeMeshVertexStreamUVHalfPrecisionAccessor(TArray< uint8 > *InData, const FRuntimeMeshVertexStreamStructureElement &Element)
virtual ~FRuntimeMeshVertexStreamUVAccessor()
TSharedPtr< struct FRuntimeMeshSectionUpdateParams, ESPMode::NotThreadSafe > GetSectionUpdateData(ERuntimeMeshBuffersToUpdate BuffersToUpdate)
void FillUpdateParams(FRuntimeMeshSectionIndexBufferParams &Params)
FSectionIndexBuffer IndexBuffer
UTexture2D * Get(TUniquePtr< T > &Dtex)
static const textual_icon check
const EUpdateFrequency UpdateFrequency
int32 GetCollisionData(TArray< FVector > &OutPositions, TArray< FTriIndices > &OutIndices, TArray< FVector2D > &OutUVs)
TSharedPtr< FRuntimeMeshSectionCreationParams, ESPMode::NotThreadSafe > FRuntimeMeshSectionCreationParamsPtr
TArray< uint8 > & GetData()
ERuntimeMeshBuffersToUpdate
virtual FVector2D GetUV(int32 Index) override
TArray< uint8 > & GetData()
void FillUpdateParams(FRuntimeMeshSectionUVVertexBufferParams &Params)
void FillUpdateParams(FRuntimeMeshSectionTangentVertexBufferParams &Params)
TSharedPtr< struct FRuntimeMeshSectionPropertyUpdateParams, ESPMode::NotThreadSafe > GetSectionPropertyUpdateData()
void FillUpdateParams(FRuntimeMeshSectionVertexBufferParams &Params)
bool Is32BitIndices() const
FRuntimeMeshVertexStreamPositionAccessor(TArray< uint8 > *InData, const FRuntimeMeshVertexStreamStructure &StreamStructure)