Camera reference fra

1. A concise explanation of the problem you're experiencing.

Similar to the example combining three.js/potree and cesium I would like to integrate cesium with my raycasting system. For this I need the transformation between the camera orientation/position of the loop and a fixed position/orientation of my raycasting system (z-axis looking down the object, camera is in front of object). Can I use the reference frame of the camera or do you have another approach ?

2. A minimal code example. If you've found a bug, this helps us reproduce and repair it.

3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
See above

4. The Cesium version you're using, your operating system and browser. 1.51

The camera transform and viewMatrix are probably the most useful here. Since it’s all open source you can see for yourself exactly what transformations are sent to the shaders:

That sounds like an interesting use case, what kind of application are you building?

Hi Omar,

thank you for the answer.

I think it is interesting to display/overlay images or self-shaded/-rendered artifacts with cesium.

We have a big library doing raycasting/raytracing rendering. I would like to overlap the result of this library with cesium at the right position and with the right orientation - so I have to understand the transformations of Cesium and the possibilities.

Are there any informations available with respect to camera transform and viewMatrix. What is transform exactly ?

On the other hand, the most complicated things here are what transformations and coordinates do the systems use and in which way are they programmed ! Keywords here are row-major, column majro, XNA matrices, ECEF coordinates, cartesian coordinates, perpsective matrix, projection matrix, view matrix ... differences between opengl, webgl and directx, d3d.



The Cesium engine should be implemented the same way a general graphics engine would be in terms of these transformation, so for example a guide like this about model, view and projection matrices should apply:

I’m not familiar with specific differences between WebGL and DirectX there. I think WebGL and OpenGL’s systems should be pretty similar.

Every link in the documentation has a link to go to the source code, so you can click on the transform for viewMatrix to see exactly how it’s used in the source. I think that, plus trying it out yourself and doing some experiments with the engine will be your best bet of figuring out where to go from there.

It definitely sounds like a very interesting project, it’d be cool to see some screenshots here when you make some progress. Best of luck!