[−][src]Struct molecules::application::Application
Fields
width: u32Width of the window
height: u32Height of the window
device: DeviceDevice used for rendering
queue: QueueMain queue to which GPU commands are sent
start_time: SystemTimeTime of initilization of program. Used for animation.
camera: RotationCameraCamera of the application.
camera_changed: boolHolds information whether camera was changed between frames. The information is used for accumulation of result.
voxel_grid: VoxelGridVoxel grid containing atoms of the molecule.
raymarch_globals: RaymarchGlobalsGlobal variables for ray marching passed to GPU.
raymarch_globals_buffer: BufferGPU buffer for raymarch_globals.
ssao_globals_buffer: BufferGlobal variables for SSAO computation passed to GPU.
raymarch_pipeline: RaymarchPipelinePipeline for ray marching.
render_pipeline: RenderPipelinePipeline that renders the sphere marched result to the window.
ssao_pipeline: SsaoPipelinePipeline that adds SSAO to the sphere marched result.
gbuffer_positions: TextureViewgbuffer_normals: TextureViewoutput_texture: TextureViewsdf_default: Buffersdf_texture: TextureTexture where signed distance field is stored. Used to progressively enhance view when camera did not change between frames.
sdf_texture_view: TextureViewmouse_pressed: boolmouse_position: PhysicalPosition<f64>Methods
impl Application[src]
pub async fn new<'_, '_>(
width: u32,
height: u32,
surface: &'_ Surface,
file_name: Option<&'_ str>
) -> Self[src]
width: u32,
height: u32,
surface: &'_ Surface,
file_name: Option<&'_ str>
) -> Self
Initialized the application.
pub fn resize(&mut self, width: u32, height: u32)[src]
Called when window is resized. Recreates textures for rendering.
pub fn render(&mut self, frame: &TextureView)[src]
Called each frame to render.
pub fn window_event(&mut self, event: &WindowEvent)[src]
pub fn device_event(&mut self, event: &DeviceEvent)[src]
pub fn device(&self) -> &Device[src]
Returns reference to the device used by the application.
pub fn queue_mut(&self) -> &Queue[src]
Returns reference to the device used by the application.
fn update_raymarch_globals(&mut self)[src]
pub fn solvent_radius(&self) -> f32[src]
pub fn set_solvent_radius(&mut self, solvent_radius: f32)[src]
pub fn max_neighbours(&self) -> i32[src]
pub fn set_max_neighbours(&mut self, max_neighbours: i32)[src]
Auto Trait Implementations
impl !RefUnwindSafe for Application
impl Send for Application
impl Sync for Application
impl Unpin for Application
impl UnwindSafe for Application
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn is_in_subset(&self) -> bool
fn to_subset_unchecked(&self) -> SS
fn from_subset(element: &SS) -> SP
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,