Page 1 of 1

Camera postion

Posted: Thu Oct 12, 2017 9:02 am
by Felguf

Is there a way to have the camera (eye) position, a global up vector and a target point of the view of my model in GiD.

Is-it possible to retrieve theses values from the GiD_Info view function or informations in the *.vv file. Or is there another function / way ?



Re: Camera postion

Posted: Fri Oct 13, 2017 3:24 pm
by escolano
For 'orthogonal projection' (the useful GiD representation mode) it only matter the visual projection direction.
(in conical 'perspective projection' the rays are not parallel and then there is not a constant 'projection direction', it is necessary to know the apex of the cone where the camera is located)

The 'camera direction' information is implicit in the transform matrix 4x4 (m 'item') returned by
GiD_Info view

In next GiD 13.1.9d developer version (available soon) the GiD_Info view is replaced by a new Tcl command
GiD_Project view <option> ?<value>?
this command is similar to GiD_Info view, but allow not only ask by the values, but also set them, and it also allow the access to each individual item
e.g. for the old 'm' item you will use:
GiD_Project view rotation_matrix
(the old command GiD_Info view won't be deleted, for back compatibility)

On the other hand, there is another GiD-Tcl command (GiD_GetWorldCoord)that maps a 2D screen integer coordinate to 3D world coordinate, and also return the 'visual direction'
I think that you can get the visual direction you want with:
lrange [GiD_GetWorldCoord 0 0] 3 5