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

sglCone.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: sglCone.hpp
00021  *   Author: Scott McMillan
00022  *  Created: 23 January 2001
00023  *  Summary: an leaf sglNode containing the geometry for a cone.  The height
00024  *           and base radius can be specified.  The base lies in the x-y plane
00025  *           with the center at the origin and the height extends along the
00026  *           +z-axis. 
00027  *****************************************************************************/
00028 
00029 #ifndef SGL_CONE_HPP
00030 #define SGL_CONE_HPP
00031 
00032 #include <sgldb.h>
00033 #include <sglTriangleStripSet.hpp>
00034 
00035 //----------------------------------------------------------------------------
00036 
00037 class SGLDB_DLL_API sglCone : public sglTriangleStripSet
00038 {
00039 public:
00040    sglCone(unsigned int num_sections,
00041            float height = 1.0f, float radius = 1.0f);
00042    virtual ~sglCone();
00043 
00044    virtual void printInfo(ostream &ostrm, const char *indent_string) const;
00045 
00046 protected:
00047 
00048 private:
00049    sglCone();                           // not implemented
00050    sglCone(const sglCone &);            // not implemented
00051    sglCone &operator=(const sglCone &); // not implemented
00052 
00053    void makeCone(unsigned int num_sections,
00054                  float height, float radius);
00055 
00056 private:
00057    unsigned int         m_num_sections;
00058    float                m_height;
00059    float                m_radius;
00060 };
00061 
00062 #endif

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