RavEngine
Loading...
Searching...
No Matches
PxSimpleTypes.h
1
//
2
// Redistribution and use in source and binary forms, with or without
3
// modification, are permitted provided that the following conditions
4
// are met:
5
// * Redistributions of source code must retain the above copyright
6
// notice, this list of conditions and the following disclaimer.
7
// * Redistributions in binary form must reproduce the above copyright
8
// notice, this list of conditions and the following disclaimer in the
9
// documentation and/or other materials provided with the distribution.
10
// * Neither the name of NVIDIA CORPORATION nor the names of its
11
// contributors may be used to endorse or promote products derived
12
// from this software without specific prior written permission.
13
//
14
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
15
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
18
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
20
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
21
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
22
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25
//
26
// Copyright (c) 2008-2021 NVIDIA Corporation. All rights reserved.
27
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
28
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
29
30
#ifndef PXFOUNDATION_PXSIMPLETYPES_H
31
#define PXFOUNDATION_PXSIMPLETYPES_H
32
37
// Platform specific types:
38
// Design note: Its OK to use int for general loop variables and temps.
39
40
#include "foundation/PxPreprocessor.h"
41
#if PX_VC
42
#pragma warning(push)
43
#pragma warning(disable : 4668)
// suppressing warning generated by Microsoft Visual Studio when including this standard
44
// header
45
#endif
46
47
#if PX_LINUX
48
//#define __STDC_LIMIT_MACROS
49
#endif
50
51
#include <stdint.h>
52
#if PX_VC
53
#pragma warning(pop)
54
#endif
55
56
#if PX_VC
// we could use inttypes.h starting with VC12
57
#define PX_PRIu64 "I64u"
58
#else
59
#if !PX_PS4 && !PX_APPLE_FAMILY
60
#ifndef __STDC_FORMAT_MACROS
61
#define __STDC_FORMAT_MACROS
62
#endif
63
#endif
64
#include <inttypes.h>
65
#define PX_PRIu64 PRIu64
66
#endif
67
68
namespace
physx
69
{
70
typedef
int64_t
PxI64;
71
typedef
uint64_t
PxU64;
72
typedef
int32_t
PxI32;
73
typedef
uint32_t
PxU32;
74
typedef
int16_t
PxI16;
75
typedef
uint16_t
PxU16;
76
typedef
int8_t
PxI8;
77
typedef
uint8_t
PxU8;
78
typedef
float
PxF32;
79
typedef
double
PxF64;
80
typedef
float
PxReal;
81
}
82
83
// Type ranges
84
85
// These are here because we sometimes have non-IEEE compliant platforms to deal with.
86
// Removal is under consideration (issue GWSD-34)
87
88
#define PX_MAX_F32 3.4028234663852885981170418348452e+38F
89
// maximum possible float value
90
#define PX_MAX_F64 DBL_MAX
// maximum possible double value
91
92
#define PX_EPS_F32 FLT_EPSILON
// maximum relative error of float rounding
93
#define PX_EPS_F64 DBL_EPSILON
// maximum relative error of double rounding
94
95
#define PX_MAX_REAL PX_MAX_F32
96
#define PX_EPS_REAL PX_EPS_F32
97
#define PX_NORMALIZATION_EPSILON float(1e-20f)
98
99
// Legacy type ranges used by PhysX
100
#define PX_MAX_I8 INT8_MAX
101
#define PX_MIN_I8 INT8_MIN
102
#define PX_MAX_U8 UINT8_MAX
103
#define PX_MIN_U8 UINT8_MIN
104
#define PX_MAX_I16 INT16_MAX
105
#define PX_MIN_I16 INT16_MIN
106
#define PX_MAX_U16 UINT16_MAX
107
#define PX_MIN_U16 UINT16_MIN
108
#define PX_MAX_I32 INT32_MAX
109
#define PX_MIN_I32 INT32_MIN
110
#define PX_MAX_U32 UINT32_MAX
111
#define PX_MIN_U32 UINT32_MIN
112
114
#endif
// #ifndef PXFOUNDATION_PXSIMPLETYPES_H
glm::uint64_t
uint64 uint64_t
Definition
fwd.hpp:145
glm::int8_t
int8 int8_t
Definition
fwd.hpp:43
glm::int64_t
int64 int64_t
Definition
fwd.hpp:85
glm::uint32_t
uint32 uint32_t
Definition
fwd.hpp:131
glm::uint8_t
uint8 uint8_t
Definition
fwd.hpp:103
glm::int32_t
int32 int32_t
Definition
fwd.hpp:71
glm::uint16_t
uint16 uint16_t
Definition
fwd.hpp:117
glm::int16_t
int16 int16_t
Definition
fwd.hpp:57
physx
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition
PxBoxController.h:39
RavEngine
deps
physx
pxshared
include
foundation
PxSimpleTypes.h
Generated by
1.9.8