Struct dzahui::mesh::Mesh

source ·
pub(crate) struct Mesh {
    pub(crate) max_length: f64,
    pub(crate) model_matrix: Matrix4<f32>,
    pub(crate) boundary_indices: Option<Vec<u32>>,
    binder: Binder,
    pub(crate) indices: Array1<u32>,
    pub(crate) vertices: Array1<f64>,
}
Expand description

General Information

Representation of a plane figure / 3d body. Contains information to draw to screen and move/rotate mesh representation to final position.

Fields

  • max_length - Maximum length of figure. Used to center camera arround objective.
  • model_matrix - Translates and rotates object to final world position.
  • binder - vao, vbo and ebo variables bound to mesh drawable in GPU.
  • indices - Indices that map to vertices. Normally used in triads. Specified in gl configuration.
  • vertices - Vertices in 3d space. Normally used in sextuples (coordinate and color). Specified in gl configuration.

Fields§

§max_length: f64§model_matrix: Matrix4<f32>§boundary_indices: Option<Vec<u32>>§binder: Binder§indices: Array1<u32>§vertices: Array1<f64>

Implementations§

Getter for model_matrix

Creates new instance of builder

Filtering vertices to give to 1d solver. Temporal function. To be changed for better solution.

Improvable solution to move gradient updating out of dzahui window. Probably will be changed in the future. Obtains max and min of solution (normallly some sort of rate of change), divides every element by the difference and then multiplies them by pi/2 so that, when calculating their sine and cosine, there’s a mapping between max velocity <-> red and min velocity <-> blue

Trait Implementations§

Obtains binder associated to object. Getter.
Obtain binder mutable reference.
Shortcut to binder setup function.
Shortcut to setup texture function.
Shortcut to bind all without texture function.
Shortcut to bind all function.
Shortcut to bind vao function
Shortcut to bind texture
Shortcut to unbind texture
Formats the value using the given formatter. Read more
Creates a way to obtain indices to draw vertices (and triangles). Getter.
Creates a way to obtain vertices from drawable object. Getter.
Creates a way to obtain order of object’s dimensions. Getter.
General Information Read more
General Information 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.