00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
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
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
00131 protected:
00132
00133
00137 Camera(void);
00138 Camera(const Camera &source);
00139
00141
00145 virtual ~Camera(void);
00146
00147
00149
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
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