Logo
  • Main Page
  • Related Pages
  • Modules
  • Classes
  • Files

mms3dmaterial.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2005-2007 Stefan Schwarzer, Jens Schneider,             *
00003  *                           Matthias Hardt, Guido Madaus                  *
00004  *                                                                         *
00005  *   Copyright (C) 2007-2008 BerLinux Solutions GbR                        *
00006  *                           Stefan Schwarzer & Guido Madaus               *
00007  *                                                                         *
00008  *   Copyright (C) 2009-2013 BerLinux Solutions GmbH                       *
00009  *                                                                         *
00010  *   Authors:                                                              *
00011  *      Stefan Schwarzer   <stefan.schwarzer@diskohq.org>,                 *
00012  *      Matthias Hardt     <matthias.hardt@diskohq.org>,                   *
00013  *      Jens Schneider     <jens.schneider@diskohq.org>,                   *
00014  *      Guido Madaus       <guido.madaus@diskohq.org>,                     *
00015  *      Patrick Helterhoff <patrick.helterhoff@diskohq.org>,               *
00016  *      René Bählkow       <rene.baehlkow@diskohq.org>                     *
00017  *                                                                         *
00018  *   This library is free software; you can redistribute it and/or         *
00019  *   modify it under the terms of the GNU Lesser General Public            *
00020  *   License version 2.1 as published by the Free Software Foundation.     *
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 GNU     *
00025  *   Lesser General Public License for more details.                       *
00026  *                                                                         *
00027  *   You should have received a copy of the GNU Lesser General Public      *
00028  *   License along with this library; if not, write to the                 *
00029  *   Free Software Foundation, Inc.,                                       *
00030  *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA            *
00031  **************************************************************************/
00032 
00033 #ifndef MMS3DMATERIAL_H_
00034 #define MMS3DMATERIAL_H_
00035 
00036 #include "mmstools/mmstypes.h"
00037 
00038 class MMS3DMaterial {
00039 public:
00040 
00041     //! indices to the materials
00042     typedef enum {
00043         // index range 0..255 for user defined materials
00044         MAT_NOTSET = -1,
00045         MAT_MAX_USER_DEFINED = 255,
00046 
00047         // basic colors
00048         MAT_BLACK,
00049         MAT_RED,
00050         MAT_GREEN,
00051         MAT_BLUE,
00052         MAT_YELLOW,
00053         MAT_CYAN,
00054         MAT_MAGENTA,
00055         MAT_WHITE,
00056 
00057         // gemstone / glass
00058         MAT_JADE,
00059         MAT_JADE_LUCENT,
00060         MAT_OBSIDIAN,
00061         MAT_OBSIDIAN_LUCENT,
00062         MAT_PEARL,
00063         MAT_PEARL_LUCENT,
00064         MAT_RUBY,
00065         MAT_RUBY_LUCENT,
00066         MAT_EMERALD,
00067         MAT_EMERALD_LUCENT,
00068         MAT_TURQUOISE,
00069         MAT_TURQUOISE_LUCENT,
00070 
00071         // synthetic
00072         MAT_BLACK_PLASTIC,
00073         MAT_RED_PLASTIC,
00074         MAT_GREEN_PLASTIC,
00075         MAT_BLUE_PLASTIC,
00076         MAT_YELLOW_PLASTIC,
00077         MAT_CYAN_PLASTIC,
00078         MAT_MAGENTA_PLASTIC,
00079         MAT_WHITE_PLASTIC,
00080         MAT_BLACK_RUBBER,
00081         MAT_RED_RUBBER,
00082         MAT_GREEN_RUBBER,
00083         MAT_BLUE_RUBBER,
00084         MAT_YELLOW_RUBBER,
00085         MAT_CYAN_RUBBER,
00086         MAT_MAGENTA_RUBBER,
00087         MAT_WHITE_RUBBER,
00088 
00089         // metal
00090         MAT_BRONZE,
00091         MAT_BRONZE_POLISHED,
00092         MAT_CHROME,
00093         MAT_GOLD,
00094         MAT_GOLD_POLISHED,
00095         MAT_COPPER,
00096         MAT_COPPER_POLISHED,
00097         MAT_BRASS,
00098         MAT_SILVER,
00099         MAT_SILVER_POLISHED,
00100         MAT_TIN,
00101 
00102         // size needed for the buffer allocation
00103         MAT_SIZE
00104     } MAT;
00105 
00106 private:
00107 
00108     //! materials
00109     static MMS3D_MATERIAL mat_buffer[MAT_SIZE];
00110 
00111     //! number of user defined materials
00112     static int material_cnt;
00113 
00114 public:
00115 
00116     MMS3DMaterial();
00117 
00118     void getBuffer(MMS3D_MATERIAL **mat_buffer);
00119 
00120     int genMaterial(MMSFBColor emission, MMSFBColor ambient, MMSFBColor diffuse, MMSFBColor specular, unsigned char shininess);
00121 };
00122 
00123 #endif /* MMS3DMATERIAL_H_ */

Generated by doxygen