Rotation of the polygon

Good afternoon.
I have arrow, which is made as PolygonGraphics.
Could You tell me, how to rotate it?

P.S. My code:
function setArrow(viewer, entityId, longitude, latitude, rotateAngle)
{
    viewer.entities.add({
        id: entityId,
        //name: "Some name",
        //description: "Some description",
        polygon : {
            hierarchy : Cesium.Cartesian3.fromDegreesArray([longitude - 5, latitude + 0.25,
                                                            longitude, latitude + 0.25,
                                                            longitude, latitude + 0.5,
                                                            longitude + 1.0, latitude,
                                                            longitude, latitude - 0.5,
                                                            longitude, latitude - 0.25,
                                                            longitude - 5, latitude - 0.25]),
            material : Cesium.Color.RED,
            stRotation : Cesium.Math.toRadians(90)
        }
    });
}

Hello,

We currently don’t have a way to rotate a polygon built into Cesium. You will have to compute the rotated positions before you create the polylon.

-Hannah

Hi Hannah,

I need to rotate polygon. Could you please provide me sample code to compute the rotated positions.

Thanks,
Gowtham.

Take a look at this paper to see the math involved. That should help you use Cesium’s matrix classes to rotate your polygon.

Scott