Mass.h

Go to the documentation of this file.
00001 /*************************************************************************
00002 *                                                                       *
00003 * Open Physics Abstraction Layer                                        *
00004 * Copyright (C) 2004-2005                                               *
00005 * Alan Fischer  alan.fischer@gmail.com                                  *
00006 * Andres Reinot  andres@reinot.com                                      *
00007 * Tyler Streeter  tylerstreeter@gmail.com                               *
00008 * Oleksandr Lozitskiy mr.olexander@gmail.com                            *
00009 * All rights reserved.                                                  *
00010 * Web: opal.sourceforge.net                                             *
00011 *                                                                       *
00012 * This library is free software; you can redistribute it and/or         *
00013 * modify it under the terms of EITHER:                                  *
00014 *   (1) The GNU Lesser General Public License as published by the Free  *
00015 *       Software Foundation; either version 2.1 of the License, or (at  *
00016 *       your option) any later version. The text of the GNU Lesser      *
00017 *       General Public License is included with this library in the     *
00018 *       file license-LGPL.txt.                                          *
00019 *   (2) The BSD-style license that is included with this library in     *
00020 *       the file license-BSD.txt.                                       *
00021 *                                                                       *
00022 * This library is distributed in the hope that it will be useful,       *
00023 * but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00024 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files    *
00025 * license-LGPL.txt and license-BSD.txt for more details.                *
00026 *                                                                       *
00027 *************************************************************************/
00028 
00029 #ifndef OPAL_MASS_H
00030 #define OPAL_MASS_H
00031 
00032 // project headers
00033 #include "Matrix44r.h"
00034 #include "OpalMath.h"
00035 #include "Vec3r.h"
00036 
00037 namespace opal
00038 {
00039     class Mass
00040     {
00041         public:
00043             Mass()
00044             {
00045                 mass = 1;
00046                 center = Vec3r( 0, 0, 0 );
00047                 inertia.makeIdentity();
00048                 inertia[ 0 ] = static_cast<real>( 1 / 6.0 );
00049                                 inertia[ 5 ] = static_cast<real>( 1 / 6.0 );
00050                                 inertia[ 10 ] = static_cast<real>( 1 / 6.0 );
00051             }
00052 
00055             real mass;
00056 
00059             Vec3r center;
00060 
00063             Matrix44r inertia;
00064     };
00065 }
00066 
00067 #endif

Generated on Tue May 16 17:49:51 2006 for OPAL by  doxygen 1.4.6-NO