getCameraCullingProjectionMatrix method
Get the camera's culling projection matrix. See Camera.h for more details.
Implementation
@override
Future<Matrix4> getCameraCullingProjectionMatrix() async {
final ptr = _module._malloc(16 * 8) as JSNumber;
_module.ccall("get_camera_culling_projection_matrix", "void",
["void*".toJS, "double*".toJS].toJS, [_viewer!, ptr].toJS, null);
final matrix = Matrix4.zero();
for (int i = 0; i < 16; i++) {
matrix[i] = (_module.getValue((ptr.toDartInt + (i * 8)).toJS, "double")
as JSNumber)
.toDartDouble;
}
_module._free(ptr);
return matrix;
}