pub struct DzahuiWindowBuilder {
Show 20 fields geometry_fragment_shader: Option<String>, geometry_vertex_shader: Option<String>, text_fragment_shader: Option<String>, text_vertex_shader: Option<String>, height_multiplier: Option<f64>, integration_iteration: Option<usize>, opengl_version: Option<(u8, u8)>, initial_time_step: Option<f64>, window_text_scale: Option<f32>, mesh_dimension: MeshDimension, character_set: Option<String>, vertex_selector: Option<f32>, time_step: Option<f64>, camera: CameraBuilder, height: Option<u32>, width: Option<u32>, mesh: MeshBuilder, solver: Solver, write_location: Option<String>, file_prefix: Option<String>,
}
Expand description

General Information

The window builder. When using function builder in DzahuiWindow without parameters a sensible default is obtained.

Fields

  • geometry_fragment_shader - Shader used to render triangulated 3D and 2D meshes. Defaults to assets/geometry_fragment_shader.fs
  • geometry_vertex_shader - Shader used to render text. Defaults to assets/geometry_vertex_shader.vs
  • text_fragment_shader - Shader used to render triangulated 3D and 2D meshes. Defaults to assets/text_fragment_shader.fs
  • text_vertex_shader - Shader used to render text. Defaults to assets/text_vertex_shader.vs
  • height_multiplier - Makes height of mesh bigger. Useful for 1D mesh.
  • integration_iteration - Amount of elements to sum to approximate integral
  • opengl_version - opengl version to use. Tested with 3.3, latter versions should work too
  • 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
  • window_text_scale - Scale of text in front of window. This text does not change with camera view
  • mesh_dimension - Dimension of mesh to build. Used to process certain elements of solution
  • character_set - Set of characters to draw on screen
  • vertex_selector - Angle for the cone that casts mouse coordinates to 3d world and selects vertices
  • time_step - How much to advance a time-dependent solution
  • camera - A CameraBuilder. Certain properties can be changend via this structure’s methods
  • height - Height of window. Defaults to 600 px.
  • width - Width of window. Defaults to 800 px.
  • mesh - A MeshBuilder. Certain properties can be changed via this structre’s methods
  • solver - An enum representing the equation to be solved
  • write_location - Where to write values from solved equation of needed. Will be chosen automatically if None
  • file_prefix- If writing files require a prefix to identify them. Will be chosen automatically if None

Fields§

§geometry_fragment_shader: Option<String>§geometry_vertex_shader: Option<String>§text_fragment_shader: Option<String>§text_vertex_shader: Option<String>§height_multiplier: Option<f64>§integration_iteration: Option<usize>§opengl_version: Option<(u8, u8)>§initial_time_step: Option<f64>§window_text_scale: Option<f32>§mesh_dimension: MeshDimension§character_set: Option<String>§vertex_selector: Option<f32>§time_step: Option<f64>§camera: CameraBuilder§height: Option<u32>§width: Option<u32>§mesh: MeshBuilder§solver: Solver§write_location: Option<String>§file_prefix: Option<String>

Implementations§

Creates default instance.

Changes geometry shader.

Changes text shader.

Makes height larger for 1D mesh

Changes height and width.

Changes opengl version.

Changes angle to determine selected vertex.

Changes distance (radius) to object centered

Changes object being targeted

Changes camera position in a sphere with center camera_target

Changes fov when using projection matrix

Changes camera movement arround object being targeted

Changes mesh dimension to 3D (originally in 2D)

Changes mesh dimension to 1D (originally in 2D)

Makes diffusion solver simulation

Makes time-dependant diffusion solver simulation

Makes Stokes time-independent solver simulation

Makes Stokes time-independent solver simulation with alias StaticPressureSolver

Sets integration iteration

Sets time step for time-dependant solutions

Size of text present on screen. Default is chosen otherwise, which may not be good for every scenario

Initial time step when simulation on real time

Set file location. If let None, a predetermined will be chosen later

Set file prefix. If let None, a predetermined will be chosen later

General Information

Builds DzahuiWindow from parameters given or sensible defaults.

Details

First it generates a window builder with title ‘Dzahui’, size according to builder and always resizable. Then an OpenGL version is assigned based on builder. Event loop is generated and, alongside window, made current context. OpenGL functions are made available and viewport for OpenGL is set. Geometry and Text shaders are created. A new instance of Mesh is created for later use. A new camera is created based on mesh (unless overriden). A timer is created. An instance of DzahuiWindow is created.

Parameters
  • self - All configuration required is within self. Default shaders are hardcoded in here.

Trait Implementations§

Formats the value using the given formatter. Read more

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.