AGX Dynamics 2.42.3.1
Loading...
Searching...
No Matches
Types.h
Go to the documentation of this file.
1/*
2Copyright 2007-2025. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx 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
33namespace agxStream
34{
35 namespace ElementTypes
36 {
37 enum Type {
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>
52 {
53 if (sizeof(T) == sizeof(float))
54 return VEC2F;
55 else
56 return VEC2D;
57 }
58
59 template <typename T>
61 {
62 if (sizeof(T) == sizeof(float))
63 return VEC3F;
64 else
65 return VEC3D;
66 }
67
68 template <typename T>
70 {
71 if (sizeof(T) == sizeof(float))
72 return VEC4F;
73 else
74 return VEC4D;
75 }
76
77 template <typename T>
79 {
80 if (sizeof(T) == sizeof(float))
81 return QUATF;
82 else
83 return QUATD;
84 }
85
86 template <typename T>
88 {
89 return OTHER;
90 }
91 }
92}
93
The object holding quaternions and providing operations on these.
Definition: QuatTemplate.h:57
A class holding 3 dimensional vectors and providing basic arithmetic.
Definition: Vec3Template.h:46
A class holding 4 dimensional vectors and providing basic arithmetic.
Definition: Vec4Template.h:35
agx::UInt32 getElementType(const float &)
Definition: Types.h:40
This namespace contain classes for streaming classes into archives, ASCII, binary for storage (serial...
uint32_t UInt32
Definition: Integer.h:32