The idea is like in BlitzMax, just to setup a 'driver' (OpenGL, DirectX) to compile for that 'engine'.(I know that sound so easy writing on the keyboard!!! but a sort of hell to realize! - maybe impossible!)

Type Entity Field position_matrix:SMat4F Field position:SVec3F Field rotation_matrix:SMat4F Field rotation:SVec3F Field rotation_quat:SQuatF Method New () position_matrix = SMat4F.Identity () rotation = New SVec3F (0.0, 0.0, 0.0) ' Euler angles rotation_quat = New SQuatF (0.0, 0.0, 0.0, 0.0).EulerXYZ (rotation) ' Quaternion creation from angles rotation_matrix = SQuatF.ToMat4 (rotation_quat) ' Matrix used for rendering EndMethod ...