Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

sglIndexedLineSet.hpp

00001 /*****************************************************************************
00002  * SGL: A Scene Graph Library
00003  *
00004  * Copyright (C) 1997-2001  Scott McMillan   All Rights Reserved.
00005  *
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Library General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2 of the License, or (at your option) any later version.
00010  *
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Library General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Library General Public
00017  * License along with this library; if not, write to the Free
00018  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00019  *****************************************************************************
00020  *     File: sglIndexedLineSet.hpp
00021  *  Created: 22 October 1997
00022  *  Summary: Approximates a pfGeoSet which contains geometry data and indices
00023  *         : for individual line segments, and pointers to the graphics state
00024  *         : associated with it (sglGeoState). 
00025  *****************************************************************************/
00026 
00027 #ifndef __SGL_INDEXED_LINE_SET_HPP
00028 #define __SGL_INDEXED_LINE_SET_HPP
00029 
00030 #include <sgl.h>
00031 #include <sglIndexedGeoSet.hpp>
00032 
00033 //============================================================================
00034 
00038 class SGL_DLL_API sglIndexedLineSet : public sglIndexedGeoSet
00039 {
00040 public:
00042    sglIndexedLineSet();
00044    virtual ~sglIndexedLineSet();
00045 
00047    sglStats::PrimEnum getPrimType() const {return sglStats::eINDEXED_LINES;}
00049    GLenum getGLPrimType() const {return GL_LINES;}
00051    unsigned int getPrimSize() const {return 2;}
00053    AAEnum getAAType() const {return eLINE_AA;}
00054 
00055 protected:
00056    virtual void updateDrawFunc();
00057 
00058 private: // not implemented
00059    sglIndexedLineSet(const sglIndexedLineSet &);
00060    sglIndexedLineSet &operator=(const sglIndexedLineSet &);
00061 
00062    void drawVT(const vector<sglTexCoords> &tex_coords) const;
00063    void drawVNoT(const vector<sglTexCoords> &tex_coords) const;
00064    void drawVNpT(const vector<sglTexCoords> &tex_coords) const;
00065    void drawVNvT(const vector<sglTexCoords> &tex_coords) const;
00066    void drawVCoT(const vector<sglTexCoords> &tex_coords) const;
00067    void drawVCoNoT(const vector<sglTexCoords> &tex_coords) const;
00068    void drawVCoNpT(const vector<sglTexCoords> &tex_coords) const;
00069    void drawVCoNvT(const vector<sglTexCoords> &tex_coords) const;
00070    void drawVCpT(const vector<sglTexCoords> &tex_coords) const;
00071    void drawVCpNoT(const vector<sglTexCoords> &tex_coords) const;
00072    void drawVCpNpT(const vector<sglTexCoords> &tex_coords) const;
00073    void drawVCpNvT(const vector<sglTexCoords> &tex_coords) const;
00074    void drawVCvT(const vector<sglTexCoords> &tex_coords) const;
00075    void drawVCvNoT(const vector<sglTexCoords> &tex_coords) const;
00076    void drawVCvNpT(const vector<sglTexCoords> &tex_coords) const;
00077    void drawVCvNvT(const vector<sglTexCoords> &tex_coords) const;
00078 
00079    class Initializer;
00080    friend class Initializer;
00081    static void setupFuncTable();
00082 
00083 private:
00084    static DrawFunc s_func_table[(eCOLORS|eNORMALS)+1];
00085    static Initializer sInitializer;
00086 };
00087 
00088 #endif

Generated at Mon Jul 1 18:00:04 2002 for SGL by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001