Entity orientation

Where can I look to see what kind of values can be stored in an entity’s orientation property? The documentation just mentions that it is a Property.

If I call entity.orientation.getValue( viewer.clock.currentTime ) … with the return value always be a Cesium.Quaternion?

Is there any way to get back an entity’s heading?

The reason I ask is that I’m trying to get the camera to assume the first-person view of an entity. However, since the entity and camera orientations are handled differently, I can’t find a way to take the entity’s orientation and set it on the camera (the entity returns a Quaternion to me, and the camera.setView property wants a heading, pitch, roll, or a view, right, and up axis).

Any pointers on how I can set the camera from an entity’s orientation?

I suppose that I could get the entity’s orientation quaternion and then use:

Cesium.Matrix3.fromQuaternion(quaternion, result)

… to turn it into a rotation matrix, and then pull out the appropriate columns to set as the direction and up on the camera.

That worked. :o)