Skip to content

Commit 821d14d

Browse files
authored
Merge pull request #226 from sfla/RMC4_UE5_Convert
Supporting UE 5.0.0: Adding explicit conversions.
2 parents c053c24 + 6ab518c commit 821d14d

8 files changed

Lines changed: 57 additions & 58 deletions

Source/RuntimeMeshComponent/Private/Modifiers/RuntimeMeshModifierAdjacency.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,14 @@ void URuntimeMeshModifierAdjacency::CalculateTessellationIndices(FRuntimeMeshRen
5555

5656
void URuntimeMeshModifierAdjacency::AddIfLeastUV(PositionDictionary& PosDict, const Vertex& Vert, uint32 Index)
5757
{
58-
auto* Pos = PosDict.Find(Vert.Position);
58+
auto* Pos = PosDict.Find(FVector(Vert.Position));
5959
if (Pos == nullptr)
6060
{
61-
PosDict.Add(Vert.Position, Corner(Index, Vert.TexCoord));
61+
PosDict.Add(FVector(Vert.Position), Corner(Index, Vert.TexCoord));
6262
}
6363
else if (Vert.TexCoord < Pos->TexCoord)
6464
{
65-
PosDict[Vert.Position] = Corner(Index, Vert.TexCoord);
65+
PosDict[FVector(Vert.Position)] = Corner(Index, Vert.TexCoord);
6666
}
6767
}
6868

@@ -110,7 +110,7 @@ void URuntimeMeshModifierAdjacency::ReplacePlaceholderIndices(FRuntimeMeshRender
110110
// Deal with dominant positions.
111111
for (uint32 V = 0; V < VerticesPerTriangle; V++)
112112
{
113-
Corner* Corn = PosDict.Find(Tri.GetEdge(V).GetVertex(0).Position);
113+
Corner* Corn = PosDict.Find(FVector(Tri.GetEdge(V).GetVertex(0).Position));
114114
if (Corn != nullptr)
115115
{
116116
MeshData.AdjacencyTriangles.SetVertexIndex(StartOutIndex + 9 + V, Corn->Index);

Source/RuntimeMeshComponent/Private/Modifiers/RuntimeMeshModifierNormals.cpp

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -114,20 +114,19 @@ void URuntimeMeshModifierNormals::CalculateNormalsTangents(FRuntimeMeshRenderabl
114114
// FaceTangentY[TriIdx] = FVector3f((S1 * X2 - S2 * X1) * R, (S1 * Y2 - S2 * Y1) * R,
115115
// (S1 * Z2 - S2 * Z1) * R);
116116

117-
118-
117+
119118
FMatrix44f ParameterToLocal(
120-
FPlane(P[1].X - P[0].X, P[1].Y - P[0].Y, P[1].Z - P[0].Z, 0),
121-
FPlane(P[2].X - P[0].X, P[2].Y - P[0].Y, P[2].Z - P[0].Z, 0),
122-
FPlane(P[0].X, P[0].Y, P[0].Z, 0),
123-
FPlane(0, 0, 0, 1)
119+
FPlane4f(P[1].X - P[0].X, P[1].Y - P[0].Y, P[1].Z - P[0].Z, 0),
120+
FPlane4f(P[2].X - P[0].X, P[2].Y - P[0].Y, P[2].Z - P[0].Z, 0),
121+
FPlane4f(P[0].X, P[0].Y, P[0].Z, 0),
122+
FPlane4f(0, 0, 0, 1)
124123
);
125124

126125
FMatrix44f ParameterToTexture(
127-
FPlane(T2.X - T1.X, T2.Y - T1.Y, 0, 0),
128-
FPlane(T3.X - T1.X, T3.Y - T1.Y, 0, 0),
129-
FPlane(T1.X, T1.Y, 1, 0),
130-
FPlane(0, 0, 0, 1)
126+
FPlane4f(T2.X - T1.X, T2.Y - T1.Y, 0, 0),
127+
FPlane4f(T3.X - T1.X, T3.Y - T1.Y, 0, 0),
128+
FPlane4f(T1.X, T1.Y, 1, 0),
129+
FPlane4f(0, 0, 0, 1)
131130
);
132131

133132
// Use InverseSlow to catch singular matrices. Inverse can miss this sometimes.
@@ -208,7 +207,7 @@ TMultiMap<uint32, uint32> URuntimeMeshModifierNormals::FindDuplicateVerticesMap(
208207
VertexSorter.Empty(NumVertices);
209208
for (int32 Index = 0; Index < NumVertices; Index++)
210209
{
211-
new (VertexSorter)FRuntimeMeshVertexSortingElement(Index, PositionStream.GetPosition(Index));
210+
new (VertexSorter)FRuntimeMeshVertexSortingElement(Index, FVector(PositionStream.GetPosition(Index)));
212211
}
213212

214213
// Sort the list

Source/RuntimeMeshComponent/Private/Providers/RuntimeMeshProviderBox.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ bool URuntimeMeshProviderBox::GetSectionMeshForLOD(int32 LODIndex, int32 Section
8181

8282
auto AddVertex = [&](const FVector& InPosition, const FVector& InTangentX, const FVector& InTangentZ, const FVector2f& InTexCoord)
8383
{
84-
MeshData.Positions.Add(InPosition);
85-
MeshData.Tangents.Add(InTangentZ, InTangentX);
84+
MeshData.Positions.Add(FVector3f(InPosition));
85+
MeshData.Tangents.Add(FVector3f(InTangentZ), FVector3f(InTangentX));
8686
MeshData.Colors.Add(FColor::White);
8787
MeshData.TexCoords.Add(InTexCoord);
8888
};
@@ -180,15 +180,15 @@ bool URuntimeMeshProviderBox::GetCollisionMesh(FRuntimeMeshCollisionData& Collis
180180
FVector BoxRadiusTemp = BoxRadius;
181181

182182
// Generate verts
183-
CollisionVertices.Add(FVector(-BoxRadiusTemp.X, BoxRadiusTemp.Y, BoxRadiusTemp.Z));
184-
CollisionVertices.Add(FVector(BoxRadiusTemp.X, BoxRadiusTemp.Y, BoxRadiusTemp.Z));
185-
CollisionVertices.Add(FVector(BoxRadiusTemp.X, -BoxRadiusTemp.Y, BoxRadiusTemp.Z));
186-
CollisionVertices.Add(FVector(-BoxRadiusTemp.X, -BoxRadiusTemp.Y, BoxRadiusTemp.Z));
187-
188-
CollisionVertices.Add(FVector(-BoxRadiusTemp.X, BoxRadiusTemp.Y, -BoxRadiusTemp.Z));
189-
CollisionVertices.Add(FVector(BoxRadiusTemp.X, BoxRadiusTemp.Y, -BoxRadiusTemp.Z));
190-
CollisionVertices.Add(FVector(BoxRadiusTemp.X, -BoxRadiusTemp.Y, -BoxRadiusTemp.Z));
191-
CollisionVertices.Add(FVector(-BoxRadiusTemp.X, -BoxRadiusTemp.Y, -BoxRadiusTemp.Z));
183+
CollisionVertices.Add(FVector3f(-BoxRadiusTemp.X, BoxRadiusTemp.Y, BoxRadiusTemp.Z));
184+
CollisionVertices.Add(FVector3f(BoxRadiusTemp.X, BoxRadiusTemp.Y, BoxRadiusTemp.Z));
185+
CollisionVertices.Add(FVector3f(BoxRadiusTemp.X, -BoxRadiusTemp.Y, BoxRadiusTemp.Z));
186+
CollisionVertices.Add(FVector3f(-BoxRadiusTemp.X, -BoxRadiusTemp.Y, BoxRadiusTemp.Z));
187+
188+
CollisionVertices.Add(FVector3f(-BoxRadiusTemp.X, BoxRadiusTemp.Y, -BoxRadiusTemp.Z));
189+
CollisionVertices.Add(FVector3f(BoxRadiusTemp.X, BoxRadiusTemp.Y, -BoxRadiusTemp.Z));
190+
CollisionVertices.Add(FVector3f(BoxRadiusTemp.X, -BoxRadiusTemp.Y, -BoxRadiusTemp.Z));
191+
CollisionVertices.Add(FVector3f(-BoxRadiusTemp.X, -BoxRadiusTemp.Y, -BoxRadiusTemp.Z));
192192

193193
// Pos Z
194194
CollisionTriangles.Add(0, 1, 3);

Source/RuntimeMeshComponent/Private/Providers/RuntimeMeshProviderPlane.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ bool URuntimeMeshProviderPlane::GetSectionMeshForLOD(int32 LODIndex, int32 Secti
6565
FVector Location = LocationA + ABDirection * ABIndex + ACDirection * ACIndex;
6666
FVector2f TexCoord = FVector2f((float)ABIndex / (float)(NumVertsAB - 1), (float)ACIndex / (float)(NumVertsAC - 1));
6767
//UE_LOG(LogTemp, Log, TEXT("TexCoord for vertex %i:%i : %s"), ABIndex, ACIndex, *TexCoord.ToString());
68-
MeshData.Positions.Add(Location);
69-
MeshData.Tangents.Add(Normal, Tangent);
68+
MeshData.Positions.Add(FVector3f(Location));
69+
MeshData.Tangents.Add(FVector3f(Normal), FVector3f(Tangent));
7070
MeshData.Colors.Add(Color);
7171
MeshData.TexCoords.Add(TexCoord);
7272
if (ABIndex != NumVertsAB - 1 && ACIndex != NumVertsAC - 1)

Source/RuntimeMeshComponent/Private/Providers/RuntimeMeshProviderStatic.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,7 @@ void URuntimeMeshProviderStatic::UpdateBounds()
773773

774774
FBoxSphereBounds URuntimeMeshProviderStatic::GetBoundsFromMeshData(const FRuntimeMeshRenderableMeshData& MeshData)
775775
{
776-
return FBoxSphereBounds(MeshData.Positions.GetBounds());
776+
return FBoxSphereBounds(FBox(MeshData.Positions.GetBounds()));
777777
}
778778

779779
void URuntimeMeshProviderStatic::UpdateSectionInternal(int32 LODIndex, int32 SectionId, FRuntimeMeshRenderableMeshData&& SectionData, FBoxSphereBounds KnownBounds)

Source/RuntimeMeshComponent/Private/RuntimeMeshBlueprintFunctions.cpp

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ void URuntimeMeshBlueprintFunctions::EmptyPositions(FRuntimeMeshVertexPositionSt
6969
void URuntimeMeshBlueprintFunctions::AddPosition(FRuntimeMeshVertexPositionStream& Stream, FRuntimeMeshVertexPositionStream& OutStream, FVector InPosition, int32& OutIndex)
7070
{
7171
OutStream = Stream;
72-
OutIndex = Stream.Add(InPosition);
72+
OutIndex = Stream.Add(FVector3f(InPosition));
7373
}
7474

7575
void URuntimeMeshBlueprintFunctions::AppendPositions(FRuntimeMeshVertexPositionStream& Stream, FRuntimeMeshVertexPositionStream& OutStream, const FRuntimeMeshVertexPositionStream& InOther)
@@ -81,19 +81,19 @@ void URuntimeMeshBlueprintFunctions::AppendPositions(FRuntimeMeshVertexPositionS
8181
void URuntimeMeshBlueprintFunctions::GetPosition(FRuntimeMeshVertexPositionStream& Stream, FRuntimeMeshVertexPositionStream& OutStream, int32 Index, FVector& OutPosition)
8282
{
8383
OutStream = Stream;
84-
OutPosition = Stream.GetPosition(Index);
84+
OutPosition = FVector(Stream.GetPosition(Index));
8585
}
8686

8787
void URuntimeMeshBlueprintFunctions::SetPosition(FRuntimeMeshVertexPositionStream& Stream, FRuntimeMeshVertexPositionStream& OutStream, int32 Index, FVector NewPosition)
8888
{
8989
OutStream = Stream;
90-
Stream.SetPosition(Index, NewPosition);
90+
Stream.SetPosition(Index, FVector3f(NewPosition));
9191
}
9292

9393
void URuntimeMeshBlueprintFunctions::GetBounds(FRuntimeMeshVertexPositionStream& Stream, FRuntimeMeshVertexPositionStream& OutStream, FBox& OutBounds)
9494
{
9595
OutStream = Stream;
96-
OutBounds = Stream.GetBounds();
96+
OutBounds = FBox(Stream.GetBounds());
9797
}
9898

9999

@@ -120,13 +120,13 @@ void URuntimeMeshBlueprintFunctions::EmptyTangents(FRuntimeMeshVertexTangentStre
120120
void URuntimeMeshBlueprintFunctions::AddNormalAndTangent(FRuntimeMeshVertexTangentStream& Stream, FRuntimeMeshVertexTangentStream& OutStream, FVector InNormal, FVector InTangent, int32& OutIndex)
121121
{
122122
OutStream = Stream;
123-
OutIndex = Stream.Add(InNormal, InTangent);
123+
OutIndex = Stream.Add(FVector3f(InNormal), FVector3f(InTangent));
124124
}
125125

126126
void URuntimeMeshBlueprintFunctions::AddTangents(FRuntimeMeshVertexTangentStream& Stream, FRuntimeMeshVertexTangentStream& OutStream, FVector InTangentX, FVector InTangentY, FVector InTangentZ, int32& OutIndex)
127127
{
128128
OutStream = Stream;
129-
OutIndex = Stream.Add(InTangentX, InTangentY, InTangentZ);
129+
OutIndex = Stream.Add(FVector3f(InTangentX), FVector3f(InTangentY), FVector3f(InTangentZ));
130130
}
131131

132132
void URuntimeMeshBlueprintFunctions::AppendTangents(FRuntimeMeshVertexTangentStream& Stream, FRuntimeMeshVertexTangentStream& OutStream, const FRuntimeMeshVertexTangentStream& InOther)
@@ -138,41 +138,41 @@ void URuntimeMeshBlueprintFunctions::AppendTangents(FRuntimeMeshVertexTangentStr
138138
void URuntimeMeshBlueprintFunctions::GetNormal(FRuntimeMeshVertexTangentStream& Stream, FRuntimeMeshVertexTangentStream& OutStream, int32 Index, FVector& OutNormal)
139139
{
140140
OutStream = Stream;
141-
OutNormal = Stream.GetNormal(Index);
141+
OutNormal = FVector(Stream.GetNormal(Index));
142142
}
143143

144144
void URuntimeMeshBlueprintFunctions::SetNormal(FRuntimeMeshVertexTangentStream& Stream, FRuntimeMeshVertexTangentStream& OutStream, int32 Index, FVector NewNormal)
145145
{
146146
OutStream = Stream;
147-
Stream.SetNormal(Index, NewNormal);
147+
Stream.SetNormal(Index, FVector3f(NewNormal));
148148
}
149149

150150
void URuntimeMeshBlueprintFunctions::GetTangent(FRuntimeMeshVertexTangentStream& Stream, FRuntimeMeshVertexTangentStream& OutStream, int32 Index, FVector& OutTangent)
151151
{
152152
OutStream = Stream;
153-
OutTangent = Stream.GetTangent(Index);
153+
OutTangent = FVector(Stream.GetTangent(Index));
154154
}
155155

156156
void URuntimeMeshBlueprintFunctions::SetTangent(FRuntimeMeshVertexTangentStream& Stream, FRuntimeMeshVertexTangentStream& OutStream, int32 Index, FVector NewTangent)
157157
{
158158
OutStream = Stream;
159-
Stream.SetTangent(Index, NewTangent);
159+
Stream.SetTangent(Index, FVector3f(NewTangent));
160160
}
161161

162162
void URuntimeMeshBlueprintFunctions::GetTangents(FRuntimeMeshVertexTangentStream& Stream, FRuntimeMeshVertexTangentStream& OutStream, int32 Index, FVector& OutTangentX, FVector& OutTangentY, FVector& OutTangentZ)
163163
{
164164
OutStream = Stream;
165165
FVector3f tangentX, tangentY, tangentZ;
166166
Stream.GetTangents(Index, tangentX, tangentY, tangentZ);
167-
OutTangentX = (FVector)tangentX;
168-
OutTangentY = (FVector)tangentY;
169-
OutTangentZ = (FVector)tangentZ;
167+
OutTangentX = FVector(tangentX);
168+
OutTangentY = FVector(tangentY);
169+
OutTangentZ = FVector(tangentZ);
170170
}
171171

172172
void URuntimeMeshBlueprintFunctions::SetTangents(FRuntimeMeshVertexTangentStream& Stream, FRuntimeMeshVertexTangentStream& OutStream, int32 Index, FVector InTangentX, FVector InTangentY, FVector InTangentZ)
173173
{
174174
OutStream = Stream;
175-
Stream.SetTangents(Index, InTangentX, InTangentY, InTangentZ);
175+
Stream.SetTangents(Index, FVector3f(InTangentX), FVector3f(InTangentY), FVector3f(InTangentZ));
176176
}
177177

178178

@@ -379,19 +379,19 @@ void URuntimeMeshBlueprintFunctions::EmptyCollisionVertices(FRuntimeMeshCollisio
379379
void URuntimeMeshBlueprintFunctions::AddCollisionVertex(FRuntimeMeshCollisionVertexStream& Stream, FRuntimeMeshCollisionVertexStream& OutStream, FVector InVertex, int32& OutIndex)
380380
{
381381
OutStream = Stream;
382-
OutIndex = Stream.Add(InVertex);
382+
OutIndex = Stream.Add(FVector3f(InVertex));
383383
}
384384

385385
void URuntimeMeshBlueprintFunctions::GetCollisionVertex(FRuntimeMeshCollisionVertexStream& Stream, FRuntimeMeshCollisionVertexStream& OutStream, int32 Index, FVector& OutVertex)
386386
{
387387
OutStream = Stream;
388-
OutVertex = Stream.GetPosition(Index);
388+
OutVertex = FVector(Stream.GetPosition(Index));
389389
}
390390

391391
void URuntimeMeshBlueprintFunctions::SetCollisionVertex(FRuntimeMeshCollisionVertexStream& Stream, FRuntimeMeshCollisionVertexStream& OutStream, int32 Index, FVector NewVertex)
392392
{
393393
OutStream = Stream;
394-
Stream.SetPosition(Index, NewVertex);
394+
Stream.SetPosition(Index, FVector3f(NewVertex));
395395
}
396396

397397

Source/RuntimeMeshComponent/Private/RuntimeMeshSlicer.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ void Transform2DPolygonTo3D(const FUtilPoly2D& InPoly, const FMatrix& InMatrix,
153153
const FUtilVertex2D& InVertex = InPoly.Verts[VertexIndex];
154154

155155
OutMeshData.Positions.Add((FVector3f)FVector3d(InMatrix.TransformPosition(FVector(InVertex.Pos.X, InVertex.Pos.Y, 0.f))));
156-
OutMeshData.Tangents.Add(TangentX, TangentY, TangentZ);
156+
OutMeshData.Tangents.Add(FVector3f(TangentX), FVector3f(TangentY), FVector3f(TangentZ));
157157
OutMeshData.Colors.Add(InVertex.Color);
158158
OutMeshData.TexCoords.Add(FVector2f(InVertex.UV));
159159
}
@@ -195,9 +195,9 @@ bool TriangulatePoly(FRuntimeMeshRenderableMeshData& MeshData, int32 VertBase, c
195195
const int32 BIndex = EarVertexIndex;
196196
const int32 CIndex = (EarVertexIndex + 1) % VertIndices.Num();
197197

198-
const FVector AVertPos = MeshData.Positions.GetPosition(VertIndices[AIndex]);
199-
const FVector BVertPos = MeshData.Positions.GetPosition(VertIndices[BIndex]);
200-
const FVector CVertPos = MeshData.Positions.GetPosition(VertIndices[CIndex]);
198+
const FVector AVertPos = FVector(MeshData.Positions.GetPosition(VertIndices[AIndex]));
199+
const FVector BVertPos = FVector(MeshData.Positions.GetPosition(VertIndices[BIndex]));
200+
const FVector CVertPos = FVector(MeshData.Positions.GetPosition(VertIndices[CIndex]));
201201

202202
// Check that this vertex is convex (cross product must be positive)
203203
const FVector ABEdge = BVertPos - AVertPos;
@@ -212,12 +212,12 @@ bool TriangulatePoly(FRuntimeMeshRenderableMeshData& MeshData, int32 VertBase, c
212212
// Look through all verts before this in array to see if any are inside triangle
213213
for (int32 VertexIndex = 0; VertexIndex < VertIndices.Num(); VertexIndex++)
214214
{
215-
const FVector TestVertPos = MeshData.Positions.GetPosition(VertIndices[VertexIndex]);
215+
const FVector TestVertPos = FVector(MeshData.Positions.GetPosition(VertIndices[VertexIndex]));
216216

217217
if (VertexIndex != AIndex &&
218218
VertexIndex != BIndex &&
219219
VertexIndex != CIndex &&
220-
FGeomTools::PointInTriangle(AVertPos, BVertPos, CVertPos, TestVertPos))
220+
FGeomTools::PointInTriangle(FVector3f(AVertPos), FVector3f(BVertPos), FVector3f(CVertPos), FVector3f(TestVertPos)))
221221
{
222222
bFoundVertInside = true;
223223
break;
@@ -514,7 +514,7 @@ void URuntimeMeshSlicer::SliceRuntimeMesh(URuntimeMeshComponent* InRuntimeMesh,
514514
// Build vertex buffer
515515
for (int32 BaseVertIndex = 0; BaseVertIndex < NumBaseVerts; BaseVertIndex++)
516516
{
517-
FVector Position = SourceSection.Positions.GetPosition(BaseVertIndex);
517+
FVector Position = FVector(SourceSection.Positions.GetPosition(BaseVertIndex));
518518

519519
// Calc distance from plane
520520
VertDistance[BaseVertIndex] = SlicePlane.PlaneDot(Position);

Source/RuntimeMeshComponent/Public/RuntimeMeshRenderable.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ struct RUNTIMEMESHCOMPONENT_API FRuntimeMeshVertexPositionStream
7070
int32 Count = Num();
7171
for (int32 Index = 0; Index < Count; Index++)
7272
{
73-
NewBox += GetPosition(Index);
73+
NewBox += FVector(GetPosition(Index));
7474
}
7575
return NewBox;
7676
}
@@ -181,12 +181,12 @@ struct RUNTIMEMESHCOMPONENT_API FRuntimeMeshVertexTangentStream
181181
if (bIsHighPrecision)
182182
{
183183
*((FPackedRGBA16N*)&Data[Index]) = FPackedRGBA16N(InTangentX);
184-
*((FPackedRGBA16N*)&Data[Index + sizeof(FPackedRGBA16N)]) = FPackedRGBA16N(FVector4f(InTangentZ, GetBasisDeterminantSign(InTangentX, InTangentY, InTangentZ)));
184+
*((FPackedRGBA16N*)&Data[Index + sizeof(FPackedRGBA16N)]) = FPackedRGBA16N(FVector4f(InTangentZ, GetBasisDeterminantSign(FVector(InTangentX), FVector(InTangentY), FVector(InTangentZ))));
185185
}
186186
else
187187
{
188188
*((FPackedNormal*)&Data[Index]) = FPackedNormal(InTangentX);
189-
*((FPackedNormal*)&Data[Index + sizeof(FPackedNormal)]) = FPackedNormal(FVector4f(InTangentZ, GetBasisDeterminantSign(InTangentX, InTangentY, InTangentZ)));
189+
*((FPackedNormal*)&Data[Index + sizeof(FPackedNormal)]) = FPackedNormal(FVector4f(InTangentZ, GetBasisDeterminantSign(FVector(InTangentX), FVector(InTangentY), FVector(InTangentZ))));
190190
}
191191
return Index / Stride;
192192
}
@@ -260,12 +260,12 @@ struct RUNTIMEMESHCOMPONENT_API FRuntimeMeshVertexTangentStream
260260
if (bIsHighPrecision)
261261
{
262262
*((FPackedRGBA16N*)&Data[EntryIndex * sizeof(FPackedRGBA16N)]) = FPackedRGBA16N(InTangentX);
263-
*((FPackedRGBA16N*)&Data[(EntryIndex + 1) * sizeof(FPackedRGBA16N)]) = FPackedRGBA16N(FVector4f(InTangentZ, GetBasisDeterminantSign(InTangentX, InTangentY, InTangentZ)));
263+
*((FPackedRGBA16N*)&Data[(EntryIndex + 1) * sizeof(FPackedRGBA16N)]) = FPackedRGBA16N(FVector4f(InTangentZ, GetBasisDeterminantSign(FVector(InTangentX), FVector(InTangentY), FVector(InTangentZ))));
264264
}
265265
else
266266
{
267267
*((FPackedNormal*)&Data[EntryIndex * sizeof(FPackedNormal)]) = FPackedNormal(InTangentX);
268-
*((FPackedNormal*)&Data[(EntryIndex + 1) * sizeof(FPackedNormal)]) = FPackedNormal(FVector4f(InTangentZ, GetBasisDeterminantSign(InTangentX, InTangentY, InTangentZ)));
268+
*((FPackedNormal*)&Data[(EntryIndex + 1) * sizeof(FPackedNormal)]) = FPackedNormal(FVector4f(InTangentZ, GetBasisDeterminantSign(FVector(InTangentX), FVector(InTangentY), FVector(InTangentZ))));
269269
}
270270
}
271271

0 commit comments

Comments
 (0)