Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8376 in orxonox.OLD for trunk/src/lib/graphics/importer/material.h


Ignore:
Timestamp:
Jun 14, 2006, 12:13:16 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: no more seg-fault when copying a Texture

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/importer/material.h

    r8370 r8376  
    1717#include <vector>
    1818#include "texture.h"
     19#include "color.h"
    1920
    2021// FORWARD DECLARATIONS //
     
    3536    void setIllum (int illum);
    3637    int getIllumModel() const { return this->illumModel; };
     38
    3739    void setDiffuse (float r, float g, float b);
    3840    void setAmbient (float r, float g, float b);
     
    4244    void setBlendFunc(GLenum sFactor, GLenum tFactor) { this->sFactor = sFactor; this->tFactor = tFactor; };
    4345
    44     void getDiffuseColor(float& r, float& g, float& b) const { r = diffuse[0], g = diffuse[1], b = diffuse[2]; }
     46    const Color& getDiffuseColor() const { return diffuse; };
    4547
    4648    // MAPPING //
     
    6668
    6769    int              illumModel;       //!< The IlluminationModel is either flat or smooth.
    68     float            diffuse [4];      //!< The diffuse color of the Material.
    69     float            ambient [4];      //!< The ambient color of the Material.
    70     float            specular [4];     //!< The specular color of the Material.
     70    Color            diffuse;          //!< The diffuse color of the Material. (also transparency.)
     71    Color            ambient;          //!< The ambient color of the Material.
     72    Color            specular;         //!< The specular color of the Material.
    7173    float            shininess;        //!< The shininess of the Material.
    72     float            transparency;     //!< The transperency of the Material.
    7374    GLenum           sFactor;          //!< The Blending Factor for the Source.
    7475    GLenum           tFactor;          //!< The Blending Factor for the Destination.
Note: See TracChangeset for help on using the changeset viewer.