TPBDActiveView

Index based view, specialized for working with several ranges within a same array such as particles.

Windows
MacOS
Linux

References

Module

Chaos

Header

/Engine/Source/Runtime/Experimental/Chaos/Public/Chaos/PBDActiveView.h

Include

#include "Chaos/PBDActiveView.h"

Syntax

template<typename TItemsType>
class TPBDActiveView

Remarks

Index based view, specialized for working with several ranges within a same array such as particles.

Constructors

Name Description

Public function

TPBDActiveView

(
    TItemsType& InItems
)

Functions

Name Description

Public function

void

 

ActivateRange

(
    int32 Offset,
    bool bActivate
)

Activate (or deactivate) the range starting at the specified offset.

Public function

int32

 

AddRange

(
    int32 NumItems,
    bool bActivate
)

Add a new active (or inactive) range at the end of the list, and return its offset.

Public function Const

TArray< TVec...

 

GetActiveRanges()

Return a list of pair (offset, range) of all active ranges.

Public function Const

TItemsType &

 

GetItems()

Return all items, including those not in the view.

Public function Const

TConstArrayV...

 

GetRanges()

Return internal ranges.

Public function Const

int32

 

GetRangeSize

(
    int32 Offset
)

Return the number of items in the range starting at the specified offset.

Public function Const

bool

 

HasActiveRange()

Return whether there is any active range in the view.

Public function Const

void

 

ParallelFor

(
    TFunctionRef< void...,
    int32 MinParallelSize
)

Execute the specified function in parallel, on all items for each active range (sequential range, parallel items). Set MinParallelSize to run sequential on the smaller ranges.

Public function Const

void

 

ParallelFor

(
    TFunctionRef< void...,
    bool bForceSingleThreadedRange,
    int32 MinParallelSize
)

Execute the specified function in nested parallel for loops, on all items for each active range (parallel range, parallel items). Set MinParallelSize to run sequential on the smaller ranges.

Public function Const

void

 

RangeFor

(
    TFunctionRef< void...
)

Execute the specified function in sequence for all active range. Callee responsible for inner loop.

Public function Const

void

 

RangeFor

(
    TFunctionRef< void...,
    bool bForceSingleThreadedRange
)

Execute the specified function in parallel for all active ranges. Callee responsible for inner loop.

Public function

void

 

Reset

(
    int32 Offset
)

Remove all ranges above the current given size.

Public function Const

void

 

SequentialFor

(
    TFunctionRef< void...
)

Execute the specified function on all active items.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss