Calculating BoxGraphic Vertices Positions

Hi,

As pictured below, I have added a BoxGraphic to the viewer and what I would like to do is calculate the coordinates of each of the corners of the box. The reason for which, is that I would like to make this box interactive, so that the user can drag the corners, or click and drag the cube itself to reposition in the viewer.

The inputs I have are the position for the centre of the cube, and the dimensions of the sides which are required to construct the BoxGraphic.

Is there a formula for calculating the coordinates of the corners of the cube or is there anything else in the Cesium API which would be better suited to what I’m trying to achieve?

Screenshot and sandcastle is attached below, thanks for any help.

Hi @spinksy,

Looking through the BoxGraphics documentation now

I do not see a method that returns the coordinates of each corner of the cube. I recommend that you use the dimensions property to make this calculation.

-Sam