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

sglLODStateNode.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: sglStateNode.hpp
00021  *  Created: 3 February 2000
00022  *  Summary: use a stateNode mask to select/deselect the entire subtree
00023  *****************************************************************************/
00024 
00025 #ifndef __SGL_LODSTATENODE_HPP
00026 #define __SGL_LODSTATENODE_HPP
00027 
00028 #include <sgl.h>
00029 #include <sglGroup.hpp>
00030 #include <sglLODState.hpp>
00031 
00032 //----------------------------------------------------------------------------
00033 
00071 class SGL_DLL_API sglLODStateNode : public sglGroup
00072 {
00073 public:
00075    sglLODStateNode();
00077    virtual ~sglLODStateNode();
00078 
00082    void setRangeScale(float val) { m_lod_state.setRangeScale(val); }
00083 
00087    float getRangeScale() const   { return m_lod_state.getRangeScale(); }
00088 
00092    void setRangeOffset(float val) { m_lod_state.setRangeOffset(val); }
00093 
00097    float getRangeOffset() const   { return m_lod_state.getRangeOffset(); }
00098 
00099    // see sglNode::intersect(f) for details.
00100    virtual sglBound::IntersectResultEnum intersect(
00101       sglIntersectf &isector) const;
00102 
00103    // see sglNode::intersect(d) for details.
00104    virtual sglBound::IntersectResultEnum intersect(
00105       sglIntersectd &isector) const;
00106 
00107    // see sglNode::pick(f) for details.
00108    virtual void pick(sglPickf &pick_state, unsigned int cull_flags) const;
00109 
00110    // see sglNode::pick(d) for details.
00111    virtual void pick(sglPickd &pick_state, unsigned int cull_flags) const;
00112 
00113    // See sglNode::clone() for details.
00114    virtual sglNode *clone(unsigned int mode) const;
00115 
00116    // See sglObject::printInfo() for details.
00117    virtual void printInfo(ostream &ostrm, const char *indent_string) const;
00118 
00119 protected:
00120    // See sglNode::cull(f) for details
00121    virtual void cull(sglCull<float> &trav_state,
00122                      unsigned int cull_flags) const;
00123 
00124    // See sglNode::cull(d) for details
00125    virtual void cull(sglCull<double> &trav_state,
00126                      unsigned int cull_flags) const;
00127 
00128    void copyTo(sglLODStateNode *dst, unsigned int mode) const;
00129 
00130 private: // not implemented
00131    sglLODStateNode(const sglLODStateNode &);
00132    sglLODStateNode &operator=(const sglLODStateNode &);
00133 
00134 protected:
00135    sglLODState m_lod_state;
00136 };
00137 
00138 #endif

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