Ignore:
Timestamp:
10/19/08 01:33:16 (16 years ago)
Author:
mattausch
Message:

added technique

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Material.h

    r3036 r3042  
    1515 
    1616 
     17/** Class representing an rgba color vector. 
     18*/ 
    1719class RgbaColor  
    1820{ 
     
    3638 
    3739 
    38  
    39 class Material  
     40/** This class represents a certain rendering technique of a shape. 
     41        A material consists of one or more techniques 
     42*/ 
     43class Technique  
    4044{ 
    4145friend class ResourceManager; 
     
    4549        /** Sets default material (ambient intensity 0.2f, diffuse intensity 1.0f) 
    4650        */ 
    47         Material(); 
     51        Technique(); 
    4852 
    49         ~Material(); 
     53        ~Technique(); 
    5054        /** Sets ambient and diffuse color to color 
    5155        */ 
    52         Material(const RgbaColor &color); 
    53  
    54         friend Material RandomMaterial(); 
     56        Technique(const RgbaColor &color); 
    5557 
    5658        inline Texture *GetTexture() const { return mTexture; } 
     
    7375        inline bool IsAlphaTestEnabled() const { return mAlphaTestEnabled; }  
    7476        inline bool IsCullFaceEnabled() const { return mCullFaceEnabled; }  
    75         /** Renders this material. 
     77        /** Renders this technique. 
    7678        */ 
    7779        void Render(RenderState *state); 
     
    115117 
    116118 
    117 extern Material RandomMaterial(); 
     119/** A material consists of one or more techniques. 
     120*/ 
     121class Material 
     122{ 
     123public: 
     124        /** Default constructor creating one default technique. 
     125        */ 
     126        Material(); 
     127 
     128        ~Material(); 
     129        /** Renders this material. 
     130        */ 
     131        void Render(RenderState *state); 
     132 
     133        void AddTechnique(Technique *t); 
     134 
     135        Technique *GetDefaultTechnique() const; 
     136 
     137        Technique *GetTechnique(int i) const; 
     138 
     139        int GetNumTechniques() const; 
     140 
     141 
     142 
     143protected: 
     144 
     145        TechniqueContainer mTechniques; 
     146}; 
    118147 
    119148} 
Note: See TracChangeset for help on using the changeset viewer.