Skip to main content

CullNoneStrategy Class

A default FrustumCullingStrategy that simply returns all SceneNodes found, e.g. no culling is applied. More...

Declaration

class helios::scene::CullNoneStrategy { ... }

Base class

classFrustumCullingStrategy

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

Public Member Functions Index

std::vector< const helios::scene::SceneNode * >cull (const helios::scene::CameraSceneNode *cameraSceneNode, const helios::scene::SceneNode &root) override

Returns all SceneNode of the specified scene, regardless of their visibility relative to the CameraSceneNode's camera view frustum. More...

Protected Member Functions Index

voidcull (std::vector< const helios::scene::SceneNode * > &nodes, const SceneNode &node) const

Internal function to populate the vector recursively with the node and its children. More...

Description

A default FrustumCullingStrategy that simply returns all SceneNodes found, e.g. no culling is applied.

Definition at line 22 of file CullNoneStrategy.ixx.

Public Member Functions

cull()

std::vector< const helios::scene::SceneNode * > helios::scene::CullNoneStrategy::cull (const helios::scene::CameraSceneNode * cameraSceneNode, const helios::scene::SceneNode & root)
inline nodiscard virtual

Returns all SceneNode of the specified scene, regardless of their visibility relative to the CameraSceneNode's camera view frustum.

Parameters
cameraSceneNode

The camera defining the view frustum.

root

The parent of the hierarchy to cull.

Returns

A vector with const pointers to the SceneNodes found under `root`.

Definition at line 56 of file CullNoneStrategy.ixx.

56 [[nodiscard]] std::vector<const helios::scene::SceneNode*> cull(
57 const helios::scene::CameraSceneNode* cameraSceneNode, const helios::scene::SceneNode& root
58 ) override {
59
60 auto nodes = std::vector<const helios::scene::SceneNode*>();
61
62 cull(nodes, root);
63
64 return nodes;
65 }

Reference cull.

Protected Member Functions

cull()

void helios::scene::CullNoneStrategy::cull (std::vector< const helios::scene::SceneNode * > & nodes, const SceneNode & node)
inline protected

Internal function to populate the vector recursively with the node and its children.

Parameters
nodes

The vector holding the const pointers to the SceneNodes

node

The current node to process. This node is added to nodes, then this method is called for each child node of node.

Definition at line 33 of file CullNoneStrategy.ixx.

33 void cull(
34 std::vector<const helios::scene::SceneNode*>& nodes, const SceneNode& node
35 ) const {
36 if (node.isActive()) {
37 nodes.push_back(&node);
38 }
39 for (auto& child: node.children()) {
40 cull(nodes, *child);
41 }
42 }

References helios::scene::SceneNode::children, cull and helios::scene::SceneNode::isActive.

Referenced by cull and cull.


The documentation for this class was generated from the following file:


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.