Directly set Camera's projection matrix

Is there a way to directly modify and set the camera’s projectionMatrix via its frustum? I see the ability to set the camera’s transform, but the only way I see of setting the frustum’s projection matrix is piecemeal, involving some math to set the near/far/fov/aspect ratio…etc.
Is there also a way to directly set the camera’s viewMatrix?

For example, what I would like to be able to do is something like:

Cesium.Matrix4.multiply(baseCameraViewMatrix, otherViewMatrix, camera.viewMatrix);

This would allow me to apply a view matrix (rotation and translation) on top of a base camera view matrix in order to apply rotation/translation local to the “baseCameraViewMatrix”


Welcome to the Cesium Community!

Both the camera’s projectionMatrix and viewMatrix are read-only from the API side. You can rotate the camera with the rotate function (API link) and translate the camera with the move function (API link). You can also set the camera’s view with setView (API link).

Thanks for the reply @dzung! Unfortunately these methods do not provide what I need, at least not what I think I need anyways, that would be great if they did! I’m currently trying to get webxr working with cesium and the first bit bit I’m trying to do is integrate the pose and projection data coming from webxr. I’m trying to understand how I can apply a view matrix coming from webxr on top of a base transformation in cesium and am not having much luck. The next battle would be to get the projection matrix coming from webxr applied to the cesium camera.