|
Lums
|
The Lums namespace. More...
Namespaces | |
| Vertex | |
| Describe a vertex type. | |
Classes | |
| class | Angle |
| A class used to represent arbitrary angles. More... | |
| class | BaseProvider |
| A basic abstract class for providers. More... | |
| class | Component |
| A class that defines behavior and attributes for a GameObject. More... | |
| class | Core |
| This class defines a core. More... | |
| struct | Event |
| A struct describing an event. More... | |
| class | Font |
| A class describing a font. More... | |
| class | GameObject |
| A composite class representing any object in a game. More... | |
| class | GameState |
| This class represents a GameState. More... | |
| struct | Glyph |
| A struct describing a single character from a font. More... | |
| class | Image |
| This class represents an image in memory. More... | |
| class | Matrix |
| A class representing a square matrix. More... | |
| class | Music |
| A class used to represent music. More... | |
| struct | Projection |
| An helper struct used to define a projection. More... | |
| class | Provider |
| A provider for assets that are loaded once. More... | |
| struct | Rect |
| A struct defining a rectangle. More... | |
| class | Sfx |
| A class used to represent sound effect. More... | |
| class | Shader |
| A class representing a shader. More... | |
| class | ShaderPipeline |
| A class describing a chain of shaders. More... | |
| class | ShaderProgram |
| A class representing a linked shader. More... | |
| class | Singleton |
| An helper template for creating singletons. More... | |
| class | Sound |
| An abstract class for sounds. More... | |
| class | Sprite |
| A class representing a sprite. More... | |
| class | SpriteBatch |
| A class representing a dynamic batch of bidimensional graphical elements. More... | |
| class | StaticSpriteBatch |
| A class representing a static batch of bidimensional graphical elements. More... | |
| class | StreamProvider |
| A provider for assets that are loaded and unloaded at runtime. More... | |
| class | Texture |
| A class representing a texture in the GPU. More... | |
| class | Vector |
| A class representing a Vector. More... | |
| class | VertexBuffer |
| A class representing a buffer of vertices. More... | |
| class | Window |
| This class defines a Window. More... | |
Typedefs | |
| using | VertexBufferP2T2C4 = VertexBuffer< Vertex::Position, 2, Vertex::Texture, 2, Vertex::Color, 4 > |
| using | VertexBufferP3C4 = VertexBuffer< Vertex::Position, 3, Vertex::Color, 4 > |
| using | Matrix4f = Matrix< 4, float > |
| using | Rect2f = Rect2< float > |
| using | Rect2i = Rect2< int > |
| using | Vector2f = Vector2< float > |
| using | Vector2i = Vector2< int > |
| using | Vector2b = Vector2< bool > |
| using | Vector2a = Vector2< Angle > |
| using | Vector3f = Vector3< float > |
| using | Vector3i = Vector3< int > |
| using | Vector3b = Vector3< bool > |
| using | Vector3a = Vector3< Angle > |
| using | Vector4f = Vector4< float > |
| using | Vector4i = Vector4< int > |
| using | Vector4b = Vector4< bool > |
| using | Vector4a = Vector4< Angle > |
| using | ShaderProvider = Provider< ShaderProgram > |
| using | ImageProvider = StreamProvider< Image > |
| using | TextureProvider = StreamProvider< Texture > |
| using | FontProvider = StreamProvider< Font > |
| using | SfxProvider = StreamProvider< Sfx > |
| using | MusicProvider = StreamProvider< Music > |
Enumerations | |
| enum | Key |
| A class representing a simple key via its scancode. | |
| enum | Module { Core, Graphics, Audio, All } |
Functions | |
| constexpr std::size_t | sym (const char *str) |
| Matrix4f | frustum (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat znear, GLfloat zfar) |
| Matrix4f | perspective (GLfloat fov, GLfloat aspect, GLfloat znear, GLfloat zfar) |
| Matrix4f | ortho (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top) |
| void | translate (Matrix4f &matrix, GLfloat x, GLfloat y, GLfloat z) |
| void | translate (Matrix4f &matrix, Vector3f vec) |
| void | rotate (Matrix4f &matrix, float angle, Vector3f v) |
| Matrix4f | lookAt (Vector3f eye, Vector3f center, Vector3f up) |
| template<typename T > | |
| void | uniform (ShaderProgram &program, const char *name, T &value) |
| template<typename... Modules> | |
| void | enableModule (Module module, Modules...modules) |
| template<std::size_t N, typename T > | |
| float | squareDist (const Vector< N, T > &v1, const Vector< N, T > &v2) |
| template<std::size_t N, typename T > | |
| float | dist (const Vector< N, T > &v1, const Vector< N, T > &v2) |
| template<std::size_t N, typename T > | |
| float | squareLength (const Vector< N, T > &vect) |
| template<std::size_t N, typename T > | |
| float | length (const Vector< N, T > &vect) |
| template<std::size_t N, typename T > | |
| Vector< N, T > | normal (const Vector< N, T > &vect) |
| template<typename T > | |
| Vector3< T > | cross (const Vector3< T > &u, const Vector3< T > &v) |
| template<std::size_t N, typename T > | |
| T | dot (const Vector< N, T > &lhs, const Vector< N, T > &rhs) |
| template<std::size_t N, typename T > | |
| bool | null (const Vector< N, T > &vect) |
| template<std::size_t N, typename T > | |
| Matrix< N, T > | operator* (const Matrix< N, T > &lhs, const Matrix< N, T > &rhs) |
| template<std::size_t N, typename T > | |
| Matrix< N, T > | operator* (const Matrix< N, T > &lhs, T rhs) |
| template<std::size_t N, typename T > | |
| Matrix< N, T > | operator* (T lhs, const Matrix< N, T > &rhs) |
| template<std::size_t N, typename T > | |
| Vector< N, T > & | operator+= (Vector< N, T > &lhs, const Vector< N, T > &rhs) |
| template<std::size_t N, typename T > | |
| Vector< N, T > & | operator-= (Vector< N, T > &lhs, const Vector< N, T > &rhs) |
| template<std::size_t N, typename T , typename U > | |
| Vector< N, T > & | operator*= (Vector< N, T > &lhs, U rhs) |
| template<std::size_t N, typename T , typename U > | |
| Vector< N, T > & | operator/= (Vector< N, T > &lhs, U rhs) |
| template<std::size_t N, typename T > | |
| Vector< N, T > | operator+ (const Vector< N, T > &lhs, const Vector< N, T > &rhs) |
| template<std::size_t N, typename T > | |
| Vector< N, T > | operator- (const Vector< N, T > &lhs, const Vector< N, T > &rhs) |
| template<std::size_t N, typename T > | |
| Vector< N, T > | operator* (const Vector< N, T > &lhs, float rhs) |
| template<std::size_t N, typename T > | |
| Vector< N, T > | operator/ (const Vector< N, T > &lhs, float rhs) |
| template<std::size_t N, typename T > | |
| Vector< N, T > | operator+ (const Vector< N, T > &vect) |
| template<std::size_t N, typename T > | |
| Vector< N, T > | operator- (const Vector< N, T > &vect) |
| const std::string & | resourcePath () |
The Lums namespace.
| using lm::FontProvider = typedef StreamProvider<Font> |
A stream provider for fonts
| using lm::ImageProvider = typedef StreamProvider<Image> |
A stream provider for images
| using lm::Matrix4f = typedef Matrix<4, float> |
A 4x4 float matrix
| using lm::MusicProvider = typedef StreamProvider<Music> |
A stream provider for musics
| using lm::Rect2f = typedef Rect2<float> |
A rectangle of floats
| using lm::Rect2i = typedef Rect2<int> |
A rectangle of ints
| using lm::SfxProvider = typedef StreamProvider<Sfx> |
A stream provider for sound effects
| using lm::ShaderProvider = typedef Provider<ShaderProgram> |
A provider for shader programs
| using lm::TextureProvider = typedef StreamProvider<Texture> |
A stream provider for textures
| using lm::Vector2a = typedef Vector2<Angle> |
A 2D vector of angles
| using lm::Vector2b = typedef Vector2<bool> |
A 2D vector of bools
| using lm::Vector2f = typedef Vector2<float> |
A 2D vector of floats
| using lm::Vector2i = typedef Vector2<int> |
A 2D vector of ints
| using lm::Vector3a = typedef Vector3<Angle> |
A 3D vector of angles
| using lm::Vector3b = typedef Vector3<bool> |
A 3D vector of bools
| using lm::Vector3f = typedef Vector3<float> |
A 3D vector of floats
| using lm::Vector3i = typedef Vector3<int> |
A 3D vector of ints
| using lm::Vector4a = typedef Vector4<Angle> |
A 4D vector of angles
| using lm::Vector4b = typedef Vector4<bool> |
A 4D vector of bools
| using lm::Vector4f = typedef Vector4<float> |
A 4D vector of floats
| using lm::Vector4i = typedef Vector4<int> |
A 4D vector of ints
| using lm::VertexBufferP2T2C4 = typedef VertexBuffer<Vertex::Position, 2, Vertex::Texture, 2, Vertex::Color, 4> |
A vertex buffer with 2 values for position, 2 for texture, and 4 for color
| using lm::VertexBufferP3C4 = typedef VertexBuffer<Vertex::Position, 3, Vertex::Color, 4> |
A vertex buffer with 3 values for position, and 4 for color
|
strong |
This enum defines a Module. A module can be loaded using enableModule().
| Vector3<T> lm::cross | ( | const Vector3< T > & | u, |
| const Vector3< T > & | v | ||
| ) |
Compute the cross product between two vectors
| u | The first vector |
| v | The second vector |
| float lm::dist | ( | const Vector< N, T > & | v1, |
| const Vector< N, T > & | v2 | ||
| ) |
Compute the distance between two points
| v1 | The first point |
| v2 | The second point |
| T lm::dot | ( | const Vector< N, T > & | lhs, |
| const Vector< N, T > & | rhs | ||
| ) |
Compute the dot product between two vectors
| lhs | The first vector |
| rhs | The second vector |
|
inline |
Enable one or more modules. You can use the special enum member Module::All to enable every module.
|
inline |
Create a frustum projection matrix
| left | The left position |
| right | The right position |
| bottom | The bottom position |
| top | The top position |
| znear | The near clipping plane |
| zfar | The far clipping plane |
| float lm::length | ( | const Vector< N, T > & | vect | ) |
Compute the length of a vector
| vect | The vector |
Create a view matrix
| eye | The eye position |
| center | The field of view center in space coordinates |
| up | The up vector |
Compute the normal of a vector
| vect | The vector |
| bool lm::null | ( | const Vector< N, T > & | vect | ) |
Check wether a vector is the null vector
| vect | The vector |
| Matrix<N, T> lm::operator* | ( | const Matrix< N, T > & | lhs, |
| const Matrix< N, T > & | rhs | ||
| ) |
Multiply two matrices
| lhs | The left matrix |
| rhs | The right matrix |
| Matrix<N, T> lm::operator* | ( | const Matrix< N, T > & | lhs, |
| T | rhs | ||
| ) |
Multiply a matrix and a scalar
| lhs | The matrix |
| rhs | The scalar |
| Matrix<N, T> lm::operator* | ( | T | lhs, |
| const Matrix< N, T > & | rhs | ||
| ) |
Multiply a matrix and a scalar
| lhs | The scalar |
| rhs | The matrix |
| Vector<N, T> lm::operator* | ( | const Vector< N, T > & | lhs, |
| float | rhs | ||
| ) |
Multiply a vector and a scalar
| lhs | The vector |
| rhs | The scalar |
| Vector<N, T>& lm::operator*= | ( | Vector< N, T > & | lhs, |
| U | rhs | ||
| ) |
Multiply and assign a vector and a scalar
| lhs | The vector |
| rhs | The scalar |
| Vector<N, T> lm::operator+ | ( | const Vector< N, T > & | lhs, |
| const Vector< N, T > & | rhs | ||
| ) |
Add vectors
| lhs | The first vector |
| rhs | The second vector |
Unary plus
| vect | A vector |
| Vector<N, T>& lm::operator+= | ( | Vector< N, T > & | lhs, |
| const Vector< N, T > & | rhs | ||
| ) |
Add and assign vectors
| lhs | The first vector |
| rhs | The second vector |
| Vector<N, T> lm::operator- | ( | const Vector< N, T > & | lhs, |
| const Vector< N, T > & | rhs | ||
| ) |
Substract vectors
| lhs | The first vector |
| rhs | The second vector |
Unary minus
| vect | A vector |
| Vector<N, T>& lm::operator-= | ( | Vector< N, T > & | lhs, |
| const Vector< N, T > & | rhs | ||
| ) |
Substract and assign vectors
| lhs | The first vector |
| rhs | The second vector |
| Vector<N, T> lm::operator/ | ( | const Vector< N, T > & | lhs, |
| float | rhs | ||
| ) |
Divide and assign a vector and a scalar
| lhs | The vector |
| rhs | The scalar |
| Vector<N, T>& lm::operator/= | ( | Vector< N, T > & | lhs, |
| U | rhs | ||
| ) |
Divide and assign a vector and a scalar
| lhs | The vector |
| rhs | The scalar |
|
inline |
Create a orthogonal projection matrix
| left | The left position |
| right | The right position |
| bottom | The bottom position |
| top | The top position |
|
inline |
Create a perspective projection matrix
| fov | The field of view in degrees |
| aspect | The aspect ratio |
| znear | The near clipping plane |
| zfar | The far clipping plane |
| const std::string& lm::resourcePath | ( | ) |
Get the program resource path. On Mac OS X, this is the Resource folder if the program is a bundle. Else, it's the folder containing the executable.
Rotate a matrix by an angle around a vector
| matrix | The matrix to be rotated |
| angle | The angle in degrees |
| v | The up vector |
| float lm::squareDist | ( | const Vector< N, T > & | v1, |
| const Vector< N, T > & | v2 | ||
| ) |
Compute the square distance between two points
| v1 | The first point |
| v2 | The second point |
| float lm::squareLength | ( | const Vector< N, T > & | vect | ) |
Compute the square length of a vector
| vect | The vector |
|
inline |
Return a hash from a string. This function can be used to compute compile-time hashes.
| str | The string to be hashed. |
|
inline |
Translate a matrix by an offset
| matrix | The matrix to be translated |
| x | The x offset |
| y | The y offset |
| z | The z offset |
Translate a matrix by a vector
| matrix | The matrix to be translated |
| vec | The translation vector |
|
inline |
Set the value of an uniform
| T | The type of the value |
| program | The shader |
| name | The uniform name |
| value | The value |