Replies: 7 comments 1 reply
-
I am trying to rotate the cylinder 45 degrees to be perpendicular to the surface of the map auto rot = vsg::rotate(vsg::radians(45.0f), 1.0f, 0.0f, 0.0f); but the result is that the cylinder is drawn in another part of the world. Seems that takes the 45 degrees relative to the center of the world. any suggestions ? |
Beta Was this translation helpful? Give feedback.
-
The vsg::EllipsoidModel is what provides the definition of the earths shape, you can use this to convert Lat, Long, Alititiude to Earth Centered Earth Fixed, you can also get transforms for local origins to ECEF and visa-versa. |
Beta Was this translation helpful? Give feedback.
-
Yes, i am using it this way : ellipsoidModel->convertLatLongAltitudeToECEF({25.686613, -100.316116, 0.0}); so i am able to position the cylinder using the lat long coordinates. My Issue is the transformation to rotate the cylinder around its own axis to be oriented paralell to the surface. When I rotate the cylnder, it rotates using the center of the earth as origin, but i need to rotate around its own. |
Beta Was this translation helpful? Give feedback.
-
This is the code :
|
Beta Was this translation helpful? Give feedback.
-
On Wed, 12 Jul 2023 at 22:28, esteban ortiz ***@***.***> wrote:
the cylinder is oriented to the north, i am trying to orient it parallell
to the earth's surface
I would recommend creating the cylinder in a local coordinate frame, and
use a vsg::MatrixTransform as it's parent to place it in ECEF. The
transform's matrix would be set using the
ElliposoidModel::computeLocalToWorldTransform(lat, long, altitude) value.
… Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
sounds good. I'll try that way. Thank you in advance. |
Beta Was this translation helpful? Give feedback.
-
It works !!!! Thank you very much !! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
How to position geometries (a Cylinder) in a map using TileDatabase as the scene ?
I am experimenting using Builder and transforms, but i cannot draw a cylinder parallel to the surface as seen in the following
Beta Was this translation helpful? Give feedback.
All reactions