pub struct DzahuiWindow {
Show 19 fields context: ContextWrapper<PossiblyCurrent, Window>, pub(crate) geometry_shader: Shader, event_loop: Option<EventLoop<()>>, mouse_coordinates: Point2<f32>, initial_time_step: Option<f64>, character_set: CharacterSet, integration_iteration: usize, pub(crate) height: u32, pub(crate) width: u32, vertex_selector: Cone, text_shader: Shader, window_text_scale: f32, pub timer: Instant, camera: Camera, solver: Solver, time_step: f64, mesh: Mesh, write_location: String, file_prefix: String,
}
Expand description

General Information

DzahuiWindow holds every important component to create an instancec of a simulator. Only one instance should be active at once.

Fields

  • context - Holds an instance of OpenGL. This normally means that all configuration associated with rendering is stored here. Only one context is allowed
  • geometry_shader - Geometry_shaders to compile and use. Responsible for mesh drawing
  • event_loop - To obtain user input in window and refresh window
  • mouse_coordinates - Current coordinates of mouse
  • initial_time_step - When solving a time-dependent problem and not specifiying a time, an initial time should be given while enough information is collected to use framerate
  • character_set - Set of characters to draw on screen
  • integration_iteration - Amount of terms to approximate integral
  • height - Height of window created
  • width - Width of window created
  • vertex_selector - A cone to interact with the screen using the mouse
  • text_shader - Text shaders to compile and use. Responsible for text rendering
  • window_text_scale - Scale of text in front of window. This text does not change with camera view
  • timer - Gives current time since creation of window. Call with timer.elapsed()
  • camera - Camera configuration creates view and projetion matrices, which directly tells OpenGL what to and not to render
  • solver - Solver enum representing the kind of equation to simmulate
  • time_step - How much to forward a time-dependent solution
  • mesh - A mesh to draw to screen. Represents an object tessellated into triangles/traingular prisms
  • write_location - Where to write values from solved equation of needed
  • file_prefix- If writing files require a prefix to identify them

Fields§

§context: ContextWrapper<PossiblyCurrent, Window>§geometry_shader: Shader§event_loop: Option<EventLoop<()>>§mouse_coordinates: Point2<f32>§initial_time_step: Option<f64>§character_set: CharacterSet§integration_iteration: usize§height: u32§width: u32§vertex_selector: Cone§text_shader: Shader§window_text_scale: f32§timer: Instant§camera: Camera§solver: Solver§time_step: f64§mesh: Mesh§write_location: String§file_prefix: String

Implementations§

Creates a new default builder.

To restart timer of window in case is needed.

Callback to change mouse coordinates.

Callback that changes wether camera can be edited by user input or not.

Callback to obtain vertex intersection with click produced cone.

Callback to change camera view matrix based on user motion.

Callback to resize window.

Send information of vertices to be written

General Information

Run window with a mesh and an event loop. Consumes every object. Generates actual solver based on solver enum. Sets mesh and text.

Parameters
  • mut self - A window instance.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.