PCG Lib
Library for procedural content generation
|
Go to the documentation of this file.
49 class __declspec(dllexport) Room
58 #pragma warning(disable:4251) // only using types from standard library, warning can be ignored. Source: https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4251
62 #pragma warning(default:4251)
139 #endif // !SKR_PCG_ROOM
RoomType
enum for types of rooms
Definition: Room.h:32
@ Start
place player starts in
std::vector< Target > GenerateTargets2(RNG *rng)
Definition: Room.cpp:918
random number generator helper class
Definition: rng.h:15
@ Finish
place to finished the game
RoomType _roomType
type of room
Definition: Room.h:57
std::vector< Target > _targets
list of targets in room
Definition: Room.h:61
float _height
height rom room
Definition: Room.h:55
static std::vector< DoorDirection > DetermineClosedWalls(std::vector< DoorDirection > doors)
Definition: Room.cpp:1259
std::vector< DoorDirection > _doors
doors leading to hallways or special rooms
Definition: Room.h:59
Point3d ULB()
Point: UpperLeftBottom.
Definition: Room.cpp:44
void SetRoomTexture(Face &face, FaceType ft)
Definition: Room.cpp:1199
@ Wall
Wall, with or wihout door.
Point3d LRT()
Point: LowerRightTop.
Definition: Room.cpp:69
Point3d _center
center of room
Definition: Room.h:52
Point3d LLB()
Point: LowerLeftBottom.
Definition: Room.cpp:34
void GenerateTargets(RNG *rng)
Definition: Room.cpp:913
FaceType
enum for types of faces
Definition: Room.h:41
specifies position, extends and relations to neighboring rooms
Definition: Room.h:50
std::vector< Face > GenerateClosedWallFaces3D(std::vector< DoorDirection > closedWalls, Vec3 maxTextureCoordinates=Vec3{1.0f, 1.0f, 1.0f})
Definition: Room.cpp:1026
std::array< float, 3 > Point3d
c 2d vector
Definition: Definitions.h:16
@ Hallway
connecting rooms, no targets or lights
@ Room
regular room filled with targest and light sources
Point3d URT()
Point: UpperRightTop.
Definition: Room.cpp:59
std::vector< Room > _adjecentRooms
list of adjecent rooms
Definition: Room.h:60
Point3d URB()
Point: UpperRightBottom.
Definition: Room.cpp:39
std::string GetReadbleDoorDirection(DoorDirection d)
Definition: Room.cpp:1300
std::vector< uint32_t > GenerateClosedWallIndices3D(std::vector< DoorDirection > closedWalls)
Definition: Room.cpp:982
Point3d LRB()
Point: LowerRightBottom.
Definition: Room.cpp:49
Point3d LLT()
Point: LowerLeftTop.
Definition: Room.cpp:54
float _width
width of room
Definition: Room.h:53
strcut describing a face
Definition: Definitions.h:42
Room()
Definition: Room.cpp:17
std::string PrintRoomMeasurements(bool extensive=false)
Definition: Room.cpp:75
constexpr float PCG_DEFAULT_ROOM_HEIGHT
default value for height of a room
Definition: Definitions.h:58
Definition: Definitions.h:7
DoorDirection InvertRoomDir(DoorDirection dir)
Definition: Room.cpp:1334
float _length
length of room
Definition: Room.h:54
std::vector< Face > GenerateGeometry3DIndexed()
Definition: Room.cpp:542
std::vector< Face > GenerateGeometry3D()
Definition: Room.cpp:149
Point3d ULT()
Point: UpperLeftTop.
Definition: Room.cpp:64
Point3d Vec3
Definition: Definitions.h:17
DoorDirection
Definition: Room.h:18