AGX Dynamics  2.35.0.1
LocalBodyContactJacobian.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, is 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 AGX_LOCALBODYCONTACTJACOBIAN_H
18 #define AGX_LOCALBODYCONTACTJACOBIAN_H
19 
20 #include <agx/Jacobian.h>
21 #include <agxSIMD/Jacobian.h>
22 
23 namespace agx
24 {
25  template <typename JacobianElementT> class LocalBodyContactJacobianT;
26  template <typename JacobianElementT> class LocalRollingResistanceJacobianT;
27  template <typename JacobianElementT> class LocalTangentJacobianT;
28 
32 
36 
40 
41 }
42 
44 namespace agxSIMD
45 {
49 
53 
57 }
59 
60 
61 namespace agx
62 {
64 
65  template <typename T>
67  {
68  public:
69  typedef T JacobianElementT;
70 
71  public:
74 
75  const JacobianElementT& u() const;
76  const JacobianElementT& v() const;
77 
78  private:
79  JacobianElementT m_u;
80  JacobianElementT m_v;
81  };
82 
84 
85  template <typename T>
87  {
88  public:
89  typedef T JacobianElementT;
90 
91  public:
93  const JacobianElementT& normal() const;
94 
97 
98  private:
99  JacobianElementT m_normal;
101  };
102 
104 
105  template <typename T>
107  {
108  public:
109  typedef T JacobianElementT;
110  static const bool IsLocal = true;
111 
112  public:
113  JacobianElementT& normal();
114  const JacobianElementT& normal() const;
115 
117  const LocalTangentJacobianT<JacobianElementT>& tangent() const;
118 
120  const LocalRollingResistanceJacobianT<JacobianElementT>& rollingResistance() const;
121 
122  JacobianElementT& get(size_t rowIndex);
123  const JacobianElementT& get(size_t rowIndex) const;
124 
125  public:
126  // Not used, only for template compatibility
127  template <typename T2>
128  void setup(const T2&, size_t) const {}
129 
130  private:
131  JacobianElementT m_normal;
134  };
135 
136 
137 
138  /* Implementation */
139 
140  template <typename JacobianElementT>
142  {
143  return m_u;
144  }
145 
146  template <typename JacobianElementT>
148  {
149  return m_u;
150  }
151 
152 
153  template <typename JacobianElementT>
155  {
156  return m_v;
157  }
158 
159  template <typename JacobianElementT>
161  {
162  return m_v;
163  }
164 
166 
167  template <typename JacobianElementT>
169  {
170  return m_normal;
171  }
172 
173  template <typename JacobianElementT>
175  {
176  return m_normal;
177  }
178 
179  template <typename JacobianElementT>
181  {
182  return m_tangent;
183  }
184 
185  template <typename JacobianElementT>
187  {
188  return m_tangent;
189  }
190 
191 
193 
194  template <typename JacobianElementT>
196  {
197  return m_normal;
198  }
199 
200  template <typename JacobianElementT>
202  {
203  return m_normal;
204  }
205 
206  template <typename JacobianElementT>
208  {
209  return m_tangent;
210  }
211 
212  template <typename JacobianElementT>
214  {
215  return m_tangent;
216  }
217 
218  template <typename JacobianElementT>
220  {
221  return m_rollingResistance;
222  }
223 
224  template <typename JacobianElementT>
226  {
227  return m_rollingResistance;
228  }
229 
230  template <typename JacobianElementT>
232  {
233  return ((JacobianElementT *)this)[rowIndex];
234  }
235 
236  template <typename JacobianElementT>
238  {
239  return ((const JacobianElementT *)this)[rowIndex];
240  }
241 
242 
243 }
244 
245 
246 #endif /* AGX_LOCALBODYCONTACTJACOBIAN_H */
void setup(const T2 &, size_t) const
const LocalTangentJacobianT< JacobianElementT > & tangent() const
LocalTangentJacobianT< JacobianElementT > & tangent()
const JacobianElementT & normal() const
const JacobianElementT & u() const
const JacobianElementT & v() const
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: macros.h:97
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: macros.h:96
#define AGX_FORCE_INLINE
Definition: macros.h:58
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
LocalTangentJacobianT< Jacobian6DOFElement > LocalTangentJacobian
LocalBodyContactJacobianT< Jacobian6DOFElement64 > LocalBodyContactJacobian64
LocalRollingResistanceJacobianT< Jacobian6DOFElement > LocalRollingResistanceJacobian
LocalBodyContactJacobianT< Jacobian6DOFElement > LocalBodyContactJacobian
LocalTangentJacobianT< Jacobian6DOFElement64 > LocalTangentJacobian64
LocalBodyContactJacobianT< Jacobian6DOFElement32 > LocalBodyContactJacobian32
LocalRollingResistanceJacobianT< Jacobian6DOFElement32 > LocalRollingResistanceJacobian32
LocalRollingResistanceJacobianT< Jacobian6DOFElement64 > LocalRollingResistanceJacobian64
LocalTangentJacobianT< Jacobian6DOFElement32 > LocalTangentJacobian32