sKit  0.0.9
sKit::Quad Class Reference

3D Quad with 2 triangles with CW winding. More...

#include <Quad.hpp>

Public Member Functions

 Quad ()=default
 
 Quad (glm::vec3 pos, glm::vec2 dimensions)
 

Public Attributes

glm::vec3 pos
 Position of the top left corner. More...
 
glm::vec2 dimensions
 Width along the X axis and height along the Y axis. More...
 
std::vector< glm::vec3 > vertices
 
std::vector< uint16_t > indices
 

Detailed Description

3D Quad with 2 triangles with CW winding.

Definition at line 10 of file Quad.hpp.

Constructor & Destructor Documentation

◆ Quad() [1/2]

sKit::Quad::Quad ( )
default

◆ Quad() [2/2]

sKit::Quad::Quad ( glm::vec3  pos,
glm::vec2  dimensions 
)

Create a quad by specifying top left corner and dimensions (width and height). Vertices and indices are automatically generated.

Parameters
postop left corner of the quad
dimensionswidth and height of the quad

Definition at line 5 of file Quad.cpp.

References dimensions, indices, pos, and vertices.

Member Data Documentation

◆ dimensions

glm::vec2 sKit::Quad::dimensions

Width along the X axis and height along the Y axis.

Definition at line 24 of file Quad.hpp.

Referenced by Quad().

◆ indices

std::vector<uint16_t> sKit::Quad::indices

Definition at line 30 of file Quad.hpp.

Referenced by Quad().

◆ pos

glm::vec3 sKit::Quad::pos

Position of the top left corner.

Definition at line 21 of file Quad.hpp.

Referenced by Quad().

◆ vertices

std::vector<glm::vec3> sKit::Quad::vertices

Definition at line 27 of file Quad.hpp.

Referenced by Quad().


The documentation for this class was generated from the following files: