Hi @liliulei,
Suppose I have an OrientedBoundingBox
obb
. In order to get the eight corners of obb
, you would need to do the following:
- Identify the three axes in
obb.halfAxes
. The local x-axis is the first column, i.e.Matrix3.getColumn(obb.halfAxes, 0, new Cartesian3())
. The local y-axis is the second column, and so on. We will call thesexaxis
,yaxis
, andzaxis
respectively. - To calculate the “backmost, bottom-left” corner (i.e. the corner with (-X, -Y, -Z) in local space), you would need to do
obb.center - xaxis - yaxis - zaxis
. - To calculate the “frontmost, bottom-right” corner (i.e. (X, -Y, Z)) you need to do
obb.center + xaxis - yaxis + zaxis
. - And so on.
Best regards,
Janine