@@ -538,6 +538,10 @@ typedef enum mjtGeom_ { // type of geometric shape
538538
539539 mjGEOM_NONE = 1001 // missing geom type
540540} mjtGeom ;
541+ typedef enum mjtProjection_ { // type of camera projection
542+ mjPROJ_PERSPECTIVE = 0 , // perspective
543+ mjPROJ_ORTHOGRAPHIC // orthographic
544+ } mjtProjection ;
541545typedef enum mjtCamLight_ { // tracking mode for camera and light
542546 mjCAMLIGHT_FIXED = 0 , // pos and rot fixed in body
543547 mjCAMLIGHT_TRACK , // pos tracks body, rot fixed in global
@@ -1223,7 +1227,7 @@ struct mjModel_ {
12231227 mjtNum * cam_poscom0 ; // global position rel. to sub-com in qpos0 (ncam x 3)
12241228 mjtNum * cam_pos0 ; // global position rel. to body in qpos0 (ncam x 3)
12251229 mjtNum * cam_mat0 ; // global orientation in qpos0 (ncam x 9)
1226- int * cam_orthographic ; // orthographic camera; 0: no, 1: yes (ncam x 1)
1230+ int * cam_projection ; // projection type (mjtProjection) (ncam x 1)
12271231 mjtNum * cam_fovy ; // y field-of-view (ortho ? len : deg) (ncam x 1)
12281232 mjtNum * cam_ipd ; // inter-pupilary distance (ncam x 1)
12291233 int * cam_resolution ; // resolution: pixels [width, height] (ncam x 2)
@@ -2102,7 +2106,7 @@ typedef struct mjsCamera_ { // camera specification
21022106 mjString * targetbody ; // target body for tracking/targeting
21032107
21042108 // intrinsics
2105- int orthographic ; // is camera orthographic
2109+ mjtProjection proj ; // camera projection type
21062110 double fovy ; // y-field of view
21072111 double ipd ; // inter-pupilary distance
21082112 float intrinsic [4 ]; // camera intrinsics (length)
0 commit comments