setCameraRotation method

  1. @override
Future setCameraRotation(
  1. Quaternion quaternion
)
override

Rotate the camera by rads around the given axis. Note this is not persistent - any viewport navigation will reset the camera transform.

Implementation

@override
Future setCameraRotation(Quaternion quaternion) async {
  _module.ccall(
      "set_camera_rotation",
      "void",
      ["void*".toJS, "float".toJS, "float".toJS, "float".toJS, "float".toJS]
          .toJS,
      [
        _viewer!,
        quaternion.w.toJS,
        quaternion.x.toJS,
        quaternion.y.toJS,
        quaternion.z.toJS
      ].toJS,
      null);
}