Struct glium_shapes::axes::AxesBuilder [] [src]

pub struct AxesBuilder { /* fields omitted */ }

Responsible for building and returning an Axes object.

By default, each orthogonal axis line is 1 unit in length, with the centre point located at the origin. This can be overriden using the transformation methods on this object.

The resultant geometry is constructed to suit OpenGL defaults - assuming a right-handed coordinate system. Vertex normals define the normalised direction of their respective axis line. Vertex texture coordinates encode end point in the U coordinate (a value of 0 or 1), and the axis number in the V coordinate (a value of 0, 1, or 2).

Methods

impl AxesBuilder
[src]

Create a new AxesBuilder object.

Apply a scaling transformation to the shape.

The scale, translate, and rotate functions accumulate, and are not commutative. The transformation functions are intended to provide flexibility in model-space. For per-instance world-space transformations, one should prefer to share as few shapes as possible across multiple instances, and instead rely on uniform constants in the shader and/or instanced drawing.

Apply a translation transformation to the shape.

The scale, translate, and rotate functions accumulate, and are not commutative. The transformation functions are intended to provide flexibility in model-space. For per-instance world-space transformations, one should prefer to share as few shapes as possible across multiple instances, and instead rely on uniform constants in the shader and/or instanced drawing.

Apply a rotation transformation to the shape about the x-axis.

The scale, translate, and rotate functions accumulate, and are not commutative. The transformation functions are intended to provide flexibility in model-space. For per-instance world-space transformations, one should prefer to share as few shapes as possible across multiple instances, and instead rely on uniform constants in the shader and/or instanced drawing.

Apply a rotation transformation to the shape about the y-axis.

The scale, translate, and rotate functions accumulate, and are not commutative. The transformation functions are intended to provide flexibility in model-space. For per-instance world-space transformations, one should prefer to share as few shapes as possible across multiple instances, and instead rely on uniform constants in the shader and/or instanced drawing.

Apply a rotation transformation to the shape about the z-axis.

The scale, translate, and rotate functions accumulate, and are not commutative. The transformation functions are intended to provide flexibility in model-space. For per-instance world-space transformations, one should prefer to share as few shapes as possible across multiple instances, and instead rely on uniform constants in the shader and/or instanced drawing.

Build a new Axes object.

Build the axes vertices and return them in a vector.

Useful if you wish to do other things with the vertices besides constructing a Axes object (e.g. unit testing, further processing, etc).

Trait Implementations

impl Default for AxesBuilder
[src]

Returns the "default value" for a type. Read more