How to get xz values as vector 3 dimensional vector

Viewed 56

I have following struct declaration, which I use in my code. But when I needed to render only x and z coords, I need somehow to get only xz coordinates from a value like Point1.XZ:

union v3
{
    struct
    {
        float x, y, z;
    };
    struct
    {
        v2 xy;
        float Ignored0_;
    };
    struct
    {
        float x;          //
        float Ignored0_;  // I Have problems with this
        float z;          //
    };
    struct
    {
        float Ignored1_;
        v2 yz;
    };
    float E[3];
};

Is it possible to get only XZ coordinates as Vector2?

1 Answers

As Some programmer dude mentioned, for doing this I just needed simply to create a function or macro. I just used macro:

#define XZ(Vector) (V2(Vector.x, Vector.z))
Related