Rendering Engine 0.2.0
Modular Graphics Rendering Engine | v0.2.0
Loading...
Searching...
No Matches
vector_definitions.hpp
Go to the documentation of this file.
1// This file is part of the Rendering Engine project.
2// Author: Alexander Obzherin <alexanderobzherin@gmail.com>
3// Copyright (c) 2025 Alexander Obzherin
4// Distributed under the terms of the zlib License. See LICENSE.md for details.
5
6#pragma once
7
8#define GLM_FORCE_RADIANS
9#define GLM_FORCE_DEPTH_ZERO_TO_ONE
10#include <glm/vec4.hpp>
11#include <glm/mat4x4.hpp>
12#include <glm/glm.hpp>
13#include <glm/gtc/quaternion.hpp>
14#include <glm/gtc/matrix_transform.hpp>
15#include <glm/gtc/matrix_inverse.hpp>
16
17namespace rendering_engine
18{
19
20/**
21 * @namespace rendering_engine::axes
22 * @brief Commonly used 3D axis and direction vectors.
23 *
24 * Coordinate system:
25 * - X+ (Forward)
26 * - Y+ (Right)
27 * - Z+ (Up)
28 *
29 * Vectors:
30 * - ForwardVector: (1, 0, 0)
31 * - RightVector: (0, 1, 0)
32 * - UpVector: (0, 0, 1)
33 * etc.
34 */
35namespace axes
36{
37static const glm::vec3 ZeroVector = glm::vec3(0.0f, 0.0f, 0.0f);
38static const glm::vec3 OneVector = glm::vec3(1.0f, 1.0f, 1.0f);
39
40static const glm::vec3 UpVector = glm::vec3(0.0f, 0.0f, 1.0f);
41static const glm::vec3 DownVector = glm::vec3(0.0f, 0.0f, -1.0f);
42
43static const glm::vec3 ForwardVector = glm::vec3(1.0f, 0.0f, 0.0f);
44static const glm::vec3 BackwardVector = glm::vec3(-1.0f, 0.0f, 0.0f);
45
46static const glm::vec3 RightVector = glm::vec3(0.0f, 1.0f, 0.0f);
47static const glm::vec3 LeftVector = glm::vec3(0.0f, -1.0f, 0.0f);
48} // namespace axes
49
50} // namespace rendering_engine
Commonly used 3D axis and direction vectors.
static const glm::vec3 DownVector
static const glm::vec3 UpVector
static const glm::vec3 RightVector
static const glm::vec3 OneVector
static const glm::vec3 LeftVector
static const glm::vec3 ZeroVector
static const glm::vec3 ForwardVector
static const glm::vec3 BackwardVector