hexagon logo

Is there a way to obtain the view rotation center of a viewport

I have 2 viewports in our application and previous posts resolved the issue of synchronizing the rotations & translations of the two.
 
I am having an issue if user changes the view rotation center in 1 viewport I can't set it in the other;
 
I see the command uil_toolbar.rotation_center() calls gm_point_on_screen_init, then ga_view_rotation_center_set.
 
I tried ga_view_rotation_center_get() but it doesn't exist. Also, I tried to extract the screen pick from gm_point_on_screen_init(astring) but it stays empty.
 
So question is how to determine the new rotation center just set, then I can apply it to the other viewport.
Parents
  • Hi Mitch,
     
    The full set of attributes that control the view are:
    clipping_flag, capping_flag, from_point, to_point, up_vector, center_x/y , zoom_factor, perspective_flag, model_sx/sy/sz , screen_sx/sy , view_plane_dist, back_plane_dist, front_plane_dist
     
    The observer stands at the from_point and looks at the to_point which is the rotation centre.
    For your need the following gives the detail you require:
     
    real ajh_to(3)
    ga_view_to_get("",ajh_to)
    dump ajh_to
     
    this is taking the current viewport's view information as the "named view" is "".
     
    it's the "To" point you need to use, so after changing viewport to the other viewport (ga_viewport_current_set)
     
    ga_view_rotation_center_set( "",  ajh_to)
     
    cheers
    Arthur
Reply
  • Hi Mitch,
     
    The full set of attributes that control the view are:
    clipping_flag, capping_flag, from_point, to_point, up_vector, center_x/y , zoom_factor, perspective_flag, model_sx/sy/sz , screen_sx/sy , view_plane_dist, back_plane_dist, front_plane_dist
     
    The observer stands at the from_point and looks at the to_point which is the rotation centre.
    For your need the following gives the detail you require:
     
    real ajh_to(3)
    ga_view_to_get("",ajh_to)
    dump ajh_to
     
    this is taking the current viewport's view information as the "named view" is "".
     
    it's the "To" point you need to use, so after changing viewport to the other viewport (ga_viewport_current_set)
     
    ga_view_rotation_center_set( "",  ajh_to)
     
    cheers
    Arthur
Children
No Data