Blender V2.61 - r43446
|
00001 00004 // Copyright (C) 2007 Ruben Smits <ruben dot smits at mech dot kuleuven dot be> 00005 00006 // Version: 1.0 00007 // Author: Ruben Smits <ruben dot smits at mech dot kuleuven dot be> 00008 // Maintainer: Ruben Smits <ruben dot smits at mech dot kuleuven dot be> 00009 // URL: http://www.orocos.org/kdl 00010 00011 // This library is free software; you can redistribute it and/or 00012 // modify it under the terms of the GNU Lesser General Public 00013 // License as published by the Free Software Foundation; either 00014 // version 2.1 of the License, or (at your option) any later version. 00015 00016 // This library is distributed in the hope that it will be useful, 00017 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00019 // Lesser General Public License for more details. 00020 00021 // You should have received a copy of the GNU Lesser General Public 00022 // License along with this library; if not, write to the Free Software 00023 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00024 00025 #include "inertia.hpp" 00026 00027 #include <Eigen/Core> 00028 00029 namespace KDL { 00030 using namespace Eigen; 00031 00032 Inertia::Inertia(double m,double Ixx,double Iyy,double Izz,double Ixy,double Ixz,double Iyz): 00033 data(Matrix<double,6,6>::Zero()) 00034 { 00035 data(0,0)=Ixx; 00036 data(1,1)=Iyy; 00037 data(2,2)=Izz; 00038 data(2,1)=data(1,2)=Ixy; 00039 data(3,1)=data(1,3)=Ixz; 00040 data(3,2)=data(2,3)=Iyz; 00041 00042 data.block(3,3,3,3)=m*Matrix<double,3,3>::Identity(); 00043 } 00044 00045 Inertia::~Inertia() 00046 { 00047 } 00048 00049 00050 00051 }