The small3d library
|
Classes | |
class | BinaryFile |
Native model file loader. The model file loaded has to have been produced by converting a file in a supported format to a small3d native binary file using the format converter program, s3dfc, produced by this project's build scripts, for example by running s3dfc car.glb car.bin (this would convert a car gltf (.glb) model file to a native binary model file) ATTENTION: Unfortunately the native binary files have issues across architectures. So for example binaries created on Windows do not work on Linux. They need to be created and tested separately for each. More... | |
class | BoundingBoxSet |
Set of bounding boxes for a SceneObject, calculated based on the vertices of a Model. More... | |
class | File |
Abstract file parser class. More... | |
class | GlbFile |
.glb (glTF) file parser class. It can load meshes, textures and linear animations from samplers with a common input (the rest are ignored). More... | |
class | Image |
An image, loaded from a .png file, which can be used for generating textures. More... | |
class | Logger |
Used for logging through macros (LOGERROR, LOGDEBUG, LOGINFO) More... | |
class | Mat4 |
4x4 float matrix More... | |
class | Material |
A 3D model material. More... | |
class | Model |
A 3D model. It can be loaded from a WavefrontFile or GlbFile. It can also be constructed procedurally by code, by inserting values to the appropriate member variables. More... | |
struct | Quat |
class | Renderer |
Renderer class (OpenGL 3.3 / OpenGL ES 3.0) More... | |
class | SceneObject |
An object that appears on the 3D scene. It is made up of a Model, together with information for positioning, rotation and collision detection. Skeletal animation is supported if contained in the Model. Otherwise, frame based animation can be used if the SceneObject is constructed with a vector of Models, each of which will be used as an animation frame. More... | |
class | Sound |
Class that loads and plays a sound from an ogg file, or a native sound file. In the latter case, the file loaded has to have been produced by converting an .ogg file to a small3d native binary file using the format converter program, s3dfc, produced by this project's build scripts, for example by running s3dfc engine.ogg engine.bin (this would convert an engine sound .ogg file to a native binary sound file) ATTENTION: Unfortunately the native binary files have issues across architectures. So for example binaries created on Windows do not work on Linux. They need to be created and tested separately for each. More... | |
class | Vec3 |
3 component float vector More... | |
class | Vec3i |
3 component integer vector More... | |
class | Vec4 |
4 component vector More... | |
class | Vec4i |
4 component integer vector More... | |
class | WavefrontFile |
.obj (Wavefront) file parser class. The file format has to be somewhat specific, with triangulated faces and containing the normals. Such a file can be exported from Blender for example (see blender.org). From the file menu, select Export > Wavefront (.obj). Then from the "Export OBJ" menu, only select "Write Normals", "Triangulate Faces" and "Keep Vertex Order". More... | |
Enumerations | |
enum | LogLevel { loggerinfo, loggerdebug, loggererror } |
Possible logging levels. | |
Functions | |
void | initLogger () |
Initialise the logger. | |
void | deleteLogger () |
Destroy the logger. | |
Mat4 | translate (const Mat4 &mat, const Vec3 &vec) |
Mat4 | scale (const Mat4 &mat, const Vec3 &vec) |
Mat4 | rotate (const Mat4 &mat, const float angle, const Vec3 &vec) |
Mat4 | ortho (float left, float right, float bottom, float top, float zNear, float zFar) |
Mat4 | perspective (float fovy, float aspect, float zNear, float zFar) |
Mat4 | inverse (const Mat4 mat) |
float * | Value_ptr (Mat4 &mat) |
float * | Value_ptr (Vec3 &vec) |
float * | Value_ptr (Vec4 &vec) |
File.cpp
Created on: 2021/02/25 Author: Dimitri Kourkoulis License: BSD 3-Clause License (see LICENSE file)
GlbFile.cpp
Created on: 2021/01/30 Author: Dimitri Kourkoulis License: BSD 3-Clause License (see LICENSE file)
WavefrontFile.cpp
Created on: 2021/02/22 Author: Dimitri Kourkoulis License: BSD 3-Clause License (see LICENSE file)