pub struct Camera { /* private fields */ }Expand description
Wraps the corresponding Model I/O camera counterpart.
Implementations§
Source§impl Camera
impl Camera
Sourcepub fn new() -> Result<Self>
pub fn new() -> Result<Self>
Wraps the corresponding Model I/O initializer for the wrapped Model I/O camera counterpart.
Sourcepub fn info(&self) -> Result<CameraInfo>
pub fn info(&self) -> Result<CameraInfo>
Calls the corresponding Model I/O method on the wrapped Model I/O camera counterpart.
Sourcepub fn set_projection(&self, projection: CameraProjection)
pub fn set_projection(&self, projection: CameraProjection)
Calls the corresponding Model I/O method on the wrapped Model I/O camera counterpart.
Sourcepub fn set_near_visibility_distance(&self, value: f32)
pub fn set_near_visibility_distance(&self, value: f32)
Calls the corresponding Model I/O method on the wrapped Model I/O camera counterpart.
Sourcepub fn set_far_visibility_distance(&self, value: f32)
pub fn set_far_visibility_distance(&self, value: f32)
Calls the corresponding Model I/O method on the wrapped Model I/O camera counterpart.
Sourcepub fn set_world_to_meters_conversion_scale(&self, value: f32)
pub fn set_world_to_meters_conversion_scale(&self, value: f32)
Calls the corresponding Model I/O method on the wrapped Model I/O camera counterpart.
Sourcepub fn set_focal_length(&self, value: f32)
pub fn set_focal_length(&self, value: f32)
Calls the corresponding Model I/O method on the wrapped Model I/O camera counterpart.
Sourcepub fn set_focus_distance(&self, value: f32)
pub fn set_focus_distance(&self, value: f32)
Calls the corresponding Model I/O method on the wrapped Model I/O camera counterpart.
Sourcepub fn set_field_of_view(&self, value: f32)
pub fn set_field_of_view(&self, value: f32)
Calls the corresponding Model I/O method on the wrapped Model I/O camera counterpart.
Sourcepub fn look_at(&self, focus_position: [f32; 3])
pub fn look_at(&self, focus_position: [f32; 3])
Calls the corresponding Model I/O method on the wrapped Model I/O camera counterpart.
Sourcepub fn look_at_from(&self, focus_position: [f32; 3], camera_position: [f32; 3])
pub fn look_at_from(&self, focus_position: [f32; 3], camera_position: [f32; 3])
Calls the corresponding Model I/O method on the wrapped Model I/O camera counterpart.
Sourcepub fn frame_bounding_box(
&self,
bounding_box: BoundingBox,
set_near_and_far: bool,
)
pub fn frame_bounding_box( &self, bounding_box: BoundingBox, set_near_and_far: bool, )
Calls the corresponding Model I/O method on the wrapped Model I/O camera counterpart.
Sourcepub fn ray_to(&self, pixel: [i32; 2], viewport: [i32; 2]) -> [f32; 3]
pub fn ray_to(&self, pixel: [i32; 2], viewport: [i32; 2]) -> [f32; 3]
Calls the corresponding Model I/O method on the wrapped Model I/O camera counterpart.