CG-Project2
Loading...
Searching...
No Matches
Factory.hpp
1#pragma once
2
3#include <glm/glm.hpp>
4#include <string>
5
6#include "Utils.hpp"
7
12struct BasicInfo {
13 glm::vec3 position{};
14 glm::vec3 scale{1, 1, 1};
15 glm::vec3 rotation{};
16 bool render = true;
17};
18
19namespace factory {
20 unsigned int factoryCube(const BasicInfo &info, const glm::vec4 &color = {1, 0, 0, 1});
21 unsigned int factorySphere(const BasicInfo &info, const glm::vec4 &color = {1, 0, 0, 1});
22 unsigned int factorySphereInstanced(const BasicInfo &info, const glm::vec4 &color = {0, 0, 1, 1});
23 unsigned int factoryPyramid(const BasicInfo &info, const glm::vec4 &color = {1, 0, 0, 1});
24 unsigned int factoryThorus(const BasicInfo &info, const glm::vec4 &color = {1, 0, 0, 1});
25 unsigned int factoryCylinder(const BasicInfo &info, const glm::vec4 &color = {1, 0, 0, 1});
26
27 unsigned int factoryPlane(const glm::vec4 &color);
28
29 unsigned int factorySkyBox(const std::string &path, const std::string &format);
30
31 unsigned int factoryObjMesh(const BasicInfo &info, const std::string &pathToFile);
32
33 unsigned int factoryTree(const BasicInfo &info);
34
35 namespace light {
36 unsigned int factoryDirectional(const glm::vec3 &direction);
37 unsigned int factoryPoint(const glm::vec3 &position, const LightConstraint &constraint);
38 unsigned int factorySpot(const glm::vec3 &position, const glm::vec3 &direction, const LightConstraint &constraint, const float &cutOff = 12.5f, const float &outerCutOff = 17.5f);
39 } // namespace light
40} // namespace factory
Simple data structure to store mesh information: position, scale, rotation and if it needs to be rend...
Definition Factory.hpp:12