AGX Dynamics  2.35.0.1
Integer.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2022. Algoryx Simulation AB.
3 
4 All AGX source code, intellectual property, documentation, sample code,
5 tutorials, scene files and technical white papers, are copyrighted, proprietary
6 and confidential material of Algoryx Simulation AB. You may not download, read,
7 store, distribute, publish, copy or otherwise disseminate, use or expose this
8 material unless having a written signed agreement with Algoryx Simulation AB, or having been
9 advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10 valid commercial license from Algoryx Simulation AB.
11 
12 Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13 from using this software, unless otherwise stated in written agreements with
14 Algoryx Simulation AB.
15 */
16 
17 #ifndef AGXDATA_INTEGER_H
18 #define AGXDATA_INTEGER_H
19 
20 #include <agx/config.h>
21 #include <agx/stdint.h>
22 #include <stdlib.h>
23 #include <limits>
24 
25 namespace agx
26 {
27 
28 #if AGX_64BIT_ARCHITECTURE
29  #define AGX_LONG_IS_DEFAULT true
30  typedef uint64_t UInt;
31  typedef int64_t Int;
32 #else
33  #define AGX_LONG_IS_DEFAULT false
34  typedef uint32_t UInt;
35  typedef int32_t Int;
36 #endif
37 
38  typedef uint8_t UInt8;
39  typedef uint16_t UInt16;
40  typedef uint32_t UInt32;
41  typedef uint64_t UInt64;
42 
43  typedef int8_t Int8;
44  typedef int16_t Int16;
45  typedef int32_t Int32;
46  typedef int64_t Int64;
47 
48  typedef bool Bool;
49 
50  typedef size_t Size;
51 
52  typedef UInt32 Index;
53 
54  // Use UInt types for non-default index types
55  // typedef UInt8 Index8;
56  // typedef UInt16 Index16;
57  // typedef UInt32 Index32;
58  // typedef UInt64 Index64;
59 
60 #ifdef max
61 #undef max
62 #endif
63 
64 #ifdef min
65 #undef min
66 #endif
67 
68  // Name clash with global macro definitions
74 
80 
82 }
83 
84 #endif /* _AGXDATA_INTEGER_H_ */
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
const UInt32 UInt32Max
Definition: Integer.h:72
uint16_t UInt16
Definition: Integer.h:39
int32_t Int32
Definition: Integer.h:45
const UInt UIntMax
Definition: Integer.h:69
const Int IntMax
Definition: Integer.h:75
uint32_t UInt32
Definition: Integer.h:40
const Int8 Int8Max
Definition: Integer.h:76
bool Bool
Definition: Integer.h:48
uint64_t UInt64
Definition: Integer.h:41
int32_t Int
Definition: Integer.h:35
int64_t Int64
Definition: Integer.h:46
const Size SizeMax
Definition: Integer.h:81
const UInt8 UInt8Max
Definition: Integer.h:70
uint32_t UInt
Definition: Integer.h:34
size_t Size
Definition: Integer.h:50
const Int16 Int16Max
Definition: Integer.h:77
uint8_t UInt8
Definition: Integer.h:38
const UInt16 UInt16Max
Definition: Integer.h:71
Vec3T< T > max(const Vec3T< T > &lhs, const Vec3T< T > &rhs)
Definition: Vec3Template.h:874
int8_t Int8
Definition: Integer.h:43
const UInt64 UInt64Max
Definition: Integer.h:73
int16_t Int16
Definition: Integer.h:44
const Int64 Int64Max
Definition: Integer.h:79
const Int32 Int32Max
Definition: Integer.h:78
UInt32 Index
Definition: Integer.h:52