[GLTFExporter] refactor: add FGLTFPackedVector8 and FGLTFPackedVector16

commit 701e4e07e0889bc20793bc64de0b3600bebdac67
Author: Aidin Abedi <aidin.abedi[at]animech.com>
Date: Sun, 27 Sep 2020 22:38:02 +0200

    refactor: add FGLTFPackedVector8 and FGLTFPackedVector16
    (cherry picked from commit c4793dfde04c55e2dc9b639aef13b98d717a0a97​)

#preflight none
#skipci

[CL 21635497 by aidinabedi in ue5-main branch]
This commit is contained in:
aidinabedi
2022-08-28 04:09:39 -04:00
parent 828c4d0f06
commit 2936704016

View File

@@ -8,10 +8,32 @@
// glTF uses RGBA independent of endianness, hence why we need this dedicated struct
struct FGLTFPackedColor
{
uint8 R,G,B,A;
uint8 R, G, B, A;
FGLTFPackedColor(uint8 R, uint8 G, uint8 B, uint8 A = 255)
: R(R), G(G), B(B), A(A)
{
}
};
// Primarily for type-safety
struct FGLTFPackedVector8
{
int8 X, Y, Z, W;
FGLTFPackedVector8(int8 X, int8 Y, int8 Z, int8 W = 0)
: X(X), Y(Y), Z(Z), W(W)
{
}
};
// Primarily for type-safety
struct FGLTFPackedVector16
{
int16 X, Y, Z, W;
FGLTFPackedVector16(int16 X, int16 Y, int16 Z, int16 W = 0)
: X(X), Y(Y), Z(Z), W(W)
{
}
};