Topaz 5.0
Topaz Game Engine
Loading...
Searching...
No Matches
tz::ren::quad_info Struct Reference

Description

Specifies initial data for a single quad.

#include "quad.hpp"

Public Attributes

tz::v2f position = tz::v2f::zero()
 Position of the quad, in world-space. You can change this later via set_quad_position.
 
float rotation = 0.0f
 Rotation of the quads, in radians.
 
tz::v2f scale = tz::v2f::filled(1.0f)
 Scale factors of the quad, in both dimensions. You can change this later via set_quad_scale.
 
std::uint32_t texture_id0 = -1
 First texture to display on the quad. Defaults to -1 (no texture). If no texture is used, then the quad will have a solid colour corresponding to colour. You can change this later via set_quad_texture0.
 
std::uint32_t texture_id1 = -1
 First texture to display on the quad. Defaults to -1 (no texture). If no texture is used, then the quad will have a solid colour corresponding to colour. You can change this later via set_quad_texture1.
 
tz::v3f colour = tz::v3f::filled(1.0f)
 Colour of the quad. If the quad has no texture, this will be the exact colour of the whole quad. If the quad does have a texture, then the sampled texture colour will be multiplied by this value (in which case you will often want to provide {1, 1, 1}). You can change this later via set_quad_colour.
 
short layer = 0
 Layer value. Has no effect if layering is not enabled (see quad_renderer_flag::enable_layering for more details).
 

Member Data Documentation

◆ position

tz::v2f tz::ren::quad_info::position = tz::v2f::zero()

Position of the quad, in world-space. You can change this later via set_quad_position.

◆ rotation

float tz::ren::quad_info::rotation = 0.0f

Rotation of the quads, in radians.

◆ scale

tz::v2f tz::ren::quad_info::scale = tz::v2f::filled(1.0f)

Scale factors of the quad, in both dimensions. You can change this later via set_quad_scale.

◆ texture_id0

std::uint32_t tz::ren::quad_info::texture_id0 = -1

First texture to display on the quad. Defaults to -1 (no texture). If no texture is used, then the quad will have a solid colour corresponding to colour. You can change this later via set_quad_texture0.

◆ texture_id1

std::uint32_t tz::ren::quad_info::texture_id1 = -1

First texture to display on the quad. Defaults to -1 (no texture). If no texture is used, then the quad will have a solid colour corresponding to colour. You can change this later via set_quad_texture1.

◆ colour

tz::v3f tz::ren::quad_info::colour = tz::v3f::filled(1.0f)

Colour of the quad. If the quad has no texture, this will be the exact colour of the whole quad. If the quad does have a texture, then the sampled texture colour will be multiplied by this value (in which case you will often want to provide {1, 1, 1}). You can change this later via set_quad_colour.

◆ layer

short tz::ren::quad_info::layer = 0

Layer value. Has no effect if layering is not enabled (see quad_renderer_flag::enable_layering for more details).