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

sglTraverser.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: sglTraverser.hpp
00021  *   Author: Scott McMillan
00022  *  Created: 3 June 2001
00023  *  Summary: Base class for all traversal classes
00024  *****************************************************************************/
00025 
00026 #ifndef __SGL_TRAVERSER_HPP
00027 #define __SGL_TRAVERSER_HPP
00028 
00029 #include <sgl.h>
00030 #include <sglTimespec.hpp>
00031 
00032 //----------------------------------------------------------------------------
00033 
00040 class SGL_DLL_API sglTraverser
00041 {
00042 public:
00043    sglTraverser()
00044          : m_discriminator_mask(~0x0u),
00045            m_lod_scale(1.0f),
00046            m_lod_offset(0.0f),
00047            m_frame_count(0),
00048            m_frame_time() {}
00049 
00050    virtual ~sglTraverser() {};
00051 
00053    void setDiscriminatorMask(unsigned int mask) {m_discriminator_mask = mask;}
00055    unsigned int getDiscriminatorMask() const    {return m_discriminator_mask;}
00056 
00058    void setLODScale(float lod_scale) { m_lod_scale = lod_scale; }
00060    float getLODScale() const         { return m_lod_scale; }
00061 
00063    void setLODOffset(float lod_offset) { m_lod_offset = lod_offset; }
00065    float getLODOffset() const          { return m_lod_offset; }
00066 
00068    void setFrameCount(unsigned int count) { m_frame_count = count; }
00070    unsigned int getFrameCount() const { return m_frame_count; }
00071 
00073    void setFrameTime(const sglTimespec &ftime) { m_frame_time = ftime; }
00075    const sglTimespec &getFrameTime() const { return m_frame_time; }
00076 
00077 private: // Methods - NOT IMPLEMENTED
00078    sglTraverser(const sglTraverser &);
00079    sglTraverser &operator=(const sglTraverser &);
00080 
00081 protected: // Variables
00082    unsigned int m_discriminator_mask;
00083    float        m_lod_scale;
00084    float        m_lod_offset;
00085 
00086    unsigned int m_frame_count;
00087    sglTimespec  m_frame_time;
00088 };
00089 
00090 #endif

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