getCameraFrustum method
Future<Frustum>
getCameraFrustum(
)
override
Implementation
@override
Future<Frustum> getCameraFrustum() async {
if (_viewer == null) {
throw Exception("No viewer available");
}
var arrayPtr = get_camera_frustum(_viewer!);
var doubleList = arrayPtr.asTypedList(24);
var frustum = Frustum();
frustum.plane0.setFromComponents(
doubleList[0], doubleList[1], doubleList[2], doubleList[3]);
frustum.plane1.setFromComponents(
doubleList[4], doubleList[5], doubleList[6], doubleList[7]);
frustum.plane2.setFromComponents(
doubleList[8], doubleList[9], doubleList[10], doubleList[11]);
frustum.plane3.setFromComponents(
doubleList[12], doubleList[13], doubleList[14], doubleList[15]);
frustum.plane4.setFromComponents(
doubleList[16], doubleList[17], doubleList[18], doubleList[19]);
frustum.plane5.setFromComponents(
doubleList[20], doubleList[21], doubleList[22], doubleList[23]);
thermion_flutter_free(arrayPtr.cast<Void>());
return frustum;
}