Biomechanical Joint Model
 Author: Anderson Maciel

comematerial.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2000 by Anderson Maciel                                 *
00003  *   andi.maciel@gmail.com                                                 *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  **************************************************************************/
00021 //
00022 //  PROJECT.....: COME_
00023 //  RESPONSIBLE.: 
00024 //
00025 //  FILE........: comematerial.cpp
00026 //  DESCRIPTION.: 
00027 //
00028 //  AUTHOR......: Anderson Maciel
00029 //  DATE........: May/14/2000
00030 //  DESCRIPTION.: Classe definition.
00031 //
00033 
00034 #include <bio/comematerial.h>
00035 
00039 
00040 COME_Material::COME_Material(){
00041 
00042         color = COME_Vector3D( 1, 1, 1 );
00043         anisotropyVector = COME_Vector3D( 1, 1, 1 );
00044         density = 1.0;
00045         dampingConst = 0.1;
00046         mediumDensity = 0.1;
00047         setDescription( "void" );
00048 }
00049 
00053 COME_Material::COME_Material( const COME_Material &materialN ){
00054 
00055         color = materialN.getColor();
00056         density = materialN.getDensity();
00057         dampingConst = materialN.getDamping();
00058         youngsModulus = materialN.getYoungsModulus();
00059         mediumDensity = materialN.getMediumDensity();
00060         description = materialN.getDescription();
00061         liquidFraction = materialN.getLiquidFraction();
00062         permeability = materialN.getPermeability();
00063         maxStress = materialN.getMaxStress();
00064         anisotropyVector = materialN.getAnisotropyVector();
00065 }
00069 
00070 COME_Material::COME_Material( const COME_Vector3D &colorN, double densityN, double dampingN, double youngs, double mediumDensityN, double liquidFractionN, double permeabilityN ){
00071 
00072         color = colorN;
00073         density = densityN;
00074         dampingConst = dampingN;
00075         youngsModulus = youngs;
00076         mediumDensity = mediumDensityN;
00077         liquidFraction = liquidFractionN;
00078         permeability = permeabilityN;
00079         anisotropyVector = COME_Vector3D( 1, 1, 1 );
00080         setDescription( "void" );
00081 }
00082 
00083 COME_Material::COME_Material( const COME_Vector3D &colorN, double densityN, double dampingN, double youngs, double mediumDensityN, double liquidFractionN, double permeabilityN, const COME_Vector3D &anisoN  ){
00084 
00085         color = colorN;
00086         density = densityN;
00087         dampingConst = dampingN;
00088         youngsModulus = youngs;
00089         mediumDensity = mediumDensityN;
00090         liquidFraction = liquidFractionN;
00091         permeability = permeabilityN;
00092         anisotropyVector = anisoN;
00093         setDescription( "void" );
00094 }
00095 
00096 COME_Material::~COME_Material()
00097 {
00098 
00099 }
00100 
00104 
00105 void
00106 COME_Material::setColor( const COME_Vector3D &colorN ){
00107 
00108         color = colorN;
00109 }
00110 
00111 void
00112 COME_Material::setDensity( double densityN ){
00113 
00114         density = densityN;
00115 }
00116 
00117 void
00118 COME_Material::setDamping( double dampingN ){
00119 
00120         dampingConst = dampingN;
00121 }
00122 
00123 void
00124 COME_Material::setYoungsModulus( double youngsN ){
00125 
00126         youngsModulus = youngsN;
00127 }
00128 
00129 void
00130 COME_Material::setMediumDensity( double mediumDensityN ){
00131 
00132         mediumDensity = mediumDensityN;
00133 }
00134 
00135 void
00136 COME_Material::setLiquidFraction( double liquidN ){
00137 
00138         liquidFraction = liquidN;
00139 }
00140 
00141 void
00142 COME_Material::setPermeability( double permeabN ){
00143 
00144         permeability = permeabN;
00145 }
00146 
00147 void
00148 COME_Material::setMaxStress( double maxStressN ){
00149 
00150         maxStress = maxStressN;
00151 }
00152 
00153 void
00154 COME_Material::setAnisotropyVector( const COME_Vector3D &anisoN ){
00155 
00156         anisotropyVector = anisoN;
00157 }
00158 
00159 
00163 
00164 double
00165 COME_Material::getColorRGB() const {
00166 
00167         return color.vpModule();
00168 }
00169 
00170 COME_Vector3D
00171 COME_Material::getColor() const {
00172 
00173         return color;
00174 }
00175 
00176 double
00177 COME_Material::getDensity() const {
00178 
00179         return density;
00180 }
00181 
00182 double
00183 COME_Material::getDamping() const {
00184 
00185         return dampingConst;
00186 }
00187 
00188 double
00189 COME_Material::getYoungsModulus() const {
00190 
00191         return youngsModulus;
00192 }
00193 
00194 double
00195 COME_Material::getMediumDensity() const {
00196 
00197         return mediumDensity;
00198 }
00199 
00200 double
00201 COME_Material::getLiquidFraction() const{
00202 
00203         return liquidFraction;
00204 }
00205 
00206 double
00207 COME_Material::getPermeability() const{
00208 
00209         return permeability;
00210 }
00211 
00212 double
00213 COME_Material::getMaxStress() const{
00214 
00215         return maxStress;
00216 }
00217 
00218 COME_Vector3D
00219 COME_Material::getAnisotropyVector() const {
00220 
00221         return anisotropyVector;
00222 }

Generated on Thu Dec 1 10:13:34 2005 for COME - Biomechanical Joint Model by  doxygen 1.4.5