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

sglViewPlatform.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: sglViewPlatform.hpp
00021  *   Author: Scott McMillan
00022  *  Created: 14 December 2000
00023  *****************************************************************************/
00024 
00025 #ifndef __SGL_VIEW_PLATFORM_HPP
00026 #define __SGL_VIEW_PLATFORM_HPP
00027 
00028 #include <sgl.h>
00029 #include <sglNode.hpp>
00030 #include <sglCamera.hpp>
00031 
00085 class SGL_DLL_API sglViewPlatform : public sglNode
00086 {
00087 public:
00091    sglViewPlatform(sglCamera &camera);
00092 
00094    virtual ~sglViewPlatform();
00095 
00102    void setEnableZUp(bool on) { m_rotx_flag = on; }
00103 
00107    bool getEnableZUp() const  { return m_rotx_flag; }
00108 
00115    void computeViewMatrix(sglMat4f &curr_mat) const;
00116 
00123    void computeViewMatrix(sglMat4d &curr_mat) const;
00124 
00128    sglCamera &getCamera() const { return *m_camera; }
00129 
00135    void setCamera(sglCamera &camera);
00136 
00137    // See sglNode::clone(..) for details.
00138    virtual sglNode *clone(unsigned int mode) const;
00139 
00140    // See sglObject::printInfo() for details.
00141    virtual void printInfo(ostream &ostrm, const char *indent_string) const;
00142 
00143 protected:
00144    void computeBound();
00145 
00146    // See sglNode::cull(f) for details
00147    virtual void cull(sglCull<float> &,  unsigned int) const {}
00148    // See sglNode::cull(d) for details
00149    virtual void cull(sglCull<double> &, unsigned int) const {}
00150 
00151    void copyTo(sglViewPlatform *dst, unsigned int mode) const;
00152 
00153 private:   // not implemented
00154    sglViewPlatform();
00155    sglViewPlatform(const sglViewPlatform &);
00156    sglViewPlatform &operator=(const sglViewPlatform &);
00157 
00158 private:
00159    bool m_rotx_flag;
00160    sglCamera *m_camera;
00161 };
00162 
00163 #endif

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