summaryrefslogtreecommitdiff
path: root/assetFactory/shape.h
blob: 2c2e7021ee4d5cadbcf76e4696610a025ae8a6d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#pragma once

#include "config/types.h"
#include "modelFactoryMesh_fwd.h"
#include "stdTypeDefs.h"
#include <OpenMesh/Core/Mesh/Handles.hh>
#include <glm/vec3.hpp>
#include <map>
#include <span>
#include <string>

class Vertex;

class Shape : public StdTypeDefs<Shape> {
public:
	using CreatedFaces = std::multimap<std::string, OpenMesh::FaceHandle>;

	static constexpr float z {}, y {.5}, n {-y}, o {1};

	virtual ~Shape() = default;

	virtual CreatedFaces createMesh(ModelFactoryMesh &, float levelOfDetailFactor) const = 0;

	static std::vector<OpenMesh::VertexHandle> addToMesh(
			ModelFactoryMesh & mesh, const std::span<const RelativePosition3D> vertices);
};