Struct truster::world::World[][src]

pub struct World { /* fields omitted */ }
Expand description

A 3D world which has shapes and lights.

Implementations

Returns a new empty World.

Adds shape to self.

Adds light to self.

Returns a list of all intersections the ray makes with any shape in the world. The list is sorted by distance.

Returns the color at the intersection encapsulated by rec in self, as if the light at index light_index where the only one.

Returns the color the self shows at the intersection point with ray.

Returns true if point is in the shadow of the light at index light_index, false otherwise.

Trait Implementations

Returns the “default value” for a 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

Performs the conversion.

Performs the conversion.

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.