Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

OSGCamera.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002  *                                OpenSG                                     *
00003  *                                                                           *
00004  *                                                                           *
00005  *             Copyright (C) 2000-2002 by the OpenSG Forum                   *
00006  *                                                                           *
00007  *                            www.opensg.org                                 *
00008  *                                                                           *
00009  *   contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de          *
00010  *                                                                           *
00011 \*---------------------------------------------------------------------------*/
00012 /*---------------------------------------------------------------------------*\
00013  *                                License                                    *
00014  *                                                                           *
00015  * This library is free software; you can redistribute it and/or modify it   *
00016  * under the terms of the GNU Library General Public License as published    *
00017  * by the Free Software Foundation, version 2.                               *
00018  *                                                                           *
00019  * This library is distributed in the hope that it will be useful, but       *
00020  * WITHOUT ANY WARRANTY; without even the implied warranty of                *
00021  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         *
00022  * Library General Public License for more details.                          *
00023  *                                                                           *
00024  * You should have received a copy of the GNU Library General Public         *
00025  * License along with this library; if not, write to the Free Software       *
00026  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                 *
00027  *                                                                           *
00028 \*---------------------------------------------------------------------------*/
00029 /*---------------------------------------------------------------------------*\
00030  *                                Changes                                    *
00031  *                                                                           *
00032  *                                                                           *
00033  *                                                                           *
00034  *                                                                           *
00035  *                                                                           *
00036  *                                                                           *
00037 \*---------------------------------------------------------------------------*/
00038 
00039 
00040 #ifndef _OSGCAMERA_H_
00041 #define _OSGCAMERA_H_
00042 #ifdef __sgi
00043 #pragma once
00044 #endif
00045 
00046 #include <OSGConfig.h>
00047 
00048 #include <OSGMatrix.h>
00049 #include <OSGFrustumVolume.h>
00050 
00051 #include <OSGCameraBase.h>
00052 
00053 OSG_BEGIN_NAMESPACE
00054 
00055 class Viewport;
00056 class DrawAction;
00057 class DrawActionBase;
00058 class FrustumVolume;
00059 class Line;
00060 
00064 class OSG_SYSTEMLIB_DLLMAPPING Camera : public CameraBase
00065 {
00066      /*==========================  PUBLIC  =================================*/
00067  public:
00068 
00069     /*---------------------------------------------------------------------*/
00073     static const char *getClassname(void) { return "Camera"; };
00074 
00076     /*---------------------------------------------------------------------*/
00080     virtual void changed(BitVector  whichField, 
00081                          UInt32     origin    );
00082 
00084     /*---------------------------------------------------------------------*/
00088     virtual void setup          (DrawActionBase *action, const Viewport& port);
00089 
00090     virtual void setupProjection(DrawActionBase *action, const Viewport& port);
00091 
00092     virtual void draw           (DrawAction     *action, const Viewport& port);
00093 
00095     /*---------------------------------------------------------------------*/
00099     virtual void getProjection           (Matrix        &result, 
00100                                           UInt32 width, UInt32 height);
00101 
00102     virtual void getProjectionTranslation(Matrix        &result, 
00103                                           UInt32 width, UInt32 height);
00104 
00105     virtual void getViewing              (Matrix        &result, 
00106                                           UInt32 width, UInt32 height);
00107 
00108     virtual void getFrustum              (FrustumVolume &result,
00109                                           const Viewport& port);
00110      
00111     virtual void getWorldToScreen        (Matrix        &result, 
00112                                           const Viewport& port);
00113 
00115     /*---------------------------------------------------------------------*/
00119     bool calcViewRay(Line & line, Int32 x, Int32 y, const Viewport& port);
00120 
00122     /*---------------------------------------------------------------------*/
00126     virtual void dump(      UInt32    uiIndent = 0, 
00127                       const BitVector bvFlags  = 0) const;
00128 
00130     /*=========================  PROTECTED  ===============================*/
00131  protected:
00132 
00133     /*---------------------------------------------------------------------*/
00137     Camera(void);
00138     Camera(const Camera &source);
00139    
00141     /*---------------------------------------------------------------------*/
00145     virtual ~Camera(void); 
00146     
00147  
00149     /*==========================  PRIVATE  ================================*/
00150  private:
00151  
00152     typedef CameraBase Inherited;
00153 
00154     friend class FieldContainer;
00155     friend class CameraBase;
00156 
00157     static void initMethod( void );
00158 
00159     void operator =(const Camera &source);
00160 };
00161 
00162 //---------------------------------------------------------------------------
00163 //   Exported Types
00164 //---------------------------------------------------------------------------
00165 
00166 typedef Camera *CameraP;
00167 
00168 OSG_END_NAMESPACE
00169 
00170 #include <OSGCameraBase.inl>
00171 #include <OSGCamera.inl>
00172 
00173 #define OSGCAMERA_HEADER_CVSID "@(#)$Id: FCTemplate_h.h,v 1.15 2002/06/01 10:37:25 vossg Exp $"
00174 
00175 #endif /* _OSGCAMERA_H_ */

Generated on Thu Aug 25 04:01:26 2005 for OpenSG by  doxygen 1.4.3