Open 3D Engine Atom Gem API Reference  2205.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
Classes | Public Types | Public Member Functions | Protected Member Functions | List of all members
AZ::RPI::CullingScene Class Reference

#include <Culling.h>

Classes

struct  OcclusionPlane
 

Public Types

using OcclusionPlaneVector = AZStd::vector< OcclusionPlane >
 

Public Member Functions

 AZ_RTTI (CullingScene, "{5B23B55B-8A1D-4B0D-9760-15E87FC8518A}")
 
 AZ_CLASS_ALLOCATOR (CullingScene, AZ::SystemAllocator, 0)
 
 AZ_DISABLE_COPY_MOVE (CullingScene)
 
void Activate (const class Scene *parentScene)
 
void Deactivate ()
 
void SetOcclusionPlanes (const OcclusionPlaneVector &occlusionPlanes)
 Sets a list of occlusion planes to be used during the culling process.
 
void BeginCulling (const AZStd::vector< ViewPtr > &views)
 Notifies the CullingScene that culling will begin for this frame.
 
void EndCulling ()
 Notifies the CullingScene that the culling is done for this frame.
 
void ProcessCullablesJobs (const Scene &scene, View &view, AZ::Job &parentJob)
 
void ProcessCullablesTG (const Scene &scene, View &view, AZ::TaskGraph &taskGraph)
 
void RegisterOrUpdateCullable (Cullable &cullable)
 
void UnregisterCullable (Cullable &cullable)
 
uint32_t GetNumCullables () const
 Returns the number of cullables that have been added to the CullingScene.
 
CullingDebugContextGetDebugContext ()
 

Protected Member Functions

size_t CountObjectsInScene ()
 

Detailed Description

Centralized manager for culling-related processing for a given scene. There is one CullingScene owned by each Scene, so external systems (such as FeatureProcessors) should access the CullingScene via their parent Scene.

Member Function Documentation

◆ ProcessCullablesJobs()

void AZ::RPI::CullingScene::ProcessCullablesJobs ( const Scene scene,
View view,
AZ::Job &  parentJob 
)

Performs render culling and lod selection for a View, then adds the visible renderpackets to that View. Must be called between BeginCulling() and EndCulling(), once for each active scene/view pair. Will create child jobs under the parentJob to do the processing in parallel. Can be called in parallel (i.e. to perform culling on multiple views at the same time).

◆ ProcessCullablesTG()

void AZ::RPI::CullingScene::ProcessCullablesTG ( const Scene scene,
View view,
AZ::TaskGraph &  taskGraph 
)

Performs render culling and lod selection for a View, then adds the visible renderpackets to that View. Must be called between BeginCulling() and EndCulling(), once for each active scene/view pair. Will create child task graphs that signal the TaskGraphEvent to do the processing in parallel. Can be called in parallel (i.e. to perform culling on multiple views at the same time).

◆ RegisterOrUpdateCullable()

void AZ::RPI::CullingScene::RegisterOrUpdateCullable ( Cullable cullable)

Adds a Cullable to the underlying visibility system(s). Must be called at least once on initialization and whenever a Cullable's position or bounds is changed. Is not threadsafe, so call this from the main thread outside of Begin/EndCulling()

◆ UnregisterCullable()

void AZ::RPI::CullingScene::UnregisterCullable ( Cullable cullable)

Removes a Cullable from the underlying visibility system(s). Must be called once for each cullable object on de-initialization. Is not threadsafe, so call this from the main thread outside of Begin/EndCulling()


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