Module tinyraytracer::blocks[][src]

In our world we have Spheres, Light Sources, Light Rays ang Materials.

Structs

LightSource
Material

Material represents the color and light reflecting properties. (Open the struct page to see images)

Plane
Ray

What is the difference between a Vec3 and a Ray? After all Vec3 is a Ray that starts at the origin. Well Ray is infinite length. That’s why the direction can be unit norm. Vec3 length is finite (it’s norm).

Rectangle2D

2D rectangle in a 3D space

Sphere

A sphere is a 3-D ball, it has a center point and a radius.

Enums

HitPoint

Point where our ray hits and object.

Traits

RayCollision

We need to determine if a ray of light hits a specific object or not. This trait contains the logic of how to determine that.

Type Definitions

MaterialMixingWeights