How to write a float4 properly?

I’m still sort of getting the hang of more in-depth c++ (I’ve written a decent amount of simple stuff) and am working to translate this into unreal and make a basic terrain generator using marching cubes.

But I’m having a hard time figuring out how to convert some of it. For example, this part:


   float4 cubeCorners[8] = {
        points[indexFromCoord(id.x, id.y, id.z)],
        points[indexFromCoord(id.x + 1, id.y, id.z)],
        points[indexFromCoord(id.x + 1, id.y, id.z + 1)],
        points[indexFromCoord(id.x, id.y, id.z + 1)],
        points[indexFromCoord(id.x, id.y + 1, id.z)],
        points[indexFromCoord(id.x + 1, id.y + 1, id.z)],
        points[indexFromCoord(id.x + 1, id.y + 1, id.z + 1)],
        points[indexFromCoord(id.x, id.y + 1, id.z + 1)]
    };

As well as understanding this part and how to use it:

AppendStructuredBuffer<Triangle> triangles;
RWStructuredBuffer<float4> points;

I realize the code was written for Unity, but I figured it’d be a good learning experience to try and get it to work with Unreal. Any thoughts?