cangine
Loading...
Searching...
No Matches
position.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "../types/types.hpp"
4#include "../shapes/shapes.hpp"
5
7static constexpr float POSITION_MAX_LAYER = 100.0f;
8
9namespace cangine {
10 class Window;
18 class Position {
19 public:
26 static Vector3 normalize(const Vector3 &v);
32 static Vector2 normalize(const Vector2 &v);
38 static Vertex normalize(const Vertex &v);
39 };
40}
Helper for converting screen-space positions into normalized device coordinates.
Definition position.hpp:18
static Vector3 normalize(const Vector3 &v)
Normalizes a 3D position into clip space.
Definition position.cpp:29
static Window * window_instance
Window used as the reference frame for normalization.
Definition position.hpp:20
Owns the application window, OpenGL context and the frame loop.
Definition window.hpp:34
Definition audiomanager.cpp:4
Two-component floating-point vector.
Definition vector2.hpp:13
Three-component floating-point vector.
Definition vector3.hpp:13
A single renderable vertex: position, color and texture coordinate.
Definition vertex.hpp:14