AGXDynamics
2.35.0.3
Range6.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
18
#ifndef AGX_RANGE_6_H
19
#define AGX_RANGE_6_H
20
21
#include <
agx/Range.h
>
22
#include <
agxData/Type.h
>
23
24
namespace
agx
25
{
26
27
template
<
typename
T>
28
class
Range6T
29
{
30
public
:
31
enum
Direction
{
32
X_DIRECTION
,
Y_DIRECTION
,
Z_DIRECTION
,
33
X_ROTATION
,
Y_ROTATION
,
Z_ROTATION
,
34
NUM_DIRECTIONS
35
};
36
37
public
:
38
Range<T>
&
operator[]
(
Direction
direction);
39
const
Range<T>
&
operator[]
(
Direction
direction)
const
;
40
41
Range<T>
&
operator[]
(
UInt
index);
42
const
Range<T>
&
operator[]
(
UInt
index)
const
;
43
44
Range<T>
get
(
Direction
direction);
45
void
set
(
Direction
direction,
Range<T>
newRange);
46
private
:
47
Range<T>
m_ranges[6];
48
};
49
50
51
template
<
typename
T>
52
Range<T>
&
Range6T<T>::operator[]
(
Direction
direction)
53
{
54
agxAssert
(direction < 6);
55
return
m_ranges[direction];
56
}
57
58
59
template
<
typename
T>
60
const
Range<T>
&
Range6T<T>::operator[]
(
Direction
direction)
const
61
{
62
agxAssert
(direction < 6);
63
return
m_ranges[direction];
64
}
65
66
67
template
<
typename
T>
68
Range<T>
&
Range6T<T>::operator[]
(
UInt
index)
69
{
70
agxAssert
(index < 6);
71
return
m_ranges[index];
72
}
73
74
75
template
<
typename
T>
76
const
Range<T>
&
Range6T<T>::operator[]
(
UInt
index)
const
77
{
78
agxAssert
(index < 6);
79
return
m_ranges[index];
80
}
81
82
83
template
<
typename
T>
84
Range<T>
Range6T<T>::get
(
Direction
direction)
85
{
86
agxAssert
(direction < 6);
87
return
m_ranges[direction];
88
}
89
90
91
template
<
typename
T>
92
void
Range6T<T>::set
(
Direction
direction,
Range<T>
newRange)
93
{
94
agxAssert
(direction < 6);
95
m_ranges[direction] = newRange;
96
}
97
98
99
100
101
typedef
Range6T<Real>
Range6
;
102
typedef
Range6T<Real32>
Range6f
;
103
typedef
Range6T<Real64>
Range6d
;
104
105
}
106
107
#endif
agx::Range6T::get
Range< T > get(Direction direction)
Definition:
Range6.h:84
agx::Range6T::NUM_DIRECTIONS
@ NUM_DIRECTIONS
Definition:
Range6.h:34
agx::Range6T::Z_DIRECTION
@ Z_DIRECTION
Definition:
Range6.h:32
agxAssert
#define agxAssert(expr)
Definition:
debug.h:143
agx::Range6T::X_DIRECTION
@ X_DIRECTION
Definition:
Range6.h:32
agx::Range6T::X_ROTATION
@ X_ROTATION
Definition:
Range6.h:33
agx
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Definition:
AddedMassInteraction.h:22
agx::Range6T::operator[]
Range< T > & operator[](Direction direction)
Definition:
Range6.h:52
Type.h
agx::Range6f
Range6T< Real32 > Range6f
Definition:
Range6.h:102
agx::Range6T::Y_DIRECTION
@ Y_DIRECTION
Definition:
Range6.h:32
agx::Range6d
Range6T< Real64 > Range6d
Definition:
Range6.h:103
Range.h
agx::Range6T::Direction
Direction
Definition:
Range6.h:31
agx::UInt
uint32_t UInt
Definition:
Integer.h:34
agx::Range6
Range6T< Real > Range6
Definition:
Range6.h:101
agx::Range
A range object has a min and max value of a given type and provides services to tell whether a value ...
Definition:
Range.h:79
agx::Range6T
Definition:
Range6.h:28
agx::Range6T::set
void set(Direction direction, Range< T > newRange)
Definition:
Range6.h:92
agx::Range6T::Z_ROTATION
@ Z_ROTATION
Definition:
Range6.h:33
agx::Range6T::Y_ROTATION
@ Y_ROTATION
Definition:
Range6.h:33
include
agx
Range6.h
Generated on Fri Feb 10 2023 14:06:17 for AGXDynamics by
1.8.17