Rendu
A lightweight rendering engine for experimentations
Loading...
Searching...
No Matches
Static Public Member Functions | Static Public Attributes | List of all members
Library Class Reference

The library provides a few commonly-used resources without having to set them up or query them from the resources manager. More...

#include <Library.hpp>

Static Public Member Functions

static Mesh generateGrid (uint resolution, float scale)
 
static Mesh generateCylinder (uint resolution, float radius, float height)
 

Static Public Attributes

static const std::array< glm::vec3, 6 > boxUps
 Skybox faces vertical direction. More...
 
static const std::array< glm::vec3, 6 > boxCenters
 Skybox faces center location. More...
 
static const std::array< glm::vec3, 6 > boxRights
 Skybox faces horizontal direction. More...
 
static const std::array< glm::mat4, 6 > boxVs
 Skybox faces view matrices. More...
 
static const std::array< glm::mat4, 6 > boxVPs
 Skybox faces view-projection matrices. More...
 

Detailed Description

The library provides a few commonly-used resources without having to set them up or query them from the resources manager.

Member Function Documentation

◆ generateCylinder()

Mesh Library::generateCylinder ( uint  resolution,
float  radius,
float  height 
)
static

Generate a Y-axis cylinder mesh.

Parameters
resolutionthe number of faces
radiusthe cylinder radius
heightthe cylinder height
Returns
the mesh

◆ generateGrid()

Mesh Library::generateGrid ( uint  resolution,
float  scale 
)
static

Generate a XZ planar grid mesh.

Parameters
resolutionnumber of cells on each axis
scaledimension of each cell
Returns
the mesh

Member Data Documentation

◆ boxCenters

const std::array< glm::vec3, 6 > Library::boxCenters
static
Initial value:
= {
glm::vec3(1.0, 0.0, 0.0),
glm::vec3(-1.0, 0.0, 0.0),
glm::vec3(0.0, -1.0, 0.0),
glm::vec3(0.0, 1.0, 0.0),
glm::vec3(0.0, 0.0, 1.0),
glm::vec3(0.0, 0.0, -1.0)
}

Skybox faces center location.

◆ boxRights

const std::array< glm::vec3, 6 > Library::boxRights
static
Initial value:
= {
glm::vec3( 0.0f, 0.0f, -1.0f),
glm::vec3( 0.0f, 0.0f, 1.0f),
glm::vec3( 1.0f, 0.0f, 0.0f),
glm::vec3( 1.0f, 0.0f, 0.0f),
glm::vec3( 1.0f, 0.0f, 0.0f),
glm::vec3(-1.0f, 0.0f, 0.0f)
}

Skybox faces horizontal direction.

◆ boxUps

const std::array< glm::vec3, 6 > Library::boxUps
static
Initial value:
= {
glm::vec3(0.0f, -1.0f, 0.0f),
glm::vec3(0.0f, -1.0f, 0.0f),
glm::vec3(0.0f, 0.0f, -1.0f),
glm::vec3(0.0f, 0.0f, 1.0f),
glm::vec3(0.0f, -1.0f, 0.0f),
glm::vec3(0.0f, -1.0f, 0.0f)}

Skybox faces vertical direction.

◆ boxVPs

const std::array< glm::mat4, 6 > Library::boxVPs
static
Initial value:
= {
Frustum::perspective(glm::half_pi<float>(), 1.0f, 0.01f, 10.0f) * boxVs[0],
Frustum::perspective(glm::half_pi<float>(), 1.0f, 0.01f, 10.0f) * boxVs[1],
Frustum::perspective(glm::half_pi<float>(), 1.0f, 0.01f, 10.0f) * boxVs[2],
Frustum::perspective(glm::half_pi<float>(), 1.0f, 0.01f, 10.0f) * boxVs[3],
Frustum::perspective(glm::half_pi<float>(), 1.0f, 0.01f, 10.0f) * boxVs[4],
Frustum::perspective(glm::half_pi<float>(), 1.0f, 0.01f, 10.0f) * boxVs[5]
}
static glm::mat4 perspective(float fov, float ratio, float near, float far)
Definition: Bounds.cpp:137
static const std::array< glm::mat4, 6 > boxVs
Skybox faces view matrices.
Definition: Library.hpp:20

Skybox faces view-projection matrices.

◆ boxVs

const std::array< glm::mat4, 6 > Library::boxVs
static
Initial value:
= {
glm::lookAt(glm::vec3(0.0f), boxCenters[0], boxUps[0]),
glm::lookAt(glm::vec3(0.0f), boxCenters[1], boxUps[1]),
glm::lookAt(glm::vec3(0.0f), boxCenters[2], boxUps[2]),
glm::lookAt(glm::vec3(0.0f), boxCenters[3], boxUps[3]),
glm::lookAt(glm::vec3(0.0f), boxCenters[4], boxUps[4]),
glm::lookAt(glm::vec3(0.0f), boxCenters[5], boxUps[5])
}
static const std::array< glm::vec3, 6 > boxUps
Skybox faces vertical direction.
Definition: Library.hpp:17
static const std::array< glm::vec3, 6 > boxCenters
Skybox faces center location.
Definition: Library.hpp:18

Skybox faces view matrices.


The documentation for this class was generated from the following files: