miniRT
By Marcelo Magalhães and Ygor G. Sena, 2023.
t_shape Struct Reference

Represents a shape in a scene. More...

#include <shapes.h>

Detailed Description

Represents a shape in a scene.

Parameters
shapeThis union of shapes represents the possible geometric forms the structure t_shape can assume, i.e., to be a sphere, a plane, a cylinder or a cone. Each shape has its own particular values. The fields below are common properties shared by all types of shape. Each one of them is going to be manipulated (transform, inverse and transpose), be made of some matter (material) and be intersected by rays (intersect and normal_at).
transformStores the transformation matrix for the shape.
inverseStores the inverse matrix for the shape.
transposeStores the transpose matrix for the shape.
materialStores the material information of the shape.
intersectStores the function's name used to calculate the intersection of a ray with the shape.
normal_atStores the function's name used to calculate the normal at a point on the shape.