chore: getter for native camera view matrix
This commit is contained in:
@@ -75,4 +75,9 @@ class ThermionFFICamera extends Camera {
|
||||
Future<double> getFocalLength() async {
|
||||
return Camera_getFocalLength(camera);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<Matrix4> getViewMatrix() async {
|
||||
return double4x4ToMatrix4(Camera_getViewMatrix(camera));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -887,6 +887,16 @@ external double Camera_getCullingFar(
|
||||
ffi.Pointer<TCamera> camera,
|
||||
);
|
||||
|
||||
@ffi.Native<double4x4 Function(ffi.Pointer<TCamera>)>(isLeaf: true)
|
||||
external double4x4 Camera_getViewMatrix(
|
||||
ffi.Pointer<TCamera> camera,
|
||||
);
|
||||
|
||||
@ffi.Native<double4x4 Function(ffi.Pointer<TCamera>)>(isLeaf: true)
|
||||
external double4x4 Camera_getModelMatrix(
|
||||
ffi.Pointer<TCamera> camera,
|
||||
);
|
||||
|
||||
@ffi.Native<ffi.Double Function(ffi.Pointer<TCamera>)>(isLeaf: true)
|
||||
external double get_camera_near(
|
||||
ffi.Pointer<TCamera> camera,
|
||||
@@ -947,11 +957,6 @@ external void Camera_setLensProjection(
|
||||
double focalLength,
|
||||
);
|
||||
|
||||
@ffi.Native<double4x4 Function(ffi.Pointer<TCamera>)>(isLeaf: true)
|
||||
external double4x4 Camera_getModelMatrix(
|
||||
ffi.Pointer<TCamera> camera,
|
||||
);
|
||||
|
||||
@ffi.Native<EntityId Function(ffi.Pointer<TCamera>)>(isLeaf: true)
|
||||
external int Camera_getEntity(
|
||||
ffi.Pointer<TCamera> camera,
|
||||
|
||||
@@ -12,6 +12,7 @@ abstract class Camera {
|
||||
double aspect = 1.0,
|
||||
double focalLength = kFocalLength});
|
||||
|
||||
Future<Matrix4> getViewMatrix();
|
||||
Future<Matrix4> getModelMatrix();
|
||||
Future setModelMatrix(Matrix4 matrix);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user