pub struct Gm<G: Geometry, M: Material> {
    pub geometry: G,
    pub material: M,
}
Expand description

A combination of a Geometry and a Material which implements Object. Use this to combine any geometry and material into an object that can be used in a render function for example render_pass. The only requirement is that the geometry provides all the per vertex information (normals, uv coordinates, etc.) that the material requires.

Fields

geometry: G

The geometry

material: M

The material applied to the geometry

Implementations

Creates a new Gm from a geometry and material.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

The resulting type after dereferencing.

Dereferences the value.

Mutably dereferences the value.

Returns the AxisAlignedBoundingBox for this geometry in the global coordinate system. Read more

Render the geometry with the given material. Must be called in the callback given as input to a RenderTarget, ColorTarget or DepthTarget write method. Use an empty array for the lights argument, if the objects does not require lights to be rendered. Read more

Render the object. Use an empty array for the lights argument, if the objects does not require lights to be rendered. Must be called in the callback given as input to a RenderTarget, ColorTarget or DepthTarget write method. Read more

Returns whether or not this object should be considered transparent. 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.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

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

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. 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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more