1 hour ago, ryt said:
is that libraries have a predefined basis vectors pointing in desired direction,
Really it use a - cross only to cunstract matrices where it is significant. It a LookAt and projection matrices only.Just it require to understend from where needs of different handness come. Imagine a front view of any vhechicle for example. How to place axes for it view? Intuitive direction is x "to right" and y "upward", becouse it habitually since secondary or ever primary school. But how to be with z axe to add a 3D? It is cross production of x and y but what it direction more comfortable? To find it direction we have to look on side or top view. It intuitively comfortable when it have positive direction to front of vhechicle. On front view it direction "to us". So for model space it is comfortable a left-hand system. But what comfortable for camera space? x "to right" and y "upward" again most comfortable directions. But how to be with direction of z? On camera z is intuitively distanse to object, so comfortable direction is "away", so it right-hand system . But if we will draw model built in left-hand model space to rigth-hand camera space we will see a back insteand of front view due to opposite direction of z axes on model and camera spaces. So we have to convert view to camera space inverting a z axe, that same as mirror it respectively to screen plane. So it is only significant to perform conversion only on world space to camera space conversion stage. Also we have a world space where we navigate a models and camera. For left-hand models it require a left world space. so right-hand camera navigated in left space will have opposite rotation direction (i mean world rotation that LookAt actually perform to match a world z axis with camera z axis, not a navigation of camera that performed as usual object navigation in same system that other world objects). So LookAtLH just a same as LookAtRH but for opposite direction. Becouse it conversion accumulated in matrice it cost zero.
Really on practicle used two methods of solwing it issue with different direction of axe.
One of it is a using left-hand system for all positions and other game mechanics calculations and convert only on related to camera tasks to perform conversion on view stage, and it primary solution for CADs and other modelling tools. Other method is to convert models to right-hand system by inverting x axe on exporting from modelling tool stage, use RH world and do not care about what system use for each operation becouse anything in RH, that often used in games. It why libraries have 2 set of matrices constraction functions related to camera. RH set perfom no system conversion and LH set mirror/inverse camera rotations to make RH from LH.