00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 #if !defined(AFX_PLANARQUAD_H__B5C3452B_60A0_4F40_BB84_19268F764CCC__INCLUDED_)
00020 #define AFX_PLANARQUAD_H__B5C3452B_60A0_4F40_BB84_19268F764CCC__INCLUDED_
00021 
00022 #if _MSC_VER > 1000
00023 #pragma once
00024 #endif // _MSC_VER > 1000
00025 
00026 #include "planarQuadZ.h"
00027 #include "../texCoordGen/quadTexGen.h"
00028 
00029 namespace glift {
00030 
00031 
00032 
00033 
00034 
00035 
00036 
00037 
00038 
00039 
00040 
00041 
00042 
00043 
00044 class _export_ PlanarQuad : public PlanarQuadZ
00045 {
00046 public:
00047    PlanarQuad( const gutz::vec2f& lowerLeft, const gutz::vec2f& upperRight, 
00048       bool genTexCoords=false, bool genNorms=false, TexCoordGen* altTexGen=NULL);
00049 
00050    PlanarQuad( const gutz::vec2f& lowerLeft, const gutz::vec2f& upperRight, float z,
00051       bool genTexCoords=false, bool genNorms=false, TexCoordGen* altTexGen=NULL);
00052 
00053    virtual gutz::vec2f  lowerLeft()     const {return m_lowerLeft;}
00054    virtual gutz::vec2f  upperRight()    const {return m_upperRight;}
00055    virtual float                        z()                             const {return m_z;}
00056    virtual int                          numActivePatches() const {return 1;}
00057    virtual gutz::vec2i  subDiv()                const {return gutz::vec2i(1,1);}
00058 
00059 private:
00060    gutz::vec2f m_lowerLeft;
00061    float m_z;
00062    gutz::vec2f m_upperRight;
00063 
00064    PlanarQuad(); 
00065    gutz::arrayo2f setQuadVertPos( const gutz::vec2f& lowerLeft, const gutz::vec2f& upperRight, float z );
00066    gutz::arrayo2f setNorm();
00067 
00068    void init( const gutz::vec2f lowerLeft, const gutz::vec2f upperRight, float z,
00069       bool genTexCoords, bool genNorms, TexCoordGen* texGen );
00070 };
00071 
00072 } 
00073 
00074 #endif 
00075 
00076 
00077 
00078