NVIDIA(R) PhysX(R) SDK 3.4 API Reference: PxSimpleTypes.h Source File

NVIDIA PhysX SDK 3.4 API

PxSimpleTypes.h

Go to the documentation of this file.
00001 // This code contains NVIDIA Confidential Information and is disclosed to you
00002 // under a form of NVIDIA software license agreement provided separately to you.
00003 //
00004 // Notice
00005 // NVIDIA Corporation and its licensors retain all intellectual property and
00006 // proprietary rights in and to this software and related documentation and
00007 // any modifications thereto. Any use, reproduction, disclosure, or
00008 // distribution of this software and related documentation without an express
00009 // license agreement from NVIDIA Corporation is strictly prohibited.
00010 //
00011 // ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
00012 // NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
00013 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
00014 // MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
00015 //
00016 // Information and code furnished is believed to be accurate and reliable.
00017 // However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
00018 // information or for any infringement of patents or other rights of third parties that may
00019 // result from its use. No license is granted by implication or otherwise under any patent
00020 // or patent rights of NVIDIA Corporation. Details are subject to change without notice.
00021 // This code supersedes and replaces all information previously supplied.
00022 // NVIDIA Corporation products are not authorized for use as critical
00023 // components in life support devices or systems without express written approval of
00024 // NVIDIA Corporation.
00025 //
00026 // Copyright (c) 2008-2017 NVIDIA Corporation. All rights reserved.
00027 // Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
00028 // Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
00029 
00030 #ifndef PXFOUNDATION_PXSIMPLETYPES_H
00031 #define PXFOUNDATION_PXSIMPLETYPES_H
00032 
00037 // Platform specific types:
00038 // Design note: Its OK to use int for general loop variables and temps.
00039 
00040 #include "foundation/PxPreprocessor.h"
00041 #if PX_VC
00042 #pragma warning(push)
00043 #pragma warning(disable : 4668) // suppressing warning generated by Microsoft Visual Studio when including this standard
00044 // header
00045 #endif
00046 
00047 #if PX_LINUX
00048 #define __STDC_LIMIT_MACROS
00049 #endif
00050 
00051 #include <stdint.h>
00052 #if PX_VC
00053 #pragma warning(pop)
00054 #endif
00055 
00056 #if PX_VC // we could use inttypes.h starting with VC12
00057 #define PX_PRIu64 "I64u"
00058 #else
00059 #if !PX_PS4 && !PX_APPLE_FAMILY && !PX_SWITCH
00060 #define __STDC_FORMAT_MACROS
00061 #endif
00062 #include <inttypes.h>
00063 #define PX_PRIu64 PRIu64
00064 #endif
00065 
00066 namespace physx
00067 {
00068 typedef int64_t PxI64;
00069 typedef uint64_t PxU64;
00070 typedef int32_t PxI32;
00071 typedef uint32_t PxU32;
00072 typedef int16_t PxI16;
00073 typedef uint16_t PxU16;
00074 typedef int8_t PxI8;
00075 typedef uint8_t PxU8;
00076 typedef float PxF32;
00077 typedef double PxF64;
00078 typedef float PxReal;
00079 }
00080 
00081 // Type ranges
00082 
00083 // These are here because we sometimes have non-IEEE compliant platforms to deal with.
00084 // Removal is under consideration (issue GWSD-34)
00085 
00086 #define PX_MAX_F32 3.4028234663852885981170418348452e+38F
00087 // maximum possible float value
00088 #define PX_MAX_F64 DBL_MAX // maximum possible double value
00089 
00090 #define PX_EPS_F32 FLT_EPSILON // maximum relative error of float rounding
00091 #define PX_EPS_F64 DBL_EPSILON // maximum relative error of double rounding
00092 
00093 #define PX_MAX_REAL PX_MAX_F32
00094 #define PX_EPS_REAL PX_EPS_F32
00095 #define PX_NORMALIZATION_EPSILON float(1e-20f)
00096 
00097 // Legacy type ranges used by PhysX
00098 #define PX_MAX_I8 INT8_MAX
00099 #define PX_MIN_I8 INT8_MIN
00100 #define PX_MAX_U8 UINT8_MAX
00101 #define PX_MIN_U8 UINT8_MIN
00102 #define PX_MAX_I16 INT16_MAX
00103 #define PX_MIN_I16 INT16_MIN
00104 #define PX_MAX_U16 UINT16_MAX
00105 #define PX_MIN_U16 UINT16_MIN
00106 #define PX_MAX_I32 INT32_MAX
00107 #define PX_MIN_I32 INT32_MIN
00108 #define PX_MAX_U32 UINT32_MAX
00109 #define PX_MIN_U32 UINT32_MIN
00110 
00112 #endif // #ifndef PXFOUNDATION_PXSIMPLETYPES_H


Copyright © 2008-2017 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. www.nvidia.com