orxEngine Structs
- Posted by Icy_Viking Sep 05, 2021
- 836 views
Hello all,
I just want to make sure I am doing this right. I am trying to convert the orxStructs to be Eu friendly. Here is what I have so far.
orxVector C struct
typedef struct __orxVECTOR_t { /** Coordinates : 12 */ union { orxFLOAT fX; /**< First coordinate in the cartesian space */ orxFLOAT fRho; /**< First coordinate in the spherical space */ orxFLOAT fR; /**< First coordinate in the RGB color space */ orxFLOAT fH; /**< First coordinate in the HSL/HSV color spaces */ }; union { orxFLOAT fY; /**< Second coordinate in the cartesian space */ orxFLOAT fTheta; /**< Second coordinate in the spherical space */ orxFLOAT fG; /**< Second coordinate in the RGB color space */ orxFLOAT fS; /**< Second coordinate in the HSL/HSV color spaces */ }; union { orxFLOAT fZ; /**< Third coordinate in the cartesian space */ orxFLOAT fPhi; /**< Third coordinate in the spherical space */ orxFLOAT fB; /**< Third coordinate in the RGB color space */ orxFLOAT fL; /**< Third coordinate in the HSL color space */ orxFLOAT fV; /**< Third coordinate in the HSV color space */ }; } orxVECTOR;
Eu code
--Orx Structs converted to Eu --orxVector --First Union public constant fH = 0, fR = 4, fRho = 8, fX = 12, --Second Union fG = 16, fS = 20, fTheta = 24, fY = 28, --Third Union fB = 32, fL = 36, fPhi = 40, fV = 44, fZ = 48, SIZEOF_orxVECTOR = 52, $ public enum orxVECTOR public constant C_orxVECTOR = { C_FLOAT, --fH C_FLOAT, --fR C_FLOAT, -- fRho C_FLOAT, --fX C_FLOAT, -- fG C_FLOAT, -- fS C_FLOAT, -- fTheta C_FLOAT, --fY C_FLOAT, --fB C_FLOAT, --fL C_FLOAT, --fPhi C_FLOAT, --fV C_FLOAT --fZ }