[−][src]Struct molecules::application::Application
Fields
width: u32
Width of the window
height: u32
Height of the window
device: Device
Device used for rendering
queue: Queue
Main queue to which GPU commands are sent
start_time: SystemTime
Time of initilization of program. Used for animation.
camera: RotationCamera
Camera of the application.
camera_changed: bool
Holds information whether camera was changed between frames. The information is used for accumulation of result.
voxel_grid: VoxelGrid
Voxel grid containing atoms of the molecule.
raymarch_globals: RaymarchGlobals
Global variables for ray marching passed to GPU.
raymarch_globals_buffer: Buffer
GPU buffer for raymarch_globals
.
ssao_globals_buffer: Buffer
Global variables for SSAO computation passed to GPU.
raymarch_pipeline: RaymarchPipeline
Pipeline for ray marching.
render_pipeline: RenderPipeline
Pipeline that renders the sphere marched result to the window.
ssao_pipeline: SsaoPipeline
Pipeline that adds SSAO to the sphere marched result.
gbuffer_positions: TextureView
gbuffer_normals: TextureView
output_texture: TextureView
sdf_default: Buffer
sdf_texture: Texture
Texture where signed distance field is stored. Used to progressively enhance view when camera did not change between frames.
sdf_texture_view: TextureView
mouse_pressed: bool
mouse_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>,