KarmaEngine
Game Engine for practical learning and research purposes
|
Template class used to filter actors by certain characteristics. More...
#include <KarmaUtilities.h>
Public Member Functions | |
void | operator++ () |
Iterates to next suitable actor. | |
FORCEINLINE AActor * | operator* () const |
Returns the current suitable actor pointed at by the Iterator. | |
FORCEINLINE AActor * | operator-> () const |
Returns the current suitable actor pointed at by the Iterator. | |
FORCEINLINE | operator bool () const |
Returns whether the iterator has reached the end and no longer points to a suitable actor. | |
void | ClearCurrent () |
Clears the current Actor in the array (setting it to NULL). | |
int32 | GetProgressNumerator () const |
Returns the number of actors considered thus far. Can be used in combination with GetProgressDenominator to gauge progress iterating over all actors. | |
FORCEINLINE bool | CanIterateLevel (const ULevel *Level) const |
Used to examine whether this level is valid for iteration or not. This function should be redefined (thus hiding this one) in a derived class if it wants special level filtering. | |
FORCEINLINE bool | IsActorSuitable (const AActor *Actor) const |
Determines whether this is a valid actor or not. This function should be redefined (thus hiding this one) in a derived class if it wants special actor filtering. | |
Protected Member Functions | |
TActorIteratorBase (EActorIteratorType) | |
A constructor. | |
TActorIteratorBase (const UWorld *InWorld, TSubclassOf< AActor > InClass, const EActorIteratorFlags InFlags) | |
Constructor for setting m_State (FActorIteratorState) with the supplied InWorld and InClass. | |
Template class used to filter actors by certain characteristics.
|
inlineprotected |
A constructor.
EActorIteratorType | Specify the iterator flag from EActorIteratorFlags |
|
inlineprotected |
Constructor for setting m_State (FActorIteratorState) with the supplied InWorld and InClass.
InWorld | The UWorld we would like to do the iteration within |
InClass | The class type we are iterating, kept for filtering |
InFlags | Specify the iterator flag from EActorIteratorFlags |
|
inline |
Used to examine whether this level is valid for iteration or not. This function should be redefined (thus hiding this one) in a derived class if it wants special level filtering.
Level | the level to check for iteration |
|
inline |
Clears the current Actor in the array (setting it to NULL).
|
inline |
Returns the number of actors considered thus far. Can be used in combination with GetProgressDenominator to gauge progress iterating over all actors.
|
inline |
Determines whether this is a valid actor or not. This function should be redefined (thus hiding this one) in a derived class if it wants special actor filtering.
Actor | Actor to check |
|
inlineexplicit |
Returns whether the iterator has reached the end and no longer points to a suitable actor.
|
inline |
Returns the current suitable actor pointed at by the Iterator.
|
inline |
Iterates to next suitable actor.
The pseudo code is chalked out in the wiki page https://github.com/ravimohan1991/KarmaEngine/wiki/Karma's-Actor-Iteration-Process
|
inline |
Returns the current suitable actor pointed at by the Iterator.