Camera postion

Moderator: GiD Team

User avatar
Felguf
Posts: 10
Joined: Mon Sep 25, 2017 11:14 am
Location: Liège, Belgium
Contact:

Camera postion

Postby Felguf » Thu Oct 12, 2017 9:02 am

Hello,

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 ?

Regards,

Yves
User avatar
escolano
Posts: 1568
Joined: Thu Sep 18, 2014 3:31 pm

Re: Camera postion

Postby escolano » Fri Oct 13, 2017 3:24 pm

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

Return to “Advanced visualization”

Who is online

Users browsing this forum: No registered users and 1 guest