Blender  V3.3
UncontrolledObject.cpp
Go to the documentation of this file.
1 /* SPDX-License-Identifier: LGPL-2.1-or-later
2  * Copyright 2009 Ruben Smits. */
3 
8 #include "UncontrolledObject.hpp"
9 
10 namespace iTaSC{
11 
13  m_nu(0), m_nf(0), m_xudot()
14 {
15 }
16 
18 {
19 }
20 
21 void UncontrolledObject::initialize(unsigned int _nu, unsigned int _nf)
22 {
23  assert (_nf >= 1);
24  m_nu = _nu;
25  m_nf = _nf;
26  if (_nu > 0)
27  m_xudot = e_zero_vector(_nu);
28  // clear all Jacobian if any
29  m_JuArray.clear();
30  // reserve one more to have an zero matrix handy
31  if (m_nu > 0)
32  m_JuArray.resize(m_nf+1, e_zero_matrix(6,m_nu));
33 }
34 
35 const e_matrix& UncontrolledObject::getJu(unsigned int frameIndex) const
36 {
37  assert (m_nu > 0);
38  return m_JuArray[(frameIndex>m_nf)?m_nf:frameIndex];
39 }
40 
41 
42 
43 }
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