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