getCameraRotation method
Future<Matrix3>
getCameraRotation(
)
override
Implementation
@override
Future<Matrix3> getCameraRotation() async {
if (_viewer == null) {
throw Exception("No viewer available");
}
var arrayPtr = get_camera_model_matrix(_viewer!);
var doubleList = arrayPtr.asTypedList(16);
var modelMatrix = Matrix4.fromFloat64List(doubleList);
var rotationMatrix = Matrix3.identity();
modelMatrix.copyRotation(rotationMatrix);
thermion_flutter_free(arrayPtr.cast<Void>());
return rotationMatrix;
}