PCG Lib
Library for procedural content generation
|
Classes | |
struct | Face |
strcut describing a face More... | |
class | FloorGenerator |
Generates a level consisting of rooms. More... | |
class | FloorGeneratorParameter |
holds parameters for floor generator More... | |
class | LevelBoundingBox |
defines the overall extends of a level in 2d. More... | |
class | RNG |
random number generator helper class More... | |
class | Room |
specifies position, extends and relations to neighboring rooms More... | |
class | Target |
specifies are target in a level to hit More... | |
class | TargetMovement |
specifies parameters how a target can move during gameplay More... | |
struct | Vertex |
struct describing a vertex More... | |
Typedefs | |
typedef std::array< float, 2 > | Point2d |
2d point More... | |
typedef Point2d | Vec2 |
typedef std::array< float, 3 > | Point3d |
c 2d vector More... | |
typedef Point3d | Vec3 |
Enumerations | |
enum | OpenGLTextureWrapParameter { OpenGLTextureWrapParameter::OGL_REPEAT = 0x2901, OpenGLTextureWrapParameter::OGL_MIRRORED_REPEAT = 0x8370, OpenGLTextureWrapParameter::OGL_CLAMP_TO_EDGE = 0x812F, OpenGLTextureWrapParameter::OGL_CLAMP_TO_BORDER = 0x812D } |
c 3d vector More... | |
enum | FloorLayoutStrategy { FloorLayoutStrategy::RandomPlacement, FloorLayoutStrategy::Stacking, FloorLayoutStrategy::PlaceAndShrink } |
enum for used strategy to generate room layout More... | |
enum | DoorDirection { DoorDirection::TOP, DoorDirection::TOP_RIGHT, DoorDirection::RIGHT, DoorDirection::BOTTOM_RIGHT, DoorDirection::BOTTOM, DoorDirection::BOTTOM_LEFT, DoorDirection::LEFT, DoorDirection::TOP_LEFT } |
enum | RoomType { RoomType::Room, RoomType::Hallway, RoomType::Start, RoomType::Finish } |
enum for types of rooms More... | |
enum | FaceType { FaceType::Wall, FaceType::Ceiling, FaceType::Floor } |
enum for types of faces More... | |
Functions | |
std::string | GetReadbleDoorDirection (DoorDirection d) |
DoorDirection | InvertRoomDir (DoorDirection dir) |
Variables | |
constexpr float | PCG_DEFAULT_ROOM_HEIGHT = 5.0f |
default value for height of a room More... | |
constexpr float | PCG_DEFAULT_ROOM_BASE_HEIGHT = 0.0f |
default value for base eight of the level More... | |
constexpr float | PCG_DEFAULT_ROOM_STACKING_OFFSET = 3.0f |
default space between rooms; also size of hallways More... | |
constexpr float | PCG_DEFAULT_TARGET_SIZE = 2.0f |
default size of targets; used to prevent overlap More... | |
constexpr float | PCG_DEFAULT_TARGET_MOVEMENT_MAX_EXTEND = PCG_DEFAULT_TARGET_SIZE * 1.5f |
default extend to which a target can move at maxmium More... | |
constexpr float | PCG_DEFAULT_TARGET_MOVEMENT_MAX_EXTEND_VERTICAL = (PCG_DEFAULT_ROOM_HEIGHT - PCG_DEFAULT_TARGET_SIZE) * 0.5f |
default extend to which a target can move vertically (y-axis) at maximum More... | |
constexpr float | PCG_DEFAULT_TARGET_MAX_MOVEMENT_SPEED = 2.0f |
constexpr Vec3 | DefaultNormal_Bottom { 0.0f, 1.0f, 0.0f } |
constexpr Vec3 | DefaultNormal_Top { 0.0f, -1.0f, 0.0f } |
More... | |
constexpr Vec3 | DefaultNormal_Back { 0.0f, 0.0f, -1.0f } |
More... | |
constexpr Vec3 | DefaultNormal_Front { 0.0f, 0.0f, 1.0f } |
More... | |
constexpr Vec3 | DefaultNormal_Right { -1.0f, 0.0f, 0.0f } |
More... | |
constexpr Vec3 | DefaultNormal_Left { 1.0f, 0.0f, 0.0f } |
More... | |
typedef std::array<float, 2> skr::pcg::Point2d |
2d point
typedef std::array<float, 3> skr::pcg::Point3d |
c 2d vector
3d point
typedef Point2d skr::pcg::Vec2 |
typedef Point3d skr::pcg::Vec3 |
|
strong |
|
strong |
|
strong |
enum for used strategy to generate room layout
|
strong |
|
strong |
std::string skr::pcg::GetReadbleDoorDirection | ( | DoorDirection | d | ) |
prints readable string of specified door direction
d | specified door direction |
DoorDirection skr::pcg::InvertRoomDir | ( | DoorDirection | dir | ) |
returns opposite direction of given room direction
dir | DoorDirection to be inverted |
|
constexpr |
default normal for top face
|
constexpr |
|
constexpr |
default normal for back face
|
constexpr |
default normal for right face
|
constexpr |
default normal for front face
|
constexpr |
default normal for bottom face
|
constexpr |
default value for base eight of the level
|
constexpr |
default value for height of a room
|
constexpr |
default space between rooms; also size of hallways
|
constexpr |
|
constexpr |
default extend to which a target can move at maxmium
|
constexpr |
default extend to which a target can move vertically (y-axis) at maximum
|
constexpr |
default size of targets; used to prevent overlap