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

This structure creates a t_pattern subclass (the same as t_pttr_at, which calls stripe_at() or checkered_at()). t_text_map is a subclass that uses spherical_map(), planar_map() or cylindrical_map() to define how to apply a pattern on a given 2D or 3D shape's surface. More...

#include <patterns.h>

Collaboration diagram for s_text_map:

Data Fields

t_checker uv_pattern
 
t_uv_map uv_map
 
t_uv_imagecanvas
 

Detailed Description

This structure creates a t_pattern subclass (the same as t_pttr_at, which calls stripe_at() or checkered_at()). t_text_map is a subclass that uses spherical_map(), planar_map() or cylindrical_map() to define how to apply a pattern on a given 2D or 3D shape's surface.

Parameters
uv_patternContains information about the pattern to applied on a given shape's surface.
uv_mapContains the corresponding shape's function that will correctly apply the texture on its surface. For example, if the shape is a plane, this field must be planar_map. If it's a cylinder, it must be cylindrical_map and if it's a sphere, it must be spherical_map.