Struct turbine_scene3d::Scene

source ·
pub struct Scene {
    pub settings: SceneSettings,
    pub projection: Matrix4<f32>,
    pub camera: Matrix4<f32>,
    pub model: Matrix4<f32>,
    /* private fields */
}
Expand description

Stores scene data.

Fields

settings: SceneSettings

Scene settings.

projection: Matrix4<f32>

Projection transform.

camera: Matrix4<f32>

Camera transform.

model: Matrix4<f32>

Model transform.

Implementations

Create new scene.

Set projection matrix.

Set camera matrix.

Set model matrix.

Load texture from path.

Create vertex shader from source.

Create fragment shader from source.

Create program from vertex and fragment shader.

Create 4D matrix uniform.

Create 2D vector uniform.

Create 3D vector uniform.

Create f32 uniform.

Create vertex array.

Create uv buffer.

Create color buffer.

Create vertex buffer for 2D coordinates.

Create vertex buffer for 3D coordinates.

Create normal buffer.

Use program.

Set model-view-projection transform uniform.

Set view transform uniform.

Set model transform uniform.

Set matrix uniform.

Set 2D vector uniform.

Set 3D vector uniform.

Set f32 uniform.

Set texture.

Translate model.

Translate model in global coordinates.

Scale model.

Rotate model around x axis with degrees.

Rotate model around y axis with degrees.

Rotate model around z axis with degrees.

Rotate model around axis with degrees.

Push model transfrom to transform stack.

Pop model transform from transform stack.

Clear background with color.

Enable framebuffer sRGB.

Disable framebuffer sRGB.

Enable blend.

Disable blend.

Enable cull face.

Disable cull face.

Cull front face.

Cull back face.

Cull both front and back face.

Draws triangles.

Draws triangle strip.

Draws points.

Draws lines.

Executes commands in command list.

Draws a command list from frame graph.

Trait Implementations

Executes the destructor for this type. 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.