Skip to main content

FrustumCullingStrategy.ixx File

Abstract base class for implementing frustum culling strategies. More...

Included Headers

#include <vector> #include <helios.scene.SceneNode> #include <helios.scene.CameraSceneNode>

Namespaces Index

namespacehelios
namespacescene

Scene graph and camera management. More...

Classes Index

classFrustumCullingStrategy

Abstract base class for implementing frustum culling strategies. More...

Description

Abstract base class for implementing frustum culling strategies.

File Listing

The file content with the documentation metadata removed is:

1/**
2 * @file FrustumCullingStrategy.ixx
3 * @brief Abstract base class for implementing frustum culling strategies.
4 */
5module;
6
7#include <vector>
8
9export module helios.scene.FrustumCullingStrategy;
10
11import helios.scene.CameraSceneNode;
12import helios.scene.SceneNode;
13
14
15export namespace helios::scene {
16
17 /**
18 * @brief Abstract base class for implementing frustum culling strategies.
19 *
20 * A FrustumCullingStrategy determines which SceneNodes are visible, relative to
21 * the view frustum of a given camera.
22 *
23 * @see [She07, pp. 443]
24 *
25 * @todo The returned list should be considered "as is" for now: Each entry in the
26 * list is a single renderable entity to consider. Its child nodes (i.e. the sub tree for
27 * which this node is the root) should _not_ be automatically considered for rendering.
28 * Later iterations should probably use an individual struct
29 * that provides a hint whether for a given node a whole subtree should be considered,
30 * saving time for culling and memory when constructing the list.
31 */
33
34
35 public:
36
37 virtual ~FrustumCullingStrategy() = default;
38
40
41
42 /**
43 * @brief Culls the scene graph to identify the visible SceneNodes.
44 *
45 * @param cameraSceneNode The CameraSceneNode providing information about the view frustum.
46 * @param root The parent of the hierarchy to cull.
47 *
48 * @return A vector with const pointers to the SceneNodes visible.
49 *
50 * @note Ownership of the SceneNodes remains with their respective owners.
51 * Implementing APIs have to make sure that the origins of the pointers returned with
52 * the vector are not destroyed in between.
53 */
54 [[nodiscard]] virtual std::vector<const helios::scene::SceneNode*> cull(
55 const helios::scene::CameraSceneNode* cameraSceneNode, const helios::scene::SceneNode& root
56 ) = 0;
57
58 };
59
60
61
62}

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.