|
PhysicsBasedAnimationToolkit 0.0.10
Cross-platform C++20 library of algorithms and data structures commonly used in computer graphics research on physically-based simulation.
|
Fixed-size queue implementation. More...
#include <Queue.h>
Public Member Functions | |
| PBAT_HOST_DEVICE | Queue () |
| Construct empty Queue. | |
| PBAT_HOST_DEVICE void | Push (T value) |
| Add element to the queue. | |
| PBAT_HOST_DEVICE T const & | Top () const |
| Get the next element in the queue. | |
| PBAT_HOST_DEVICE void | Pop () |
| Remove the next element in the queue. | |
| PBAT_HOST_DEVICE bool | IsFull () const |
| Check if the queue is full. | |
| PBAT_HOST_DEVICE bool | IsEmpty () const |
| Check if the queue is empty. | |
| PBAT_HOST_DEVICE auto | Size () const |
| Get the number of elements in the queue. | |
| PBAT_HOST_DEVICE void | Clear () |
| Clear the queue. | |
| PBAT_HOST_DEVICE constexpr auto | Capacity () const |
| Get the maximum number of elements in the queue. | |
Fixed-size queue implementation.
| T | Type of the elements in the queue |
| kCapacity | Maximum number of elements in the queue |
|
inlineconstexpr |
Get the maximum number of elements in the queue.
|
inline |
Check if the queue is empty.
|
inline |
Check if the queue is full.
|
inline |
Remove the next element in the queue.
|
inline |
Add element to the queue.
| value | Element to add |
|
inline |
Get the number of elements in the queue.
|
inline |
Get the next element in the queue.