Rehti MMORPG  1.0.0
Rehti MMORPG is a free and open source MMORPG game.
MapObjLoader.hpp File Reference
#include "MapLoader.hpp"
Include dependency graph for MapObjLoader.hpp:

Go to the source code of this file.

Classes

struct  Vertex
 

Enumerations

enum  WINDING_ORDER : bool { CLOCKWISE , COUNTER_CLOCKWISE }
 

Functions

void writeVertex (std::ofstream &objFile, const Vertex &vertex)
 Writes a vertex to an OBJ file. More...
 
void writeFace (std::ofstream &objFile, const int corner1, const int corner2, const int corner3)
 Writes a face to an OBJ file. More...
 
void generateAreaObjs (const std::vector< std::vector< int >> &heightMap, const std::vector< std::vector< std::string >> &areaMap)
 Generates obj map for each area of the map. More...
 

Variables

constexpr bool WINDING_ORDER = COUNTER_CLOCKWISE
 

Enumeration Type Documentation

◆ WINDING_ORDER

enum WINDING_ORDER : bool
Enumerator
CLOCKWISE 
COUNTER_CLOCKWISE 

Function Documentation

◆ generateAreaObjs()

void generateAreaObjs ( const std::vector< std::vector< int >> &  heightMap,
const std::vector< std::vector< std::string >> &  areaMap 
)

Generates obj map for each area of the map.

Parameters
heightMapThe height matrix of the map.
areaMapThe map of all the areas.
Here is the call graph for this function:

◆ writeFace()

void writeFace ( std::ofstream &  objFile,
const int  corner1,
const int  corner2,
const int  corner3 
)

Writes a face to an OBJ file.

Parameters
objFile
corner1
corner2
corner3
Here is the caller graph for this function:

◆ writeVertex()

void writeVertex ( std::ofstream &  objFile,
const Vertex vertex 
)

Writes a vertex to an OBJ file.

Parameters
objFile
vertex
Here is the caller graph for this function:

Variable Documentation

◆ WINDING_ORDER

constexpr bool WINDING_ORDER = COUNTER_CLOCKWISE
constexpr