PxOpoolGetCurrentCapacity()
Return the current capacity of an object pool.
- APPLIES TO
-
1.0.0
- SYNOPSIS
-
PxUInt_t PxOpoolGetCurrentCapacity (PxOpool_t OpoolId); - ARGUMENTS
|
- RETURN VALUES
-
-
The current capacity of the given object pool
-
- ERROR CODES
-
PXERR_OPOOL_ILLOPOOLOpoolIdis not a valid object pool idPXERR_GLOBAL_ILLEGAL_COREThe requested object pool is not on the same core
- DESCRIPTION
-
PxOpoolGetCurrentCapacityreturns the current capacity inopool. This is the actual number of available objects only for real object pools. For virtual objects pools, it describes the number of objects that can be obtained from the object pool, provided that its source has sufficient capacity. IfPxOpoolGetCurrentCapacityreturns 0, either the object pool is empty or an error has occurred. CallPxGetErrorto see if an error occurred.
- IMPLEMENTATION GUIDELINES
-
- Before call
-
-
OpoolIdmust be a valid PXROS-HR object pool. The validity ofOpoolIdmay be checked by the following macros:-
PxOpoolIdIsValid()must be true. -
PxOpoolIdGet()must not be_PXIllegalObjId. -
PxOpoolIdError()must bePXERR_NOERRORotherwise the returned error code has to be interpreted (C).
-
-
- After call
-
-
The function returns 0 if the given object pool is invalid. In this case
PxGetErrormust be called to check which error has occurred. (F)
-
- Best Practice
-
-
No restrictions.
-
- SEE ALSO
- USAGE
-
#include "pxdef.h" PxUInt_t Cap = PxOpoolGetCurrentCapacity(OpoolId);