29#ifndef PX_FOUNDATION_H
30#define PX_FOUNDATION_H
36#include "foundation/Px.h"
37#include "foundation/PxErrors.h"
38#include "foundation/PxFoundationConfig.h"
39#include "foundation/PxErrors.h"
48class PxAllocationListener;
108 virtual bool error(
PxErrorCode::Enum c,
const char* file,
int line,
const char* messageFmt, ...) = 0;
110 virtual bool error(
PxErrorCode::Enum,
const char* file,
int line,
const char* messageFmt, va_list) = 0;
124#define PX_IMPLEMENT_OUTPUT_ERROR \
125template<const int errorCode> \
126static PX_NOINLINE bool outputError(int line, const char* message) \
128 return PxGetFoundation().error(PxErrorCode::Enum(errorCode), __FILE__, line, message); \
160#pragma clang diagnostic push
161#pragma clang diagnostic ignored "-Wreturn-type-c-linkage"
167#pragma clang diagnostic pop
175class PxProfilerCallback;
176class PxAllocatorCallback;
177class PxErrorCallback;
Abstract listener class that listens to allocation and deallocation events from the foundation memory...
Definition PxBroadcast.h:49
Abstract base class for an application defined memory allocator that can be used by the Nv library.
Definition PxAllocatorCallback.h:53
User defined interface class. Used by the library to emit debug information.
Definition PxErrorCallback.h:51
Foundation SDK singleton class.
Definition PxFoundation.h:57
virtual void setReportAllocationNames(bool value)=0
virtual PxAllocatorCallback & getAllocatorCallback()=0
virtual PxErrorCode::Enum getErrorLevel() const =0
virtual void release()=0
Destroys the instance it is called on.
virtual PxErrorCallback & getErrorCallback()=0
virtual void setErrorLevel(PxErrorCode::Enum mask=PxErrorCode::eMASK_ALL)=0
virtual bool getReportAllocationNames() const =0
The pure virtual callback interface for general purpose instrumentation and profiling of GameWorks mo...
Definition PxProfiler.h:42
PX_C_EXPORT PX_FOUNDATION_API void PX_CALL_CONV PxSetProfilerCallback(physx::PxProfilerCallback *profiler)
Set the callback that will be used for all profiling.
Definition FdFoundation.cpp:289
PX_C_EXPORT PX_FOUNDATION_API void PX_CALL_CONV PxDecFoundationRefCount()
Decrement the ref count of PxFoundation.
Definition FdFoundation.cpp:299
#define PX_CALL_CONV
Definition PxPreprocessor.h:299
PX_C_EXPORT PX_FOUNDATION_API physx::PxAllocatorCallback *PX_CALL_CONV PxGetAllocatorCallback()
Get the allocator callback.
Definition FdFoundation.cpp:259
PX_C_EXPORT PX_FOUNDATION_API physx::PxU32 PX_CALL_CONV PxGetWarnOnceTimeStamp()
Get the warn once timestamp.
Definition FdFoundation.cpp:294
PX_C_EXPORT PX_FOUNDATION_API physx::PxErrorCallback *PX_CALL_CONV PxGetErrorCallback()
Get the error callback.
Definition FdFoundation.cpp:269
PX_C_EXPORT PX_FOUNDATION_API physx::PxProfilerCallback *PX_CALL_CONV PxGetProfilerCallback()
Get the callback that will be used for all profiling.
Definition FdFoundation.cpp:284
PX_C_EXPORT PX_FOUNDATION_API physx::PxFoundation *PX_CALL_CONV PxCreateFoundation(physx::PxU32 version, physx::PxAllocatorCallback &allocator, physx::PxErrorCallback &errorCallback)
Creates an instance of the foundation class.
Definition FdFoundation.cpp:248
PX_C_EXPORT PX_FOUNDATION_API physx::PxFoundation &PX_CALL_CONV PxGetFoundation()
Retrieves the Foundation SDK after it has been created.
Definition FdFoundation.cpp:279
PX_C_EXPORT PX_FOUNDATION_API physx::PxErrorCallback *PX_CALL_CONV PxGetBroadcastError()
Get the broadcasting error callback.
Definition FdFoundation.cpp:274
PX_C_EXPORT PX_FOUNDATION_API physx::PxAllocatorCallback *PX_CALL_CONV PxGetBroadcastAllocator()
Get the broadcasting allocator callback.
Definition FdFoundation.cpp:264
PX_C_EXPORT PX_FOUNDATION_API void PX_CALL_CONV PxIncFoundationRefCount()
Increment the ref count of PxFoundation.
Definition FdFoundation.cpp:304
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39
Enum
Definition PxErrors.h:52