Antkeeper  0.0.1
context.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2023 Christopher J. Howard
3  *
4  * This file is part of Antkeeper source code.
5  *
6  * Antkeeper source code is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * Antkeeper source code is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with Antkeeper source code. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef ANTKEEPER_RENDER_CONTEXT_HPP
21 #define ANTKEEPER_RENDER_CONTEXT_HPP
22 
23 #include <engine/math/vector.hpp>
25 #include <vector>
26 
27 namespace scene
28 {
29  class camera;
30  class collection;
31  class object_base;
32 }
33 
34 namespace render {
35 
39 struct context
40 {
43 
46 
48  float t;
49 
51  float dt;
52 
54  float alpha;
55 
57  std::vector<scene::object_base*> objects;
58 
60  std::vector<const operation*> operations;
61 };
62 
63 } // namespace render
64 
65 #endif // ANTKEEPER_RENDER_CONTEXT_HPP
Collection of scene objects.
Definition: collection.hpp:33
Abstract base class for scene objects.
Definition: object.hpp:37
High-level rendering.
3D scene.
Definition: context.hpp:28
Context of a renderer.
Definition: context.hpp:40
const scene::camera * camera
Pointer to the camera.
Definition: context.hpp:42
float alpha
Subframe interpolation factor.
Definition: context.hpp:54
scene::collection * collection
Collection of scene objects being rendered.
Definition: context.hpp:45
std::vector< scene::object_base * > objects
Objects visible to the active camera.
Definition: context.hpp:57
float dt
Timestep, in seconds.
Definition: context.hpp:51
std::vector< const operation * > operations
Render operations generated by visible objects.
Definition: context.hpp:60
float t
Current time, in seconds.
Definition: context.hpp:48