[ue4] Fix formatting.

This commit is contained in:
badlogic 2022-07-04 14:00:50 +02:00
parent a85765d4d9
commit de5f8cd469

View File

@ -116,8 +116,7 @@ void USpineSkeletonRendererComponent::UpdateRenderer(USpineSkeletonComponent* sk
atlasScreenBlendMaterials.Add(material);
pageToScreenBlendMaterial.Add(currPage, material);
}
}
else {
} else {
pageToNormalBlendMaterial.Empty();
pageToAdditiveBlendMaterial.Empty();
pageToMultiplyBlendMaterial.Empty();
@ -134,8 +133,7 @@ void USpineSkeletonRendererComponent::UpdateRenderer(USpineSkeletonComponent* sk
}
}
UpdateMesh(skeleton->GetSkeleton());
}
else {
} else {
ClearAllMeshSections();
}
}
@ -242,8 +240,7 @@ void USpineSkeletonRendererComponent::UpdateMesh(Skeleton* Skeleton) {
attachmentUvs = regionAttachment->getUVs().buffer();
numVertices = 4;
numIndices = 6;
}
else if (attachment->getRTTI().isExactly(MeshAttachment::rtti)) {
} else if (attachment->getRTTI().isExactly(MeshAttachment::rtti)) {
MeshAttachment *mesh = (MeshAttachment *) attachment;
// Early out if region is invisible
@ -259,8 +256,7 @@ void USpineSkeletonRendererComponent::UpdateMesh(Skeleton* Skeleton) {
attachmentUvs = mesh->getUVs().buffer();
numVertices = mesh->getWorldVerticesLength() >> 1;
numIndices = mesh->getTriangles().size();
}
else /* clipping */ {
} else /* clipping */ {
ClippingAttachment *clip = (ClippingAttachment *) attachment;
clipper.clipStart(*slot, clip);
continue;
@ -351,7 +347,6 @@ void USpineSkeletonRendererComponent::UpdateMesh(Skeleton* Skeleton) {
}
//Calculate total triangle to add on this loof.
int TriangleInitialCount = firstIndex / 3;
@ -368,18 +363,16 @@ void USpineSkeletonRendererComponent::UpdateMesh(Skeleton* Skeleton) {
if (FVector::CrossProduct(
vertices[indices[TargetTringleIndex + 2]] - vertices[indices[TargetTringleIndex]],
vertices[indices[TargetTringleIndex + 1]] - vertices[indices[TargetTringleIndex]]).Y < 0.f)
{
vertices[indices[TargetTringleIndex + 1]] - vertices[indices[TargetTringleIndex]])
.Y < 0.f) {
const int32 targetVertex = indices[TargetTringleIndex];
indices[TargetTringleIndex] = indices[TargetTringleIndex + 2];
indices[TargetTringleIndex + 2] = targetVertex;
}
}
FVector normal = FVector(0, 1, 0);
//Add normals for vertices.
@ -387,7 +380,6 @@ void USpineSkeletonRendererComponent::UpdateMesh(Skeleton* Skeleton) {
for (int j = 0; j < numVertices; j++) {
normals.Add(normal);
}
idx += numVertices;