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