Get rectangle of entity in the view

30 views
Skip to first unread message

Yonatan Joe

unread,
Jun 26, 2019, 2:11:01 AM6/26/19
to cesium-dev
Hi!

I'm rendering a entity with a glb model.
Then the camera is positioned so the entity is in view after I click it.

I want to add HTML elements to serround the model.

To do that I need to know the boundaries of the model in the current camera view.

Is there a function to get those values?
I mean the value in px.

Thanks alot!

Omar Shehata

unread,
Jun 28, 2019, 5:19:53 PM6/28/19
to cesium-dev
This thread has some discussion on how to compute the bounding area of a given entity:


Let me know if it helps!

Yonatan Joe

unread,
Jun 30, 2019, 1:52:40 AM6/30/19
to cesium-dev
I read that discuttion but couldent make it to work for me.
Is there any other way?

Omar Shehata

unread,
Jul 3, 2019, 1:41:10 PM7/3/19
to cesium-dev
Can you please show a code example on Sandcastle (https://cesiumjs.org/Cesium/Apps/Sandcastle/index.html) that I can run of the code you tried? Is it giving you an error, or an incorrect result? If so, can you share a screenshot of it?
Reply all
Reply to author
Forward
0 new messages