Loading...
Searching...
No Matches
hellfire::Cube Class Reference

#include <Cube.h>

Collaboration diagram for hellfire::Cube:

Classes

struct  Config
 

Static Public Member Functions

static EntityID create (Scene *scene, const std::string &name, const Config &config)
 
static std::shared_ptr< Meshcreate_mesh ()
 
static void get_cube_data (std::vector< Vertex > &vertices, std::vector< unsigned int > &indices, const glm::vec3 &color=glm::vec3(1.0f))
 

Private Member Functions

 Cube ()=delete
 

Static Private Attributes

static const std::vector< float > vertices_
 
static const std::vector< float > uvs_
 
static const std::vector< unsigned int > indices_
 

Detailed Description

Definition at line 16 of file Cube.h.

Constructor & Destructor Documentation

◆ Cube()

hellfire::Cube::Cube ( )
privatedelete

Member Function Documentation

◆ create()

EntityID hellfire::Cube::create ( Scene scene,
const std::string &  name,
const Config config 
)
static

Definition at line 81 of file Cube.cpp.

◆ create_mesh()

std::shared_ptr< Mesh > hellfire::Cube::create_mesh ( )
static

Definition at line 110 of file Cube.cpp.

◆ get_cube_data()

void hellfire::Cube::get_cube_data ( std::vector< Vertex > &  vertices,
std::vector< unsigned int > &  indices,
const glm::vec3 &  color = glm::vec3(1.0f) 
)
static

Definition at line 117 of file Cube.cpp.

Member Data Documentation

◆ indices_

const std::vector< unsigned int > hellfire::Cube::indices_
staticprivate
Initial value:
= {
0, 1, 2, 0, 2, 3,
5, 4, 7, 5, 7, 6,
8, 9, 10, 8, 10, 11,
13, 12, 15, 13, 15, 14,
16, 17, 18, 16, 18, 19,
23, 22, 21, 23, 21, 20
}

Definition at line 35 of file Cube.h.

◆ uvs_

const std::vector< float > hellfire::Cube::uvs_
staticprivate
Initial value:
= {
0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f,
1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f,
0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f,
1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f,
0.0f, 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f,
0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f
}

Definition at line 34 of file Cube.h.

◆ vertices_

const std::vector< float > hellfire::Cube::vertices_
staticprivate

Definition at line 33 of file Cube.h.


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