Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

material.inl

Go to the documentation of this file.
00001 /*
00002     Sheep - A Rigid Body Dynamics Engine
00003     Copyright (C) 2001-2004 Francois Beaune
00004     Contact: http://toxicengine.sourceforge.net/
00005 
00006     This file is part of Sheep.
00007 
00008     Sheep is free software; you can redistribute it and/or modify
00009     it under the terms of the GNU General Public License as published by
00010     the Free Software Foundation; either version 2 of the License, or
00011     (at your option) any later version.
00012 
00013     Sheep is distributed in the hope that it will be useful,
00014     but WITHOUT ANY WARRANTY; without even the implied warranty of
00015     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016     GNU General Public License for more details.
00017 
00018     You should have received a copy of the GNU General Public License
00019     along with Sheep; if not, write to the Free Software
00020     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00021 */
00022 
00023 inline
00024 Color3::Color3() {}
00025 
00026 inline
00027 Color3::Color3(Real r) :
00028     m_r(r),
00029     m_g(r),
00030     m_b(r) {}
00031 
00032 inline
00033 Color3::Color3(const Color3 &c) :
00034     m_r(c.m_r),
00035     m_g(c.m_g),
00036     m_b(c.m_b) {}
00037 
00038 inline
00039 Color3::Color3(Real r, Real g, Real b) :
00040     m_r(r),
00041     m_g(g),
00042     m_b(b) {}
00043 
00044 inline
00045 Material::Material() :
00046     m_ambient(0.0),
00047     m_diffuse(0.0),
00048     m_specular(0.0),
00049     m_texture(0)
00050 {
00051 }
00052 
00053 inline
00054 void Material::SetAmbientColor(const Color3 &c) {
00055     m_ambient = c;
00056 }
00057 
00058 inline
00059 const Color3 &Material::GetAmbientColor() const {
00060     return m_ambient;
00061 }
00062 
00063 inline
00064 void Material::SetDiffuseColor(const Color3 &c) {
00065     m_diffuse = c;
00066 }
00067 
00068 inline
00069 const Color3 &Material::GetDiffuseColor() const {
00070     return m_diffuse;
00071 }
00072 
00073 inline
00074 void Material::SetSpecularColor(const Color3 &c) {
00075     m_specular = c;
00076 }
00077 
00078 inline
00079 const Color3 &Material::GetSpecularColor() const {
00080     return m_specular;
00081 }
00082 
00083 inline
00084 void Material::SetTexture(Texture *t) { //!< 't' may be 0.
00085     m_texture = t;
00086 }
00087 
00088 inline
00089 Texture *Material::GetTexture() {
00090     return m_texture;
00091 }
00092 
00093 inline
00094 const Texture *Material::GetTexture() const {
00095     return m_texture;
00096 }

Generated on Tue May 11 01:31:50 2004 for toxic by doxygen 1.3.6