#[repr(C)]pub struct CameraApi {Show 17 fields
pub view_from_transform: Option<unsafe extern "C" fn(view: *mut Mat44T, tm: *const TransformT) -> *mut Mat44T>,
pub view_from_lookin: Option<unsafe extern "C" fn(view: *mut Mat44T, position: Vec3T, forward: Vec3T, up: Vec3T) -> *mut Mat44T>,
pub transform_from_view: Option<unsafe extern "C" fn(tm: *mut TransformT, view: *const Mat44T) -> *mut TransformT>,
pub projection_from_frustum: Option<unsafe extern "C" fn(proj: *mut Mat44T, left: f32, right: f32, bottom: f32, top: f32, near: f32, far: f32) -> *mut Mat44T>,
pub matrices_from_eyes: Option<unsafe extern "C" fn(camera: *mut CameraT, head_tm: *const Mat44T, head_to_left_eye: *const Mat44T, head_to_right_eye: *const Mat44T, left_eye_left: f32, left_eye_right: f32, left_eye_top: f32, left_eye_bottom: f32, right_eye_left: f32, right_eye_right: f32, right_eye_top: f32, right_eye_bottom: f32)>,
pub projection_from_fov: Option<unsafe extern "C" fn(proj: *mut Mat44T, near_plane: f32, far_plane: f32, vertical_fov: f32, aspect: f32) -> *mut Mat44T>,
pub orthographic_from_frustum: Option<unsafe extern "C" fn(proj: *mut Mat44T, left: f32, right: f32, bottom: f32, top: f32, near: f32, far: f32) -> *mut Mat44T>,
pub orthographics_from_dimensions: Option<unsafe extern "C" fn(proj: *mut Mat44T, near_plane: f32, far_plane: f32, width: f32, height: f32) -> *mut Mat44T>,
pub projection_from_camera: Option<unsafe extern "C" fn(camera: *mut CameraT, transform: CameraTransform, aspect: f32) -> *mut Mat44T>,
pub update_free_flight: Option<unsafe extern "C" fn(tm: *mut TransformT, t: Vec3T, r: Vec2T)>,
pub update_pan: Option<unsafe extern "C" fn(tm: *mut TransformT, focus_position: *mut Vec3T, pan: Vec2T)>,
pub update_maya: Option<unsafe extern "C" fn(tm: *mut TransformT, focus_position: Vec3T, zoom: f32, rot: Vec2T)>,
pub world_to_screen: Option<unsafe extern "C" fn(camera: *const CameraT, transform: CameraTransform, viewport: RectT, world: *const Vec3T, screen: *mut Vec3T, n: u32) -> *mut Vec3T>,
pub screen_to_world: Option<unsafe extern "C" fn(camera: *const CameraT, transform: CameraTransform, viewport: RectT, screen: *const Vec3T, world: *mut Vec3T, n: u32) -> *mut Vec3T>,
pub meters_per_pixel: Option<unsafe extern "C" fn(distance: f32, vertical_fov: f32, viewport_height: f32) -> f32>,
pub default_camera_settings: Option<unsafe extern "C" fn() -> *const CameraSettingsT>,
pub frustum_planes_from_view_projection: Option<unsafe extern "C" fn(view: *const Mat44T, projection: *const Mat44T, frustum_planes: *mut Vec4T)>,
}
Fields§
§view_from_transform: Option<unsafe extern "C" fn(view: *mut Mat44T, tm: *const TransformT) -> *mut Mat44T>
§view_from_lookin: Option<unsafe extern "C" fn(view: *mut Mat44T, position: Vec3T, forward: Vec3T, up: Vec3T) -> *mut Mat44T>
§transform_from_view: Option<unsafe extern "C" fn(tm: *mut TransformT, view: *const Mat44T) -> *mut TransformT>
§projection_from_frustum: Option<unsafe extern "C" fn(proj: *mut Mat44T, left: f32, right: f32, bottom: f32, top: f32, near: f32, far: f32) -> *mut Mat44T>
§matrices_from_eyes: Option<unsafe extern "C" fn(camera: *mut CameraT, head_tm: *const Mat44T, head_to_left_eye: *const Mat44T, head_to_right_eye: *const Mat44T, left_eye_left: f32, left_eye_right: f32, left_eye_top: f32, left_eye_bottom: f32, right_eye_left: f32, right_eye_right: f32, right_eye_top: f32, right_eye_bottom: f32)>
§projection_from_fov: Option<unsafe extern "C" fn(proj: *mut Mat44T, near_plane: f32, far_plane: f32, vertical_fov: f32, aspect: f32) -> *mut Mat44T>
§orthographic_from_frustum: Option<unsafe extern "C" fn(proj: *mut Mat44T, left: f32, right: f32, bottom: f32, top: f32, near: f32, far: f32) -> *mut Mat44T>
§orthographics_from_dimensions: Option<unsafe extern "C" fn(proj: *mut Mat44T, near_plane: f32, far_plane: f32, width: f32, height: f32) -> *mut Mat44T>
§projection_from_camera: Option<unsafe extern "C" fn(camera: *mut CameraT, transform: CameraTransform, aspect: f32) -> *mut Mat44T>
§update_free_flight: Option<unsafe extern "C" fn(tm: *mut TransformT, t: Vec3T, r: Vec2T)>
§update_pan: Option<unsafe extern "C" fn(tm: *mut TransformT, focus_position: *mut Vec3T, pan: Vec2T)>
§update_maya: Option<unsafe extern "C" fn(tm: *mut TransformT, focus_position: Vec3T, zoom: f32, rot: Vec2T)>
§world_to_screen: Option<unsafe extern "C" fn(camera: *const CameraT, transform: CameraTransform, viewport: RectT, world: *const Vec3T, screen: *mut Vec3T, n: u32) -> *mut Vec3T>
§screen_to_world: Option<unsafe extern "C" fn(camera: *const CameraT, transform: CameraTransform, viewport: RectT, screen: *const Vec3T, world: *mut Vec3T, n: u32) -> *mut Vec3T>
§meters_per_pixel: Option<unsafe extern "C" fn(distance: f32, vertical_fov: f32, viewport_height: f32) -> f32>
§default_camera_settings: Option<unsafe extern "C" fn() -> *const CameraSettingsT>
§frustum_planes_from_view_projection: Option<unsafe extern "C" fn(view: *const Mat44T, projection: *const Mat44T, frustum_planes: *mut Vec4T)>
Implementations§
Source§impl CameraApi
impl CameraApi
pub unsafe fn view_from_transform( &self, view: *mut Mat44T, tm: *const TransformT, ) -> *mut Mat44T
pub unsafe fn view_from_lookin( &self, view: *mut Mat44T, position: Vec3T, forward: Vec3T, up: Vec3T, ) -> *mut Mat44T
pub unsafe fn transform_from_view( &self, tm: *mut TransformT, view: *const Mat44T, ) -> *mut TransformT
pub unsafe fn projection_from_frustum( &self, proj: *mut Mat44T, left: f32, right: f32, bottom: f32, top: f32, near: f32, far: f32, ) -> *mut Mat44T
pub unsafe fn matrices_from_eyes( &self, camera: *mut CameraT, head_tm: *const Mat44T, head_to_left_eye: *const Mat44T, head_to_right_eye: *const Mat44T, left_eye_left: f32, left_eye_right: f32, left_eye_top: f32, left_eye_bottom: f32, right_eye_left: f32, right_eye_right: f32, right_eye_top: f32, right_eye_bottom: f32, )
pub unsafe fn projection_from_fov( &self, proj: *mut Mat44T, near_plane: f32, far_plane: f32, vertical_fov: f32, aspect: f32, ) -> *mut Mat44T
pub unsafe fn orthographic_from_frustum( &self, proj: *mut Mat44T, left: f32, right: f32, bottom: f32, top: f32, near: f32, far: f32, ) -> *mut Mat44T
pub unsafe fn orthographics_from_dimensions( &self, proj: *mut Mat44T, near_plane: f32, far_plane: f32, width: f32, height: f32, ) -> *mut Mat44T
pub unsafe fn projection_from_camera( &self, camera: *mut CameraT, transform: CameraTransform, aspect: f32, ) -> *mut Mat44T
pub unsafe fn update_free_flight(&self, tm: *mut TransformT, t: Vec3T, r: Vec2T)
pub unsafe fn update_pan( &self, tm: *mut TransformT, focus_position: *mut Vec3T, pan: Vec2T, )
pub unsafe fn update_maya( &self, tm: *mut TransformT, focus_position: Vec3T, zoom: f32, rot: Vec2T, )
pub unsafe fn world_to_screen( &self, camera: *const CameraT, transform: CameraTransform, viewport: RectT, world: *const Vec3T, screen: *mut Vec3T, n: u32, ) -> *mut Vec3T
pub unsafe fn screen_to_world( &self, camera: *const CameraT, transform: CameraTransform, viewport: RectT, screen: *const Vec3T, world: *mut Vec3T, n: u32, ) -> *mut Vec3T
pub unsafe fn meters_per_pixel( &self, distance: f32, vertical_fov: f32, viewport_height: f32, ) -> f32
pub unsafe fn default_camera_settings(&self) -> *const CameraSettingsT
pub unsafe fn frustum_planes_from_view_projection( &self, view: *const Mat44T, projection: *const Mat44T, frustum_planes: *mut Vec4T, )
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CameraApi
impl RefUnwindSafe for CameraApi
impl Send for CameraApi
impl Sync for CameraApi
impl Unpin for CameraApi
impl UnwindSafe for CameraApi
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more