Thanks for sharing your code!
I wasn't aware of the 'absolute' keyword - you learn something new every day.
For that kind of access I either typecast or use the 'case' syntax with records (example here from Jink) :
Code:
TVec4 = packed record
case UInt8 of
0:(XYZ : TVec3);
1:(XY, ZW : TVec2);
2:(X,Y,Z,W : JFloat);
3:(V : packed array[0..3] of JFloat);
end;
TJMatrix = packed record
case UInt8 of
0:(_11, _12, _13, _14,
_21, _22, _23, _24,
_31, _32, _33, _34,
_41, _42, _43, _44 : JFloat);
1 : (M : packed array[0..15] of JFloat) ;
2 : (RC : packed array[0..3, 0..3] of JFloat);
3 : (Rows : packed array[0..3] of TVec4);
end;
I'll certainly make use of the 'absolute' keyword in future to make things a little more succinct
Bookmarks