Hello,
Yes the model view matrix can be fetched with .getStandardMatrix(),
but the problem i have is,
this.context.modelViewMatrix.loadIdentity();
this.context.modelViewMatrix.rotate001(-this.camera.getRoll());
this.context.modelViewMatrix.rotate100(-this.camera.getTilt());
this.context.modelViewMatrix.rotate001(-this.camera.getHeading());
this.context.modelViewMatrix.translate(0, 0, -1 -
this.camera.getAltitude() / we.scene.EARTH_RADIUS);
this.context.modelViewMatrix.rotate100(this.camera.getLatitude());
this.context.modelViewMatrix.rotate010(-this.camera.getLongitude());
there are rotations that are not made in 0,0,0 ; the lat and long are
moving the camara to other place that is not the Translation info in
the mvm (i think).
should i do a simple p'=p*RotX and p'=p*RotY to find the new position
of the camera?
(p - position of the camera , p' - new position , RotX RotY - matrix
to rotate in X and Y axe)
should i use like proj4js to find the coordinates in x,y,z?
if i use this proj4js, the lat long heigh are in epsg:4979 (or epsg:
4326 ?) and i must convert to wsg84?
On 16 Nov, 08:44, Petr Sloup - Klokan Technologies GmbH
<
sloupp...@gmail.com> wrote:
> Hi,
>
> you can get the modelview matrix from scene.context.modelViewMatrix .
> It's type is "we.math.TransformationMatrix" so you probably want to
> call .getStandardMatrix() on the result to get
> "goog.math.Matrix" (
http://closure-library.googlecode.com/svn/docs/
> class_goog_math_Matrix.html). If you multiply (0,0,0) by this matrix,
> you should get position of the camera.
>
> -----Petr SloupSoftware Engineer - WebGL Earth developer
> Klokan Technologies GmbHBahnhofstrasse 9, Baar 6340, SwitzerlandTel:
> +41 (0)41 511 26 12Email: i...@klokantech.comWeb:
http://www.klokantech.com/