09-06-2012 12:59 AM
I use Set_Camera_Target,Set_Camera_Position,Set_Camera_U
I try to change the camera,but the origin point is changed too. I want to know why? And how to set the camera?
Thanks in advance.
09-10-2012 03:01 PM
Those are the correct HOOPS commands to use. However, I don't see a "refresh" command.
With a "refresh" command, you can set a seriesr of viewing parameters and not be continually updating the view, until you call "refresh".
Spatial provides source code for the Scheme toolkit application. You may want to check out:
void HoopsView::refresh(logical update_sils)
void HoopsView::set_eye(const SPAposition& p)
Looking at this code, you will see calls to HC_Set_Camera_Position, HC_Control_Update_By_Key(), HC_Update_Display(), HC_Update_One_Display, and HC_Flush_Contents.
I hope the Scheme example code helps.
09-18-2012 08:45 PM
Thank you very much.
By the way, how to get the modeling coordinates?
I use HC_Show_Net_Camera_Target,HC_Show_Net_Camera_P
I'll appreciate your help.
09-19-2012 08:02 AM
These are 3D modeling coordinates.
To convert between the 2D screen coordinates and 3D modeleing coordinates, use Compute_Coordinates(...).
For examples, see HOOPS documentation on the 2D Tutorial: Soccer.
Or look thru SPAScmExtHoops\ha_scm.m\src\view_ha.cpp, especially HoopsView::drawable_to_world(...).