AGX Dynamics
2.38.0.2
Loading...
Searching...
No Matches
Types.h
Go to the documentation of this file.
1
/*
2
Copyright 2007-2024. 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
#pragma once
17
18
19
20
#include <
agx/agxCore_export.h
>
21
#include <
agx/version.h
>
22
23
#include <
agx/String.h
>
24
#include <
agx/Vec2.h
>
25
#include <
agx/Vec3.h
>
26
#include <
agx/Quat.h
>
27
#include <
agx/Range.h
>
28
#include <
agx/Matrix3x3.h
>
29
#include <
agx/SPDMatrix3x3.h
>
30
31
32
33
namespace
agxStream
34
{
35
namespace
ElementTypes
36
{
37
enum
Type
{
38
FLOAT
,
DOUBLE
,
VEC2F
,
VEC2D
,
VEC3F
,
VEC3D
,
VEC4F
,
VEC4D
,
QUATF
,
QUATD
,
OTHER
39
};
40
inline
agx::UInt32
getElementType
(
const
float
&)
41
{
42
return
FLOAT
;
43
}
44
45
inline
agx::UInt32
getElementType
(
const
double
&)
46
{
47
return
DOUBLE
;
48
}
49
50
template
<
typename
T>
51
agx::UInt32
getElementType
(
const
agx::Vec2T<T>
&)
52
{
53
if
(
sizeof
(T) ==
sizeof
(
float
))
54
return
VEC2F
;
55
else
56
return
VEC2D
;
57
}
58
59
template
<
typename
T>
60
agx::UInt32
getElementType
(
const
agx::Vec3T<T>
&)
61
{
62
if
(
sizeof
(T) ==
sizeof
(
float
))
63
return
VEC3F
;
64
else
65
return
VEC3D
;
66
}
67
68
template
<
typename
T>
69
agx::UInt32
getElementType
(
const
agx::Vec4T<T>
&)
70
{
71
if
(
sizeof
(T) ==
sizeof
(
float
))
72
return
VEC4F
;
73
else
74
return
VEC4D
;
75
}
76
77
template
<
typename
T>
78
agx::UInt32
getElementType
(
const
agx::QuatT<T>
&)
79
{
80
if
(
sizeof
(T) ==
sizeof
(
float
))
81
return
QUATF
;
82
else
83
return
QUATD
;
84
}
85
86
template
<
typename
T>
87
agx::UInt32
getElementType
(
const
T&)
88
{
89
return
OTHER
;
90
}
91
}
92
}
93
Matrix3x3.h
Quat.h
Range.h
SPDMatrix3x3.h
String.h
Vec2.h
agxCore_export.h
Vec3.h
agx::QuatT
The object holding quaternions and providing operations on these.
Definition
QuatTemplate.h:57
agx::Vec2T
Definition
Vec2Template.h:31
agx::Vec3T
A class holding 3 dimensional vectors and providing basic arithmetic.
Definition
Vec3Template.h:46
agx::Vec4T
A class holding 4 dimensional vectors and providing basic arithmetic.
Definition
Vec4Template.h:35
agxStream::ElementTypes::getElementType
agx::UInt32 getElementType(const float &)
Definition
Types.h:40
agxStream::ElementTypes::Type
Type
Definition
Types.h:37
agxStream::ElementTypes::VEC3F
@ VEC3F
Definition
Types.h:38
agxStream::ElementTypes::QUATD
@ QUATD
Definition
Types.h:38
agxStream::ElementTypes::OTHER
@ OTHER
Definition
Types.h:38
agxStream::ElementTypes::DOUBLE
@ DOUBLE
Definition
Types.h:38
agxStream::ElementTypes::VEC4F
@ VEC4F
Definition
Types.h:38
agxStream::ElementTypes::QUATF
@ QUATF
Definition
Types.h:38
agxStream::ElementTypes::VEC2F
@ VEC2F
Definition
Types.h:38
agxStream::ElementTypes::FLOAT
@ FLOAT
Definition
Types.h:38
agxStream::ElementTypes::VEC4D
@ VEC4D
Definition
Types.h:38
agxStream::ElementTypes::VEC3D
@ VEC3D
Definition
Types.h:38
agxStream::ElementTypes::VEC2D
@ VEC2D
Definition
Types.h:38
agxStream
This namespace contain classes for streaming classes into archives, ASCII, binary for storage (serial...
Definition
ElementaryConstraint.h:32
agx::UInt32
uint32_t UInt32
Definition
Integer.h:32
version.h
include
agxStream
Types.h
Generated on Sun Sep 1 2024 11:24:48 for AGX Dynamics by
1.9.8