Blender  V2.93
UncontrolledObject.cpp
Go to the documentation of this file.
1 
4 /*
5  * UncontrolledObject.cpp
6  *
7  * Created on: Jan 5, 2009
8  * Author: rubensmits
9  */
10 
11 #include "UncontrolledObject.hpp"
12 
13 namespace iTaSC{
14 
16  m_nu(0), m_nf(0), m_xudot()
17 {
18 }
19 
21 {
22 }
23 
24 void UncontrolledObject::initialize(unsigned int _nu, unsigned int _nf)
25 {
26  assert (_nf >= 1);
27  m_nu = _nu;
28  m_nf = _nf;
29  if (_nu > 0)
30  m_xudot = e_zero_vector(_nu);
31  // clear all Jacobian if any
32  m_JuArray.clear();
33  // reserve one more to have an zero matrix handy
34  if (m_nu > 0)
35  m_JuArray.resize(m_nf+1, e_zero_matrix(6,m_nu));
36 }
37 
38 const e_matrix& UncontrolledObject::getJu(unsigned int frameIndex) const
39 {
40  assert (m_nu > 0);
41  return m_JuArray[(frameIndex>m_nf)?m_nf:frameIndex];
42 }
43 
44 
45 
46 }
virtual const e_matrix & getJu(unsigned int frameIndex) const
std::vector< e_matrix > m_JuArray
virtual void initialize(unsigned int _nu, unsigned int _nf)
#define e_zero_vector
Definition: eigen_types.hpp:39
#define e_zero_matrix
Definition: eigen_types.hpp:44
#define e_matrix
Definition: eigen_types.hpp:40