aboutsummaryrefslogtreecommitdiff
path: root/src/obj_parser.cpp
Commit message (Collapse)AuthorAgeFilesLines
* added textures for the hardware renderervimene2026-01-131-53/+96
| | | | | | | | | | | | | | | | | - removed "using" directive in .hpp - reverse order of arguments for quaternion rotation, i.e. q.rot(v) instead of v.rot(q), where q is a quaterinon and v a vector - pass the inverse of the view matrix to render_and_present_frame, to allow light calculation in shaders (we used to just pass the matrix of the quaternion of the transformation, i.e. discard scaling and translations) - added another mesh and texture (viking_room) for testing purposes - added transparent background option - added Quaternion::look_towards(), which is the equivalent of Matrix4::look_at() but only for rotations - various improvement to .obj parsing - load texture coordinates from .obj file - merged duplicate vertices in Mesh::linearize_indices()
* starting to merge vulkan with the enginevimene2025-12-291-6/+2
| | | | | | | | | | | | | - refactored scene_main to be able to share code between software and hardware renderers, while still sharing code between terminal software renderer and graphical software renderer - made the hardware renderer use scene objects vertices and transforms, instead of hardcoded ones - made the hardware renderer use the scene's camera - made .obj parser create Vector3 instead of Vector4, which didn't made sense - removed unnecessary std:: - lots of small changes
* check if file exists in obj_parser.cppvimene2025-12-131-0/+4
|
* renamed .h to .hppvimene2025-12-101-4/+4
|
* various improvementsvimene2025-01-021-8/+6
| | | | | | | | | | - cleaned up the computation of the camera's matrix - changed VertexData to being a struct which transmit data between the "vertex shader" and the "fragment shader" - started working on keyboard and mouse controls - added fov (field of view) - changed quaternion to euler angles conversion, from zyx to zxy - fixed computations of z coordinates in triangle rendering - improved naming in the triangle rasterizer
* fixed parse_object by implementing custom parsersvimene2024-12-311-20/+80
| | | | | std::setlocale also change the parsing of floats with std::stof. It is also more future proof to use a parser specific to Wavefront .obj files.
* various improvementsvimene2024-12-311-0/+81
- added quaternions and rewrote all rotations to use them - added transforms to put all object transforms in a single place - added Wavefront .obj file parser - removed frame buffer's abstract class - improved vectors, matrices, triangles, vertices and vertices data by putting all code in header file - added vector's operations - changed from NULL to nullptr - miscellaneous improvements